Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-07-2004, 07:55 AM   #1
macunkie
Triple-A Player
 
Join Date: Dec 2003
Location: redneckhell
Posts: 54
Jaguar Run X11 applications from Terminal.app

I've been looking at Sao's Homepage and trying to configure my X11 to run apps. I want to be able to launch apps from the X11 Aplications menu?

Sao's tutorial: Tutorial Homepage

Quote:
o start X11 applications from Terminal.app:
Write in your .cshrc or .login or .tcshrc file:


if (! $?DISPLAY) then
***setenv DISPLAY :0.0
endif

----------

If you are using Bash:

if [ ${#DISPLAY} -eq 0 ]; then
***export DISPLAY=':0.0'
fi

----------

The 'standard' way to do it in the Bourne shells:

: ${DISPLAY:=':0.0'}
**export DISPLAY


This also works with zsh.

I'm using Panther with a bash terminal. How do I locate and edit the correct file so x11 will run gimp and xcat?

Thanks for your great tutorial

MacUnkie.
macunkie is offline   Reply With Quote
Old 06-07-2004, 08:19 AM   #2
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
the bash equivalent is .bashrc
yellow is offline   Reply With Quote
Old 06-07-2004, 09:15 AM   #3
macunkie
Triple-A Player
 
Join Date: Dec 2003
Location: redneckhell
Posts: 54
Jaguar

Quote:
Originally Posted by yellow
the bash equivalent is .bashrc

I edited the .bashrc file to include:

Quote:
f you are using Bash:

if [ ${#DISPLAY} -eq 0 ]; then
***export DISPLAY=':0.0'
fi

----------



I got a terminal error that says it doesn't recognize the "export" command?

MacUnkie.
macunkie is offline   Reply With Quote
Old 06-07-2004, 01:36 PM   #4
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Quote:
want to be able to launch apps from the X11 Aplications menu

In Apple's X11 Applications menu go to --> Customize, and write, for example:

Name: Gimp
Command: source /sw/bin/init.sh ; gimp

Also, edit your .xinitrc file (in your user directory) and add:

source /sw/bin/init.sh

Also, try writing in your .bashrc:

[[ -z $DISPLAY ]] && export DISPLAY=":0.0"
sao is offline   Reply With Quote
Reply


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

Forum Jump



All times are GMT -5. The time now is 10:25 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.