xset: unable to open display ""
by anothernewbie123 from LinuxQuestions.org on (#6NB54)
When logging in locally as an ordinary user in the text mode, there is an error:
Code:xset: unable to open display ""The same also happens in the graphical mode when switching to root in the bash shell, regardless of terminal program.
Code:user@hostmachine:~> sudo -i
[sudo] password for root:
xset: unable to open display ""
hostmachine:~ # gimp
Cannot open display:
hostmachine:~ # firefox
Error: no DISPLAY environment variable specified
hostmachine:~ # gimp &
[1] 4668
hostmachine:~ # Cannot open display:
^C
[1]+ Exit 1 gimp
hostmachine:~ # firefox &
[1] 4684
hostmachine:~ # Error: no DISPLAY environment variable specified
^C
[1]+ Exit 1 firefox
hostmachine:~ # exit
logout
user@hostmachine:~> env | grep -E -i 'x11|xorg|wayland'
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
XNLSPATH=/usr/share/X11/nls
PATH=/home/user/bin:/usr/local/bin:/usr/bin:/bin:/snap/bin:/usr/X11R6/bin
user@hostmachine:~> lsb_release -a
LSB Version: n/a
Distributor ID: openSUSE
Description: openSUSE Leap 15.5
Release: 15.5
Codename: n/a
user@hostmachine:~> uname -r
5.14.21-150500.55.65-default
user@hostmachine:~> echo "$BASH_VERSION"
4.4.23(1)-release
user@hostmachine:~> echo $DESKTOP_SESSION
xfce
user@hostmachine:~> echo $XDG_CURRENT_DESKTOP
XFCE
user@hostmachine:~> Xorg -version
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux hostmachine 5.14.21-150500.55.65-default #1 SMP PREEMPT_DYNAMIC <removed> x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.14.21-150500.55.65-default root=UUID=<removed> splash=silent preempt=full mitigations=auto quiet security=apparmor
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
user@hostmachine:~> rpm -qa |grep xorg-x11-server
xorg-x11-server-Xvfb-21.1.4-150500.7.26.1.x86_64
xorg-x11-server-extra-21.1.4-150500.7.26.1.x86_64
xorg-x11-server-21.1.4-150500.7.26.1.x86_64
user@hostmachine:~>Code:user@hostmachine:~> xfce4-about
xfce4-about-Message: 13:50:30.528: No vendor information found in "/usr/share/xfce4/vendorinfo".
user@hostmachine:~>Quote:
How should the error be dealt with?
Code:xset: unable to open display ""The same also happens in the graphical mode when switching to root in the bash shell, regardless of terminal program.
Code:user@hostmachine:~> sudo -i
[sudo] password for root:
xset: unable to open display ""
hostmachine:~ # gimp
Cannot open display:
hostmachine:~ # firefox
Error: no DISPLAY environment variable specified
hostmachine:~ # gimp &
[1] 4668
hostmachine:~ # Cannot open display:
^C
[1]+ Exit 1 gimp
hostmachine:~ # firefox &
[1] 4684
hostmachine:~ # Error: no DISPLAY environment variable specified
^C
[1]+ Exit 1 firefox
hostmachine:~ # exit
logout
user@hostmachine:~> env | grep -E -i 'x11|xorg|wayland'
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
XNLSPATH=/usr/share/X11/nls
PATH=/home/user/bin:/usr/local/bin:/usr/bin:/bin:/snap/bin:/usr/X11R6/bin
user@hostmachine:~> lsb_release -a
LSB Version: n/a
Distributor ID: openSUSE
Description: openSUSE Leap 15.5
Release: 15.5
Codename: n/a
user@hostmachine:~> uname -r
5.14.21-150500.55.65-default
user@hostmachine:~> echo "$BASH_VERSION"
4.4.23(1)-release
user@hostmachine:~> echo $DESKTOP_SESSION
xfce
user@hostmachine:~> echo $XDG_CURRENT_DESKTOP
XFCE
user@hostmachine:~> Xorg -version
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux hostmachine 5.14.21-150500.55.65-default #1 SMP PREEMPT_DYNAMIC <removed> x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.14.21-150500.55.65-default root=UUID=<removed> splash=silent preempt=full mitigations=auto quiet security=apparmor
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
user@hostmachine:~> rpm -qa |grep xorg-x11-server
xorg-x11-server-Xvfb-21.1.4-150500.7.26.1.x86_64
xorg-x11-server-extra-21.1.4-150500.7.26.1.x86_64
xorg-x11-server-21.1.4-150500.7.26.1.x86_64
user@hostmachine:~>Code:user@hostmachine:~> xfce4-about
xfce4-about-Message: 13:50:30.528: No vendor information found in "/usr/share/xfce4/vendorinfo".
user@hostmachine:~>Quote:
Device: hostmachine OS Name: openSUSE Leap 15.5 OS Type: 64-bit Distributor: openSUSE Xfce Version: 4.18 GTK Version: 3.24.34 Kernel Version: 5.14.21-150500.55.65-default CPU: Intel Core i5-8265U CPU @ 1.60Ghz x 8 Memory: 7.6 GiB GPU: Mesa Intel UHD Graphics 620 (7.6 GiB) |