Custom application launchers in Dock?

Hi,

I have an X11 question (I hope this is the right place to post it...). Basically, although I the vast majority of the applications that I use have been ported to Mac OS X, I still have a few that run under X11. XMMS is one of them, and although I love the Mac system I have I can't bear to part with XMMS. But it's inconvenient to start up an xterm and run a command bringing up XMMS every time I want to run it. So what I want it a custom application launcher in my Dock, that can bring up XMMS just by clicking on the icon.
So this is where I have got so far: I found a program called Platypus that essentially does exactly what I need, in that it creates an icon that is linked to a script. So now I just need to find a script that can start XMMS, which should be no problem at all. Unfortunately, I can't figure out the script I need, and I'm totally stumped...
The problem is that I need to start X. So when I bring up a terminal, and run
/usr/X11R6/bin/startx
then go to the xterm that comes up and type
/sw/bin/xmms
everything works fine. Unfortunately, the script
#!/bin/sh
/usr/X11R6/bin/startx
/sw/bin/xmms
does not work in the same way... it seems that it starts X, but then it hangs, and doesn't run the next command in the xterm.
Is there a way to do this? To start X, and then run a command in the xterm, all within the same script (that I can then link to the icon)? If so, please let me know. I feel like I'm close to figuring this out, and it would really make running those X11 applications so much easier!

Thanks in advance for any help,

nanoo

Posted on Oct 11, 2005 8:15 PM

Reply
5 replies

Oct 11, 2005 9:05 PM in response to nanoo

Here's an idea.

Create an alias to the /usr directory and place it in your home directory. (You can't navigate directory to this directory in the Finder unless you choose "Go To Folder").

Create an alias to an existing app and click on "Select New Original" choosing the X11 program from the /usr directory. (I couldn't create an alias to an X11 program due to Unix permissions restrictions so I just created an alias to another program and used that to point to the X11 program).

Drag the newly created alias to the Dock.

Click on the alias you just put in the Dock.

Let us know if this works for you.

Oct 11, 2005 9:15 PM in response to nanoo

Have you tried placing the XMMS executable directly in the "Dock"? You wouldn't think it would work but many X11 apps can be double-clicked and somehow the system knows to launch X11.app and run the executable...
http://www.macosxhints.com/article.php?story=20050823202926555

The same apparently goes for some "Terminal" commands too - eg. try double-clicking ' /usr/bin/top' for example...

Oct 13, 2005 12:57 PM in response to nanoo

Wow - I wasn't expecting a response so quickly! Sorry I'm late in posting back.
Well, I thought I would try all the suggestions, with the easiest one first, and sure enough when I just dragged the xmms icon into the dock it did indeed know to launch X11 and it worked perfectly! I'm so used to working with terminals, that I didn't even think about just dragging it... Thank you for all the advice, and expecially for the Unix forum - I had missed that actually.

Thanks again,

Daniel

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Custom application launchers in Dock?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.