Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two computers. Computer A runs Red Hat 9.0, Computer B runs Fedora 4. These two computers are connected via ethernet.
I log in from Computer B to Computer A via ssh(). Over on Computer B, I'm sure to type "xhost +", and the response assures me I am able to connect to remote hosts. Likewise, within my ssh session, I am also sure to type "export DISPLAY=<port IP addr>:0.0" before starting anything.
I would like to edit a file on Computer A with Emacs, so I invoke emacs on Computer A from within my ssh session hosted by Computer B. I get the following error message:
emacs: Cannot connect to X server <port IP addr>:0.0
I'm thinking it's one of three things:
a. Security/firewall settings
b. Different versions of X-windows in the two distros
c. Something I just am not seeing
Anyone out there have any ideas? Tried looking through "similar threads", nothing really matches there. Will try looking to see if the versions of X are incompatible. Meanwhile, if someone can think of something I could try, I'd sure appreciated hearing about that idea....
I have used this several times to run stuff from my laptop to my desktop. There is a how-to under Tutorials - Networking on this board. I found it a little confusing at first. Is is important to run the commands from the correct location, and get ip addresses correct. So, here is how I do it.
My desktop ( client ) is named sluggy with ip address of 192.168.1.21. Mandriva 2006.
My laptop ( server ) is named presto with ip address of 192.168.1.22 Ubuntu 6.06 LTS.
On the client, ( it will receive and display the remote program output ) I run the command,
'xhost +192.168.1.22' ( without the quotes ). I get a response that 192.168.1.22 is added.
Now I ssh to the server, and supply the password. BTW it is possible to set up keys, and not need to bother with the password thing, not required, but if you are going to use it a lot, worth the time.
On the ssh session on the server I run the command 'export DISPLAY=192.168.1.21:0.0' ( no quotes ) and press enter. Make sure there are no error messages. Then start the application, through the ssh session on the server ( remote machine ). It takes a few seconds, and the app shows up on your current desktop on the client.
If this will not work for you, it is most probably a firewall issue. I'm doing it on a home lan, both machines are behind a firewall, and neither has a firewall running. My x servers are not at the same level, I don't believe they need to be.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Sorry, but 'ssh -X' (without any xhost settings and $DISPLAY exporting) is a better way to do so: traffic is encrypted and everything goes through ssh channel (it means firewall doesn't block it any more than ssh'ed console output).
Thank-you for the input. The thing I like about linux is I learn something every day. I tried your method, it worked like a charm.
So for clarity, here is what I did...
Code:
ssh -X presto
and supplied the password for my user. Got connected, and just typed the name of the GUI program I want to start. In my case I ran xfce4-mixer and then xmms as a test. Both worked as expected. ( presto is the name of the server machine, I have an entry for it in /etc/hosts ).
I have checked and am sure DISPLAY is :0.0 and not simply :0.
I will attempt to fire up ssh -X and, without fooling with either the DISPLAY environment variable, nor xhost, try emacs. Will simply try as in successful Camorri example, and we'll see.
I tried to locate the HOW TO referred by you earlier in Networking Tutorials but could not find it. Here is the list of all tutorials under networking. Can you please suggest me which tutorial you were
refering to. Sorry for trouble. Thanking you.
Best regards, RAKESH
****** LIST OF TUTORIALS UNDER NETWORKING *******************
Networking Category
(Slackware) Installing Linksys WMP54G with NDISWRAPPER-11
A simplified view of MPMs in Apache
Apache + SSL Howto
Basic Samba Network File Sharing
Belkin F5D6001 ver 3. wireless pci adapter using ndiswrapper for Slackware 10.0
Belkin F5D7000 USA Wireless Card in Linux: Complete Guide
Building a Slackware Wireless Access Point
Comcast and KMail - HOWTO
Configure BIND DNS to Answer Active Directory Queries
Configuring Dynamic Domain Name System (DDNS) Server
Connecting to XBox Live through a linux computer connected to a wireless LAN
CUPS server with WinXP clients (SuSE 9.1)
DHCP DNS & Firewall with NetBSD
DHCP Server Howto
DNS
Down-and-dirty Samba is UP --- NOW
Easy intel wireless install
Easy NFS
File sharing with OS X using Ubuntu 5.04
Forward ports via an SSH tunnel with auto reconnect (using key pair authentication)
From beginning to end: ProFTPD
Guide to NdisWrapper for MN-720 MN-730 Microsoft Wireless Cards in SusE 9.x
How I Setup Apache2-2.0.58, PHP-5.1.4 and MySql-5.0.22 on Slackware 10.2
How to get Broadcom 43xx Wireless (AirForce54g) card to work (proven in Ubuntu Dappe Drake)
How to list all your USERs..
How to Simply Add a NAS (Network Storage) using Konqueror and Samba
How to: Simple Installation of Madwifi in Fedora Core 4 (for Atheros chipped cards)
HOW TO: SUSE Linux Enterprise Desktop SLED10 LDAP / Kerberos Authentication to Active Directory / Windows Server 2003 R2
HOW TO: SUSE Linux Enterprise Desktop SLED10 LDAP / Kerberos Authentication to Active Directory / Windows Server 2003 R2
HOW TO: Unmounting a NFS mount on a server when the mounted server has gone down, causing the applications thread to hang up.
HOW-TO install the Broadcom bcm43xx Driver in Debian Linux and enable WPA Encryption
HOWTO Setup a Secure Relaying Email Server
HOWTO wirless working on Thinkpad R40e with Belkin Wireless G notebook card
Install ipw2200 on Sony VAIO VGN-A217M & Debian unstable
Install rt2500 WLAN driver in Fedora
Installing a HomePNA 2.0 Home Phoneline Network for Knoppix and Slackware
Installing the Cisco VPN Client
Intel Pro Wireless 2200 + Slackware
Internet access and SuSe 9.1
IPv6 deployment
Konqueror ad blocker
Linksys Ver4 - Using NDISWrapper
Linux Router
Linux Wireles LAN
Multi Processing Module in Apache
NDISwrapper for RTL8180 mini-HOWTO
Ndiswrapper in Fedora Core 5
ndiswrapper on Debian Sarge without having to compile anything
NdisWrapper: The Ultimate Guide
NdiswrapperHowToforSuSE9+
Netgear MA111 USB Wireless Howto
Netgear WG511 v3 Made in China with WPA on Ubuntu 6.06 LTS (Dapper)
Netgear WG511 with WPA on SuSE 10.0
Newbie's Guide to Small Home LAN
ORINOCO MONITOR and KISMET HOWTO
Playstation ICS for online gaming
PPP dial-up over Bluetooth Cell-Phone
PPTP VPN on Slackware How-to
Public key authentication with ssh
quick and easy way to get internet connection sharing
Realtek8180 Driver Install HOWTO
Samba - up and running NOW
Sendmail SMTP AUTH Howto
Setting up 'Network Information Service'
Setting Up a Network Printer using CUPS
Setting up Broadcom wireless networking under Slackware 11
Setting up DNS in Small Subnets
Spanning Multiple DSLs
ssh w/ gtk programs (host-client display export)
Ubuntu Guide To Installing Wireless Cards (CARDS: PCMCIA RT2500 54mbit, Siemens Gigaset 108 USB Adapter).
Using rsync to mirror data between servers
Using Windows Directories for Default Apache 2 Web Site
Verizon Cell Phone Internet
Virtual Webhosting on Linux for support of php+mysql+jsp+servlets
VNC Server/Client Quickstart
WiFi-Radar in Slackware
YUM FC4 Centralized Server
Zaurus USB-network how-to
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.