Add gnome ubuntu application luncher with custom shell environmentBy neokrates, written on March 22, 2010 |
howto |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Your skill as shell programmer is?
- No skill (35%, 7 Votes)
- FreeTime coder (acceptable) (25%, 5 Votes)
- Developer (good) (15%, 3 Votes)
- Novice (15%, 3 Votes)
- Admin (very good) (10%, 2 Votes)
- Guru (perfect) (0%, 0 Votes)
Total Voters: 20
Loading ...
You have some script or application which needs shell(bash!?) environment. If you add it to the Application Luncher, it misses variables and script fails.
The problem is that you might have your variables in bashrc or file like this, and they are not been read in this case. In this howto, I will add Java path to the PATH environment variable so that my eclipse can start from script. But solution would work for any similar case…
My eclipse directory is ECLIPSE_HOME.
Step 1.
In ECLIPSE_HOME:
Create file with your variables and export them. Call the file “vars”:
1 2 3 4 | DEVTOOLS=/opt/dev JAVA_HOME=$DEVTOOLS/lang/jdk export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin:. |
Step 2.
Create starter script. I.e., mine is called “estarter”:
1 2 3 4 | #!/bin/bash cd /opt/dev/ide/eclipse source vars ./eclipse |
The source vars command tells bash to read variables from my vars file.
Step 3.
Make “estarter” executable:
ECLIPSE_HOME> chmod a+x estarter
Step 4.
Now drag the icon of estarter from File Browser to the Gnome Starter panel. Give a name for new luncher.
Done.
Remark: You can put vars in your ~ (home directory). That will spare you the problem of double configuration.
Then, you use it from .bashrc, .profiles etc. like this:
source vars|
LEARN MORE (amazon bookstore)
|
|
TAGS
|
|
RELATED
|
Pages
Posts
|
|
SOCIAL
|
|
INCOMING SEARCH TERMS
|


















