Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

X and external apps

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> X and external apps Page: [1]
Login
Message << Older Topic   Newer Topic >>
X and external apps - Oct. 29, '05, 2:04:52 PM   
Einstein

 

Posts: 7
Joined: Jul. 3, '05,
Status: offline
Hi there,
I've got a problem with X, hope you can help me:

I compiled "Worker" (a X-based file manager) for Interix, it runs just fine and even filetype detection based on its content works. Problem is, when I try to open let's say something.txt with a win32 programm the console says thatthere is no access to the displayable windows station.
But that's not true. I know I'm not running it through SSH (which of course wouldn't work).
So I think there MUST be a way to get it top work somehow.

By the way: Igot a little program from sysinternals, with it you can easily launch win32 GUI apps over SSH. It's called "psexec". But my problem seems to resist this tweak *g*.

So when I try to execute "notepad" from a shellscript in which "psexec" invokes notepad to show up on the desktop (yes this works through SSH as well) it runs fine EXCEPT when I try to run it through "Worker" it shows this debug info at the commandline:

"doscmd: /usr/contrib/win32/bin/psexec[109]: /dev/fs/C/WINNT/system32/cmd.exe: No such device"

I used one of the /usr/contrib/win32/bin scripts as a template an only changed the commandline to "psexec.exe -di C:/WINNT/system32/notepad.exe"
Where -i tells the system to force the app to show up on the users desktop and -d to return to the commandline immediatly.

I hope someone reads all this and understands my strange thoughts *g*
Post #: 1
RE: X and external apps - Oct. 31, '05, 10:21:42 PM   
Rodney

 

Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
The Win32 process model is different from the Unix process model.
What is considered "good programming form" in Unix isn't even though of with Win32.
Basic structural concepts that have been the tenets of other OS's got shot in the
foot with DOS and still live on today. This very particularly so with GUI code.
*end rant*

Win32 processes can't handle their stdin, stdout and stderr being, for example, a socket.
That's the "no such device" part. What you need to do is redirect stdin, stdout and stderr
when starting the process. The Win32 program may do nothing with any of the three (and
likely doesn't) but that's what is kacking it over. The usual thing to do is use /dev/null
for all three. As an aside, but related, you may also want to read the cat32 manual
page for additional information.

So run it as "./mywin32program < /dev/null >& /dev/null" (in csh-speak)
or as "./mywin32program < /dev/null 2>&1 > /dev/null" (in ksh-speak).

(in reply to Einstein)
Post #: 2
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> SFU / Interix - Getting Started >> X and external apps Page: [1]
Jump to:





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


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047