LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   how to start x as user and not root? (https://www.linuxquestions.org/questions/fedora-35/how-to-start-x-as-user-and-not-root-335683/)

SharpyWarpy 06-21-2005 04:57 AM

how to start x as user and not root?
 
How can I start x as myself and not as root? It always starts with root. I can't seem to find a config file to edit to change this. I boot into console mode logged in as myself and start x with "startx". Thanks.

Bruce Hill 06-21-2005 05:05 AM

If you boot to console as a normal user, then startx should start
the X server as that user. Is your prompt in console a $ or # ?
Did you create a normal user? And why do you think it starts X
as root and not user?

Hope I read your post right...

SharpyWarpy 06-21-2005 05:15 AM

Quote:

Originally posted by Chinaman
If you boot to console as a normal user, then startx should start
the X server as that user. Is your prompt in console a $ or # ?
Did you create a normal user? And why do you think it starts X
as root and not user?

Hope I read your post right...

I have a # in console mode. Acutually, no I didn't create a normal user, I cheated and did like I do with Mandrake and edited the /etc/shadow and /etc/passwd files so I have the same priviledges as root so I don't have to log myself in as root to have these priviledges. Also, I use "Autologin" from the Mandrake distribution.
X starts as root because when I open a terminal it shows root in the root directory.

Bruce Hill 06-21-2005 05:52 AM

There's the problem. If you didn't create a normal user account,
it is impossible to login as user. There is a difference between a
user and myself, which is just a name you gave to root. If you're
open to learning some more about Linux, here are some links:

http://www.icon.co.za/~psheer/book/node14.html.gz

http://en.tldp.org/HOWTO/Unix-and-In...ml#permissions

If you want to run your computer as root, that's your choice. I
suppose the same type person would prefer to drive their car
without seatbelts or doors.

The way to start X as user and not root:
Boot to root, type "adduser <username>", answer the questions,
exit from root to user, type "startx" and hit Enter key (not to be
confused with the Any Key)

SharpyWarpy 06-22-2005 05:57 AM

Odd, KDE and IceWM start fine with me as user, in my home directory. My problem lies with Gnome. Maybe there's a Gnome configuration file I can edit...

kurtdriver 06-22-2005 04:17 PM

gnome
 
Have you set gnome as your default desktop? The way to do so is (as your non-priveledged self, not as root) type <i>switchdesk-gnome</i> to set kde as the default desktop, <i>switchdesk-kde</i> (no spaces). You should be able to boot directly to the GUI, if that is you desire. To do so become root and type <i>init 5</i> . BTW, running X programs as root is considered a security lapse, remember, those programs run with the permissions of their user. NEVER do ordinary tasks as root. Looking at the internet, reading mail and playing freecell should be done only as a non-priveledged user. Happy computing , Kurt


All times are GMT -5. The time now is 02:07 AM.