3

I'd like to write a question that will provide some info that I would have needed a year ago as I was learning Ubuntu. But I'm having a hard time formulating it so that it is clear and simple. I'll describe the problem; help me come up with a good wording for the question. Thanks! Here's the issue:

One thing that I had to learn (but was ultimately very rewarding) was writing simple bash scripts. What drove me to do this was a desire to add programs to the Main Menu and the Panel that I had downloaded/built myself (not through Synaptic/apt/Software Center). The reason I could not simply use the GUI to add them is because they need to be run from within their own directory. If I tried to add a link to the programs to the menu or panel, the launcher would fail.

So what I did is this: I found a bash script online that would move to the directory and then launch the program and amended it to work for me. Here's what I did for a Latin translation program I use, called Words:

#! /bin/bash

WORDSPATH=~/latin/latin.words/

( cd $WORDSPATH ; ./words $* )

I'd like to ask a question so that this kind of answer can be provided. I know that, if I had come to this service 6 months ago, this would be one question I'd want answered. But how can I write this up in a short, clear question?

  • The best I could come up with is this: "How do I add a program to the main menu or the panel that i have downloaded myself and that needs to be launched from within its own directory?" But that's kind of awkward, isn't it? And it is possible that a new user would not know that the program needed to be launched from within its own directory, too. – eugenemarshall Jul 30 '10 at 16:47
3

OK, I think I've come up with a good phrasing: "How do I add a program that must be run from within its own directory to the panel or main menu?"

Some programs can only be run from within their own directories. If I go to System->Preferences->Main Menu->Add Item and select the file, it will not work. Similarly, if I right click on the Panel and choose "Add to Panel...", choose "Custom Application Launcher," and then point to the file, it will similarly fail. How can I add a launcher to my panel and an entry in my Main Menu that will successfully launch this kind of program?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .