LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2006, 08:00 AM   #1
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Rep: Reputation: 15
Initialisation script


Hi there.

I was wondering if anyone knew of a script that was run as soon as your X-Windows system was run, or as soon as you login.

For example, say I wanted to always load an Xterm on workspace number 2. Where would this go?

Thanks for your help.
 
Old 05-01-2006, 08:42 AM   #2
blueser
Member
 
Registered: Oct 2003
Location: Rio de Janeiro, Brazil
Distribution: Fedora Core 5
Posts: 76

Rep: Reputation: 15
When an X session is initiated, the script ~/.xsession is executed, so you can put your initialization code there. This is X11's barebones initialization; window managers (eg. fluxbox) and desktop managers (GNOME, KDE etc.) each offer their own initialization scheme, you might want to check the proper documentation. For example, for GNOME on FC5 you would go to Main Menu > System > Preferences > More Preferences > Sessions and put there your startup programs.

Be aware that if you write down your own .xsession file, you will be responsible for doing _all_ X session management, which means starting {window|desktop} manager by hand etc. This is usually not trivial because you'll need to run specific daemons and programs at a specific order. So, please check the docs before choosing an approach.

HTH

Andre
 
Old 05-01-2006, 10:45 AM   #3
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 31
Quote:
say I wanted to always load an Xterm on workspace number 2
If you want apps on a particular workspace, then that will be window manager dependant. X itself doesn't (and can't) know anything about what your window manager calls "workspaces".
 
Old 05-01-2006, 10:50 AM   #4
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ioerror
If you want apps on a particular workspace, then that will be window manager dependant. X itself doesn't (and can't) know anything about what your window manager calls "workspaces".
Well I thought that all this stuff would just be called by some script somewhere. Maybe not then.
 
Old 05-01-2006, 11:32 AM   #5
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 31
If you just want to start some stuff, then it can go in a script (~/.xsession if you login via xdm, ~/.xinitrc if you startx from the cmdline). However, if you want apps on a particular workspace, then you'll need to configure that in your window manager, you don't say what you're using but most can be setup to start apps on a given workspace).
 
Old 05-01-2006, 12:55 PM   #6
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Original Poster
Rep: Reputation: 15
Ok sorry if I was a little confusing. I was hoping there would be some generic script that got loaded automatically independent of distribution - I wanted to make one script that I could then put on every (most) linux pc and it worked ok. The workpace application allocation seems to be a rubbish example.

Just for the record I'm using FC3 atm.

Thanks.
 
  


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
Fatal error finishing initialisation Nay_Nay Mandriva 0 09-17-2005 11:03 AM
Init running before other initialisation? fatzo Linux - General 2 02-26-2004 06:51 AM
Is there something like rc.local for system initialisation? brian-e Debian 3 01-20-2004 08:56 AM
Modem initialisation takes too long pja Linux - Newbie 1 12-23-2003 10:02 PM
Initialisation string C8H10N4O2 Linux - Newbie 2 03-17-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:48 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration