Skip to content

Let users force display number to match seat number #349

@iphands

Description

@iphands

I would like to have seat0 always have :0 and seat1 have :1.
Right now it seems if I try and force this using any/all of:

  • xserver-command=/usr/bin/X :0
  • xserver-display-number=0

I end up with a situation like:

$ ps aux | fgrep X
root       21768  4.6  0.0 6652828 78060 ?       S<l  23:26   0:00 /usr/bin/X :1 :0 -layout seat1 -seat seat1 -auth /var/run/lightdm/root/:0 -nolisten tcp
root       21770 12.5  0.0 25396784 64132 tty7   S<sl+ 23:26   0:01 /usr/bin/X :0 :1 -layout seat0 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch

I think this is due to how the code appends display_number no matter what.
https://github.com/canonical/lightdm/blob/main/src/x-server-local.c#L480

And that number is selected via:
https://github.com/canonical/lightdm/blob/main/src/x-server-local.c#L157

Maybe we could support a forced_display_number and fail if its unavailable?
Or even attempt to line up with the seat number?
Or attempt to line up with a desired_display_number and fall back to next available if that does not work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions