Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 06-30-2006, 08:17 PM   #1
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 862

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


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.

Old 06-30-2006, 08:37 PM   #2
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, 09:33 PM   #3
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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

Last edited by IBall; 06-30-2006 at 09:34 PM.
Old 06-30-2006, 11:31 PM   #4
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 862

Original Poster
Rep: Reputation: 118Reputation: 118
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:

# 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!



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

All times are GMT -5. The time now is 02:07 PM.

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