Autostarting applications with .xinitrc

There is certainly a number of ways to autostart applications. As it happens every window manager has its own way of doing autostarting and at some point you might get a bit confused about where exactly you should put your autostart entries. To overcome the problems of autostarting you can use a file called .xinitrc .

What is .xinitrc?

.xinitrc is a hidden file located inside your home directory which tells your system what programs should always autostart no matter what the window manager is. It is a really good way of autostarting things especially if you are like me: a person who is always experimenting with his Linux box. Below you can see an example of my .xinitrc file to get you started

#Start programs

/usr/bin/pulseaudio &
setxkbmap fi &
#volumeicon &
guake &
#conky -c .box &
#xcompmgr -c &

#Start wm
exec awesome

The lines marked with # in the beginning are comments. They are not being used once programs are starting up. You should also always but the mark & in the end of an application because otherwise you may experience some problems You can also see that I have an entry marked as #start wm this is because I use a display manager called Slim. Slim is a great program if you want a small and lightweight dm without so much program dependencies. I will be making my next post from Slim which will most likely come out on Monday so for the time being you should keep in mind that if you are using Slim  with your Linux you should add your session entry there like I did with exec awesome.

Final note:; In order to use .xinitrc you will need to make it executable either by using GUI and changing file properties or by executing a simple command inside terminal like this: chmod +x insert_file_location_and_name_here