You are not logged in.
Hi,
I am trying to run both Kodi and Retroarch in "standalone" mode using systemd services.
I used kodi-standalone-service (AUR) as base for both services.
Here are said services files:
kodi.service
[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty1
Environment=WINDOWING=x11
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
WantedBy=graphical.targetretroarch.service
[Unit]
Description=Systemd service and user to run Retroarch in stand-alone mode
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty2.service
[Service]
User=brix
Group=users
PAMName=login
TTYPath=/dev/tty2
Environment=WINDOWING=x11
ExecStart=/usr/bin/xinit /usr/bin/retroarch -- :0 -nolisten tcp vt2
Restart=always
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
WantedBy=graphical.targetBasically I changed tty1/vt1 to tty2/vt2 so retroarch would run on tty2 and I would be able toggle from one to another with Ctrl+Alt+F1/F2
But it doesn't work...
Kodi starts just fine but when I try to start retroarch I end up with an error "Server is already active for display 0"
So i suspect I don't have the right approach here, does anyone have any idea how to achieve this or what's is wrong with my services files?
Thanks!
PS: I also tried retroarch-standalone-service (AUR) with the same result.
Offline
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1ExecStart=/usr/bin/xinit /usr/bin/retroarch -- :0 -nolisten tcp vt2:0 is the X11 display…
Offline
The error tells you that an xorg server is already running for the display called "0", If you want to run a second x server, you'll have to choose a different display.
Last edited by progandy (2020-04-16 12:19:18)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1ExecStart=/usr/bin/xinit /usr/bin/retroarch -- :0 -nolisten tcp vt2:0 is the X11 display…
So if I replace :0 by :1 in one of the unit would do the trick?
Offline
Feel encouraged to try.
Offline
Or replace one of them by :3 or :7, it really doesn't matter as long as they are different. I've always found it frustrating that vt numbers start from 1 yet most people number Xorg displays starting from 0. Just because xorg allows :0 as a display number doesn't mean you have to use it.
My system is set up to make the display and vt number the same: :1 on vt1, :2 on vt2, etc. If I ever need an xorg display not running on a local tty, I'd just use a display number larger than the number of ttys (or maybe I could use :0 for that).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline