Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use Terminal with X11 instead of xterm UNIX
This is a relatively simple hint, but it makes sense for people who use X11 (XDarwin) in rootless mode. A shell environment variable "DISPLAY" tells XWindows applications where the windows should display. When you start XDarwin, DISPLAY is automatically set to :0.0, but this variable only gets exported to new xterm shells.

xterm is slow while scrolling, yet is quite quick. Why not use instead of xterm? To do this, use this command in a variant of csh.
setenv DISPLAY :0.0
(if you don't use a variant of csh, you will need to know how to set environment variables in your shell.)

Put this in your shell init script (which is most likely .cshrc for those who haven't changed their default shell or made a .tcshrc file instead) or just use it at the command prompt. From then on, you can use to open your x windows apps.

This is only useful if you're using XDarwin in rootless mode; it looks great with OroborOSX!
  • Currently 3.00 / 5
  You rated: 4 / 5 (2 votes cast)

Use Terminal with X11 instead of xterm | 7 comments | Create New Account
Click here to return to the 'Use Terminal with X11 instead of xterm' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Configuring Terminals
Authored by: adrianu on Dec 07, '01 11:08:15PM

It may also be worth pointing out that in Terminal it is possible to save the settings for any chosen Terminal window to a file (it will have a ".term" extension).

The settings that are stored in this type of file includes such things as size, location, title, colours, transparency, and also any command that was run on starting that window.

To get back that particular Terminal window when you want it, just double-click on the file!

Also, you can set up your Terminal windows how you wany them to appear when you start Terminal, and then save them *all* to a ".term" file, and check the box that tells it to use that file when Terminal starts up...



[ Reply to This | # ]
Authored by: hatchethead on Dec 11, '01 10:21:20AM

I was just this morning asking myself, "I wonder how you launch X-apps from the terminal window."

Works great.

Now all I need to learn is how to display X-apps running from a remote server on my Mac.


[ Reply to This | # ]
Authored by: adrianu on Dec 11, '01 11:15:30AM

See the hint with title:

"Global xhost setting for X windows"

Summary: use "ssh -X [remote-machine]" if the remote machine is running ssh,
otherwise use "xhost [remote-machine]" on the Mac and "setenv DISPLAY [name-of-mac]:0.0" on the remote machine.



[ Reply to This | # ]
DISPLAY variable
Authored by: kholburn on Jan 17, '02 01:52:27AM

I have the following in my .tcshrc

if ( `ps -awwwux|grep XDarwin |grep -vc grep` > 0 ) then
setenv DISPLAY :0.0

[ Reply to This | # ]
Authored by: cerbero on Oct 21, '02 03:21:58PM

How do I do this using Bash? After I have set the DISPLAY variable to :0.0 in bash, I can do "echo $DISPLAY", and it echoes the correct value, but when I try to open an X11 app, I still get the error message saying it can't open a display. Weird thing is, when using Bash in xterm, it works like a charm, and I have the same value for DISPLAY there. And yes, it works perfectly using tcsh in the Terminal.
Anyone got an idea?

[ Reply to This | # ]
Authored by: augustusarnone on Nov 15, '06 01:39:50PM

I'm having the exact same problem and can't find the answer anywhere. Did anyone ever answer you?

[ Reply to This | # ]
Not such good luck here...
Authored by: bluehz on Oct 21, '02 05:40:37PM

Not having much luck with this one...

I regularly connect to a Linux box on my LAN an run apps locally on the Mac. I have SSH running on both the Mac and the Linux box. The ONLY way I have ever successfully got this to work (and I use this method daily...

1. Launch XDarwin (Orborosx refuse to start on my machine - even after hours of fiddling)
2. Within X-Darwin/xterm - issue on the Mac:

xhost +

3. Now still within XDarwin/xterm issue:

ssh -X

4. Once logged in via SSH/xterm to the linux box I then have to issue:

export on the linux box.

And after that I'm golden - anything I enter in XTERM will launch on the linux box and display on the Mac machine.

Any suggestions or step-by-step for getting this tip (using teh regualr terminal) to work?

[ Reply to This | # ]