All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Unable to display a win32 application launched from a xterm.
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
Unable to display a win32 application launched from a x... - Mar. 23, '04, 5:45:31 AM
|
|
|
ht
Posts: 7
Joined: Mar. 23, '04,
Status: offline
|
Hi,
I've installed on my system (Win2000): SFU3.5 and Interop X-server 9.0.0.0.
I'm trying to launch a win32 application (like notepad) from a xterm.
But I've the following error message:
ERROR: /dev/fs/C/WINNT/SYSTEM32/NOTEPAD.EXE will not run. No access to the displayable Windows station.
(eg) Win32 apps won't run in a telnet session.
If I launch notepad from a csh or a ksh, there is no problem.
Is there a solution?
Thank you in advance,
HT.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 9:27:11 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
You should check out the FAQ which answers this question:
http://www.interopsystems.com/tools/FAQ.htm
Specifically the two questions:
- Running Win32 programs from Interix "on the glass"
- Running Win32 programs from Interix via telnet/rlogin/ssh/xterm
I'll quote them here:
Running Win32 programs from Interix "on the glass"
When you are logged on to Windows at the screen (aka "the glass") and you are running an Interix terminal (one of the shells: ksh, csh, tcsh, bash, zsh) you can run Win32 programs. If the Win32 program is a command line oriented programs it will display in the same window from which the command was run. If the Win32 program is a GUI (Graphical User Interface; such as notepad) it will open it's own graphics display. You are able to do this without a problem because everything is working within the same "window station" (what you see on the glass).
Running Win32 programs from Interix via telnet/rlogin/ssh/xterm
When you are logged in to the system via telnet, rlogin or ssh, OR you are working from a locally displayed xterm terminal you cannot run all Win32 programs. When you are logged in this way you do not have access to a "window station". This might change in the future, but this is the way it is now. Without a window station some Win32 programs cannot run, or will run but their output is confused or missing some information. Win32 programs that are GUI (graphically based) cannot run because there is nowhere for them to display. For programs that are command line based the majority run correctly. There are a few that Win32 command line programs that are not well written that attempt to "draw" to the terminal. These command line applications will appear to be missing information in their output.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 10:25:14 AM
|
|
|
ht
Posts: 7
Joined: Mar. 23, '04,
Status: offline
|
Thank you for your reply.
It's a bad news (for me) because it was working on Interix 2.2 and I don't know how I'm going to change my program.
In fact in C++, if you launch the notepad with the command 'system', you have this problem.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 10:53:24 AM
|
|
|
javacody
Posts: 17
Joined: Mar. 16, '04,
Status: offline
|
Does edit work?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 10:57:53 AM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
If ur running the xserver / sshd as a service does it have interact with desktop selected?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 10:58:43 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
It has to do with the GUI apps needing a window station and or a console.
With Notepad it's a GUI. With "edit" it needs a console window.
Back to "ht": what does your program do? Why can't it be changed?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 11:07:35 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
Running sshd (or any otehr daemon) as a service does nothing for
interacting with the visible window station on the glass.
Each user session (login) will be (for security reasons) in it's
own window station. Those coming in by telnet or ssh just don't have
their window station visible. Thus a GUI will run but will never be
seen (sorta the tree falling in the forest when no one is there is
to it ;-) ).
When you start a xterm it technically has no connection to the visible
window station.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 11:18:10 AM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
Can you please check what Windows OS and service pack
you were using with Interix 2.2.
I agree that starting a window's gui app from an xterm was
possible using Interix 2.2 on a Win2k SP2 system - but only
if the account that started the xterm was the same
account that log'ed onto the "glass".
But somewhere between Win2k-SP2 and XP, Microsoft tightened
the security on WindowStations.
Only the logon session now has access to the WindowStation
and xterm and telnet sessions are part of the logon session.
So I don't think this is a change in Interix, but rather
a change with Windows security.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 11:18:23 AM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
This doesnt agree with the behaviour we get from cygwin sshd running as a service. Is this due to inherent differences between cygwin and interix sshd?
Following this with interest as it could prevent the project I had in mind for interix dead in its tracks if this is not possible.
< Message edited by steveh -- Mar. 23, '04, 11:18:45 AM >
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 11:26:56 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
|
Just so I'm clearly understanding what you are doing with cygwin:
Sshd is running as a service. Someone logs in via ssh and then
displays on the glass a GUI application?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 23, '04, 11:35:18 AM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
Yep all that was needed was to select interact with desktop on the service.
Under Windows XP we had initial issues when there where multiple user accounts
on the machines. XP seems to pick a random users "screen" to display the
application. This was solved by setting autologon using control userpasswords2.
< Message edited by steveh -- Mar. 23, '04, 11:35:47 AM >
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 5:49:48 AM
|
|
|
ht
Posts: 7
Joined: Mar. 23, '04,
Status: offline
|
In reply to Javacody
quote:
Does edit work?
I've tried edit in a xterm and it doesn't work (I didn't try further).
In reply to Rodney
quote:
Back to "ht": what does your program do? Why can't it be changed?
The problem is not that it can't be changed, but is that I don't have much time to change it.
What I do is: A win32 application (lets call it "win_A") start a posix application (unix_B) who try to launch a win32 application (win_C) via a C++ "system" command.
I've replaced the system command by a C++ "execl" command, but the problem still remains, win_C doesn't shows his GUI. After some tests, I've found that if I launch directly the posix program (without starting it from win_A), I'm able to launch the second win32 application (win_C) with the GUI. I make progress.
To solve my problem, I've to find a way to launch unix_B from win_A that allows me to launch win_C with his GUI. (I hope that my explanations are quite clear).
In reply to Markfunk
quote:
Can you please check what Windows OS and service pack
you were using with Interix 2.2.
My OS is Win2k Service Pack 4.
I use the same Windows OS with Interix 2.2 and SFU 3.5
In reply to ...
I'm not a Windows specialist and I'm a little bit confused with all this stuff of services, ...
Can it solve my problem? And if yes, how?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 9:20:01 AM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
quote:
In reply to ...
I'm not a Windows specialist and I'm a little bit confused with all this stuff of services, ...
Can it solve my problem? And if yes, how?
Nope I gave it a go. Where as it works fine under cygwin it fails as u say under interix :(
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 9:28:44 AM
|
|
|
ht
Posts: 7
Joined: Mar. 23, '04,
Status: offline
|
(Happy) end:
I've found a solution to my problem.
In my first application (Win_A), I used the following command to launch my unix application:
quote:
C:\WINNT\system32\PSXRUN.EXE C:\SFU\bin\ksh -l -c "unix_B"
I've replaced the PSXRUN.EXE by "POSIX.EXE /c" and so the GUI of my second win32 application (win_C) is displayed.
I don't know why the behaviour is different.
So it was not really a problem with a xterm.
Once more, thanks for your replies,
ht.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 9:31:24 AM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
Still think this needs looking at further. I belive there should be nothing stopping you running gui apps from the ssh, which at current doesnt work.
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 1:01:20 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
Can you explain your real world example of why you'd want to ssh to a remote system and then invoke a Windows GUI app on the remote system which would display on one of the remote system's WindowsStations ?
thanks,
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 1:18:12 PM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
No problem:
The system we currently run manages games servers most of these have a gui console ( unfortunately ) which we need access to.
Games are installed via a unix interface using ssh to the machine. Once installed logical game servers instances are added / started / managed using a web interface.
This all works great under cygwin but it is slow, specifically ssh / scp support.
We are hence looking to move to interix which I have benchmarked to be considerably quicker as well as doesnt suffer from glitches in ssh / scp support.
So in this case the apache server would need to be able to create win32 applications that have a fully functional display. There is no local user as these are "dedicated servers" so windows poping up on the main display is not an issue.
Is that the sort info you need?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 7:35:22 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
Let me see if I understand: you use ssh (and ssh tools) to install programs on the remote windows server.
Then to start the programs you are using a web interface being served by an apache server. Is this apache server the Interix version or a Windows version ?
And you don't care if these programs also display a gui window on the server's console, right ?
Do you also want to start these programs from a ssh session/command line ?
And the Windows remote server system is a Win2K or WinXP or Win2003 system ?
|
|
|
RE: Unable to display a win32 application launched from... - Mar. 25, '04, 8:26:29 PM
|
|
|
steveh
Posts: 195
Joined: Jan. 23, '04,
Status: offline
|
> Let me see if I understand: you use ssh (and ssh tools) to install programs on the remote windows server.
Yes
> Then to start the programs you are using a web interface being served by an apache server.
Yes
> Is this apache server the Interix version or a Windows version ?
At current cygwin version of apache during the port to interix I hope to move to interix version. Why not native win32 apache? Portability of the cgi-bin scripts running under it.
> And you don't care if these programs also display a gui window on the server's console, right ?
Thats right we want the apps to pop up their gui displays. That way if there is an issue an admin can rdp in and check for errors.
> Do you also want to start these programs from a ssh session/command line ?
Thats not in the design atm but if its possible via an apache script dont see why it wouldnt be possible via an ssh session.
> And the Windows remote server system is a Win2K or WinXP or Win2003 system ?
We have Win2K and WinXP systems in the cluster atm no win2k3.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|