Monday, March 28, 2005

Automatically launch X11

I just saw this tip in a comment for this hint on macosxhints.  By adding these lines to your .profile, your shell will automatically launch X11 when you start a shell, and you are not connected via ssh.

# if we're NOT ssh'd in

if [ ! ${SSH_TTY} ]; then

# make sure X is running

if [ "`ps -x | awk '{print $5}' | grep X11`" = "" ]; then

open /Applications/Utilities/ &

# then refocus

osascript -e 'tell application "Terminal" to activate'


# if DISPLAY isn't set

if [ x${DISPLAY} = x ]; then

export DISPLAY=:0



No comments:

Post a Comment

DIY Cloud Storage: A Step-by-Step Guide to Setting Up Nextcloud on Your Raspberry Pi

In this post, I'm going to walk you through the process of setting up Nextcloud on a Raspberry Pi using NextcloudPi . If you're loo...