# How to start applications such as xcompmgr at start up? [duplicate]

I've been trying to make xcompmgrto autostart in Lubuntu 11.10 but it just doesn't, I have to start it manually.

I have added the next lines to the autostart script in ~/.config/openbox/

#Run a composite manager
xcompmgr &


But whenever I log in it doesn't do anything, I don't really need any special parameters for it I just want it to start at log in.

How can I make it run automatically at login?

-

## marked as duplicate by Seth♦May 9 '14 at 19:09

Other instructions in that autostart script get executed? –  enzotib Nov 13 '11 at 22:45
That's the only thing there. –  Uri Herrera Nov 14 '11 at 3:42
I would add some other line, like for example sleep 100000 &, and see if it appear in ps output, just to be sure the whole script get executed. –  enzotib Nov 14 '11 at 6:49
no, just syntax error of the .desktop files. However, openbox sometimes crashes and tells me to include ~/.config/autostart in the bug report. –  melvincv Jul 6 '12 at 13:04

First create the autostart folder if it doesnt already exist:

mkdir -p ~/.config/autostart


Then create a xcompmgr desktop file

lxshortcut -o ~/.config/autostart/xcompmgr.desktop


N.B. this picture shows what the xcompmgr.desktop file contains as well how to confirm xcompmgr is running.

-
This would work for any other software i want to autostart right? –  Uri Herrera Nov 18 '11 at 6:24
correct - its a generic method to autostart any application on login. –  fossfreedom Nov 18 '11 at 10:26
Thank you very very much <3. –  Uri Herrera Nov 18 '11 at 17:12

Yes "xcompmgr" alone does nothing. You need to tell it what kind of effects you want, which is what all gibberish at the end of the command is for.

Also you must add the "&" in the end of the command to start xcompmgr in the background. Without that your startup script starts xcompmgr and then waits until it finishes (which it will never do) before continuing with your startup script.

Mine is: xcompmgr -cfF -t-9 -l-11 -r9 -o.95 -D6 &

edit: Here's an explanation for the options I'm using:

"-cfF" "c" is for soft shadows and transparency support, "f" for fade in & fade out when creating and closing windows, and "F" for fade when changing a window's transparency.

"-t-9 -l-11" shadows are offset 9 pixels from top of the window and 11 pixels from the left edge

"-o.95" shadow opacity is set to 0,95

"-D6" the time between each step when fading windows is set to 6 milliseconds.

"&" isn't actually xcompmgr's option, it's a built-in function in the shell itself, sending the command to run in the background.

-

Just in case the dropbox link is not available:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=xcompmgr
Name[en_US]=xcompmgr
Exec=xcompmgr
Comment[en_US]=
StartupNotify=true


Save, restart your system and you should be compositing.

There'a also a lighter compositor: http://lubuntublog.blogspot.com.es/p/compton.html

Cheers, Iberê

-