Automatically Starting X11 applications


New member
Can anyone recommend a good way to autostart an X11 application on bootup? I've tried using ~/.xsession /etc/X11/Xsession.d ~/.config/Autostart and ~/.matchbox/session and none of them start up my application. It works fine when I start it manually.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.

CF Tech

The guy who is super familiar with that is on holiday.

I will ask him to look into it when he gets back.

CF Support

There are a few things you can try...

Have a look at /etc/matchbox/session. That file is exec'd by xinit from /etc/X11/Xserver (link to a script at /home/root/ which runs /usr/bin/matchbox-session (another script). Now as /etc/X11/Xserver is run from an init script during start up, $HOME may not be set and ~/.matchbox/session will not be run.

Additionally the /home/root/.matchbox/mbdock.session script is run as part of the window manager's dock start up.

One of these files should take of your needs using the current system. (If you have modified your system to use a login manager then $HOME/.matchbox/session should work as that will set $HOME.)


New member
I copied /etc/matchbox/session to /home/root/.matchbox/session and modified it to run my application and it works! :D

I think the problem I was having before was that if /home/root/.matchbox/session exists /etc/matchbox/session never runs. By copying it everything works.