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 - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-25-2005, 02:22 PM   #1
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 32
automatically starting gui after login


instead of editing the innit file is it possibe to automatically load the GUI for a particular user instead of for everyone... i mean once they enter their login name and password in console for the GUI to load up instead of them having to mess around in the console...

thank you...
 
Old 07-25-2005, 02:30 PM   #2
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
maybe put "startx &" in .bashrc

Or for all users pput it into /etc/bash.bashrc
 
Old 07-25-2005, 02:32 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
You could simply add the line startx to either their .bash_profile or to /etc/profile, I just tried it in /etc/profile and it worked like a charm.

Last edited by leonscape; 07-25-2005 at 03:04 PM.
 
Old 07-25-2005, 02:37 PM   #4
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
thank you, i'll give it a try...
 
Old 07-25-2005, 03:01 PM   #5
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
thanks, it worked (used the bash_profile route)
 
Old 07-25-2005, 03:33 PM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
if you add it to /etc/profile, you cannot login to a normal console without starting X.
so .bash_profile or .profile in the home dir. is better.

egag
 
Old 07-25-2005, 03:53 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Doesn't that also try and start X when opening an xterm aswell, or at least it did when I tried that. You could do with a bit of checking before executing `startx`, something of the lines
Code:
#!/bin/bash
for i in 0 1 2 3 4 5 6
do
    if [ `tty` = "/dev/tty$i" ]
    then
        startx
        exit
    fi
done
You could even check X isn't running to start off with, but the above always met my needs
 
Old 07-25-2005, 04:11 PM   #8
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
you're right.

but maybe testing with " ps -aux |grep X " is simpler.

edit: EDIT: you will still start a second X with ctrl-alt-F6, and then login

egag

Last edited by egag; 07-25-2005 at 04:17 PM.
 
Old 07-25-2005, 04:30 PM   #9
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
yes true, I did think of this whilst writing it down here, but when I had X running I never felt the need to go to another ttyX console when I could open up another xterm. So it worked perfectly OK for my needs
 
Old 07-25-2005, 06:38 PM   #10
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 32
yeah i noticed that as well, when openning konsole/xterm/etc i get some sort of message saying X is already running when the GUI is loaded automatically through .bash_profile...
 
  


Reply



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
Programs Starting automatically on login? keysorsoze Fedora 2 01-31-2005 07:53 AM
help starting KDE 3.3.2 automatically fcoutel Linux - Newbie 22 01-03-2005 11:34 AM
help starting KDE 3.3.2 automatically fcoutel Linux - Newbie 1 12-31-2004 02:53 AM
not starting automatically ??? JNaas Linux - Networking 0 09-30-2004 07:25 PM
Starting X Automatically shari Linux - Software 2 08-08-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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