User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

sudo su startx (pi account issue)

Sun Apr 17, 2016 9:23 pm

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?
Last edited by Rive on Sun Apr 17, 2016 9:34 pm, edited 2 times in total.
DNPNWO

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: sudo su startx (pi account issue)

Sun Apr 17, 2016 9:28 pm

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
There are 10 types of people: those who understand binary and those who don't.

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: sudo su startx (pi account issue)

Sun Apr 17, 2016 9:29 pm

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.
Last edited by Rive on Sun Apr 17, 2016 9:35 pm, edited 1 time in total.
DNPNWO

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: sudo su startx (pi account issue)

Sun Apr 17, 2016 9:34 pm

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:

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: sudo su startx (pi account issue)

Sun Apr 17, 2016 9:36 pm

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
DNPNWO

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: sudo su startx (pi account issue)

Sun Apr 17, 2016 11:56 pm

DirkS wrote: Did you try

Code: Select all

gksu pcmanfm
?

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

Return to “Troubleshooting”