|
|
||||
|
Solution for „Error: Can’t open display: (null)“ on Linux!02/17/2023 (529x read) No protocol specified If you’re using a Linux system, you might encounter this error message: „No protocol specified – Error: Can’t open display“. This might occur when trying to start a graphical application. The error indicates that you are unable to access the X server, which is responsible for displaying graphical content. In our example, we try to run the xdotool.
Another solution, if running the app in a script, is to try to export the display by entering these lines: export DISPLAY=":0" export XAUTHORITY=/home/pi/.Xauthority Our xdotool example, which shall refresh the firefox browser via an SSH connection, would look like this: #!/bin/bash export DISPLAY=":0" export XAUTHORITY=/home/pi/.Xauthority xdotool getactivewindow xdotool key F5 Running the script with sudo permissions should help to get rid of the „Can’t open display: (null)“ error: sudo sh firefox-reload.sh
|
More about Solution for "Error: Can’t open display: (null)" on Linux! |