LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 06-30-2006, 09:17 PM   #1
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 745

Rep: Reputation: 81
How can I start a program when gnome loads w/out editing .xinitrc for all users?


Hello.

I'm trying to set up an OEM installation of Ubuntu Dapper (using the "alternate" CD), and I've run into a problem. I want to start glipper (an enhanced gnome clipboard) each time gnome starts up, for every user that is created. Since this is an OEM installation (I'm not actually creating the user accounts), it's not possible to go around editing every user's ~/.xinitrc and adding "exec glipper &" (or something like that) to them.

How can I set it up as a global setting (i.e. for all users) so that glipper will start automatically no matter who logs in, or what users are created? This must be done in such a fashion that the end-users will not have to actually do anything in order to make this work.

Thanks in advance.

--Dane
 
Old 06-30-2006, 09:37 PM   #2
darkpark
LQ Newbie
 
Registered: Nov 2003
Location: NW Indiana
Distribution: Ubuntu 6.06 LTS
Posts: 18

Rep: Reputation: 0
Have you looked at /etc/gdm/gdm.conf and/or ../gdm.conf-custom ?
 
Old 06-30-2006, 10:33 PM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
If you put a file called .xinitrc in /etc/skel with whatever you want to start when X is started, then whenever a new user is created that file will be copied into their newly created home directory.

This means that the individual users will be able to not start glipper if they don't want to (by deleting the line from their own .xinitrc) without affecting other users, but this may or may not be a good thing.

It may be worth mentioning that there are other files in /etc/skel, such as the default .bashrc for all new users. You can edit these files to meet any other requirements that you have.

I hope this helps
--Ian

Last edited by IBall; 06-30-2006 at 10:34 PM.
 
Old 07-01-2006, 12:31 AM   #4
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 745

Original Poster
Rep: Reputation: 81
Thanks, both of you, for your suggestions!

Here's the solution that I found based on what you told me:

Place a file called .gnomerc in /etc/skel with the following contents:

Code:
# Start the glipper clipboard tool
glipper &
It took me a bit of digging to find out that I needed to do that (instead of the .xinitrc or .xsession file; putting the command there prevented the X session from starting). Basically, there's a file called /etc/X11/Xsession that sources the contents of /etc/X11/Xsession.d/, and one of the files in there, 55gnome-session_gnomerc, sources ~/.gnomerc if it exists. Somehow (I'm only a novice scripter, so I don't really understand it), the commands sourced through the above processes are then executed, so all one really has to do is make sure that the commands to be run when gnome starts end up in ~/.gnomerc.

Thanks, everybody!

--Dane
 
  


Reply

Tags
autostart, config, gnome, startup, xsession


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
lauching program at start up in Gnome. rvoigt Linux - Software 6 08-01-2005 10:32 PM
I can't start the Users and Groups program. jwizardc Red Hat 1 07-24-2004 10:22 AM
Auto start a program in GNOME 2.6 rusty0412 Linux - Newbie 1 05-23-2004 03:47 AM
editing .xinitrc question bosewicht Linux - Newbie 1 04-04-2004 03:58 AM
.xinitrc question. Just trying to get one program to run hindenbergbaby Linux - General 2 02-21-2004 07:06 PM


All times are GMT -5. The time now is 01:58 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