Categories
Development Linux

.xinitrc seems to be ignored if /usr/bin/xinit is called from systemd service

This is on Xubuntu 18.04.

I’m trying to replace lightdm with my own application running full screen on boot up.

I can run xinit from root shell, and it correctly takes my /root/.xinitrc commands and runs my program full screen.

which xinit  #gives "/usr/bin/xinit"

I tried to make a /lib/systemd/system/fullscreen.service with:

[Unit]
Description=Fullscreen App
#Conflicts=getty@tty7.service plymouth-quit.service
#After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service

[Service]
ExecStart=/usr/bin/xinit

But when I run

systemctl daemon-reload
systemctl start fullscreen

It just loads an xterm terminal logged into root.

any ideas why there is any difference between the two? And how to make it run the same as xinit directly?

Leave a Reply

Your email address will not be published. Required fields are marked *