OpenBSD Journal

Second X session on OpenBSD?

Contributed by jose on from the making-X-do-neat-things dept.

ysgdhio writes: "I discovered that in Linux, it's possible to start a second X Windows session by doing this:
$ startx -- :1
But when I try it on my OpenBSD 3.4 machine, it doesn't work. Can someone tell me why? And, is there some way to make it work? Thanks."

(Comments are closed)

  1. By danh () on

    If I'm not mistaken, this is due to the xf86(4) driver and the securelevel. Try with a securelevel less than or equal to 0.

    1. By Anonymous Coward () on

      Is anyone using KDE Desktop Sharing on OpenBSD or similar program? I am looking into a solution similar to pcanyware.

      So far, KDE Desktop Sharing won't listen to the network (?)

      1. By logan () on


        1. By Anonymous Coward () on

          AFAIK, thightvnc will use a new virtual display instead of using the current. You may want to check on x0rfbserver

          1. By MotleyFool () on

            anyone ever try gemsvnc on OpenBSD? It's supposed to do what x0rfbserver does and is newer.

  2. By j0rd () on

    I'd like to be able to do this with out having to change my kern.securelevel if possible.

    X on ctrl+alt+f5 and
    rdesktop fullscreened on ctrl+alt+f6

    1. By tedu () on

      if your X server needs to open /dev/mem, you can't run two of them without securelevel 0.

      so basically, yeah, you need to set securelevel down. but it's no so bad. securelevel doesn't really mean much.

  3. By Anonymous Coward () on

    You can also start a nested X session with Xnest:

    $ Xnest :1 &
    $ xterm -display :1 &
    $ twm -display :1 &

    Good to know if you want to try out new window managers, or if you make changes to your window manager config files and don't want to restart X until you know it's actually working.

  4. By Anonymous Coward () on

    I managed to do this on accident once with gdm, I had one x session running on F7, with another to a remote machine (via xdmcp) on F8. It was an accident though, so I'm not entirely sure how I did it, and have since formatted that machine. I merely thought of it as an oddity as I had never thought of trying that before. I didn't have any use for it so I moved on.

  5. By RC () on

    You don't need to run startx from the command-line manually to get multiple sessions. If you use XDM, just edit 'Xservers' (in /etc/X11/xdm/) and copy that single uncommented line, with a :1 (or up) instead of a :0.

    That's also how you can have an X display on your local machine, comming over the network from a remote server.

  6. By Moron Hunter () on

    hi, i just discovered, THAT IM A COMPLETE MORON! OMFG!@#$$%^&

  7. By Anonymous Coward () on

    Why would you want to bother with two local X servers? When I've needed to have a citrix login to a windows box, I've just had that running in one of 4 desktops, within the same X session.

    1. By Strog () on

      I've seen a setup where there was two monitors, keyboards and mice. One set was configured to :0 and the other was configured to :1. I thought that it was a very cool setup since you have 2 users working off the same machine. I'm not sure how far you could take this but it would be cool to throw a couple quad video cards and usb keyboards/mice on a beefy box. Mmm 4 dual setups. lol

      I tend to run everything on different desktops too but I use to run a full screen vnc session on the second monitor. I have a larger monitor now and I can do everything on one screen and multiple desktops now.

      1. By RC () on

        That's really not a good idea right now. The scheduling isn't good enough that each user would get equal time. One user could hog it all, and another would have a real slow system.

        I'd like to do it myself, but virtualization isn't quite there yet.

  8. By Anonymous Peon () on

    ...Has anyone found a trick to emulating 'fast user switching' at a single machine without running two servers on two vtys?

    The "xmove" proxy would seem to allow the trick, but can't feed through GLX or similar, so no hope of pausing Quake (or using it as the basis for a generalized solution)...

    [At this point, I'm past my personal need for it, and some of the fabled alternative display servers (Y-Windows) might make it an easier problem in their models... But it's become a point of trivia whether there's a way to do this with X, preserving some semblence of 'native' performance on things like hardware GL.]


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]