Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Unix to Unix Connection through X11

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
new_techie's Avatar
Junior Member with 6 posts.
 
Join Date: Nov 2007
27-Nov-2007, 09:07 AM #1
Unix to Unix Connection through X11
Hi I want to connect my Unix machine (server) to another Unix Machine (client) in which the client has some pictures. I want to be able to view the pictures that are on the client from my server. Is this possible? I need to use an XWindow (X11) but I'm not sure how to go about it. The client already has the IP address of the server and I can ping the client no problem.

Thanks in advance for any help you can give me!
RobLinux's Avatar
Computer Specs
Senior Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
27-Nov-2007, 01:18 PM #2
If you login via ssh(1), you should set the DISPLAY variable to your X server host (one with graphics).

You'll need to sort out access control, this may be trivial with shared home directory, or you might need to do something with xauth.

Reading through the docs, ssh used to have good explanation of best way to do this.
new_techie's Avatar
Junior Member with 6 posts.
 
Join Date: Nov 2007
28-Nov-2007, 04:32 AM #3
How do I set the DISPLAY variable to the host ? Access control is already configured. When I try and connect to the host it comes up with problems regarding DISPLAY
RobLinux's Avatar
Computer Specs
Senior Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
28-Nov-2007, 11:29 AM #4
http://www.faqs.org/docs/Linux-mini/Remote-X-Apps.html

rob@oak:~> ssh 10.5.5.8
Password:
Last login: Wed Nov 28 10:32:28 2007 from console
Have a lot of fun...
rob@fir:~> env | egrep 'HOST|SSH'
HOSTNAME=fir
HOST=fir
SSH_CLIENT=10.5.5.1 59762 22
SSH_TTY=/dev/pts/7
HOSTTYPE=i386
SSH_SENDS_LOCALE=yes
SSH_CONNECTION=10.5.5.1 59762 10.5.5.8 22
rob@fir:~> export DISPLAY=`echo $SSH_CLIENT | sed -e 's/.*=//' -e 's/ .*$//'`:0
rob@fir:~> echo $DISPLAY
10.5.5.1:0
rob@fir:~> xterm
xterm Xt error: Can't open display: 10.5.5.1:0

Not surprising as I didn't authorise anything. And actually :

oak:/var/log # netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:sunrpc *:* LISTEN 3123/portmap
tcp 0 0 localhost:ipp *:* LISTEN 3140/cupsd
tcp 0 0 localhost:smtp *:* LISTEN 3187/master
tcp 0 0 *:ssh *:* LISTEN 3311/sshd
tcp 0 0 localhost:ipp *:* LISTEN 3140/cupsd
tcp 0 0 localhost:smtp *:* LISTEN 3187/master

Shows my X server isn't actually listening on a network port, secure or what? So have to enable remote connections to Xorg, to get it to work; I'm sure there'll be docs somewhere

Last edited by RobLinux : 28-Nov-2007 11:41 AM.
tomdkat's Avatar
Computer Specs
Distinguished Member with 5,019 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
29-Nov-2007, 03:51 PM #5
Do you need to run the image viewer on the client machine to view the photos? If not, why not get the two boxes connected via NFS and read the photos over the network, viewing them on a image viewer running on the server?

Peace...
RobLinux's Avatar
Computer Specs
Senior Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
29-Nov-2007, 05:31 PM #6
If there's not too many files, you could also use "rsync -essh -ax /server/pictures /to/dir" to copy them over quickly, without having to configure much.
RobLinux's Avatar
Computer Specs
Senior Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
03-Dec-2007, 06:20 AM #7
There's always new stuff to learn.

ssh -X remotehost
Password:
$ echo $DISPLAY
localhost:10.0
$ xterm

And a window just opened, without doing anything else. Clever ssh(1)!
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 08:34 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.