LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 07-21-2005, 03:18 AM   #1
asrisk
LQ Newbie
 
Registered: Jul 2005
Location: Wiltshire, UK
Distribution: Mageia 1
Posts: 16

Rep: Reputation: 2
Make KDM run .xinitrc or .xsession


Hi folks. This is a simple question with a (hopefully) simple answer.

When I log in graphically via KDM (autologin without password), neither my ~/.xinitrc or ~/.xsession files are run.

If I log in non-graphically and type startx, my ~/.xsession is run. (Yes, .xsession and not .xinitrc. Don't know why.)

~/.xsession says, (recalling from memory):

Code:
#!/bin/sh
xterm &
gkrellm &
xscreensaver &
xsetbg <whatever>
exec fluxbox
How can I make this be run when starting up with KDM?

System is knoppix 3.6 installed to HD, kernel 2.4.27, using Fluxbox.

Cheers,
Andy.
 
Old 07-21-2005, 10:04 PM   #2
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Re: Make KDM run .xinitrc or .xsession

Quote:
Originally posted by asrisk
Hi folks. This is a simple question with a (hopefully) simple answer.

When I log in graphically via KDM (autologin without password), neither my ~/.xinitrc or ~/.xsession files are run.

If I log in non-graphically and type startx, my ~/.xsession is run. (Yes, .xsession and not .xinitrc. Don't know why.)

~/.xsession says, (recalling from memory):

Code:
#!/bin/sh
xterm &
gkrellm &
xscreensaver &
xsetbg <whatever>
exec fluxbox
How can I make this be run when starting up with KDM?

System is knoppix 3.6 installed to HD, kernel 2.4.27, using Fluxbox.

Cheers,
Andy.
Fluxbox has a startup script of it's own. Here is a link to a gentoo fluxbox tutorial about the startup script.

http://gentoo-wiki.com/HOWTO_Fluxbox...p_Applications


EDIT: .xsession & .xintrc do not lauch from a graphical log in manager, at least in my expierience

Last edited by trey85stang; 07-21-2005 at 10:05 PM.
 
Old 07-22-2005, 03:18 AM   #3
asrisk
LQ Newbie
 
Registered: Jul 2005
Location: Wiltshire, UK
Distribution: Mageia 1
Posts: 16

Original Poster
Rep: Reputation: 2
Thanks trey85stang. I'll give the startup feature a try. Lots of other interesting stuff in that howto as well - a good find!
 
Old 07-22-2005, 05:39 AM   #4
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Quote:
Originally posted by asrisk
Thanks trey85stang. I'll give the startup feature a try. Lots of other interesting stuff in that howto as well - a good find!
No problem, have fun
 
Old 07-22-2005, 10:12 AM   #5
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 30
I think .xinitrc and .xsession are only used when executing startx from the command line.
 
Old 07-25-2005, 08:09 AM   #6
asrisk
LQ Newbie
 
Registered: Jul 2005
Location: Wiltshire, UK
Distribution: Mageia 1
Posts: 16

Original Poster
Rep: Reputation: 2
Ooookay. The fluxbox startup works fine when I type startx (I have put in my .xinitrc the command "exec startfluxbox" instead of "exec fluxbox") - this is OK.

But logging in via KDM, still none of the applications start. I expect that somewhere, there is a file telling KDM what the command is to start the various window managers. I think I need to find this file, and change "fluxbox" into "startfluxbox". Trouble is I've had a good look around in /etc/X11/kde3/kdm (or something similar - not in front of my Linux box at the moment) and cannot find such a file anywhere.

Any guesses where this information may be squirreled away?

Cheers,
Andy.
 
Old 07-26-2005, 03:26 AM   #7
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Quote:
Originally posted by asrisk
Ooookay. The fluxbox startup works fine when I type startx (I have put in my .xinitrc the command "exec startfluxbox" instead of "exec fluxbox") - this is OK.

But logging in via KDM, still none of the applications start. I expect that somewhere, there is a file telling KDM what the command is to start the various window managers. I think I need to find this file, and change "fluxbox" into "startfluxbox". Trouble is I've had a good look around in /etc/X11/kde3/kdm (or something similar - not in front of my Linux box at the moment) and cannot find such a file anywhere.

Any guesses where this information may be squirreled away?

Cheers,
Andy.
Try updatedb and then locate fluxbox, you will get a lot of resulsts... But look for one in the /etc directory. That should be what you are looking for. Finding the load file for the desktop managers is sometimes a PITA, seems like every distro has them in a different spot.
 
Old 08-01-2005, 07:20 AM   #8
asrisk
LQ Newbie
 
Registered: Jul 2005
Location: Wiltshire, UK
Distribution: Mageia 1
Posts: 16

Original Poster
Rep: Reputation: 2
Right - we've got it licked. Eventually.

It turns out that KDM's xsession runs the global Xsession in /etc/X11. This Xsession runs a whole bunch of scripts in /etc/X11/Xsession.d, one of which launches the chosen window manager, which had been passed as $1.

I had to add a bit to catch $1=fluxbox, and execute startfluxbox, instead of simply executing $1.

Thanks to all contributors for your help.

Andy.
 
  


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
.xinitrc and .xsession ignored Whitman Debian 2 09-18-2005 01:11 PM
.xinitrc vs. .Xdefaults vs .Xsession frankie_DJ Linux - Newbie 4 08-02-2005 06:39 AM
.Xsession .xinitrc a10392 Linux - Newbie 2 12-10-2004 03:34 PM
.xinitrc/.xsession - Where are they? Fluxbox the_rydster Slackware 3 03-07-2004 02:45 PM
No .Xdefaults, .xsession, .xinitrc madchmst82 Linux - Newbie 3 09-23-2003 08:05 PM


All times are GMT -5. The time now is 02:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration