Lauching OBS as a process

adebeau

New Member
Hi,

I need to launch OBS before user logged. So the idea is that OBS starts at boot as a process.
I am using Ubuntu 20.4.
But unfortunately options see,m not to work:
OBS (26.0.2+dfsg1-1)
I am testing option on a terminal window and none of the, seems to work.

Ex : -m does not have any effect for me, OBS is launched with a GUI.
/usr/bin/obs -m
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: Command Line Arguments: -m
info: CPU Name: ....

Is there a way to launch OBS as a process ? Using systemd ?

Thanks for your help,
 
OBS wants an OpenGL context to run. This usually means on the users Desktop. What exactly are you even trying to do?
 
I would like OBS to start without users log in. So using OBS as a service, and push file config for it to stream etc... no users.
 
I tried to launch it using systemd :

obs.service :

Description=OBS Studio
After=graphical.target
Requires=graphical.target

[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/usr/bin/obs -m -p "/root/obs"
Restart=on-failure
KillSignal=SIGINT
TimeoutStopSec=60

[Install]
WantedBy=default.target


But I get issues with Qt
ov. 22 21:29:23 Real2050 systemd[1]: Started OBS Studio.
nov. 22 21:29:23 Real2050 obs[1260]: qt.qpa.xcb: could not connect to display
nov. 22 21:29:23 Real2050 obs[1260]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
nov. 22 21:29:23 Real2050 obs[1260]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
nov. 22 21:29:23 Real2050 obs[1260]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

So I have 2 alternatives :
- launch OBS without GUI
- find a way to launch OBS after graphical environment started, and before user logs in.

Thanks
PS: root account is here just used for testing :)
 
Back
Top