Jump to content

Fast User Switching with GUI


Guest cid
 Share

Recommended Posts

Hello,

 

I'm trying to make my wife like Linux enough that we can keep it as our main desktop.

 

She is indifferent as far as apps go, but she's REALLY annoyed with:

 

Ctrl-ALT-F1

(userid)

(password)

% startx -- :1

 

Then Ctrl-Alt-F7/8/9 to get around...

 

 

Has anyone done this in a GUI or even simple command line interface to launch all these things in order...

 

I know I can pay for the $99 Xandros distro to get it, and I've heard Rumors that Redhat is doing this in RH8, but can anyone point me to a simple Mandrake solution, or know if Mandrake is considering this with 9.1 or anything?

 

Thanks!

 

D

Link to comment
Share on other sites

Are you launching in text mode, and then starting x at need?

If she likes gui, why not launch into x with a login screen?

I am not sure why you are switching consoles. If you prefer text mode, then YOU switch to console when you use it, but have it boot into x for your wife.

Link to comment
Share on other sites

Thanks for the quick responses guys...

 

gregor: If I'm using GDM, There is no "K" though is there :) I'll give it a shot and see if that works. We generally use KDE though, but if it meant that change, I could live with it. If I do that, doesn't that log me out though first?

 

 

Ixthusdan: No, I'm not trying to run in console mode only for me. I launch KDE by default. We are trying to run two login sessions actively at the same time, both using KDE (GDM would be fine as well). But I'm doing so after one X session has started (i.e. mine) so I go to a text mode login cuz that's the only way I know how to create a new session without logging mine out. I know this is less than Ideal from a resources standpoint, but most of what we do is Internet/Email/Word Proc, so I'm not concerned about the overhead of two X's running.

Link to comment
Share on other sites

Ctrl-ALT-F1  

(userid)

(password)

% startx -- :1

 

Just open a Xterm (or equivalent); tell your wife to do:

~$ su - username

<enter the password>

~$ startx -- :1

That will automatically jump to vt8 (anon said a way to avoid typing the password) w/o needing to go to text mode

 

If she stills not liking to type "startx..." you can add an alias for her (at her ~/.bashrc):

alias go="startx -- :1"

 

so at the end she will only need to type:

~$ su - username 

~$ go

 

Also the "su - username" can be aliased, or even, you can create an icon/button to run:

xterm -exec "su - username"

so she will only need to press that button and type "go" on the xterm that will be opened

 

disclaimer: never tried :)

Link to comment
Share on other sites

Also the "su - username" can be aliased, or even, you can create an icon/button to run:  

xterm -exec "su - username"

 

maybe all can be done in just one step, calling "startx -- :1" with the -c flag of 'su' (not sure at all that that will work). Maybe you might want to try it and report us your results

Link to comment
Share on other sites

The startx default display # (i.e. :0, :1) Is it in the .profile? .xinitrc? I don't see it anywhere...

 

Can I automatically id each logins Xsession display such that...

 

No matter who logs in, CTRL-ALT-F7 points to user A and CTRL-ALT-F8 points to user B?

 

Basically, I'd have to somehow tell it at xinit that if I am user A, xinit me at :0, if I am user B, xinit me at :1, user C at :2 etc.

 

That would make user switching even easier. The "go" command as aliased above could simply check and see if you are logged in already with a who, and if so, just tell you "You are already logged in, hit CTRL-ALT-F8 to open your session" or it would log you in if it found no instance of you on that machine. Everyone would have an assigned CTRL-ALT-FX button to get to their account when logged in, no second guessing who logged in first and what not.

Link to comment
Share on other sites

you can start several X servers at boot(1), but I don't think it will be trivial (and secure) to do it the way you want. An approach would be that each user have it's own startx script to start a server in a particular VT, for example, an alias for each user:

user1:

alias startx="startx -- :0 vt7"

user2:

alias startx="startx -- :1 vt8"

...

userN:

alias startx="startx -- :N vtN+7"

 

But that will mean to login in text mode (runlevel 3).

 

----------------------

(1) If you use gdm, edit the file /etc/X11/gdm/gdm.conf and append as many start instances as you wish:

[servers]

0=/usr/bin/X11/X -dpi 96 -nolisten tcp vt7

1=/usr/bin/X11/X -dpi 96 -nolisten tcp vt8

Link to comment
Share on other sites

Tried this:

 

[dad@localhost dad]$ su - mom -c startx -- :1

Password:

 

Authentication failed - cannot start X server.

Perhaps you do not have console ownership?

[dad@localhost dad]$

 

Same thing if I do it from anywhere within my own session.

Link to comment
Share on other sites

GDM is the login manager, not the window manager. You can use GDM and KDE with no problem (many people actually prefer GDM to KDM, even though they prefer KDE to Gnome). As was already said, replace KDM with GDM, and you'll be able to open a new graphical login window from the standard menu.

 

Yves.

Link to comment
Share on other sites

I'd think a decently simple way would be to write a quick little script, and either stick it on the desktop or put it somewhere else and then stick a link to it on the desktop.

 

i couldn't figure out a way to make it work right just now, but maybe aru can jump in and do some of his famous bash scripting?

(edit:no, i didn't notice that aru had already posted :-/)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...