Page 1 of 1

sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 9:23 pm
by Rive
I have a problem. Simply put, I need to access a root folder in /usr/shared/ and modify contents of said folder.

I used this to gain root user access to the GUI.

Code: Select all

sudo su
startx

Fine. Works, make my changes...

Code: Select all

exit
Then reboot.

Login screen no longer accepts:
Pi user
Pi password

My understand is that .xauthority is now owned by root, and pi can no longer log in.

My understanding is that if I use a terminal (cntrl +alt+f1-f7), type pi user, pi password, then;

Code: Select all

 mv .Xauthority .Xauthority.bak 
exit
Login screen will now work for pi, but that my custom pi settings may be wiped?

I went and restored backup image, so now I get a 'do over'.

So how do I do this now? Login as root in GUI make my changes to /usr/shared/ via file manager, exit root, and still have pi user work properly?

Re: sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 9:28 pm
by kusti8
DON'T RUN X AS ROOT!!!
Simply put, edit whatever file you want in the terminal or start Leafpad and the file manager with gksudo

Re: sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 9:29 pm
by Rive
kusti8 wrote:DON'T RUN X AS ROOT!!!
Simply put, edit whatever file you want in the terminal or start Leafpad and the file manager with gksudo
Already tried that (gksudo in file manger) permissions still denied for changes to file (I am not editing text here) I am trying to remove contents ((I am modifying .png image files) of a root folder and move contents from a pi folder to a /usr/shared/ root folder using file manager.

I don't want to use terminal commands to move items I want to use file manager.

Re: sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 9:34 pm
by DirkS
Rive wrote:
kusti8 wrote:DON'T RUN X AS ROOT!!!
Simply put, edit whatever file you want in the terminal or start Leafpad and the file manager with gksudo
Already tried that (gksudo) permissions still denied for changes to file (I am not editing text here) I am trying to remove contents of a folder and move contents from a pi folder to a /usr/shared/ folder.

I don't want to use terminal commands to move items
Did you try

Code: Select all

gksu pcmanfm
?

Using the command line is a lot easier :shock:

Re: sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 9:36 pm
by Rive
DirkS wrote:
Rive wrote:
kusti8 wrote:DON'T RUN X AS ROOT!!!
Simply put, edit whatever file you want in the terminal or start Leafpad and the file manager with gksudo
Already tried that (gksudo) permissions still denied for changes to file (I am not editing text here) I am trying to remove contents of a folder and move contents from a pi folder to a /usr/shared/ folder.

I don't want to use terminal commands to move items
Did you try

Code: Select all

gksu pcmanfm
?

Using the command line is a lot easier :shock:
I'll try that

Re: sudo su startx (pi account issue)

Posted: Sun Apr 17, 2016 11:56 pm
by Rive
DirkS wrote: Did you try

Code: Select all

gksu pcmanfm
?

Using the command line is a lot easier :shock:
Worked like a charm. Thanks