LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2017, 04:29 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 521

Rep: Reputation: 37
opening gui programs from remote putty terminal


I'm running putty on a windows machine and logging in to a fedora 25 desktop machine on my LAN. I've been trawling google trying to find a way to run commands in putty to open programs on the fedora desktop but nothing works. I always get " cannot open display: :0" or something similar.
I found this thread https://www.howtoforge.com/tutorial/...-applications/ but when I run commands in putty I still get:
Gtk-WARNING **: cannot open display: :0
I've tried export DISPLAY=:0 in putty first but that doesn't work either. I've had success remotely connecting to the fedora desktop using x11vnc but that requires starting x11vnc on the desktop machine first and then switching to putty on windows. I need to get putty to open GUI programs from putty/windows without having to touch the fedora machine. I also saw this link https://www.suse.com/communities/blo...lays-remotely/ but that doesn't work for me either. Thanks for any help.

Last edited by tonj; 07-22-2017 at 04:31 AM.
 
Old 07-22-2017, 04:46 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,504

Rep: Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113
You need to install an x server on Windows to run remote applications like cygwin/x or xming via PuTTy. Since xllvnc is a server you should be able to start it at boot up.

http://x.cygwin.com/
https://sourceforge.net/projects/xming/
 
Old 07-22-2017, 04:48 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,505

Rep: Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548
does that fedora desktop have GUI installed at all? Does any kind of window manager running on it?
You cannot display linux graphical apps on native windows desktop, you may need either vnc (installed server on linux) or X server (installed on windows).
 
Old 07-22-2017, 11:12 AM   #4
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
@pen64 yes the fedora machine has a gui. As I said earlier I can access the fedora desktop from a remote windows machine using vnc, that's not a problem. The problem is I can't run commands from a remote putty session to open programs on the fedora desktop. I've since discovered I can do this on a fedora 20 machine but a fedora 25 machine will not work.
 
Old 07-22-2017, 11:22 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,504

Rep: Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113
Quote:
I've since discovered I can do this on a fedora 20 machine but a fedora 25 machine will not work.
Are you accessing the fedora 20 machine using Windows?
 
Old 07-22-2017, 11:25 AM   #6
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
yeah, using putty on a windows machine
 
Old 07-22-2017, 01:00 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,504

Rep: Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113
That would imply that a x server is running?

Is x11 forwarding enabled on the fedora 25 machine? (/etc/ssh/sshd_config)
 
Old 07-22-2017, 01:22 PM   #8
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
it is enabled. In /etc/ssh/sshd_config I have X11Forwarding yes
 
Old 07-22-2017, 01:29 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,504

Rep: Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113Reputation: 4113
What x server is running on the Windows machine?
 
Old 07-24-2017, 07:29 PM   #10
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
VcxSrv (free) is a pretty easy windows X-server. I use it with putty to X-forward from Fedora/CentOS computers.

You need to enable X-Forwarding in putty configuration for the connection.
 
Old 07-24-2017, 07:47 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,850

Rep: Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383
While there are testing stuff. Try mobaxterm. Quick easy portable program to try. I assume the entire issue is on the Centos setup however.
 
Old 07-25-2017, 08:09 AM   #12
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch
Posts: 1,253

Rep: Reputation: 467Reputation: 467Reputation: 467Reputation: 467Reputation: 467
Easiest way I've found to do this is to install vncserver on the Fedora box, make sure it's configured appropriately etc. ... .

Then, when you log in with putty, issue the command:

Code:
vncserver
.. on on the Fedora box. After it initializes, you'll be able to connect to it with the vnc client on the Windows box.

Do it all the time - works reliably.

Cheers.
 
  


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
Opening the xterm session on Linux through remote putty linuxunix Linux - Newbie 2 11-25-2010 05:53 AM
X11 - getting GUI from remote Windows PC using Putty anjanesh General 7 07-28-2006 06:59 PM
Problem with remote terminal (ssh and PuTTY) guardian653 *BSD 11 02-09-2005 06:16 AM
after doing su -, opening graphical programs in terminal won't work TheOneAndOnlySM Slackware 10 10-27-2003 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:19 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