View previous topic :: View next topic |
Author |
Message |
gforum Tux's lil' helper
Joined: 31 Mar 2008 Posts: 140
|
Posted: Tue Apr 14, 2009 4:19 am Post subject: [SOLVED] NO login managers on root login(and root only) |
|
|
simply my questions is, how do it start a login manager(say... gdm) when anyone in the group "users" logs in, but NOT on system startup, or therfore root login... if i login as root i dont want the bloody login manager in the way, just my peaceful tty.
i imagine im gonna have to edit something in rc.conf(im using baselayout2), but im not certain.
since regular users cant start it via bash_profile, i really dont know where to look next, but im no gentoo/linux expert.
any hint is appreciated,
cheers
Last edited by gforum on Tue Apr 14, 2009 9:45 pm; edited 1 time in total |
|
Back to top |
|
|
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Tue Apr 14, 2009 10:50 am Post subject: |
|
|
One more question, how does the system know which user you use before login?
Or do you mean after you did the shell login, X should automatically start for normal users?
then you could sime put this at the end of /etc/profile
Code: | if [ "$GROUPS"!=0 ]; then startx fi |
p.s. probably wrong syntax in the script
//edit: you can use any statement, if you know the group ID use e.g. "$GROUPS"==1000
//edit: oh and default runlevel would be in /etc/inittab
Code: | # Default runlevel.
id:3:initdefault: |
|
|
Back to top |
|
|
gforum Tux's lil' helper
Joined: 31 Mar 2008 Posts: 140
|
Posted: Tue Apr 14, 2009 9:22 pm Post subject: |
|
|
my idea was?
if i log as root, on startup i get the regular shell, this is good for debuggin... login managers get in the way fo me reading the full log... >.<
and if i or anyone logs as a regular user the get a login manager, or as you put it startx.
oh, and yeah i know about the default run level iw as using rc-update add login mngr default to have it brought up as soon as the system starts.
maybe there is a better idea...
the truth is that i wanted the user `friendlyness` of the login man. for the regular user and the rawness of the tty for root.
thanks again,
cheers
edit:thats not exactly what i wanted, but ill give your script a shot |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Tue Apr 14, 2009 9:37 pm Post subject: |
|
|
As disi pointed out, the system can't know which user you are before you log in. It's difficult to log in as root and have the login manager drop back to a tty because it would have to stop the X server (and thus itself).
Virtual terminals are ideal for this--I do this often (root on console, user on GUI). Leave xdm in your default runlevel and when you want to login as root, press Ctrl+Alt+Fn first (n=1-6) to select a VT not managed by GDM (or whatever). After you log out, press Ctrl+Alt+F7 to switch back to the display manager. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
gforum Tux's lil' helper
Joined: 31 Mar 2008 Posts: 140
|
Posted: Tue Apr 14, 2009 9:45 pm Post subject: |
|
|
thats right, forgot about that... i feel stupid now.
anyways, the solution i used was
Code: |
if [ "$EUID" != "0" ] || [ "$USER" != "root" ]; then startx
fi
|
thanks for the help guys. |
|
Back to top |
|
|
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Tue Apr 14, 2009 10:00 pm Post subject: |
|
|
For a fancy login with mouse etc. you could use Qingy. I use it myself, it starts instead of agetty in framebuffer. then you can decide to start X or login to console.
http://qingy.sourceforge.net/ |
|
Back to top |
|
|
|