LinuxQuestions.org
Review your favorite Linux distribution.
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 09-26-2007, 10:09 AM   #1
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Rep: Reputation: 30
Switch users sessions without restarting X?


Hi... I'm using Slackware 12.0, and I would like to open GUI applications as multiple, different users, and while running on USERA, I can't open GUI applications on USERB such as :
Code:
su USERB -c "firefox"
No protocol specified

(firefox-bin:26512): Gtk-WARNING **: cannot open display:
Also, I cannot switch between X sessions without logging out from one session, switching to other user, and starting x with startx command.

Is there a way to make my life easier?
Thanks!
 
Old 09-26-2007, 10:35 AM   #2
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
with kde there's a "switch user" option in the K menu.

but I assume you aren't using kde.

basically, the kde solution starts a second X server on a new virtual terminal.

what you're looking for is possibly something like that. try googling for something like that with your window manager/desktop environment.
 
Old 09-26-2007, 11:40 AM   #3
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by itz2000 View Post
Also, I cannot switch between X sessions without logging out from one session, switching to other user, and starting x with startx command.

Is there a way to make my life easier?
Thanks!
Here's what I do, and pardon me if this seems very basic.

1) I boot to runlevel 3, the console (the default Slackware behavior). So I start my X Windows session by typing "startx". Then X starts in a virtual terminal "bound" to the F7 key.

2) So then (for example) my wife wants to check her e-mail, all I do is hit CTRL-ALT-F2 to go to the next open console terminal where my wife logs in and starts X Windows by typing "startx -- :1". Which opens her X server on a virtual terminal "bound" to the F8 key.

3) Then she and I can switch between our sessions by hitting CTRL-ALT-F7 for my session or CTRL-ALT-F8 for hers. We're both logged in the whole time.

Here's more on running multiple X sessions.

I hope this helps,

-Drew

Last edited by Lufbery; 09-26-2007 at 11:42 AM.
 
Old 09-26-2007, 11:28 PM   #4
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by janhe View Post
with kde there's a "switch user" option in the K menu.

but I assume you aren't using kde.

basically, the kde solution starts a second X server on a new virtual terminal.

what you're looking for is possibly something like that. try googling for something like that with your window manager/desktop environment.
I do use KDE.
 
Old 09-27-2007, 12:56 AM   #5
drauk
Member
 
Registered: Sep 2007
Location: /MX/BC/TJ
Distribution: Slackware 13
Posts: 37

Rep: Reputation: 15
You can try sux
http://fgouget.free.fr/sux/
 
Old 09-27-2007, 10:22 AM   #6
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Lufbery View Post
Here's what I do, and pardon me if this seems very basic.

1) I boot to runlevel 3, the console (the default Slackware behavior). So I start my X Windows session by typing "startx". Then X starts in a virtual terminal "bound" to the F7 key.

2) So then (for example) my wife wants to check her e-mail, all I do is hit CTRL-ALT-F2 to go to the next open console terminal where my wife logs in and starts X Windows by typing "startx -- :1". Which opens her X server on a virtual terminal "bound" to the F8 key.

3) Then she and I can switch between our sessions by hitting CTRL-ALT-F7 for my session or CTRL-ALT-F8 for hers. We're both logged in the whole time.

Here's more on running multiple X sessions.

I hope this helps,

-Drew
I did it, I used terminal 2, could go back to X :0 with ALT+CTRL+F7 but when I enterted terminal 2 and written startx -- :1 it got me a black screen which I couldn't escape out of it (CTRL + C, CTRL + BREAK, CTRL + ALT + f7, f1, CTRL+ALT+DEL+ ...... any combination I know of didn't get me out of this black screen including the CTRL + ALT + BACKSPACE.)
So I had to do reboot, manually, twice.
Is there something you suggesting?
 
Old 09-27-2007, 11:37 AM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by itz2000 View Post
I did it, I used terminal 2, could go back to X :0 with ALT+CTRL+F7 but when I enterted terminal 2 and written startx -- :1 it got me a black screen which I couldn't escape out of it (CTRL + C, CTRL + BREAK, CTRL + ALT + f7, f1, CTRL+ALT+DEL+ ...... any combination I know of didn't get me out of this black screen including the CTRL + ALT + BACKSPACE.)
So I had to do reboot, manually, twice.
Is there something you suggesting?
Wow. I'm very sorry this didn't work for you, and I'm not sure why that would happen.

Did you get a chance to read the link that I placed in my post. Maybe there is information in it that would help you.

I'm at work now, so I won't be able to check things out on my machine for another several hours. Maybe between now and then somebody else can help.

What surprises me is that you weren't able to switch to another terminal when you got the blank screen.

Good luck,

-Drew
 
