Ubuntu Menu Item
Has anyone managed to add a menu item for IDEA in Ubuntu?
I unpacked the tarball and I can run IDEA via idea.sh in the bin directory.
I then tried to add a launcher via:
System -> Preferences -> Main Menu: Programming -> New Item
Name = IDEA
Command = /home/myName/apps/JetBrains/idea-IU-90.193/bin/idea.sh
However, when I click on it nothing happens.
If I paste that command into a terminal IDEA launches.
Any clue to what is going on?
Please sign in to leave a comment.
Check your environment. idea.sh needs a couple of variables (IDEA_JDK or JDK_HOME) defined to work correctly. They may be defined for your shell, but not for the X11 session. Try defining these variables in your ~/.profile script, then logging out and in again. Another option is hardcoding these variables in the idea.sh script. This is guaranteed to work, but then you have to do it every time you upgrade.
I hadn't thought about the difference between the shells, thanks!
I've been working on a script to install an icon in the menu automatically.
It would live in the bin directory and so far looks like this.
The problem is getting the environment variables in correctly.
I don't want to sync up my .bashrc and .profile all the time (or ever) so I thought about creating an extra launcher script that contains the necessary paths from the current env then calls the idea.sh.
Of course the other option would be do just push these into the idea.sh
I'm not sure what is the best option.
Remember that bash also reads your ~/.profile, so you can move everything that's currently in your ~/.bashrc to ~/.profile, unless it's something that actually should only be defined for interactive bash shells.