-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xtitle: can't open display. #25
Comments
You have to specify the X display name, like so: In a shell script: #!/bin/sh
DISPLAY=:0 xtitle >> ~/dump In your service file:
There's probably a way for you to do it in the service file instead of a separate script, but I haven't found it yet. |
To set environment variables directly in the service file you can use the [Service]
ExecStart=/usr/bin/env DISPLAY=:0 /usr/bin/xtitle >> ~/dump However, the redirection (the
But you can call the shell itself to use that specific feature (in which case you can drop [Service]
ExecStart=/usr/bin/sh -c 'DISPLAY=:0 xtitle >> ~/dump' That said, if all you want is to monitor the window title as it changes, systemd is probably the wrong tool for what you are (and OP was at some point) trying. (Unless it's to fork the process to background to allow monitoring it via Instead, depending on your environment you can subscribe to the window manager directly and only call |
I tried to create a systemctl service that would dump title every few seconds
Hre is the service file:
The text was updated successfully, but these errors were encountered: