Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: xephyr and lightdm

  1. #1
    Join Date
    May 2013
    Beans
    32

    xephyr and lightdm

    I'm trying to figure how to nest X sessions within lightdm using Xephyr, employing two separate accounts. When I execute
    Code:
    ssh -XfC  account-name@my-computer lightdm-session
    on the client side I get a cascade of errors, so clearly I either need to make changes to my lightdm configuration, or to use something other than lightdm-session in the ssh command. Pointers, anyone?
    Last edited by planarian; July 4th, 2013 at 03:11 AM.

  2. #2
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xephyr and lightdm

    If you are looking at running a local nested X session, you can simply run:
    Code:
    dm-tool add-nested-seat
    ...to open up a second nested session.



    If you want to run a remote nested session, it gets a little more complicated. On the remote host, create the file /usr/local/bin/nestedX with the following content:
    Code:
    #!/bin/bash
    export XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
    /usr/bin/dm-tool add-nested-seat
    ...and make the file executable. Then from the guest system:
    Code:
    ssh -XfC  account-name@my-computer nestedX
    (Note: ensure that openssh-server is installed and properly configured and that port 22 is allowed through the firewall).

    dm-tool (part of lightdm) seems tailored to this but I can't seem to find much in the way of documentation. Passing it --help shows some info:
    Code:
    $ dm-tool --help
    Usage:
      dm-tool [OPTION...] COMMAND [ARGS...] - Display Manager tool
    
    Options:
      -h, --help        Show help options
      -v, --version     Show release version
      --session-bus     Use session D-Bus
    
    Commands:
      switch-to-greeter                   Switch to the greeter
      switch-to-user USERNAME [SESSION]   Switch to a user session
      switch-to-guest [SESSION]           Switch to a guest session
      lock                                Lock the current seat
      list-seats                          List the active seats
      add-nested-seat                     Start a nested display
      add-local-x-seat DISPLAY_NUMBER     Add a local X seat
      add-seat TYPE [NAME=VALUE...]       Add a dynamic seat
    The one thing I haven't been able to figure out is how to change the viewable screen dimensions of the nested session.

  3. #3
    Join Date
    May 2013
    Beans
    32

    Re: xephyr and lightdm

    Thanks for bringing dm-tool to my attention!

    I used your remote-host instructions because although I'm working on a single machine, I want to import a session from another login. Unfortunately, although
    Code:
    ssh -XfC  account-name@my-computer nestedX
    produces the right login prompt, when I enter the password it opens a nested session onto my current desktop, not the one I logged in for....

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xephyr and lightdm

    Quote Originally Posted by planarian View Post
    I used your remote-host instructions because although I'm working on a single machine, I want to import a session from another login. Unfortunately, although
    Code:
    ssh -XfC  account-name@my-computer nestedX
    produces the right login prompt, when I enter the password it opens a nested session onto my current desktop, not the one I logged in for....
    Just to confirm, you are trying to connect to an existing login session on the same computer but have it display in a nested session? If so, I'm not sure thats possible with lightdm.

  5. #5
    Join Date
    May 2013
    Beans
    32

    Re: xephyr and lightdm

    Yes that is what I'm trying to do. But here's the odd thing: If I reverse the client and server, the process works. In fact if I merely execute
    Code:
    dm-tool add-nested-seat
    from the second account (without ssh), the first account appears in a Xephyr window without even asking me for a password. Not only is that bizarre, it would seem to be a significant security hole!

    [EDIT: I may have misunderstood your question. I'm trying to use an existing login, but NOT to connect to an existing session. Rather than login to a virtual terminal, I'd like to access my second account from a window within the first]
    Last edited by planarian; July 4th, 2013 at 02:42 AM.

  6. #6
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xephyr and lightdm

    Quote Originally Posted by planarian View Post
    Yes that is what I'm trying to do. But here's the odd thing: If I reverse the client and server, the process works. In fact if I merely execute
    Code:
    dm-tool add-nested-seat
    from the second account (without ssh), the first account appears in a Xephyr window without even asking me for a password. Not only is that bizarre, it would seem to be a significant security hole!
    I am unable to replicate that. Whenever I create a nested seat (from either login), I am greeted with the login screen.

  7. #7
    Join Date
    May 2013
    Beans
    32

    Re: xephyr and lightdm

    I just realized that my primary account had autologin enabled. Once I switched it off, the greeter appears no matter which account I start from (the desired result). Thanks very much! Now if only I can figure a way to increase the display area....

  8. #8
    Join Date
    May 2013
    Beans
    32

    Re: xephyr and lightdm

    Well, I have it straight from the horse's mouth that there's currently no way to change Xephyr's display area when it's invoked by dm-tool. At the project leader's suggestion, I've submitted a bug report. If anyone here would like to cast a vote, it would probably help speed things along....
    Last edited by planarian; July 5th, 2013 at 12:35 AM.

  9. #9
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: xephyr and lightdm

    Quote Originally Posted by planarian View Post
    Well, I have it straight from the horse's mouth that there's currently no way to change Xephyr's display area when it's invoked by dm-tool. At the project leader's suggestion, I've submitted a bug report. If anyone here would like to cast a vote, it would probably help speed things along....
    Thanks. I've added my name to the affected users list.

  10. #10
    Join Date
    May 2013
    Beans
    32

    Re: xephyr and lightdm

    While we're waiting for a proper update, I decided to go ahead and roll my own. Please understand that I'm not an experienced C hacker -- caveat emptor -- but the attached executable/src ought to do the trick:

    Code:
    dm-tool.modifed add-nested-seat -screen 800x600
    Code:
    dm-tool.modifed add-nested-seat -fullscreen
    My changes only add accommodation for -screen and -fullscreen. The code was taken from version 1.6.0.
    Attached Files Attached Files
    Last edited by planarian; July 6th, 2013 at 09:01 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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