So I'm trying to run an update to the tripwire database via ./tripwire --update --twrfile ./report/name.twr as described here as root on my computer but I get these errors (note that --init and --check worked fine):

No protocol specified
QXcbConnection: Could not connect to display :0
Interactive Update failed.
Error: Editor could not be launched.

I'm running Debian 9.1 with KDE. How can I fix this problem?


It is simple you don't have the DISPLAY=:0 environment variable set.

  1. You could run:

    export DISPLAY=:0; ./tripwire --update --twrfile ./report/name.twr
  2. or you could logout from the terminal root session and start new one without passing - argument that will make you inherit env variables of current session including the DISPLAY variable. So press ctrl+d and then run su. Type your password, then you can check your environment with the env command and grep for DISPLAY:

    env | grep DISPLAY
  3. you could change your default editor to something that is console based like nano or vim. You should change as the article mentioned EDITOR field in your tripwire configuration file.

    Tripwire will display the report file using the default text editor specified on the EDITOR line of the Tripwire configuration file

Choose the way you want to do it. Either one of those three ways will allow you to open GUI based application or change the GUI text editor setting into the console based one.

The first one and second one are simplest assuming that you want to use the graphical editor to view the content of the Tripwire reports.


Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:

$ xhost si:localuser:root

$ sudo -i
$ ...your-graphical-app...

Restore the default permissions:

$ xhost -si:localuser:root

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.