Jump to content

Problem with 2 X servers running


Steve Scrimpshire
 Share

Recommended Posts

I have two users logged into X simultaneously (one on :0 and the other on :1). The problem is, which ever is the second user to start X, the desktop comes up and is the blank blue default desktop, no Gnome splash screen and just a pointer that sits there. I can toggle to the first user's desktop and toggle immediately back and see the proper startup of the second user's desktop. Even if, after having both users logged into X, I log one out and then relogin and start X, I have to toggle to the logged-in user's desktop and back to get the second user's desktop to load. Now, to try to clarify....two scenarios:

 

(1) I start X as the second user and then immediately toggle back and forth, I see the Gnome splash screen and normal startup of the desktop.

 

(2) I start X as the second user and stare blankly at the blank blue desktop and pointless pointer (it moves, but does nothing...no right click menu...nothing) for 45 seconds and then toggle back and forth, I see the desktop fully drawn.

 

So, the processes are occurring, just not updating the screen.

 

I didn't adjust the /etc/X11/XF86Config-4 file for having two X servers running....do I have to that? Or is the display section

Section "Screen"

   Identifier "screen1"

   Device      "RIVA TNT2"

   Monitor     "Gateway EV700"

   DefaultColorDepth 24

   Subsection "Display"

       Depth       8

       Modes       "1024x768" "800x600" "640x400"

       ViewPort    0 0

   EndSubsection

   Subsection "Display"

       Depth       16

       Modes       "1024x768" "800x600" "640x480"

       ViewPort    0 0

   EndSubsection

   Subsection "Display"

       Depth       24

       Modes       "1024x768" "800x600" "640x480"

       ViewPort    0 0

   EndSubsection

   Subsection "Display"

       Depth       32

       Modes       "1024x768" "800x600" "640x480"

       ViewPort    0 0

   EndSubsection

EndSection





Section "ServerLayout"

   Identifier "layout1"

   Screen     "screen1"



   InputDevice "Mouse1" "CorePointer"



   InputDevice "Keyboard1" "CoreKeyboard"

EndSection

 

for only if you have two monitors or a split display?

 

[edit]NVidia Riva TNT 32 MB video with latest drivers and MDK 8.1 (2.4.20 kernel)

Link to comment
Share on other sites

You're not misspeaking :) You actually start a second X server. When you use startx to do so, then it is better to provide the command:

startx /path/to/graphical/command -- :1

or to set your .xinitrc file (in your home directory) the way you want.

But is this really what you want? I mean, wouldn't you prefer if you only had to click an item in the menu to have a second X server open right to the login screen? This is possible simply by replacing the KDM login manager with GDM (you can still use KDE thereafter, no problem). To do that, edit the /etc/sysconfig/desktop file, and replace (or add) the line DISPLAYMANAGER=... with DISPLAYMANAGER=gdm

While you're at it, in the same file, the line which says DESKTOP=... defines what is started by default by startx (you can use Gnome, KDE, Fluxbox...)

 

I hope this helps.

 

Yves.

Link to comment
Share on other sites

You're not misspeaking :) You actually start a second X server. When you use startx to do so, then it is better to provide the command:
startx /path/to/graphical/command -- :1

or to set your .xinitrc file (in your home directory) the way you want.

 

I'm a little lost here. I have no .xinitrc in either home directory. I guess I can search and see what one is supposed to look like.

 

But is this really what you want? I mean, wouldn't you prefer if you only had to click an item in the menu to have a second X server open right to the login screen?

 

Well, what I really want is an easy way to start a second desktop (Gnome) for my fiancee when she logs in....if there is some way to automatically have her log in (or automatically give her a GUI login from clicking something on *my* desktop), that would be awesome. Currently, what I have is added a line in her ~/.bash-profile that says

 

startx -- :1

This is possible simply by replacing the KDM login manager with GDM (you can still use KDE thereafter, no problem). To do that, edit the /etc/sysconfig/desktop file, and replace (or add) the line DISPLAYMANAGER=... with DISPLAYMANAGER=gdm

While you're at it, in the same file, the line which says DESKTOP=... defines what is started by default by startx (you can use Gnome, KDE, Fluxbox...)

]

 

I have no /etc/sysconfig/desktop file or directory...guess I could search for info on that, too.

Link to comment
Share on other sites

This is possible simply by replacing the KDM login manager with GDM (you can still use KDE thereafter, no problem). To do that, edit the /etc/sysconfig/desktop file, and replace (or add) the line DISPLAYMANAGER=... with DISPLAYMANAGER=gdm

While you're at it, in the same file, the line which says DESKTOP=... defines what is started by default by startx (you can use Gnome, KDE, Fluxbox...)

 

