Re: os.getlogin() Error

2017-05-06 Thread Wildman via Python-list
On Fri, 05 May 2017 11:30:41 -0700, 20/20 Lab wrote: > I'm not sure if this will help you, but I found some stuff on accident > looking at something related. > > Not sure if it will help, but looked promising > > https://github.com/parmentelat/apssh/issues/1 > > ==Some snippets from the page >

Re: os.getlogin() Error

2017-05-05 Thread 20/20 Lab
I'm not sure if this will help you, but I found some stuff on accident looking at something related. Not sure if it will help, but looked promising https://github.com/parmentelat/apssh/issues/1 ==Some snippets from the page From the os.getlogin() docs: "Returns the user logged in to the cont

Re: os.getlogin() Error

2017-05-05 Thread Cameron Simpson
On 04May2017 21:05, Wildman wrote: On Fri, 05 May 2017 09:58:02 +1000, Chris Angelico wrote: On Fri, May 5, 2017 at 9:50 AM, Wildman via Python-list wrote: I'm afraid that won't work. The user environment is different than root. A different set of variables. However you have given me a pos

Re: os.getlogin() Error

2017-05-04 Thread Cameron Simpson
On 04May2017 20:42, Wildman wrote: On Fri, 05 May 2017 09:00:58 +1000, Cameron Simpson wrote: On 04May2017 15:03, Wildman wrote: The program installs using the Debian package system (.deb) and an entry is created in the Applications Menu. The strange thing is that the crash only occurs when

Re: os.getlogin() Error

2017-05-04 Thread Chris Angelico
On Fri, May 5, 2017 at 12:05 PM, Wildman via Python-list wrote: > On Fri, 05 May 2017 09:58:02 +1000, Chris Angelico wrote: > >> On Fri, May 5, 2017 at 9:50 AM, Wildman via Python-list >> wrote: >>> I'm afraid that won't work. The user environment is different >>> than root. A different set of

Re: os.getlogin() Error

2017-05-04 Thread Wildman via Python-list
On Fri, 05 May 2017 09:58:02 +1000, Chris Angelico wrote: > On Fri, May 5, 2017 at 9:50 AM, Wildman via Python-list > wrote: >> I'm afraid that won't work. The user environment is different >> than root. A different set of variables. However you have >> given me a possible workaround. You can

Re: os.getlogin() Error

2017-05-04 Thread Wildman via Python-list
On Fri, 05 May 2017 09:00:58 +1000, Cameron Simpson wrote: > On 04May2017 15:03, Wildman wrote: > >>The program installs using the Debian package system (.deb) and an >>entry is created in the Applications Menu. The strange thing is >>that the crash only occurs when the program is run from the

Re: os.getlogin() Error

2017-05-04 Thread Chris Angelico
On Fri, May 5, 2017 at 9:50 AM, Wildman via Python-list wrote: > I'm afraid that won't work. The user environment is different > than root. A different set of variables. However you have > given me a possible workaround. You can't create a variable > for root unless you are root so that approa

Re: os.getlogin() Error

2017-05-04 Thread Wildman via Python-list
On Fri, 05 May 2017 08:31:15 +1000, Chris Angelico wrote: > On Fri, May 5, 2017 at 8:18 AM, Wildman via Python-list > wrote: >> I am using pkexec to restart so $SUDO_USER is not set. For some >> reason sudo, su and su-to-root will freeze the first instance of >> the program and not let it close

Re: os.getlogin() Error

2017-05-04 Thread Cameron Simpson
On 04May2017 15:03, Wildman wrote: I tried testing on Mint and Ubuntu and the program would crash. The GUI would appear briefly and disappear. On Ubuntu a crash report was created so I was able to figure out what was going on. It had the traceback and showed that os.getlogin threw an error.

Re: os.getlogin() Error

2017-05-04 Thread Chris Angelico
On Fri, May 5, 2017 at 8:18 AM, Wildman via Python-list wrote: > I am using pkexec to restart so $SUDO_USER is not set. For some > reason sudo, su and su-to-root will freeze the first instance of > the program and not let it close until the second instance closes. > I have tried every method I ca

Re: os.getlogin() Error

2017-05-04 Thread Wildman via Python-list
On Fri, 05 May 2017 07:46:32 +1000, Chris Angelico wrote: > On Fri, May 5, 2017 at 6:03 AM, Wildman via Python-list > wrote: >> I will try to explain... >> The program reports system information based on the user's name. >> Things such as passwd, groups and shadow info. However, the >> program m

Re: os.getlogin() Error

2017-05-04 Thread Chris Angelico
On Fri, May 5, 2017 at 6:03 AM, Wildman via Python-list wrote: > I will try to explain... > The program reports system information based on the user's name. > Things such as passwd, groups and shadow info. However, the > program must have elevated privileges to get the shadow info so > the progra

os.getlogin() Error

2017-05-04 Thread Wildman via Python-list
I wrote a Linux only GUI program using Tk that reports various system information using a tabbed Notebook. I have tested the program on Debian, SoldyX and MX-15 and the program runs perfectly. I tried testing on Mint and Ubuntu and the program would crash. The GUI would appear briefly and disapp