Results 1 to 6 of 6

Thread: Posibility of having multiple X sessions?

  1. Back To Top    #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    16
    Threads
    3
    Local Date
    Jun 3rd 2020
    Local Time
    06:06 AM

    Posibility of having multiple X sessions?

    Hi, I just installed Kubuntu 18.04 on my laptop, and I was wondering if it's possible to have multiple X sessions at once.

    For example, I can open as many TTY as I want (only from F2 to F6, actually, F1 seems to be default X session) but, when I type 'startx' or 'startx -- :1' on one of those terminals, the session seems to open fine, but the first one gets corrupted, session is closed and error messages appears all over the screen.

    Is there a safe way of doing this? Or is it just a bad idea?

    In the case there IS a safe way, since I also installed the 'ubuntu-desktop' package, can I choose to open a KDE or GNOME session via command?

    Thanks in advance!

  2. Back To Top    #2
    Insert Pithy Nothingness here claydoh's Avatar
    Join Date
    Sep 2005
    Location
    Savannah GA
    Posts
    8,239
    Threads
    228
    Local Date
    Jun 3rd 2020
    Local Time
    12:06 AM
    Homepage: Go to claydoh's homepage
    I have used this in the past, seems to work still

    Code:
    export DISPLAY=:2
    startx -- :2
    The first line is important as you are already using the display marked as " :1"
    My first session logs out when I log in to the second session, and vice versa.

    It should work with multiple desktops, if you use the correct command. startx starts the default desktop, startplasma-x11 would start a plasma session (it could still be startkde in 18.04, not sure on that, though). Gnome will have a similar command gnome-shell or gnome-session, but I oddly can't quickly find the current correct answer, lol. I do not know if you will be logged out of your first session or not, however. It shouldn't, I'd guess, as you are not using SSDM (the login manager) to handle things when you start a session manually. There also may be some file edits that may need to be done, but I have not delved too deeply into the topic.

  3. Back To Top    #3
    Kubuntu as a Second Language
    Join Date
    Apr 2008
    Location
    Auckland, New Zealand
    Posts
    1,889
    Threads
    68
    Local Date
    Jun 3rd 2020
    Local Time
    04:06 PM
    I looked into this last week, see this post.

    I didn't do anything other than use "switch user", and log in as another user. I was surprised to get a different X session; $DISPLAY was ":1". ctrl-alt-f2 instead of starting a tty switches to the other session.
    Regards, John Little

  4. Back To Top    #4
    Junior Member
    Join Date
    Apr 2012
    Posts
    16
    Threads
    3
    Local Date
    Jun 3rd 2020
    Local Time
    06:06 AM
    Quote Originally Posted by claydoh View Post
    My first session logs out when I log in to the second session, and vice versa.
    So, can't I have two X sessions with the same user at once? Like non-X sessions? Because I can open as many TTYs as I want with the same user at the same time, can't I do the same with X?

    Thanks.

  5. Back To Top    #5
    Insert Pithy Nothingness here claydoh's Avatar
    Join Date
    Sep 2005
    Location
    Savannah GA
    Posts
    8,239
    Threads
    228
    Local Date
    Jun 3rd 2020
    Local Time
    12:06 AM
    Homepage: Go to claydoh's homepage
    Quote Originally Posted by eXtremeDevil View Post
    So, can't I have two X sessions with the same user at once? Like non-X sessions? Because I can open as many TTYs as I want with the same user at the same time, can't I do the same with X?

    Thanks.
    cli sessions, you can have as many as you want. I would think that multiple X sessions with the same user should be doable, but my very brief test, it logged me out of my first Plasma session when i logged in to the second Plasma session. It could be that the display manager may be doing this. It is SDDM in Kubuntu, but there are others. If you installed Ubuntu-desktop on top of Kubuntu, you may be using Gnome's display manager, GDM.

    You also should be able to use the "switch user" option in the "Leave" menu, and then log i n, selecting the Gnome desktop session on the lower right of the login screen (if you are using SDDM)

    Luckily, you won't break anything by trying things out, either using the commands, or the user switching

  6. Back To Top    #6
    Junior Member
    Join Date
    Apr 2012
    Posts
    16
    Threads
    3
    Local Date
    Jun 3rd 2020
    Local Time
    06:06 AM
    Sorry for the looooooooooooong delay, but I finally tested it without any problems. My doubt was I the system is able to have multiple X sessions with the same user, but all my doubts are resolved now and things are working perfectly.

    Thanks to all for the support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •