|
|
Easier use of X11 in bash
Here's a different solution for getting the DISPLAY variable correctly set in Terminal.app. This will also work with Fast User Switching, when DISPLAY is not necessarily :0.0 .
1. Put X11 in your startup items (System Preferences --> Accounts --> Startup Items) 2. Copy /private/etc/X11/xinit/xinitrc to .xinitrc in your home directory. 3. Edit .xinitrc so that the last few lines are:
Basically we're putting the value of the DISPLAY variable in a file so we can find it from Terminal.app. Also, since I prefer to user Terminal.app instead of xterm in X11, I've commented out the automatic startup of xterm. 4. Add these lines to your .bashrc file:
For this to work, .bashrc must be sourced when you start a new Terminal. This has been covered in a few places already, but what I do is to add these lines to .bash_profile:
And this line to .Xdefaults:
Easier use of X11 in bash
Thank you! Thank you! Thank you! kingtrench! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|