LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-03-2005, 11:28 AM   #1
Kanaflloric
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Slackware 10.0
Posts: 80

Rep: Reputation: 15
starting desktop automatically for a user


hi

My system is configured to start at level 3.
However, I would like KDE (for example) to start automatically if it is my daughter who is logged in.

I wanted to add "startx" in .bash_profile, but it is probably a bad idea, since it is executed each time a console is loaded.

Any idea ? Thanks in advance
 
Old 09-03-2005, 11:38 AM   #2
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
change the default runlevel to 5 (i think) in /etc/inittab

Also, make sure that GDM of KDM is installed and running at startup.

hamish
 
Old 09-03-2005, 12:00 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
If you want to keep it booting to level 3 for you and level 5 for your daughter, I would make another entry in the lilo.conf or grub.conf with init 5 on the end.
For example:

Set the default to your daughter so she doesn't have to fuss with it.
default=0

title Fedora Core Daughter
root (hd1,1)
kernel /boot/vmlinuz-2.6.12-1.1447_FC4 ro root=LABEL=/ rhgb quiet init 5
initrd /boot/initrd-2.6.12-1.1447_FC4.img

title Fedora Core Yours
root (hd1,1)
kernel /boot/vmlinuz-2.6.12-1.1447_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.12-1.1447_FC4.img
 
Old 09-03-2005, 01:05 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Actually your original idea about using .bash_profile may be sound. The following is a quote from here



Quote:
~/.bash_profile is read, and the commands within executed, every time you log onto the system. It is NOT read whenever any subshells are started. In fact, if you set your $PS1 variable here, it will likely be clobbered (read set to something else) when you start another subshell. Chances are you will start other subshells.

~/.bashrc is read whenever a new bash shell is started. It is not read when you start your login shell.
So if I'm reading that right, starx in your .bash_profile should only execute when your daughter logs on. It is .bashrc that is executed every time a shell is opened.
 
Old 09-04-2005, 10:05 AM   #5
Kanaflloric
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Slackware 10.0
Posts: 80

Original Poster
Rep: Reputation: 15
I made a simple test with a single line (Echo "hello world") in bash_profile. Then, I started a console within KDE, and I could see that bash_profile was executed...!

So, Homey's idea is probably the best one for now !

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing X from starting automatically DeadlySin3 Linux - Newbie 6 04-11-2005 05:26 AM
Starting Internet Automatically? grazak Linux - Networking 1 03-27-2005 11:39 PM
not starting automatically ??? JNaas Linux - Networking 0 09-30-2004 07:25 PM
Automatically starting Kppp Gomi Linux - Newbie 1 05-18-2004 08:33 PM
Starting X Automatically shari Linux - Software 2 08-08-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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