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

Simulate a built-in X11 server package UNIX
I personally hate having to specifically start Apple's X11 when I log into a machine, and in a lab administration setting, it is not ideal either. Here's how to make X11 Beta 3 run in the background of 10.2.5, invisible to the user. It's a collection of known hints and tricks. NOTE: This will affect all users on a machine.
  1. Turn off X11's Quit Warning Dialog Box. Type defaults write com.apple.x11 no_quit_alert true in a Terminal.

  2. Make X11 run without dock icon or menu bar. If you have the OS X Developer Tools installed:

    1. Control-click on X11.app in the Finder and select "Show Package Contents"
    2. Open Contents and open "Info.plist" in Property List Editor.
    3. Open root and click "New Sibling" with Property "LSUIElement" and String "1" as the value.
    4. Save and quit.

  3. (Optional) If you don't have a .xinitrc file, get one. Type cp /etc/X11/xinit/xinitrc ~/.xinitrc to copy an existing one.

  4. (Optional) Modify the .xinitrc file to lose startup programs. Type pico ~/.xinitrc in Terminal. Go down to where it says start some nice programs and put a # in front of xterm & (Result: # xterm &).

  5. Enable Terminal to open X11 apps. Type cat >> ~/.login and hit return in Terminal. Then type setenv DISPLAY :0 and hit return, then hit Control-D.

  6. Add X11 to the user's Startup Items, or implement a login hook to do so (see previous hint).

  7. Log out and log in, then try running an X11 program from Terminal.
[robg adds: I have not tested this one myself...]
    •    
  • Currently 1.60 / 5
  You rated: 1 / 5 (5 votes cast)
 
[10,879 views]  

Simulate a built-in X11 server package | 5 comments | Create New Account
Click here to return to the 'Simulate a built-in X11 server package' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Simulate a built-in X11 server package
Authored by: ackbar on Apr 28, '03 10:48:35AM
If you really want to make it transparent, edit X11's Info.plist so that it says
    NSUIElement
    1
This will get rid of the dock icon, so that it's always running. This does prevent people from easily accessing X11's menu options, so it may not fit your situation, but I don't find myself needing X11's menu options often.

[ Reply to This | # ]
Simulate a built-in X11 server package
Authored by: twalther on Apr 28, '03 11:56:24AM

That's what LSUIElement does, too. As I understand it,
NSUIElement is deprecated in favor of LSUIElement. But yes,
that's part of the trick of it.

Incidently, you don't really need the menu if you use other tips
and tricks to have X11 programs in the dock/script menu.



[ Reply to This | # ]
Simulate a built-in X11 server package
Authored by: Shadowcharly on Apr 28, '03 11:10:14PM

I'll post it so if anyone else is as dumb as i am ;)
If all the proccess goes ok but you can't start the x11 apps from
the terminal, pico your .login file and make sure you wrote the
"setenv DISPLAY :0" stuff before any "source
wathever_you_source" present in your .login file.

To make sure, write it just below the first setenv statement
present in your .login file, rule of thumb for me :)

Hope it doesn't make me look too dumb now.... well, too late XD

Hope it helps

---

--
Shadowcharly

"What a strange game. The only winning move is not to play"

Wargames. Computer's final conclusion about war.



[ Reply to This | # ]
Simulate a built-in X11 server package
Authored by: drewpc on Jun 21, '05 05:46:14PM

In Tiger (I don't know about Panther), you need to update the cache of the Info.plist file after making the NSUIElement change. You can do this by touching the file from the command line:

> touch /Applications/Utilities/X11.app

Now it works in Tiger also!



[ Reply to This | # ]
Simulate a built-in X11 server package
Authored by: bil on May 05, '06 05:12:57AM

Depending on your shell, to run X11 apps from terminal you may need to run "export DISPLAY=:0" instead of the setenv command.

If you add this to the .profile file in your home dir, it will execute each time you open a terminal window.



[ Reply to This | # ]