my project as posted here (mserv)
requires x as it runs vlc, for people not familiar with xorg, it doesnt start itself, nor do you just give it an argument and then it will run that program using it etc.
basically your display manager usually is what handles starting it in modern setups, or you use xinit/startx to run the supplied xinitrc/xorg config to figure out what window manager your running, and start that after x has started, then if you close the window manager x will close itself.
basically was looking up as easily to implement as possible(to make it easier to install my project for other people as is usually desired by most people that create packages).
what i found was
use systemd/init to autologin a user and startx using something like
su username -l -c /usr/bin/startx
as the command and have a user for this specific purpose with a local .xinitrc to start my program(have the .xinitrc where it works and starts it up properly)
but the issue trying this was.. it seems to give unexpected results (Atleast to me). where from doing a systemd status mserv.service(the file unit file i made) it shows that it had executed the result and had switched users from root to mserv, but.. the startx starts with
'$[HOME]'
including the single quotes as the home directory and uses the system xinitrc
so not really sure there lol.. tried doing some other stuff like make a script which did the su command, and then presumably would have been continuing the script as mserv, cd into /home/mserv then do start x etc, but similar result ensued.
probably will try messing with it a bit more just to cover my bases before abandoning this approach,
but
also found another approach which seems not worth it in the long run, as involved a modified loginshell, modifying a bashrc for this user, the xinitrc, and then use getty from systemd/init to use the modified loginshell
issue with this is.. if i do nothing other than provide a xinitrc its probably less time consuming to just login and hit startx even over the life span of the server as its a server, they could deploy it no internet access and do update/upgrade 1-2x a year if they even wanted to at all other than if power failed
which will be like 5-10seconds to login and hit startx versus 5+ minutes of reading my horribly written directions/manual on how to get this shit to work.
tldr:
anybody got any other ideas that would be easy to setup, to start x and then this service not as root. before i start digging more
figured would ask since.. kind of an interesting use/edge case