Score:0

DISPLAY and XAUTHORITY environement variables missing in the systemd user environment list

al flag

I m not able to run graphical application as systemd service in user mode because the DISPLAY and XAUTHORITY variable are missing in the result of : systemctl --user show-environment.

How can add these variable so that they appear in the list and my user service can make use of it.

vanadium avatar
cn flag
You do not want to run graphical applications as a systemd service. Instead of asking about how you think you can do this (Problem *Y*), ask about how you could achieve what you want (your real problem *X*). Then people can come up with adapted direct help.
vanadium avatar
cn flag
So it appears you aready got help on Problem X, but you seem to persist: https://askubuntu.com/questions/1474738/gui-application-fails-to-launch-as-a-systemd-servicedaemon-in-system-session Carefully read the answer there again.
vanadium avatar
cn flag
Does this answer your question? [GUI application fails to launch as a systemd service(daemon) in system session](https://askubuntu.com/questions/1474738/gui-application-fails-to-launch-as-a-systemd-servicedaemon-in-system-session)
Vipul Gupta avatar
al flag
@vanadium From this answer I am aware that running GUI application via systemd service is not possible in system mode, but I m sure that it is possible in the user session(not recommended though), and hence my question.
vanadium avatar
cn flag
You say it: not recommended though. So why would you try to do something that is not recommended, and that appears actually difficult to do, while other recommended approaches may be available?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.