X display on laptop shows output of xterm running on server. grep -iB 1 tcp /etc/gdm3/nfĭisallowTCP = ssh -C -R 6000:127.0.0.1:6000 forwarding request failed on channel export xterm Note: in this case the server is not running a display-manager, it's a 'headless' virtual machine with no graphics card or monitor attached. Works for me, debian wheezy -> ubuntu trusty. ¹ In principle this lacks proper quoting, but in this specific instance $DISPLAY and $XAUTHORITY won't contain any shell metacharacter. XAUTHORITY=~/.Xauthority xauth merge "$XAUTHORITY" # set, so merge the contents of `$XAUTHORITY` into ~/.Xauthority. # DISPLAY is set and points to a local display, and XAUTHORITY is To copy cookies when you log into your desktop X session, add the following lines to ~/.xprofile or ~/.profile (or some other script that is read when you log in): case $DISPLAY:$XAUTHORITY in So for most people, this either does not apply (no NFS) or is not a problem (no X TCP connections). They'd still need to connect to your machine somehow, unless you've enabled X TCP connections (Debian has them off by default). There can be a security issue if your home directory is accessible over NFS or other network file system that allows remote administrators to view its contents.
![vnc viewer unable to open display vnc viewer unable to open display](https://i.stack.imgur.com/562pO.png)
Since the cookies are generated each time you log in, it's not a problem if you keep stale values in ~/.Xauthority.
![vnc viewer unable to open display vnc viewer unable to open display](https://linuxtechlab.com/wp-content/uploads/2017/03/VNC-1-768x304.jpg)
You have to figure out the PID of a process that's connected to the display you want to work on, then get the environment variables from /proc/$pid/environ ( eval export $(could detect the values of DISPLAY and XAUTHORITY from a running process. :*) export | grep -E '(^| )(DISPLAY|XAUTHORITY)=' >~/.local-display-setup.sh
![vnc viewer unable to open display vnc viewer unable to open display](https://www.cloudhostworld.com/kb/wp-content/uploads/img/chwkb-java-vnc-area.gif)
You could also save the values of DISPLAY and XAUTHORITY in a file and recall the values. Then, in the ssh session: screen -d -r local You can systematically start a screen session from your desktop, perhaps automatically in your login scripts (from ~/.profile but do it only if logging in under X: test if DISPLAY is set to a value beginning with : (that should cover all the cases you're likely to encounter)). Here are a few ways to obtain the values of DISPLAY and XAUTHORITY: cookies stored in ~/.Xauthority.) Getting the values of the variables (You had no problem before because earlier versions of gdm used the default setting, i.e. Finding the location of the X authority file is harder, because with gdm as set up under Debian squeeze or Ubuntu 10.04, it's in a file with a randomly generated name. If you're the only person using your desktop machine, it's very likely that the display name is :0.
#VNC VIEWER UNABLE TO OPEN DISPLAY WINDOWS#
You're trying to act on the windows that are displayed on your desktop. If $XAUTHORITY is not set, programs use ~/.Xauthority. The X authority file is normally indicated in the XAUTHORITY environment variable. Magic cookies are not specified directly: they are always stored in X authority files, which are a collection of records of the form “display :42 has cookie 123456”. X display passwords are called magic cookies.
![vnc viewer unable to open display vnc viewer unable to open display](https://aws1.discourse-cdn.com/business6/uploads/nodered/original/2X/d/d60eb61d5feeafd8a0fae368105660ec9812a465.jpeg)
The address of the display is normally indicated in the DISPLAY environment variable. when you're logged in remotely (but the number can change depending on how many X connections are active). It needs the address of the display, which is typically :0 when you're logged in locally or :10, :11, etc. (Adapted from Linux: wmctrl cannot open display when session initiated via ssh+screen) DISPLAY and AUTHORITYĪn X program needs two pieces of information in order to connect to an X display.