Benches macOS

5

Custom application launchers in Dock?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    msuper69

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  2. 0

    msuper69

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You might check the Unix forum for further Unix related questions:

    http://discussions.info.apple.com/webx?14@@.eeeb8d4

  3. 0

    Rafe H.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Create a shell script that runs XMMS. Make it executable. Append ".command" to the end of the script's name (without the quotes). Now its double-clickable (and hence dockable).

  4. 0

    biovizier

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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...

  5. 0

    nanoo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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