Operating System - HP-UX
1748161 Members
3746 Online
108758 Solutions
New Discussion юеВ

Re: Invoke Xapps from telnet

 
SOLVED
Go to solution
arkie
Super Advisor

Invoke Xapps from telnet

I have a very basic question which is not clear.

Can we invoke HP-UX/Unix/Linux X-Applications within a CLI Telnet session from a remote host.

Can anyone pls clarify
10 REPLIES 10
TTr
Honored Contributor
Solution

Re: Invoke Xapps from telnet

X apps are graphics based and need an X display environment to run and display. You telnet session does not provide the X environment. You need to run an X environment alongside your telnet session so that you can tell the X apps to display there.
Michael Steele_2
Honored Contributor

Re: Invoke Xapps from telnet

Usual procedure is:

export DISPLAY=xxx.xxx.xxx.xxx:0.0

...where xxx.xxx... is your PC's ip address.

Then it's :

dtterm &

-or-

xterm &
Support Fatherhood - Stop Family Law
OldSchool
Honored Contributor

Re: Invoke Xapps from telnet

"Can we invoke HP-UX/Unix/Linux X-Applications within a CLI Telnet session from a remote host."

one answer is "maybe".

X apps ususally require a X-Windows display, set via the DISPLAY=xxx.xxx.xxx.xxx:y environment variable, so its possible to:

a) start an app form telnet and route it to anoter display, for instance a PC running X

b) some apps, such as AutoCad, accept DISPLAY=NULL, which was used primarily for batch scripts / cron jobs. X-Display wasn't needed in this case. That is, I believe, going to be application-specific, so it may not work. depends on app and what it is you're trying to accomplish
arkie
Super Advisor

Re: Invoke Xapps from telnet

Hi TTr, Michael, OldSchool

After a export DISPLAY=xxx.xxx.xxx.xxx:0.0
...where xxx.xxx... is my PC's ip address

Does a `dtterm &` and/or `xterm &` necessarily does the invoking of X environment in a Windows PC through telnet, ssh ?
Steven Schweda
Honored Contributor

Re: Invoke Xapps from telnet

> Does a `dtterm &` and/or `xterm &`
> necessarily does the invoking of X
> environment in a Windows PC through telnet,
> ssh ?

If I understand the question, then no.
"dtterm" runs a dtterm. "xterm" runs an
xterm. They expect there to be an X server
running where DISPLAY says that there's an X
server.

Generally, one starts the X server software,
and _then_ tries to use it. How you start it
may depend on whose X server software you're
using.
arkie
Super Advisor

Re: Invoke Xapps from telnet

I could see that from a basic telnet session also:-

# export DISPLAY=XXX.XXX.XXX.XXX:0.0
# /usr/dt/bin/dtterm -ls -display $DISPLAY

does the job.

Now, `xclock &` or `sam` works on my laptop fine.
Steven Schweda
Honored Contributor

Re: Invoke Xapps from telnet

> # export DISPLAY=XXX.XXX.XXX.XXX:0.0
> # /usr/dt/bin/dtterm -ls -display $DISPLAY
>
> does the job.

You're working too hard. After:

export DISPLAY=XXX.XXX.XXX.XXX:0.0

you don't need to specify "-display
$DISPLAY". Plain "/usr/dt/bin/dtterm -ls"
should be fine.
Steven Schweda
Honored Contributor

Re: Invoke Xapps from telnet

> [...] Plain "/usr/dt/bin/dtterm -ls"
> should be fine.

And, if you add "/usr/dt/bin" to your PATH,
then plain "dtterm -ls" should be fine, too.
Horia Chirculescu
Honored Contributor

Re: Invoke Xapps from telnet

Hello,

>Now, `xclock &` or `sam` works on my laptop fine.

This means that on your laptop is running an X server. If you stop this server from running, there is nothing you can do on your HP-UX/Unix CLI that would let you see an X desktop on your laptop.

'X Server' uses a specific protocol. Has nothing to do with a telnet/ssh connection.

Horia.
Best regards from Romania,
Horia.