You are not logged in.

#1 2016-07-13 13:00:14

radiopayola
Member
Registered: 2016-07-13
Posts: 5

[SOLVED] .xinitrc won't execute as 744

I just finished configuring xfce with xdm, and everything from the wiki worked great except for the 744 permissions specified in the xdm wiki:

Defining the session
Unlike many more modern display managers such as GDM or LightDM, XDM does not source available sessions from .desktop files located in the /usr/share/xsessions directory. As such, XDM does not have a 'session menu.' Instead, XDM will execute the .xinitrc file in the home directory. See Xinitrc#Configuration for details.
Ensure that the .xinitrc file in your home directory is executable. To do this use the following command:

$ chmod 744 ~/.xinitrc

Setting the permissions to 744 seems to allow read/write/execute for just the owner and read only for everyone else.  This resulted in an endless login loop which, I assume, cropped up because .xinitrc couldn't be executed.  To work around this issue, I ran chmod +x.  So, I guess this allows everyone to execute, and everything worked fine after this change.

This makes me think I should have been configuring X as root instead of while logged in as another user.  Can someone help me understand why this happened?

Last edited by radiopayola (2016-07-13 17:53:27)

Offline

#2 2016-07-13 14:20:33

alive4ever
Member
Registered: 2016-07-10
Posts: 65

Re: [SOLVED] .xinitrc won't execute as 744

A file permission of 744 is rather weird. With default umask (022), the file permission should be 644 for ordinary files and 755 for directories and executable files.
My .xinitrc is 644 (u=rw,go=r), because it inherits umask value of 022 and I am able to launch 'startx' from virtual console.

I need to give myself execute permission to .xinitrc to allow XDM starting X session for me. So the best file permission for ~/.xinitrc would be 700 (u=rwx), since XDM launched .xinitrc directly as logged in user without startx help.

Last edited by alive4ever (2016-07-13 14:38:34)

Offline

#3 2016-07-13 17:50:55

radiopayola
Member
Registered: 2016-07-13
Posts: 5

Re: [SOLVED] .xinitrc won't execute as 744

Thanks for the detailed response...  This got me thinking about who the actual owner of ~/.xinitrc was, and it turned out to be root because I copied the file while I was running su.  My excuse for this is because I'm accustomed to running things with sudo, but I hadn't configured it yet.  Also, I'm a total newb.

Anyways, I created a copy of .xinitrc with my normal user account and changed the permissions to 744 like the wiki suggests.  Worked great.  I'll probably take your advice and cut it back to 700 since there's no benefit to me of allowing other users to read the file.  On the flip side, I wonder why I wouldn't want to allow other users to read that file.  Better safe than sorry, I guess...

I'm marking this one [solved].  Thanks again.

Offline

Board footer

Powered by FluxBB