Newbie: Xterm help

rjmagyar

Registered
Hi,

I am new to Mac OS but am a long time linux and unix user. I am running the X11 that was available on the Mac OS version 10.4 disk. When I open an xterm and try to run application &, no new window pops up. How do I enable this? I'd like to run emacs, for example, in a new window. Thanks, Rudy Magyar
 

digit9

Registered
You need to append the -DISPLAY flag at the end of your application. Most man pages document this flag.

Basically it's something like this
AppName -DISPLAY 192.168.0.1:0.0
 

spb

Registered
Are you sure about needing to set $DISPLAY ?

When I check I do not have $DISPLAY set, but I can type "open-x11 gimp" and it works just fine.

Frankly, I've also had many problems, getting the X applications to work as I want them to, but I've not found that the problem is associated with the DISPLAY variable.

For example I've had problems getting remote x applications to tunnel with ssh. I've set "xhost +", I've used the -X flag with ssh, and I've manally set $DISPLAY, but I've still had problems.
 

gentsch

Registered
On other *ix's you may have to run xhost + to allow other X winders to pop on the host.
(xhost + is the least secure option, xhost +yourhostname is better)

My Mac is at home, so would have to actually try it and see if that indeed is the problem...
it may not be....seems like I have never had issues popping X on my mac...I do have to have the X11 program running, though, but if you alredy have an xterm up, and not a terminal you should be good.

Reply and let me know if I need to go dig on this. :) I am assuming you figured it out since this post is a month or so old.

S
 

gentsch

Registered
The display is a good point, as is the ssh -X (assuming your ssh config files allow it).

I somehow did not see the other responses before my post, so sorry....feels like Monday again.....terminal morning fog.
 

mambopanda

Registered
spb said:
Are you sure about needing to set $DISPLAY ?

When I check I do not have $DISPLAY set, but I can type "open-x11 gimp" and it works just fine.

Frankly, I've also had many problems, getting the X applications to work as I want them to, but I've not found that the problem is associated with the DISPLAY variable.

For example I've had problems getting remote x applications to tunnel with ssh. I've set "xhost +", I've used the -X flag with ssh, and I've manally set $DISPLAY, but I've still had problems.
I believe he is talking about launching emacs from xterm(which is an x11 app that lets you access the shell), instead of from terminal. In that case the DISPLAY flag is the way to go.
 

rjmagyar

Registered
I solved half of this problem. I can run many applications from the X11 window without a problem, but for some reason emacs prefers to run in the xterminal. I tried the display option and that failed. Also, I used to use an "xterm -e" option in linux. How do I get this to work? Thanks, Rudy
 

artov

Registered
rjmagyar said:
I solved half of this problem. I can run many applications from the X11 window without a problem, but for some reason emacs prefers to run in the xterminal. I tried the display option and that failed.
Are you sure you have X11 support compiled to your emacs? Normally
emacs uses X11 if it finds it, but if it has no X11 support, it will not even
try to search it.
 

phinsman

Registered
Sorry if this is just way off, but make sure the X11 app is actually running. I had all the xhost, DISPLAY, etc. set right, and I knew it, but I couldn't make anything work, until it dawned on me that X11 wasn't even running.

<sigh>
Dale
 
Top