Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let users force display number to match seat number #349

Open
iphands opened this issue Mar 27, 2024 · 2 comments
Open

Let users force display number to match seat number #349

iphands opened this issue Mar 27, 2024 · 2 comments

Comments

@iphands
Copy link

iphands commented Mar 27, 2024

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?

@iphands
Copy link
Author

iphands commented Mar 27, 2024

This was being looked for here: https://unix.stackexchange.com/questions/721870/force-seatn-to-display-n

@iphands
Copy link
Author

iphands commented Mar 27, 2024

Oh I even tried this after reading the code:

[Seat:seat0]
xserver-command=/usr/bin/X :0
xserver-layout=seat0
xserver-display-number=0
minimum-display-number=0

[Seat:seat1]
xserver-command=/usr/bin/X :10
xserver-layout=seat1
xserver-display-number=10
minimum-display-number=10

But I guess it doesnt work (same X :0 :1 and X :1 :0 behavior) because minimum-display-number is not valid for an individual seat?

Its a global conf only option or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant