Operating System - HP-UX
1834391 Members
1597 Online
110066 Solutions
New Discussion

How to connect Linux workstation to HPUX server via X

 
SOLVED
Go to solution
Mark Sellan
Advisor

How to connect Linux workstation to HPUX server via X

I would like to be able to open an xterm window on my Linux workstation and connect to my HP-UX server to run gui apps like Commandview etc...

I have have added my workstation entry to xhosts on the server and a server entry to xhosts on my workstation. But when I try to start an xterm it just hangs.

Is there a basic compatibility issue I'm missing here between Linux and HP-UX or do I have a configuration issue to work out?

Thanks much,

-mark
13 REPLIES 13
Gavin Clarke
Trusted Contributor

Re: How to connect Linux workstation to HPUX server via X

Is dtlogin running on the HP-UX end?
john kingsley
Honored Contributor

Re: How to connect Linux workstation to HPUX server via X

You can run an entire CDE session from the HP server to your linux desktop by running:

X :1 -query

This will start a 2nd Xsession on your linux box connected to $DISPLAY:1

--F7 will bring up your linux session.

--F8 wil bring up your HPUX-CDE session.
Torsten.
Acclaimed Contributor

Re: How to connect Linux workstation to HPUX server via X

Did you set the DISPLAY variable on the HP-UX system? This should be like

export DISPLAY=:0.0

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Rick Garland
Honored Contributor

Re: How to connect Linux workstation to HPUX server via X

If the HPUX is running X (usually CDE) then login to the linux, startx if not running a X environment on the linux, issue the command 'xhost +' on the Linux system, export DISPLAY= on the the Linux system, connect to the HPUX via ssh (or telnet, etc.)


Morcos
Super Advisor

Re: How to connect Linux workstation to HPUX server via X

export DISPLAY=Your_linux_station:0

Ziad
Mark Sellan
Advisor

Re: How to connect Linux workstation to HPUX server via X

Thanks for the replies....I realize I needed to provide more information....

I have exported my DISPLAY variable from my Linux & HPUX box and set the xhost + from linux.

Here's the scenario

I ran xhost + on the Linux (Fedora Core 3) box. Received a message that access is open to all.

I exported my DISPLAY variable on Linux and HPUX as 'export DISPLAY=10.XX.XX.XX:0.0' where XXs are my ip address.

Next I telnet to HPUX server and login. I run xclock and that's it -- it hangs....

From the HPUX side I can start dtterm or xterm and run gui programs just fine....and from the Linux side I can run xterm and gui programs no problem.

Does that help?
Steve Lewis
Honored Contributor
Solution

Re: How to connect Linux workstation to HPUX server via X

Linux these days has got a lot tighter on security and X.
Some Linux distros run X windows purely on UNIX sockets, not tcp sockets, which will stop your X windows even with the DISPLAY and xhost values correct.

So on your workstation type
netstat -a | grep tcp

If it does not say
tcp 0 0 *.x11 *:* LISTEN
somewhere in the output, then you will need to change the X windows config on your linux box to ensure that it listens to the network as well.

One other thing, ensure there is no firewall inbetween, blocking port 6000/tcp (X)

Rick Garland
Honored Contributor

Re: How to connect Linux workstation to HPUX server via X

Check with the network folks and make sure the firewall is configured to allow X traffic through.

Looks as though the hanging is a symptom of the X traffic being blocked

Jeff Hoevenaar
Frequent Advisor

Re: How to connect Linux workstation to HPUX server via X

login into the linux server. then set xhost:
xhost +

from the linux server telnet to the hpux server

in the hpux server login window export your display to the linux server: export DISPLAY=linux_server_ip_goes_here:0.0

launch xclock
Mark Sellan
Advisor

Re: How to connect Linux workstation to HPUX server via X

Thanks everyone, points all around. But full credit goes to the two folks who suggested security and network issues.

Sure enough my Linux box is going to need to have its X windows config file tweaked. The output from netstat -a | grep tcp to verify it is listening for x11 traffic came up empty.

Thanks again!

-mark
Torsten.
Acclaimed Contributor

Re: How to connect Linux workstation to HPUX server via X

Still have problems?

You wrote

"I ran xhost + on the Linux (Fedora Core 3) box. Received a message that access is open to all.

I exported my DISPLAY variable on Linux and HPUX as 'export DISPLAY=10.XX.XX.XX:0.0' where XXs are my ip address.

Next I telnet to HPUX server and login. I run xclock and that's it -- it hangs...."

New sequence:

1. xhost +
2. telnet
3. export DISPLAY

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Manuel Contreras
Regular Advisor

Re: How to connect Linux workstation to HPUX server via X

export DISPLAY?
update your .profile on your hpux box and kiss export GOODBYE!

the following is the top of my .profile, which automatically exports your DISPLAY from any telnet or ssh session (recommended).

me> cat .profile

# @(#) $Revision: 72.2 $

# Default user .profile file (/usr/bin/sh initialization).
TERM=xterm
export TERM

# Set up the terminal:

if tty -s; then
DISPLAYHOST=$(who -muR | awk '{print $NF}')
DISPLAYHOST=${DISPLAYHOST%%:0.0}
DISPLAY=$DISPLAYHOST:0.0; export DISPLAY
echo "DISPLAY has been set to $DISPLAY"
fi

if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs

...



you will have to xhost+ from your source box.

try it, you'll like it!
Stuart A Jaskowiak
New Member

Re: How to connect Linux workstation to HPUX server via X

You can also tunnel X through SSH via:

ssh -X

This tunnels the X-windows packets back throught the SSH tunnel between you and the HP-UX box. The only issue would be if the HP-UX box doesn't allow X-forwarding via ssh. Check out http://www.cag.lcs.mit.edu/~wentzlaf/faq/ssh_X.html for more info.

Stu.