-
Notifications
You must be signed in to change notification settings - Fork 305
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
Support for Multiple TTYs #623
base: master
Are you sure you want to change the base?
Conversation
Alias=display-manager.service | ||
WantedBy=multi-user.target | ||
# Alias=display-manager.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the alias to display-manager.service
removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So after looking at #608 and a bit of systemd documentation online, it looks like WantedBy=multi-user.target
is required for it to have an installation config. (It's apparently sort of like a preset?) However, the Alias=display-manager.service
should still be needed, so I'm not sure why you've removed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you keep it, it doesn't let you enable the service. (Probably because you can enable the template instance multiple times). You can try it out with sudo systemctl enable ly@tty2
and it'll throw this error:
Failed to enable unit: Cannot alias [email protected] as display-manager.service.
It isn't needed for Ly though, been running it on tty2 and tty9 since I created this pull request. I think sddm and gdm are the only ones that create a display-manager alias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't needed for Ly though, been running it on tty2 and tty9 since I created this pull request. I think sddm and gdm are the only ones that create a display-manager alias.
I think the main reason to have it is to prevent Ly and any other display manager (e.g. SDDM or GDM) from colliding with each other at startup.
pub const vt = @cImport({ | ||
@cInclude("linux/vt.h"); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other header file that can be included instead of a Linux-specific one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look this week.
// This will set the current active VT as our TTY. | ||
var vtstat: interop.vt.vt_stat = undefined; | ||
_ = std.c.ioctl(std.c.STDIN_FILENO, interop.VT_GETSTATE, &vtstat); | ||
config.tty = @intCast(vtstat.v_active); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note, this would completely override the TTY option and thus make it useless. I think a better idea would be to make the default value 0
, and if it is, get the TTY number from the current active VT.
This allows for Ly to run on multiple ttys concurrently. It utilizes systemd templates to support multiple instances. It also will dynamically change the tty, allowing for the desktop environment to start up correctly.
Not sure if this is exactly what we being looked for in #532 but it is a solution that is fairly simple.