Overclockers Australia Forums

OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Software Topics > Other Operating Systems

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 19th August 2012, 10:24 AM   #1
papelboyl1 Thread Starter
(Banned or Deleted)
 
Join Date: Jan 2012
Location: southern Adelaide 5163
Posts: 137
Default How do I automatically start a program after X/gnome starts in FreeBSD?

As title. I searched but found nothing. Thanks
papelboyl1 is offline   Reply With Quote

Join OCAU to remove this ad!
Old 19th August 2012, 10:43 AM   #2
BAK
Member
 
BAK's Avatar
 
Join Date: Jan 2005
Location: Melbourne
Posts: 328
Default

Out of interest, what program are you trying to start?
__________________
NeOnServ 2.0: Ubuntu 12.04LTS | Q6600 | 8gb | G/A 8EP35-DS3P | AOC-USAS-L8i | 15x 2tb Samsung HD204UI (ZFS Raid-Z2) | CMStacker 810
BAK is offline   Reply With Quote
Old 19th August 2012, 10:49 AM   #3
papelboyl1 Thread Starter
(Banned or Deleted)
 
Join Date: Jan 2012
Location: southern Adelaide 5163
Posts: 137
Default

Quote:
Originally Posted by BAK View Post
Out of interest, what program are you trying to start?
Not sure but as an example, let's say I wanna start the text editor app that comes with gnome. I believe this is gedit?
papelboyl1 is offline   Reply With Quote
Old 19th August 2012, 10:53 AM   #4
BAK
Member
 
BAK's Avatar
 
Join Date: Jan 2005
Location: Melbourne
Posts: 328
Default

Quote:
Originally Posted by papelboyl1 View Post
Not sure but as an example, let's say I wanna start the text editor app that comes with gnome. I believe this is gedit?
Why? If you're starting something that's a background service then it's different - but why would you want to start a text editor every time you load X? (Or any other productivity type GUI program..)
__________________
NeOnServ 2.0: Ubuntu 12.04LTS | Q6600 | 8gb | G/A 8EP35-DS3P | AOC-USAS-L8i | 15x 2tb Samsung HD204UI (ZFS Raid-Z2) | CMStacker 810
BAK is offline   Reply With Quote
Old 19th August 2012, 11:26 AM   #5
papelboyl1 Thread Starter
(Banned or Deleted)
 
Join Date: Jan 2012
Location: southern Adelaide 5163
Posts: 137
Default

Quote:
Originally Posted by BAK View Post
Why? If you're starting something that's a background service then it's different - but why would you want to start a text editor every time you load X? (Or any other productivity type GUI program..)
I know how to create rc.d scripts for daemons but not sure how it works for gui apps.

and as for why, because I want to/for my own knowledge.
papelboyl1 is offline   Reply With Quote
Old 19th August 2012, 6:32 PM   #6
f3n1x
Member
 
f3n1x's Avatar
 
Join Date: Mar 2003
Location: Armadale, Melbourne
Posts: 1,653
Default

It depends, what display manager are you running?

Do you want it system wide or just per user.

if you want to do it system wide there's a directory called /etc/X11/Xsession.d, if you place a symbolic link to the program you want to execute, it will do so once a user is logged in.

If it's per user you want, the file ~/Xsession is what you're looking for.

Here's an example ~/Xsession:

Code:
#!/bin/sh
xmms &
xterm &
So as you can see its just a plain bash script.
__________________
f3n.org|systems admin, graphics & foss software

Canon Eos 40D. Canon 50mm f1.8. Tamron SP AF28-75mm F/2.8 XR Di LD Aspherical (IF). Sigma EF 500 DG Super ETTL Flash(Broken! :/)
f3n1x is offline   Reply With Quote
Old 19th August 2012, 7:27 PM   #7
elvis
Member
 
elvis's Avatar
 
Join Date: Jun 2001
Location: Brisbane
Posts: 19,937
Default

What version of GNOME are you running?
__________________
Child's Play Charity
elvis is offline   Reply With Quote
Old 20th August 2012, 12:16 AM   #8
papelboyl1 Thread Starter
(Banned or Deleted)
 
Join Date: Jan 2012
Location: southern Adelaide 5163
Posts: 137
Default

Gnome 2.32.x

I'll try the suggestion fenix
papelboyl1 is offline   Reply With Quote
Old 20th August 2012, 12:44 AM   #9
Smakked
Member
 
Smakked's Avatar
 
Join Date: Nov 2007
Location: Goldcoast
Posts: 2,050
Default

Under preferences check for sessions and you can add it in there

http://www.ghacks.net/2009/04/08/add...mes-autostart/
Smakked is offline   Reply With Quote
Old 21st August 2012, 9:15 AM   #10
elvis
Member
 
elvis's Avatar
 
Join Date: Jun 2001
Location: Brisbane
Posts: 19,937
Default

Quote:
Originally Posted by Smakked View Post
Under preferences check for sessions and you can add it in there

http://www.ghacks.net/2009/04/08/add...mes-autostart/
Yup, this is the way I'd do it, specific to GNOME 2 (and/or MATE-Desktop).
__________________
Child's Play Charity
elvis is offline   Reply With Quote
Old 21st August 2012, 3:10 PM   #11
papelboyl1 Thread Starter
(Banned or Deleted)
 
Join Date: Jan 2012
Location: southern Adelaide 5163
Posts: 137
Default

thanks everyone. I tried the gnome2 autostart and works as intended.
papelboyl1 is offline   Reply With Quote
Old 21st August 2012, 4:16 PM   #12
tr3nton
Member
 
Join Date: Oct 2009
Posts: 1,193
Default

See also, http://standards.freedesktop.org/aut...ec-latest.html
__________________
Microsoft gives you windows, linux gives you the whole house
tr3nton is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

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 On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 5:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. -
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!