Ask Your Question

$HOME/.xsession file is not executed.

asked 2012-03-08 03:10:50 -0500

Sardathrion gravatar image

I want to set up a few things via the xsession file on Fedora 16. However, the file is not read when I start a session (via the login screen and fvwm). None of the commands in the ~/.xsession are executed. ~/.xsession-errors has nothing as to indicate why this happens.

What am I doing wrong?

; ls -l ~/.xsession
4.0K -rwxrwxr-x. 1 usr grp 720 Mar  7 15:44 /home/usr/.xsession*

; cat ~/.xsession

# Screen size -- *sigh* xorg does not do the right thing. 
xrandr --newmode 1600x1200 $(gtf 1600 1200 60 | grep Mode | read a b c; echo $c)
xrandr --addmode DVI-I-1 1600x1200 
xrandr --addmode DVI-I-2 1600x1200 
xrandr --output DVI-I-1 --mode 1600x1200                                   
xrandr --output DVI-I-2 --mode 1600x1200 --right-of DVI-I-1   

# xset and xmodmap.
xset s default
xset s on
xset s 3700
xset b off

# Key binding the old way.
xmodmap -e 'keycode 133 = XF86Launch1'
xmodmap -e 'keycode 108 = XF86Launch2'

# Shell 
/usr/bin/urxvt &
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-11-15 04:31:19 -0500

Jos de Kloe gravatar image

updated 2012-11-15 04:33:17 -0500

On recent Fedora versions you need to install xorg-x11-xinit-session first, before this will work. Make sure you also add the line "exec fvwm" to the .xsession file to fire up fvwm. Then choose "User script" as session type in the login screen, and this should allow you to use your custom .xsession file.

edit flag offensive delete link more

answered 2017-05-28 22:09:49 -0500

worley gravatar image

In Fedora 25, this works for me: ~/.xsession can be used by a special login: After selecting user, there is a gear icon. Click on the gear and select "GNOME Classic". That causes Gnome to run /etc/X11/xinit/Xsession upon login, which runs ~/.xsession. This action seems to be sticky, in that if I log out and then later select the same use to log in, clicking on the gear will show "GNOME Classic" as selected, and ~/.xsession will be run.

edit flag offensive delete link more

answered 2012-03-08 06:47:17 -0500

FranciscoD_ gravatar image

Take a look at this page:

Source: Google.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-03-08 03:10:50 -0500

Seen: 4,283 times

Last updated: Nov 15 '12