LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 08:17 PM   #1
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
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, 08: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, 09:33 PM   #3
IBall
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
--Ian

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

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:20 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
Open Source Consulting | Domain Registration