Restart weston with tty in graphics mode
We would like to restart weston, in case of a crash, or if the watchdog detects a problem.
If weston is restarted with the same parameter --tty=1
, we get the error message tty1 is already in graphics mode, is another display server running?
.
Our provisional solution is to patch libweston/launcher-direct.c
:
iff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c
index 9fa329b6..b55f8be9 100644
--- a/libweston/launcher-direct.c
+++ b/libweston/launcher-direct.c
@@ -160,7 +160,6 @@ setup_tty(struct launcher_direct *launcher, int tty)
if (kd_mode != KD_TEXT) {
weston_log("%s is already in graphics mode, "
"is another display server running?\n", tty_device);
- goto err_close;
}
ioctl(launcher->tty, VT_ACTIVATE, minor(buf.st_rdev));
Maybe it is a good solution to add a command line parameter that turns off this test?