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 acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard netgear network printer problem ram registry repair router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Unix to Unix Connection through X11

Reply  
Thread Tools
new_techie's Avatar
Junior Member with 6 posts.
 
Join Date: Nov 2007
27-Nov-2007, 10: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
Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
27-Nov-2007, 02: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, 05: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
Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
28-Nov-2007, 12:29 PM #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 at 12:41 PM..
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
29-Nov-2007, 04: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
Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
29-Nov-2007, 06: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
Member with 417 posts.
 
Join Date: Nov 2007
Location: UK
Experience: UNIX/Linux Pro, M$ 'doze Sufferer
03-Dec-2007, 07: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)!
Reply

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.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:52 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.