Old 09-27-2007, 12:18 PM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Not sure why the suggestion(s) above failed. *Maybe** because you switched to the console first??

Here's what works for me when done from a Konsole window from my desktop(example):

sasha# su - user
password: ******
user# startx -- :1

and a new X starts on another TTY, as user. NOTE the - in the su command; it means 'login' as user, rather than just su to user's credentials.
 
Old 09-27-2007, 12:26 PM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Hey GrapefruiTgirl,

I haven't seen you posting here for a while -- maybe I've just missed your posts.

FWIW, I have no trouble when I switch to the console first, which is why I typed the instructions that way. But, I guess depending on how the original poster has things set up, you're solution might work better.

I just wish I knew more about what configuration options or drivers, or ... whatever... would allow this to work for me, but not somebody else.

Regards,

-Drew
 
Old 09-27-2007, 01:13 PM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Don't know why.. It *should* work, but then...

Quote:
Originally Posted by Lufbery View Post
>>> Hey GrapefruiTgirl,

Hiya Drew

>>> I haven't seen you posting here for a while -- maybe I've just missed your posts.

My MB died earlier in the summer, so while awaiting new parts I wasn't on very much at all. Spent more time out-doors but now I have a new machine (new guts anyway) and I'M BaaaAAAAaack!

>>> FWIW, I have no trouble when I switch to the console first, which is why I typed the instructions that way. But, I guess depending on how the original poster has things set up, you're solution might work better. I just wish I knew more about what configuration options or drivers, or ... whatever... would allow this to work for me, but not somebody else.

Indeed, though it probably wouldn't take very much in some config file somewhere to cause it to not work or work differently for some people. I can't explain it either. Let's see what the OP has to say when he next posts

>>> Regards,
-Drew

Take care!,
Sasha
 
Old 09-29-2007, 09:01 AM   #11
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
That's weird, but still it doesn't work.
It gives me the black screen mentioned before.

:S
 
Old 09-29-2007, 09:37 AM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hmmm... I wonder.

Would you post the section of your /etc/inittab file, that looks like this:

# Standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:1235:respawn:/sbin/agetty 38400 tty6 linux


Maybe (this is a semi-educated guess) your setup doesn't have another TTY available for X besides TTY7.

Last edited by GrapefruiTgirl; 09-29-2007 at 09:39 AM.
 
Old 09-29-2007, 02:08 PM   #13
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by GrapefruiTgirl View Post
Maybe (this is a semi-educated guess) your setup doesn't have another TTY available for X besides TTY7.
Maybe. How can I check that?

about the file :

Quote:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
 
Old 09-29-2007, 02:21 PM   #14
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I don't really know HOW to check it, other than the half-assed way I am perusing here..

This may not work, infact it may make absolutely no difference at all, but TRY changing one of your c1-c5 lines so that it matches the c6 line. Specifically, adding the 4 to the 1235 and see if that makes any difference at all.

This is quite uncertain (it won't break anything) but I'm basing it on some recent changes I made in the same manner, when I set up my second serverlayout for X to start my second session and use my TV as a screen.

I just tried an experiment on my machine, which ***may*** have proved my idea, but we won't know till you try this.

If it makes no difference, you may as well undo the change, but if it works, well.. Happy day

NOTE: After the change, I suspect you'll need to reboot to make it officially take effect.
 
Old 09-29-2007, 02:34 PM   #15
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by GrapefruiTgirl View Post
I don't really know HOW to check it, other than the half-assed way I am perusing here..

This may not work, infact it may make absolutely no difference at all, but TRY changing one of your c1-c5 lines so that it matches the c6 line. Specifically, adding the 4 to the 1235 and see if that makes any difference at all.

This is quite uncertain (it won't break anything) but I'm basing it on some recent changes I made in the same manner, when I set up my second serverlayout for X to start my second session and use my TV as a screen.

I just tried an experiment on my machine, which ***may*** have proved my idea, but we won't know till you try this.

If it makes no difference, you may as well undo the change, but if it works, well.. Happy day

NOTE: After the change, I suspect you'll need to reboot to make it officially take effect.
I didn't understand what actually to change, to what...

sorry :S
 
  


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
Cannot switch between sessions - why? ibex Linux - General 6 05-03-2006 12:55 AM
How do I view currently attached network users prior to restarting our server? Jaizey Linux - Networking 4 01-10-2006 11:21 PM
Can't start concurrent X sessions with different users. rickh Debian 3 12-26-2005 08:52 PM
How to switch between KDE sessions? KlaymenDK Mandriva 3 06-28-2004 04:15 AM
software way to switch between X sessions dukeinlondon Linux - Software 1 11-26-2003 07:58 AM

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

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