Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 06-05-2012, 05:20 PM   #1
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
autostart program in gnome with script

I have a autostart file in ~/.config/autostart, I only want the program to start if I am using a gnome session. How should I write this?

if $SESSION="gnome-session"

startup program


Thanks for your help
Old 06-05-2012, 09:16 PM   #2
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Jessie
Posts: 592

Rep: Reputation: 119Reputation: 119
At least for GNOME2, there is no need to manually place a script in ~/.config/autostart. Any file in the ~/.config/autostart directory automatically runs after you login to a GNOME session.

Create your script and add it to your Startup Programs under System > Preferences > Startup Programs.

I don't use GNOME3 so I can't say if this has changed.

Hope this helps.

Last edited by towheedm; 06-05-2012 at 09:17 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
autostart any program with linux mit 11 (gnome)? - *solved* dieter.b Linux Mint 5 09-25-2011 10:10 PM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
Shell script adding autostart gnome script Coolrunr Programming 3 01-01-2009 02:23 PM
Autostart program Mithrilhall Linux - Newbie 3 08-29-2008 10:49 AM
Gnome/KDE Desktop Folder & Gnome Autostart ihatethedekoys Linux - General 1 08-07-2006 11:16 AM

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration