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


Click here to return to the 'X Commands in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
X Commands in Terminal
Authored by: jdbyler on Dec 13, '01 05:44:54PM
The xhost command (and just about any other X command) will not work without the DISPLAY variable being set. In order to set DISPLAY automatically in Terminal windows, I use this code in my .cshrc:
  if ($?TERM_PROGRAM) then
    # Only run these commands if the shell is launched by Terminal
    setenv DISPLAY :0.0
  endif
You could combine this with adrianu's suggestion for running xhost commands only if DISPLAY is set. I recommend using ssh -X, though, for security.

[ Reply to This | # ]