Gnome Shell Script – Running Shell Script After Session Starts

desktop-environmentgnome-shellgnome3

I'm a long time KDE user, never seen GNOME since may be Mandrake Linux 10 something. Yesterday I took a look at GNOME Shell on Youtube and thought it may worth a look.

It actually is worth, but I can't figure out one moment.

I've got a shell script that used to run on my KDE Laptop installations for ages:

synclient |grep -E 'TapT|RightB|EdgeScr'|awk '{print $1}'|while read item; do synclient $item=0; done
synclient VertScrollDelta=-111
synclient HorizScrollDelta=1
synclient RightEdge=999999999
synclient TopEdge=0
synclient CircularScrolling=0
synclient BottomEdge=999999999
synclient RightButtonAreaLeft=9999999
synclient ClickFinger3=2
synclient HorizScrollDelta=0
synclient HorizTwoFingerScroll=0 

This disables right-click, all taps, inverts scroll directions, disables horizontal scrolling and stuff. Touchpad menu nor in KDE neither in gnome doesn't allow this kind of configuration. (TBH, only Mac of all the operating systems has the gui to set up touchpad exactly like that :)).

I can't figure out, how do I run this after gnome shell session starts?
I've already tried this with no results:

[1] % cat /home/neko/.config/autostart/script.desktop 
[Desktop Entry]
Name="Auto stuff"
GenericName="Auto startup stuff"
Comment="Synclient mostly"
Exec=/home/neko/bin/auto_stuff.sh
Terminal=false
Type=Application
X-Gnome-Autostart=true

Any other suggestions,please?
Thank you.

Best Answer

You can use the program gnome-session-properties. Just execute it from your shell prompt (gnome-terminal):

$ gnome-session-properties

This will open a GUI where you can configure (i.e., add, edit, remove, enable and disable) startup programs.

Nice and easy. Enjoy.

Update: As noted by don_crissti (thanks) in the comments below, the gnome-session-properties startup programs functionality has migrated to gnome-tweak-tool since Gnome 3.12 (which btw is a great tool, but a little messier as it concentrates just too many functions). So, for versions 3.12 and above, this is the new place to look.

OBS: And btw, using this method, you don't need to create a .desktop file, you can simply specify the command line of the /home/neko/bin/auto_stuff.sh script you created (or any other script or command you want).