3

So I installed and am properly using xbindkeys. The problem is that I must manually start this process each time I start my system. I read more into the wiki and found there is a method one can exploit to auto-start this process - editing ~/.xinitrc. So, I went into that directory and did not find such a file. I then jumped over to the xinitrc wiki to read more about this file.

Apparently, this file apparently is a script read by the startx/xinit program that is ran to start basic working environment - or a desktop environment if installed and explicitely coded in the script. From this wiki page it reads that:

In the absence of ~/.xinitrc, startx/xinit defaults to parsing the global file /etc/X11/xinit/xinitrc, which starts a basic environment with the Twm window manager, Xclock and Xterm.

It seems confusing considering that I have cinnamon installed as my default desktop environment which is started each time I login - but apparently without the use of .xinitrc to dictate that. Unless my display manager is starting cinnamon behind-the-scenes I am not quite sure how this is all working.

The point: The reason I bring all that up is because the second link above (method) requires that I edit a file that does not exist, yet the same file is said to be required by the last link (this wiki) since my desktop, non-basic, is started on log-in. What is happening here?

sherrellbc
  • 839
  • 5
  • 17
  • 31

1 Answers1

5

startx and ~/.xinitrc isn't the only method of starting an X11 environment. Most desktop environments come with a "display manager" daemon which automatically starts Xorg on all available monitors, and shows a graphical login screen.

While some display managers do try to run ~/.xinitrc themselves, most DMs take the list of available "sessions" from /usr/share/xsessions/*.desktop.

As for the other question – starting programs when the desktop environment starts – there usualy are two methods, as in my earlier post:

  • According to the XDG Autostart specification, the desktop environment's "session manager" (e.g. cinnamon-session) will read the programs from ~/.config/autostart/*.desktop. You can manage them using cinnamon-session-properties.

  • Some display managers will read the ~/.xprofile script, which works similarly to ~/.xinitrc but without starting a window manager (as that's already done by the session manager).

grawity
  • 501,077