image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old May 7th, 2004, 05:50 AM
Registered User
 
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sljivo is on a distinguished road
Launch X11 application

Hi, I'm currently trying to launch an X11 application from an Objective C program but it nevers works, the graphical mode of the X11 app is never launched when I try to use NSTask, it only launches the app in shell mode. What I need is to pass the command line to launch the X11 app directly in the X11 xterm but I'd like to do it using code (for the moment I launch X11 and then the user has to type the app X11 name with the name of the file that must be opened thanks to the app).

If someone had the solution it would be great, PLEASE HEEEEELP !
Reply With Quote
  #2  
Old May 12th, 2004, 06:20 AM
rhg rhg is offline
Registered User
 
Join Date: Dec 2002
Location: Velbert, Germany
Posts: 220
Thanks: 0
Thanked 0 Times in 0 Posts
rhg is on a distinguished road
The X11 app requires the DISPLAY environment variable to be set appropriately. Open xterm in X11 and check with echo $DISPLAY how this variable is set. You must set it globally (in environment.plist) so that your Cocoa program inherits it.

For details about environment.plist look here:
http://developer.apple.com/qa/qa2001/qa1067.html

For a convenient tool to edit your environment.plist look here:
http://www.rubicode.com/Software/Bundles.html
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 11:27 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.