You are not logged in.

#1 2009-11-03 00:16:49

agnes
Member
Registered: 2009-11-03
Posts: 1

startx only works for "sudo <normal user> startx"

Hello everyone,

I recently installed Archlinux. When I boot I get a login prompt. I've installed xfce.
Now when I login as root and type "startx" I get a very basic window system (not xfce), with 3 terminals open.
When I login as a normal user and type "startx" I get nothing (black screen).
However when I login as a normal user and type "sudo startx" xfce actually starts.

Why could that be?

Offline

#2 2009-11-03 00:38:14

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: startx only works for "sudo <normal user> startx"

It could be that you configured just the root account and not your user account.
Try copying /home/root/.xinitrc to /home/<user>/

Edit: sorry, it won't work. I didn't pay attention to this: "when I login as root and type "startx" I get a very basic window system"

Last edited by SoleSoul (2009-11-03 00:39:55)

Offline

#3 2009-11-03 05:07:07

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: startx only works for "sudo <normal user> startx"

The "very basic window system" your getting as root is the default X window manager (I forget what its called since both of my arch installs are botched ATM and im in windows) which is usually used as a test to see if you installed the X server correctly. You can change it to whatever you want you just have to edit the .xinitrc file and uncomment the line that you want to use and comment out the one that is currently in use. There is a way to set the system wide display manager but I forget where the file is located, I want to say its /etc/.xintrc but dont hold me to it.

As for your other problem the only thing that I can think of is that the .xinitrc in your home directory doesnt have the correct permissions (ex. owned by root instead of your normal user) so it fails when trying to launch it as your normal user but using sudo effectively executes it as root so it thinks all is well. You can check the permissions by executing this as your normal user: ls -la ~/|grep .xinitrc

the output should look something like this: rwxrwxrwx [username] [groupname] [file]

To change this you can run either of these from the command line:
sudo chmod 777 ~/.xinitrc
or
sudo chown [your user name]:[your group name, usually the same as your username] ~/.xinitrc

the syntax of the second command might be wrong I always get it confused, if it doesnt work switch the places of [user]:[group] and ~/.xinitrc

the first command just allows everyone to read,write and execute the file while the second command actually changes the owner and group to your own which is more secure if more than one user is using your computer.

Offline

#4 2009-11-04 11:16:22

iway
Member
Registered: 2009-08-16
Posts: 2

Re: startx only works for "sudo <normal user> startx"

Hi agnes!
Check the Slim page in the Wiki, there is all you need to know how to start xfce whits the Loginmanager Slim.
Hope it helps!

Offline

#5 2009-11-04 12:09:30

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: startx only works for "sudo <normal user> startx"

Try "startxfce4" as user. If it works, edit your ~/.xinitrc or if you don't have one copy it from /etc/skel/.xinitrc.

Offline

Board footer

Powered by FluxBB