I have Apache2 installed on my laptop and I want to be able to start GUI programs with the www-data user. I tried this:

$ sudo -u adrian xhost +

and I tried to run the following script with the www-data user:

export DISPLAY=:0
notify-send "Test!"

but nothing happened. What's the problem and how can I solve this?

  • Did you share ~/.Xauthority as suggested here? Might this even be a duplicate of said question? – Fiximan Sep 30 at 8:48
  • That file isn't exsist in my system. – Adrián Sopár Sep 30 at 10:13
  • That is most uncommon. How do you connect to the system? – Fiximan Sep 30 at 10:16
  • It's Ubuntu 20.04.1 LTS desktop OS on my laptop. – Adrián Sopár Sep 30 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.