Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xprofile vs xsession vs xinitrc [closed]

Tags:

linux

x11

I'm using Debian + i3 + lightdm. Applications which I would like to start after my user has logged - I place them in user systemd units or in .config/i3/config exec sections. Systemd usually requires some modification to have DISPLAY and XAuthority set for GUI to works. And even then some of them doesn't work.

I've heard about above configuration files, but I'm lost which one when is executed. Lets assume given sequence: Lightdm (through Lightdm-greeter) starts i3 session. Where should I place start of my applications?

like image 901
T4ng10r Avatar asked Dec 30 '16 13:12

T4ng10r


People also ask

What is Xprofile file?

An xprofile file, ~/. xprofile and /etc/xprofile , allows you to execute commands at the beginning of the X user session - before the window manager is started. The xprofile file is similar in style to xinitrc.

What is Xsessionrc?

xsessionrc is for holding global environment variables. The emphasis is mine. Secondly: 40x11-common_xsessionrc in /etc/X11/Xsession. d is sourced before 50x11-common_determine-startup . So .


1 Answers

.xinitrc is run by xinit (and therefore also startx). In addition to configuration, it is also responsible for starting the root X program (usually a window manager such as Gnome, KDE, i3, etc.). This usually applies when X is started manually by the user (with startx or similar).

.xsession is similar to .xinitrc but is used by display managers (such as lightdm, or sddm) when a user logs in. However, with modern DMs the user can usually choose a window manager to start, and the DM may or may not run the .xsession file.

.xprofile is just for setting up the environment when logging in with an X session (usually via a display manager). It is similar to your .profile file, but specific to x sessions.

like image 88
Thayne Avatar answered Sep 28 '22 13:09

Thayne