LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2017, 07:00 AM   #1
Epic555
LQ Newbie
 
Registered: Sep 2017
Posts: 9

Rep: Reputation: Disabled
Question error: cannot open display


Hi, i have the same problem, i can't open gedit.
I connect to CentOS server with Putty with enabled X11 forwarding.
I tried to use Cygwin X or Xming, didn't help.
In Putty i do:
- export DISPLAY='IP of local station:0.0'
- xhost+
But after that - error: cannot open display.
I installed all X packages (xorg-x11-xauth, xorg-x11-fonts-*, xorg-x11-utilsxorg, etc).
X11Forwarding options is 'Yes' in /etc/ssh/sshd_config on CentOS server.
In /etc/hosts:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
IP-address-of-server hostname
What is wrong? Help pls.
I looked in the Internet all advices to solve the issue, but nothing helped.
 
Old 09-15-2017, 11:09 AM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,004

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Have you installed an X server on your Windows machine? Which one?
Disclamer: I've never understood how to connect a remote client to X on a server. (or why one would want to)

Consider: Rather than using gedit, install WinSCP and SciTE on the Windows PC. WinSCP can open remote files into SciTE, which is an excellent text editor for scripting/programming.
 
Old 09-15-2017, 11:13 AM   #3
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,311

Rep: Reputation: Disabled
For remote management SSH and a text editor as VIM is all you ever need. Works reliably over thousands of miles, even if there is slow internet connection somewhere in the way.
 
Old 09-15-2017, 11:44 AM   #4
Epic555
LQ Newbie
 
Registered: Sep 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
gedit it is just example. i can't launch gui apps. Oracle DB doesn't launch too.
 
Old 09-15-2017, 12:11 PM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,311

Rep: Reputation: Disabled
This is how it works. Your local box must accept incoming X connections, local X server must be listening on port 6000. The xhost command has to be run in local box, not remote. How it all works in Windows - I have no clue. I do not run Windows, never will.
 
Old 09-17-2017, 06:58 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,613
Blog Entries: 1

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
On the local box I use multiple users and one X session. And this is my method of sorts.

$ startx -- :0 -dpi 100 -to 10 -nolisten tcp -retro -depth 24 -layout MultiHead

$ xhost local:

$ su - otheruser

$ export DISPLAY=":0"

$ xcalc

I would imagine that the X on the server has something like "-nolisten tcp" which disables remote X services. Various Xephyr and Xdmx ways to get things going. Assuming linux to linux. Otherwise vnc, x2go, and other methods might prove simpler. If I'm fiddling with Xdmx or other things I drop the "-nolisten tcp" option so that ssh -X and stuff works. Not that I've done any remote X stuff in recent history.
 
Old 09-17-2017, 08:11 PM   #7
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,311

Rep: Reputation: Disabled
ssh -X works even if X server is not listening.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need help with Xvision S/W gets error !! xterm Xt error: cant open display maneeshkmrt Linux - Server 1 08-16-2017 08:34 AM
[SOLVED] Error: can't open display. swdiaz Linux - General 3 02-03-2014 06:58 AM
[SOLVED] try to open xclock and get Error: Can't open display thohogan Linux - Newbie 3 10-07-2013 05:19 PM
cannot open display error shaaquille Red Hat 1 07-08-2011 12:04 PM
Could not open display error reyemarr Linux - General 14 12-06-2003 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:59 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration