You are not logged in.
Hi folks,
I have a problem starting compton as a systemd service. The service file is
[Unit]
Description=Compositing manager
After=dbus.service
Requires=dbus.service
[Service]
ExecStart=/usr/bin/compton --backend glx --paint-on-overlay --vsync opengl-swc
Environment=DISPLAY=:0
[Install]
WantedBy=multi-user.targetand the error
● compton.service - Compositing manager
Loaded: loaded (/etc/systemd/system/compton.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2016-11-13 08:20:18 GMT; 2s ago
Process: 24252 ExecStart=/usr/bin/compton --backend glx --paint-on-overlay --vsync opengl-swc (code=exited, status=1/FAILURE)
Main PID: 24252 (code=exited, status=1/FAILURE)
Nov 13 08:20:18 Tex systemd[1]: Started Compositing manager.
Nov 13 08:20:18 Tex compton[24252]: No protocol specified
Nov 13 08:20:18 Tex compton[24252]: session_init(): Can't open display.
Nov 13 08:20:18 Tex systemd[1]: compton.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 08:20:18 Tex systemd[1]: compton.service: Unit entered failed state.
Nov 13 08:20:18 Tex systemd[1]: compton.service: Failed with result 'exit-code'.I can start it manually, though I still assume it's a permissions error. Any idea where to look?
Last edited by Roken (2016-11-13 13:09:49)
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline
Is compton a wayland compositor, I thought compton was just for X?
In either case, is this a user service, or a system service? It looks like the latter as you've put it in multiuser target.
If compton is a wayland compositor now, then just making this a user service should work.
You say you can start compton manually - really, from a tty without X?
EDIT: the DISPLAY environment variable seems to indicate this is for X.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
It's for X, and I can start it from a regular xterminal without issue. It only fails when started as a service. Started from /etc/systemd/system/ and multi-user.target
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline
Well there you go.
It needs to be started as a regular user while X is running. Making a system-level service leads to it being run as root without X started.
Why are you trying to make this into a systemd service anyways? You should start your comptom in your xinitrc.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
I tried that as well, it wouldn't auto start. Having said that, I went back to xfce's session and startup and altered the launch to daemonize it (it wasn't before, and used to work this way), and that's got it auto starting again. I'll mark as SOLVED.
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline