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

Launch X11 xterm windows from anywhere UNIX
I prefer to use the xterm that comes with X11 over Apple's Terminal. However, launching a new xterm window can be a pain when X11 isn't the current active app. I wrote the following AppleScript which starts X11, if it isn't running, and then launches an xterm window. The only requirement is that there is a menu entry in X11's Application menu with the title of Terminal (this entry is present by default):
tell application "X11"
  activate
end tell

tell application "System Events"
  tell process "X11"
    tell menu bar 1
      tell menu "Applications"
        click menu item "Terminal"
      end tell
    end tell
  end tell
end tell
After testing the script, I saved it as an application with the "Run Only" checkbox checked. I then downloaded a "terminal" icon from xicons.com and applied it to the program. Now an xterm window is a click away on my desktop.
    •    
  • Currently 1.75 / 5
  You rated: 1 / 5 (4 votes cast)
 
[9,485 views]  

Launch X11 xterm windows from anywhere | 5 comments | Create New Account
Click here to return to the 'Launch X11 xterm windows from anywhere' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Launch X11 xterm windows from anywhere
Authored by: paddlefoot on Mar 08, '04 11:25:09AM

I keep X11 on my dock, and my .xinitrc file is set up to launch xterm every time X11 starts. So, in order to do what this hint does, I just click on the X11 icon in my dock.



[ Reply to This | # ]
Launch X11 xterm windows from anywhere
Authored by: frankxiv on Mar 08, '04 01:47:02PM

What if X11 is already running but doesn't have an xterm window open? Doesn't the .xintrc only run when you launch X11?

If that is the case then you would have to click the Dock icon for X11 then head to the applications menu and select Terminal so it seems that this tip provides a better solution.

Later, Frank



[ Reply to This | # ]
Launch X11 xterm windows from anywhere
Authored by: pittnat on Mar 08, '04 04:32:25PM

you can also just use the command open-x11 which is an apple-provided script to start an x11 program, starting x11.app if it is not currently running.



[ Reply to This | # ]
Launch X11 xterm windows from anywhere
Authored by: Graff on Mar 09, '04 12:45:56PM

Right and you can combine that with this hint to make a easy solution. Just enter this into Script Editor, save it as an application, and then place the application in the Dock:

do shell script "open-x11 xterm"

[ Reply to This | # ]
Launch X11 xterm windows from anywhere
Authored by: AndyF on Mar 08, '04 10:37:46PM

Other alternatives:

Use the "Go To Folder" (cmd-shift-G) in the finder and go to /usr/X11R6/bin.

Then use command-option-drag to make an alias; you can double click the alias to launch xterm.

Or drag xterm to the dock (on the right side of the bar, though, unlike other apps).



[ Reply to This | # ]