Ok. I went into MCC and changed X to start at boot and I tried both autologin and not. After configuring X to start at boot, I now have an /etc/sysconfig/desktop file, but it only has

GNOME

 

Adding a line DISPLAYMANAGER=gdm actually makes my problem worse. The second person to start x now gets a background on their blank blue screen (the background I have set in Gnome), but no icons and the left mouse-click now changes the cursor from an X to an arrow, but doing Ctrl-Alt-F9 Ctrl-Alt-F10 does not alter anything and allow Gnome to start. So, I changed it back. Back to square one.

 

I would've thought that changing X to start at boot would've created an .xinitrc file for me, but it didn't.

Link to comment
Share on other sites

Still having this trouble. I reset it so that X starts at boot and auotlogin my other user, but when I log in and startx as myself, I have to go through the Ctrl-Alt-F9 and Ctrl-Alt-f10 to see Gnome start.

I have no .xinitrc set up and don't know what it should look like.

Link to comment
Share on other sites

I'm a little lost about what you have and what you did. I suggest we start from a clean base.

First configure your computer in the standard way, with no autologin, and nothing special in .xinitrc, in /etc/sysconfig/desktop, in .bashrc, and in .bash-profile or whatever... In short, no startx command, no -- :1, and so on. (even more: delete .xinitrc and .bash* from your home directory, and your fiancee's)

 

So when you start your computer, you should end-up with a GUI login screen on CtrlAltF7. You should be able to see virtual consoles on CtrlAltF1 to F6. There should be nothing from CtrlAltF8 to CtrlAltF11, but there may be a log screen on CtrlAltF12. Is all that OK? So let's continue.

 

Edit /etc/sysconfig/desktop, or create this file as root if it does not exist. Inside this file, just make sure DISPLAYMANAGER=Gnome (or gdm, it should be the same). Now reboot (restarting X may not be enough). You should have GDM as a login screen. Is that OK? Does everything work as usual at this point on your single X server? Can you login and work as usual on your single X server?

 

If so, all should be fine. Login as usual. Now look at the menu. Somewhere inside "configuration", or "system", or (I don't know, I have the Mdk8.1 menu, and what's more, it's in French), there should be a menu item stating something like "login with another user using GDM" (I can't tell the exact phrase). Click on it, and a new login screen should appear on CtrlAltF8 (your session is still alive on CtrlAltF7). Your fiancee should be able to login to her desktop without problem. And you should be able to switch from your session to hers and back using the CtrlAltF7 and F8 key-combinations.

 

This all should work especially well, if you use Gnome as your desktop. But it should be OK whatever the desktop you use, though in truth, I once happened to notice display-refresh errors, when switching between a second X server and my session on Fluxbox.

 

One note though: whatever method you choose to start two X servers on the same machine, be it through GDM, or startx, or... there will always be something you'll notice: all devices belong to the first user who logged in, so for example, the user on the second X server won't be able to access /dev/mixer, or /dev/usb/scanner, or... Except if you run a chmod after the 2nd user logged in.

 

Tell me if you have a problem. And more importantly, tell me where/when the problem occured.

Bye,

 

Yves.

Link to comment
Share on other sites

...Maybe this is what the original poster is talking about.

 

To log in my second user, I launch a virtual console, Ctrl-Alt-F1, and after logging in there, execute:

 

startx -- :1

 

(I actually use a script to determine the next available session number and tell the user who is on what session)

 

The new :1 session on Ctrl-Alt-F8 hangs on the blue background screen for some reason. Nothing happens.

 

If I swtich back to :0 via C-A-F7, and then back to :1 via C-A-F8, the X session looks fine (though I still have sound card sharing issues, but that's a different thread :)

 

Don't know why this works, but it does. It's a minor workaround, so I haven't minded yet, but I'm definately going to try going with GDM.

 

Perhaps this is the same problem the original poster is referring to though?

 

D

Link to comment
Share on other sites

Was also ommitted, I see the same problem on both Mandrake 9.0, and Mdk 9.1 RC1 (just upgraded last night, hoped it would fix it)

 

No problems with switching users in Xandros 1.0

 

D

Link to comment
Share on other sites

Did I mention, that my post is not only theory? My wife and I actually use the computer this way. In fact we go even further, by sometimes using an old laptop as a X terminal (dumb mouse+keyboard+screen connecting to the main PC's GDM and power).

 

That was to encourage you :) It can be done !

Link to comment
Share on other sites

The GDM login from the button works great...

 

Even moved it ot the kicker and it works almost like in Xandros..

 

One question though...any way to get that to work from a locked session?

 

Say my session is screen locked and password protected, any way I can pull up a new login screen?

 

Thanks,

 

D

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...