LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



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

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

fi


Thanks for your help
 
Old 06-05-2012, 10:16 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

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 10:17 PM.
 
  


Reply


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 11:10 PM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 Suse/Novell 1 05-03-2010 07:17 AM
Shell script adding autostart gnome script Coolrunr Programming 3 01-01-2009 03:23 PM
Autostart program Mithrilhall Linux - Newbie 3 08-29-2008 11:49 AM
Gnome/KDE Desktop Folder & Gnome Autostart ihatethedekoys Linux - General 1 08-07-2006 12:16 PM


All times are GMT -5. The time now is 11:21 PM.

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