Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
8544
views
How to enable xhost access from second user when display:0 is on first user?
Here is my situation: I have two (sudo) users on a machine: 1. `userA` (created first on the machine. This is also where display `:0` is attached) 2. `userB` (created later) Being on `userA` I do: ```bash export DISPLAY=:0.0 xclock ``` And the clock opens on `DISPLAY:0` as intended. Now, I want the...
Here is my situation:
I have two (sudo) users on a machine:
1.
userA
(created first on the machine. This is also where display :0
is attached)
2. userB
(created later)
Being on userA
I do:
export DISPLAY=:0.0
xclock
And the clock opens on DISPLAY:0
as intended.
Now, I want the same steps to work on userB
. But unfortunately, it shows:
No protocol specified
xhost: unable to open display ":0.0"
What I tried:
1. Creating a trusted xauth key using: xauth generate :0.0 . trusted
which again shows unable to open display ":0.0"
2. Copying the /home/userA/.Xauthority
to /home/userB/.Xauthority
. (Note: I did not see any key pertaining to display :0 in the userA
xauth list, even though it works.)
3. Creating trusted xauth key for :0
on userA
and copying that key to userB
.
None of these worked.
**What worked:**
1. I log-in to userA
. I export DISPLAY=:0.0
and then xhost +
to enable access from all clients.
2. I log back in to userB
. I export DISPLAY=:0.0
and then xclock
.
I want to eliminate Step 1. I do NOT want to log-in to userA
each time. And I did try to xhost +
from userB
, which shows error already shown above.
How can I run xhost +
from userB
, while also making it think it has the DISPLAY:0
access?
**Edit**: As mentioned by @user414777, I was able to:
# On userA
$ xhost +si:localuser:userB
# On userB
$ export DISPLAY=:0.0 ; xclock
And make it work. But these changes don't stay post-reboot.
# After rebooting, on userB
$ export DISPLAY=:0.0 ; xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0.0
I'm running Ubuntu 18.04 LTS, 4.18.0-15-generic
**SOLVED**
I eventually went with a slightly insecure and modified suggestion by @user414777. Instead of adding the change in ~/.xsession
or Xsession.d
, I added that line in /etc/profile
, which applies the change for all users.
Karan Shah
(121 rep)
Oct 8, 2020, 05:27 AM
• Last activity: Jul 10, 2025, 01:08 PM
7
votes
1
answers
24117
views
Xauthority problem xdpyinfo: unable to open display "".
I am trying to run a program after enabling X windows port forwarding. My sshd_config file in /etc/ssh/sshd_config is configured such that: X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes and my ssh_config file in /etc/ssh/ssh_config has: Host * ForwardAgent yes ForwardX11 yes I try to ena...
I am trying to run a program after enabling X windows port forwarding.
My sshd_config file in /etc/ssh/sshd_config is configured such that:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
and my ssh_config file in /etc/ssh/ssh_config has:
Host *
ForwardAgent yes
ForwardX11 yes
I try to enable X Windows port forwarding with
lemon:~ # ssh -X localhost
lemon:~ # echo $DISPLAY
lemon:~ # /usr/bin/SMclient
xdpyinfo: unable to open display "".
Unable to launch GUI due to X server display setting problem, Exiting .
So $DISPLAY is set to nothing. I have tried everything I've seen online. Originally there was no .Xauthority file so I copied from
/var/run/gdm/auth-for--/database
and renamed the file .Xauthority
I then tried
lemon:~ # xauth generate :0 . trusted
Invalid MIT-MAGIC-COOKIE-1 keyxauth: (argv):1: unable to open display ":0".
When this didn't work, I deleted the old .Xauthority file and then:
lemon:~ # touch ~/.Xauthority
lemon:~ # xauth generate :0 . trusted
No protocol specified
xauth: (argv):1: unable to open display ":0".
And many others suggested to run host + which just leads to
lemon:~ # xhost +
xhost: unable to open display ""
CrazyCray
(71 rep)
Aug 8, 2017, 07:31 PM
• Last activity: May 15, 2025, 09:06 AM
0
votes
1
answers
13890
views
xhost: unable to open display "desktop:0"
UPDATE 1: I am not using SSH. I am using a local machine. UPDATE 2: I restarted the X and notice that the Xauthority file that I am exporting to is actually being updated: $ sudo systemctl restart display-manager $ ls /run/user/1000/gdm/Xauthority* -rwx------ 1 mona mona 96 Jan 25 16:07 /run/user/10...
UPDATE 1: I am not using SSH. I am using a local machine.
UPDATE 2: I restarted the X and notice that the Xauthority file that I am exporting to is actually being updated:
$ sudo systemctl restart display-manager
$ ls /run/user/1000/gdm/Xauthority*
-rwx------ 1 mona mona 96 Jan 25 16:07 /run/user/1000/gdm/Xauthority
Also, after I restarted the X, the other two Xauthority files, namely
/run/user/1000/gdm/Xauthority-c
and /run/user/1000/gdm/Xauthority-l
, are gone as can be seen below:
$ fd Xauthority /
/run/user/1000/gdm/Xauthority
and I can call xauth after reboot:
$ xauth
Using authority file /run/user/1000/gdm/Xauthority
xauth>
Following https://unix.stackexchange.com/questions/199891/invalid-mit-magic-cookie-1-key-when-trying-to-run-program-remotely I tried:
[9080:9072 0:2035] 02:14:50 Mon Jan 25 [mona@goku:pts/0 +1] ~/research/code/vision/integration
$ export DISPLAY=desktop:0
18838/31772MB(vision)
and then:
$ xhost +local:
xhost: unable to open display "desktop:0"
how could I fix this problem?
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Another similar example:
$ xclock
Error: Can't open display: desktop:0
More details:
$ xclock
Error: Can't open display: desktop:0
27296/31772MB
[3266:3258 3:2008] 02:54:16 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ export DISPLAY=":0.0"
26016/31772MB
[3266:3258 3:2009] 02:57:24 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0.0
$ export DISPLAY=":0"
26238/31772MB
[3266:3258 3:2011] 02:57:40 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0
$ xhost +mona
Invalid MIT-MAGIC-COOKIE-1 keyxhost: unable to open display ":0"
$ firefox
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Error: cannot open display: :0
$ xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0
25694/31772MB
[3266:3258 3:2026] 03:04:35 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ export DISPLAY=desktop:0
25694/31772MB
[3266:3258 3:2027] 03:04:49 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ xclock
Error: Can't open display: desktop:0
Also, I am having weird characters in Xauthority file:
$ xrandr | nc termbin.com 9999
Invalid MIT-MAGIC-COOKIE-1 keyCan't open display :0
21618/31772MB
[9136:3258 0:2002] 03:49:16 Mon Jan 25 [mona@goku:pts/2 +1] ~
$ fd Xauthority /
/run/user/1000/gdm/Xauthority
/run/user/1000/gdm/Xauthority-c
/run/user/1000/gdm/Xauthority-l
22048/31772MB
[9136:3258 0:2003] 03:51:26 Mon Jan 25 [mona@goku:pts/2 +1] ~
$ cat /run/user/1000/gdm/Xauthority-c
22048/31772MB
[9136:3258 0:2004] 03:51:49 Mon Jan 25 [mona@goku:pts/2 +1] ~
$ cat /run/user/1000/gdm/Xauthority-l
22081/31772MB
[9136:3258 0:2005] 03:51:58 Mon Jan 25 [mona@goku:pts/2 +1] ~
$ cat /run/user/1000/gdm/Xauthority
gokuMIT-MAGIC-COOKIE-1R��9��s{�H��H�l��gokuMIT-MAGIC-COOKIE-1R��9��s{�H��H�l22081/31772MB
[9136:3258 0:2006] 03:52:03 Mon Jan 25 [mona@goku:pts/2 +1] ~
Also, setting it to the found Xauthority file didn't solve the problem:
$ export XAUTHORITY=/run/user/1000/gdm/Xauthority
22022/31772MB
[9136:3258 0:2010] 03:54:31 Mon Jan 25 [mona@goku:pts/2 +1] ~
$ xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0
I am uid 1000:
uid=1000(mona) gid=1000(mona) groups=1000(mona),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)
I also have these about xauth
:
$ xauth info
Authority file: /run/user/1000/gdm/Xauthority
File new: no
File locked: no
Number of entries: 2
Changes honored: yes
Changes made: no
Current input: (argv):1
21740/31772MB
[11979:11971 0:2016] 05:26:34 Mon Jan 25 [mona@goku:pts/0 +1] ~
$ xauth list
goku/unix: MIT-MAGIC-COOKIE-1 SECRET_KEY
#ffff#676f6b75#: MIT-MAGIC-COOKIE-1 SECRET_KEY

Mona Jalal
(119 rep)
Jan 25, 2021, 07:18 PM
• Last activity: Apr 4, 2025, 06:02 AM
11
votes
5
answers
14819
views
How to run graphical applications as root under wayland
Under the new Wayland display server, several applications requiring root permission fail to run. I actually have an answer (one way of working around the issue). I welcome any better solutions or criticisms. Many other answers to this issue recommend adding root to xhost which, while it solves the...
Under the new Wayland display server, several applications requiring root permission fail to run. I actually have an answer (one way of working around the issue). I welcome any better solutions or criticisms.
Many other answers to this issue recommend adding root to xhost which, while it solves the issue, breaks the Wayland security model a bit. It is much better that we add root to xhost only for the duration of the running of the program, be it synaptic or gparted or whichever.
**Gufw:**
Edit your gufw.desktop file (/usr/share/applications/gufw.desktop in Debian 10) and change the line:
=gufw
to
=sh -c "xhost +si:localuser:root && gufw && xhost -si:localuser:root"
**Synaptic:**
Inspired by the post at: https://discourse.ubuntu.com/t/adding-applications-to-start-up/9288
Edit /usr/bin/synaptic-pkexec to comment out the zenity warning message (assuming Debian 10) and change the line:
"/usr/sbin/synaptic" "$@"
to
xhost +si:localuser:root
pkexec "/usr/sbin/synaptic" "$@"
xhost -si:localuser:root
I imagine other programs can mostly be adapted in the same way as gufw. This does not solve the underlying issue of old programs running everything including GUI as root but at least they can function like before.
ManSoMean
(111 rep)
Jun 21, 2020, 03:05 PM
• Last activity: Dec 31, 2024, 05:53 PM
0
votes
0
answers
159
views
How do you disable xauth in X11 CDE?
I am using FreeBSD 14.1 with CDE (https://sourceforge.net/projects/cdesktopenv/) I would like to disable `xauth` and use just `xhost`. I am unsure if this has to be done via Xorg server configuration (FreeBSD) or via CDE config files. This is what I have tried: 1. Modify `/etc/dt/config/Xconfig`: ``...
I am using FreeBSD 14.1 with CDE (https://sourceforge.net/projects/cdesktopenv/)
I would like to disable
xauth
and use just xhost
.
I am unsure if this has to be done via Xorg server configuration (FreeBSD) or via CDE config files.
This is what I have tried:
1. Modify /etc/dt/config/Xconfig
:
Dtlogin*authorize: False
2. Delete user's .Xauthority
file.
M.E.
(631 rep)
Sep 28, 2024, 07:17 AM
0
votes
2
answers
289
views
xhost not working in combination with aws vpn client
I have a laptop running Windows with a Cygwin X server. On this machine I have a virtual Linux box running under VMWare. I set export DISPLAY=xserver:0 on the VM and do xhost +xclient on the cygwin shell. I can use either the hostname or the IPv4 address. I can now run my X programs (mostly emacs/xt...
I have a laptop running Windows with a Cygwin X server. On this machine I have a virtual Linux box running under VMWare.
I set export DISPLAY=xserver:0 on the VM and do xhost +xclient on the cygwin shell. I can use either the hostname or the IPv4 address. I can now run my X programs (mostly emacs/xterm) by redirecting the display. So far so good.
I also need to use the AWS VPN client to connect to AWS (horrible client but it works). This runs on the Windows laptop but also gets picked up by the virtual machine. I can now talk to AWS on either machine. So far so good.
However, if I try to start any X programs on the linux machine, it refuses to authenticate it. I just get the error "Authorization required, but no authorization protocol specified". If I add the IP address or the server name, it doesn't matter - same error. Neither IP address has changed (I've verified this with Wireshark).
If I do xhost + to disable the authentication, then I can connect but this is obviously hideously insecure and I don't want to do it.
I've tried going down the xauth rabbit hole but that just replaces the above errors with Invalid MIT-MAGIC-COOKIE-1 errors.
Any idea what's going on?
Richard Wheeldon
(51 rep)
Apr 29, 2022, 04:49 PM
• Last activity: Mar 3, 2023, 04:03 PM
-2
votes
1
answers
1231
views
Why are these xhost commands used here for running a docker container?
I am running a docker container. The suggested way to run it is $ xhost + access control disabled, clients can connect from any host $ sudo docker run -it --rm --ipc=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro [...] $ xhost - access control enabled, only authorized clients can conne...
I am running a docker container. The suggested way to run it is
$ xhost +
access control disabled, clients can connect from any host
$ sudo docker run -it --rm --ipc=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro [...]
$ xhost -
access control enabled, only authorized clients can connect
What do the two xhost commands do?
Why are they needed here with running a docker container?
What are their equivalents for SwayWM (Wayland)?
Thanks.
Tim
(106422 rep)
Apr 17, 2022, 04:25 PM
• Last activity: Apr 17, 2022, 04:46 PM
1
votes
1
answers
588
views
Problem with XServer - _XSERVTransSocketUNIXAccept: accept() failed
I run a headless Manjaro server with Xhost and Xvfb (for a display) and after about 236 instances of a program running, the server starts lagging a lot and the error `_XSERVTransSocketUNIXAccept: accept() failed` is printed infinitely on the screen. Does anybody know of a fix for this? I've searched...
I run a headless Manjaro server with Xhost and Xvfb (for a display) and after about 236 instances of a program running, the server starts lagging a lot and the error
_XSERVTransSocketUNIXAccept: accept() failed
is printed infinitely on the screen. Does anybody know of a fix for this? I've searched the Internet for solutions, but I've come up empty. I've read in one forum post that it's because of «clients using lots of true-type fonts», but even if it is I have no idea what to do to fix it.
Bintr
(31 rep)
Sep 7, 2021, 04:35 PM
• Last activity: Sep 15, 2021, 06:59 PM
1
votes
0
answers
588
views
How do I use xhost for linking the display of one virtual terminal device to another?
I am currently trying to make an autonomous drone using the Robot Operating System ([ROS][1]). To do this, I have installed **Raspbian Lite** (**Jessie**) on a **Rasperry Pi 3** and am currently using **ROS Kinetic** on it. I decided to go with **Openbox Window Manager** and installed a terminal ont...
I am currently trying to make an autonomous drone using the Robot Operating System (ROS ). To do this, I have installed **Raspbian Lite** (**Jessie**) on a **Rasperry Pi 3** and am currently using **ROS Kinetic** on it. I decided to go with **Openbox Window Manager** and installed a terminal onto it for convenience. I can just call
sudo startx
to open up a window manager in another terminal. Since there is no desktop environment, I have also installed **tmux** for convenience. I am running the *xserver* on a particular pane and conduct my *ROS* work on other panes.
Now when I try to run commands that call on a GUI application from my first terminal virtual device (Ctrl
+ Alt
+ F1
), I get the error:
QxcbConnection: Could not connect to display
Aborted
After a recommendation from this question, I decided to install xhost
on my terminal emulator (which is running on my window manager on my second terminal virtual device, that can be accessed by Ctrl
+ Alt
+ F2
). After invoking xhost +
in the same emulator, I get this:
access control disabled, clients can connect from any host
After which I invoke xhost
which returns with:
access control disabled, clients can connect from any host
SI:localuser:root
Therefore, in my first virtual terminal device, I have set the environmental variable to 5 different values which have been listed below, and tried to run the program which calls on the $DISPLAY
, but I get the same QxcbConnection: Could not connect to display
error.
SI:localuser:root
localuser:root
localuser
root
SI:localuser
localhost:0
The last one was actually from the linked question. To my understanding, I am doing exactly what is listed out in this man page. What am I doing wrong?
-----
**NOTE**
I have also tried ssh
'ing into the window manager with ssh root@raspberrypi
(which is what I infer the user@hostname to be from the prompt in my terminal emulator inside my window manager). However, this asks me for a password, which I do not know and cannot access. This is the topic for this question.
SDG
(315 rep)
Jan 4, 2017, 11:32 AM
• Last activity: Feb 17, 2021, 09:29 AM
0
votes
0
answers
5468
views
How to add authorized client to xhost?
Om a linux machine (In this case Debian), when I use the xhost command as follows: $ xhost + access control disabled, clients can connect from any host $ xhost - access control enabled, only authorized clients can connect When I do `xhost -` I observe `authorized clients` are allowed... Is there a w...
Om a linux machine (In this case Debian), when I use the xhost command as follows:
$ xhost +
access control disabled, clients can connect from any host
$ xhost -
access control enabled, only authorized clients can connect
When I do
xhost -
I observe authorized clients
are allowed...
Is there a way that I can add a authorised client? So that, even with xhost -
specific clients/users can access the server.
Anirban
(141 rep)
Jun 17, 2020, 12:10 PM
0
votes
1
answers
1627
views
Setting `xhost` from systemd service file
I would like to run `DISPLAY=:0 xhost +` at every system boot. (I'm aware of the security implications of `xhost +`.) This command, executed locally, works just fine: ``` username@hostname:`$ DISPLAY=:0 xhost + access control disabled, clients can connect from any host ``` But when I would like to r...
I would like to run
DISPLAY=:0 xhost +
at every system boot. (I'm aware of the security implications of xhost +
.)
This command, executed locally, works just fine:
username@hostname:`$ DISPLAY=:0 xhost +
access control disabled, clients can connect from any host
But when I would like to run it through the following systemd service file, it fails as noted below.
username@hostname:/etc/systemd/system$ cat set-xhost.service
[Unit]
Description=Set access control for X server
[Service]
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/usr/bin/xhost +
[Install]
WantedBy=multi-user.target
username@hostname:~$ sudo systemctl start set-xhost.service
Job for set-xhost.service failed because the control process exited with error code. See "systemctl status set-xhost.service" and "journalctl -xe" for details.
username@hostname:~$ sudo journalctl -u set-xhost.service
Jun 09 12:09:28 hostname systemd: Starting Set access control for X server...
Jun 09 12:09:28 hostname xhost: No protocol specified
Jun 09 12:09:28 hostname xhost: /usr/bin/xhost: unable to open display ":0"
Jun 09 12:09:28 hostname systemd: set-xhost.service: Main process exited, code=exited, status=1/FAILURE
Jun 09 12:09:28 hostname systemd: Failed to start Set access control for X server.
Jun 09 12:09:28 hostname systemd: set-xhost.service: Unit entered failed state.
Jun 09 12:09:28 hostname systemd: set-xhost.service: Failed with result 'exit-code'.
What is the reason behind this? From all I know, this should work. That it doesn't work indicates I'm missing some important knowledge in this area.
Multisync
(514 rep)
Jun 9, 2020, 10:16 AM
• Last activity: Jun 9, 2020, 12:53 PM
5
votes
1
answers
7919
views
How to allow second local user access to DISPLAY 0
I have basic desktop machine with two user accounts. I want to allow the second user ( no the one which started X ) to access xserver and run GUI programs. I had this working using xhost from the login user but this no longer seems to work. xhost +SI:localuser:fred now if I do su - fred and try anyt...
I have basic desktop machine with two user accounts. I want to allow the second user ( no the one which started X ) to access xserver and run GUI programs.
I had this working using xhost from the login user but this no longer seems to work.
xhost +SI:localuser:fred
now if I do su - fred and try anything which requires X, I get an error to the effect that it cannot access the display.
$ xhost
xhost: unable to open display ""
Please do not reply about how to use vnc, ssh or remote access. That is not the question.
Thanks for any help in how to do this, it is stopping me being able to work.
stacker
(51 rep)
Apr 12, 2017, 08:34 PM
• Last activity: May 31, 2020, 03:02 PM
0
votes
0
answers
443
views
fedora31: cannot open display:: 0 without ethernet
I use as a window manager i3, lightdm and other graphic display manager disabled Starting with Fedora-31, executing "nm down ethernet" causes the graphics programs to stop running: > Cannot open display: No protocol specified Unable to init server: > Could not connect: Connection refused xhost doesn...
I use as a window manager i3, lightdm and other graphic display manager disabled
Starting with Fedora-31, executing "nm down ethernet" causes the graphics programs to stop running:
> Cannot open display: No protocol specified Unable to init server:
> Could not connect: Connection refused
xhost doesn't help either:
> Error: cannot open display: :0 No protocol specified xhost: unable to
> open display «:0»
The problem starts with version 31 and is saved in 32_RC1.6
I suspect that the problem is related to SELinux security policy settings, how can I fix it?
dymdin
(21 rep)
Apr 28, 2020, 01:25 PM
0
votes
1
answers
3823
views
Allowing xhost access to another user, permanently
I want to run a GUI application as another user (say other-guy). Whenever I want to do so, I run xhost si:localuser:other-guy The changes only persist until a reboot. How do I make this permission permanent, so that I don't have to run this command ever again? For reference, I run KDE with SDDM as t...
I want to run a GUI application as another user (say other-guy). Whenever I want to do so, I run
xhost si:localuser:other-guy
The changes only persist until a reboot. How do I make this permission permanent, so that I don't have to run this command ever again?
For reference, I run KDE with SDDM as the display manager.
Mukesh Sai Kumar
(366 rep)
Dec 23, 2019, 05:20 PM
• Last activity: Dec 23, 2019, 08:38 PM
0
votes
1
answers
221
views
Why does sudo xhost throw an error on openSUSE, but su -c xhost does not?
Here are some things that work: ``` xhost su -c xhost su -c su `logname` -c xhost ``` Here are some things that do not work: ``` sudo xhost sudo su `logname` -c xhost sudo runuser -l `logname` -c xhost sudo -u `logname` xhost ``` Those each threw the following error: `access control enabled, only au...
Here are some things that work:
xhost
su -c xhost
su -c su logname
-c xhost
Here are some things that do not work:
sudo xhost
sudo su logname
-c xhost
sudo runuser -l logname
-c xhost
sudo -u logname
xhost
Those each threw the following error: access control enabled, only authorized clients can connect
Does anyone have any idea why this is happening, or how I can use the xhost
command in a script that my users will most likely be running with sudo
?
Johnathan Andersen
(101 rep)
May 9, 2019, 06:01 PM
• Last activity: May 9, 2019, 07:49 PM
-1
votes
1
answers
461
views
SSH Tunnelling for Exceed
I have a following requirement. Source (Windows-Exceed) ---> Destination (Linux Running XServer xdm-kdm) I am able to get the complete X GUI when I connect using Exceed to Destination. This works!! I just wish to go one step further and make it secure by making use of SSH Tunnelling. I have SSH-Putt...
I have a following requirement.
Source (Windows-Exceed) ---> Destination (Linux Running XServer xdm-kdm)
I am able to get the complete X GUI when I connect using Exceed to Destination. This works!!
I just wish to go one step further and make it secure by making use of SSH Tunnelling.
I have SSH-Putty on Windows for this.
I have gone through the documents on the Internet and followed the steps. As follows. Start Exceed in Passive Mode. Enable X11 Forwarding in Putty and then connect to Destination Host. Start xclock and the output gets forwarded correctly onto my local Windows Host. But in order to start a Tunnel , they suggest to do following setup in Putty,
Under Tunneling ,
SourcePort : Destination : localhost: so e.g For SMTP , it would be localhost:25
I got this far as well. Now the big question is , which destination port I should set here if I am willing to connect to destination Host's desktop? So with Exceed, I would simply connect to localhost and get the GUI Desktop of remote Destination.
Sachin H
(171 rep)
Feb 13, 2017, 02:32 PM
• Last activity: Mar 9, 2019, 02:00 PM
3
votes
0
answers
7812
views
Difference between 'xhost + ' and 'xhost +SI:localuser:AnotherUser'
If I do xhost + >access control disabled, clients can connect from any host su AnotherUser -c xterm an xterm pops up. However if I do xhost +SI:localuser:AnotherUser >localuser:AnotherUser being added to access control list su AnotherUser -c xterm I got `No protocol specified`, I'd like to understan...
If I do
xhost +
>access control disabled, clients can connect from any host
su AnotherUser -c xterm
an xterm pops up.
However if I do
xhost +SI:localuser:AnotherUser
>localuser:AnotherUser being added to access control list
su AnotherUser -c xterm
I got
No protocol specified
, I'd like to understand why it doesn't work.
I am in Debian sid amd64
user129340
(67 rep)
Aug 19, 2015, 03:26 PM
• Last activity: Feb 2, 2019, 09:36 AM
0
votes
1
answers
673
views
Configuring CentOS 7, ParaView and Oracle VM VirtualBox on Windows 7
I am attempting to run OpenFOAM 2.3.1 on an installation of CentOS 7, running inside a virtual machine hosted by Oracle VM VirtualBox on a Windows 7 machine. I am not trying to use any remote tunneling, SSH etc, it is all local. The exercise is proving disastrous. `startx` starts bringing up the gno...
I am attempting to run OpenFOAM 2.3.1 on an installation of CentOS 7, running inside a virtual machine hosted by Oracle VM VirtualBox on a Windows 7 machine. I am not trying to use any remote tunneling, SSH etc, it is all local. The exercise is proving disastrous.
startx
starts bringing up the gnome interface, with the 'first time install' window. However in the virtual machine, the GUI ignores all input and effectively all I can do is kill and restart the VM. Not even Ctrl+Alt+F2 etc will switch to other terminals.
With Paraview or xhost
or anything else on the command line no matter what I export the DISPLAY
variable as, the result is:
xhost: unable to open display "localhost:0.0"
or
xhost: unable to open display
or whatever $DISPLAY
returns.
What I would like to know is effectively what are the ways in which the system could be broken, what exactly to look for in the stack of technologies as evidence of faults, where any settings are stored, and what things may well be the key to getting this working.
- Machine operating system: Windows 7 Professional
- Virtual machine manager: Oracle VM VirtualBox Manager 5.2.18
- Virtualised operating system: CentOS 7 3.10.0-862.14.4.el7.x86_64
- OpenFOAM version: 2.3.1
**Update 1:**
It turns out, xterm was not installed. I have run yum install xterm
on an attempt to run xinit
. There is a new behaviour, a GUI window with only xterm visible. Again, no input is being accepted. I will now have to restart the machine.
**Update 2:**
Attempting to reinstall VBoxLinuxAdditions.run the kernel build reveals "ERROR: Kernel configuration is invalid."
J Collins
(1205 rep)
Oct 16, 2018, 01:29 PM
• Last activity: Oct 18, 2018, 09:47 PM
3
votes
1
answers
5225
views
Is 'xhost local' (no colon) allowing malicious access?
I'm setting up a new system and need to grant the root user authority to access the nonroot user's X display in order to run GUI utilities. I used the `xhost` command for this as follows, but ***mistakenly*** leaving off the colon suffix seems to have allowed access to the remote server `lb.usemaxse...
I'm setting up a new system and need to grant the root user authority to access the nonroot user's X display in order to run GUI utilities. I used the
xhost
command for this as follows, but ***mistakenly*** leaving off the colon suffix seems to have allowed access to the remote server lb.usemaxserver.de
...
nonroot@host2:~ xhost -
access control enabled, only authorized clients can connect
nonroot@host2:~ xhost local
local being added to access control list
nonroot@host2:~ xhost
access control enabled, only authorized clients can connect
INET:lb.usemaxserver.de
INET:localhost
I've used the following to remove it...
nonroot@host2:~ xhost -INET:lb.usemaxserver.de
lb.usemaxserver.de being removed from access control list
Am I interpreting this correctly?
If so, how did lb.usemaxserver.de
setup something so that local
links to that addess?
Does this require there to be some malicious configuration or software already on my system? If so, any suggestions for where to look?
DocSalvager
(2312 rep)
Sep 27, 2018, 11:14 PM
• Last activity: Sep 28, 2018, 10:40 AM
1
votes
1
answers
14824
views
Unable to open display - error
I ran the command below on [secureCRT](https://www.vandyke.com/download/securecrt/download.html) ssh client: $ DISPLAY=abc.xyz.com:0 ; export DISPLAY $ /bin/xhost +abc.xyz.com But it output this error: /bin/xhost: unable to open display "abc.xyz.com" # cat /etc/system-release Red Hat Enterprise Linu...
I ran the command below on [secureCRT](https://www.vandyke.com/download/securecrt/download.html) ssh client:
$ DISPLAY=abc.xyz.com:0 ; export DISPLAY
$ /bin/xhost +abc.xyz.com
But it output this error:
/bin/xhost: unable to open display "abc.xyz.com"
# cat /etc/system-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
# whoami
root
How to troubleshoot this error?
overexchange
(1596 rep)
Sep 17, 2018, 09:24 PM
• Last activity: Sep 18, 2018, 01:42 PM
Showing page 1 of 20 total questions