LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-14-2018, 10:07 AM   #1
armageddonlord
LQ Newbie
 
Registered: Aug 2018
Posts: 3

Rep: Reputation: Disabled
X11 export display drops display


I'm exporting my display from a remote system, to a local system. At first it works fine, but after about 20 minutes exported windows start to disappear, and attempting to open new windows give me errors like:
Code:
Error: Can't open display: localhost:10.0
I'm creating the connection with:
Code:
ssh -X ubuntuvm
and export display gets set correctly on the remote system:
Code:
env |grep DISPLAY
DISPLAY=localhost:10.0

I'm looking for:
A) remediation: How to reconnect the disconnected display while still in the same ssh session.
B) prevention: What is the cause, and how to prevent the disconnection in the first place.


remote/guest system:
Ubuntu 18.04
OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017
xorg-server 1.19.6
running under VirtualBox 5.2.16
local/host system:
MacOS 10.13.6
homebrew 1.6.9
xquartz 2.7.11 (xorg-server 1.18.4)
OpenSSH_7.6p1, LibreSSL 2.6.2
network:
VirtualBox Host-only Adapter
 
Old 08-16-2018, 04:12 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Is one of the screens blanking as they do to save power?
 
Old 08-16-2018, 01:14 PM   #3
armageddonlord
LQ Newbie
 
Registered: Aug 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Is one of the screens blanking as they do to save power?
Nope. Power save is set for 3 hours, and this happens while I'm actively using the system.
 
Old 01-16-2019, 10:10 AM   #4
armageddonlord
LQ Newbie
 
Registered: Aug 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Solution

Use ssh -Y instead of -X, or update your ssh_config file. The default ForwardX11Timeout for the X11 SECURITY extension restrictions is 20 minutes.

Code:
SSH(1)
     -X      Enables X11 forwarding.  This can also be specified on a per-host basis in a configuration file.

             X11 forwarding should be enabled with caution.  Users with the ability to bypass file permissions on the
             remote host (for the user's X authorization database) can access the local X11 display through the for‐
             warded connection.  An attacker may then be able to perform activities such as keystroke monitoring.

             For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default.  Please
             refer to the ssh -Y option and the ForwardX11Trusted directive in ssh_config(5) for more information.

     -Y      Enables trusted X11 forwarding.  Trusted X11 forwardings are not subjected to the X11 SECURITY extension
             controls.
Code:
SSH_CONFIG(5)
     ForwardX11Timeout
             Specify a timeout for untrusted X11 forwarding using the format described in the TIME FORMATS section of
             sshd_config(5).  X11 connections received by ssh(1) after this time will be refused.  Setting
             ForwardX11Timeout to zero will disable the timeout and permit X11 forwarding for the life of the connec‐
             tion.  The default is to disable untrusted X11 forwarding after twenty minutes has elapsed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
export DISPLAY=:0, no protocol specified, can't open the DISPLAY=: :0 KristenU Linux - Newbie 2 05-24-2018 02:34 PM
what is export DISPLAY=:0 yureka Linux - Newbie 3 07-05-2012 12:26 PM
export display and Gtk-WARNING **: cannot open display: zimma Linux - Server 0 04-24-2009 02:51 AM
What is the difference between DISPLAY= and export DISPLAY=?? john test Linux - Newbie 4 09-01-2008 06:41 PM
how to export the display bruse Linux - Networking 18 05-03-2005 09:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration