|
|
#1 |
|
Major Leaguer
Join Date: Sep 2002
Location: Cambridge, MA
Posts: 367
|
Unexpected automatic opening of X11
I have X11 set up to open automatically in my .tcshrc file with:
Code:
open /Applications/X11.app There are three cases where this simple method causes X11 to open or be brought to the foreground when I don't want it to, so I would like some suggestions on making this more robust. 1) If I open a new Terminal window while X11 is already open, X11 is brought to the front. 2) If I log back into my machine from a remote machine (for example, using scp), X11 is opened or brought to the front. 3) If I run a compiler in Emacs or Project Builder, X11 is opened or brought to the front. Basically, I want to know how to check if (a) X11 is already open, in which case, don't try to re-open it, and (b) actually opening a Terminal window is what ran my .tcshrc, in which case, open X11 for the first time. |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
.tcshrc should run silent. don't put interactive things in your .tcshrc
put interactive commands in your .login and you can test if X11 is running: Code:
[ ! `ps wwaxl | grep '[X]11'` ] && open ...
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#3 |
|
Major Leaguer
Join Date: Sep 2002
Posts: 350
|
Why don't you instead put it in system preferences login items. That way it will start when you log it and will always be there. In addition, I used an application called Dockless to remove the X icon from the dock and menu bar, and I just launch xwindows applications from the terminal command line. Then it never pops in front.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|