LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gnome launcher for intellij shell script (https://www.linuxquestions.org/questions/linux-software-2/gnome-launcher-for-intellij-shell-script-359869/)

loopyzort 09-03-2005 01:10 PM

gnome launcher for intellij shell script
 
Hey hay,

I'm running Ubuntu with Gnome (I converted from Blackbox/Slack, so I'm a Debian newbie). I've scoured google and the likes for a solution, but basically, I'm running Intellij Idea Java IDE, which launches with a shell script and can't get a panel launcher in Gnome. I created a wrapper shell script and added a sleep call to see what the errors were, it appears my shell environment variables don't apply to the shell script when called from the launcher. I've tried hardcoding the paths into the script to no avail. Has anyone encountered this? Gnome seems pretty snappy, but I don't know if I can live with Terminal->cd /usr/share/idea/bin->idea.sh every time I want to write some Java code...

Thanks,
lz

shadowcreeper 08-24-2009 12:46 PM

The following works for me with Ubuntu Jaunty (also worked with Intrepid).

This assumes you have downloaded the .tgz file and extracted it into $HOME/bin (it should have created a directory under that called idea-#### -- where #### is the build that you downloaded). If you have installed it elsewhere, you will need to modify the script a bit.

PS -- I would recommend always extracting into another directory and moving the resulting idea-#### into $HOME/bin by hand.

########### BEGIN idea.desktop (the icon on the menu bar) ###########
#!/usr/bin/env xdg-open

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name[en_US]=IntelliJ Idea 8
Exec=/home/shadow/bin/idea
Comment[en_US]=IntelliJ Idea 8 Java IDE
Name=IntelliJ Idea 8
Comment=IntelliJ Idea 8 Java IDE
Icon[en_US]=/home/shadow/icons/idea32.png
Icon=/home/shadow/icons/idea32.xpm
Categories=Application;Development
############ END idea.desktop (the icon on the menu bar) ############

########### BEGIN $HOME/bin/idea (shell script) ###########
#!/bin/bash

# Buggy: Appears to add an extra blank line after every line of text.
#export JDK_HOME=/usr/lib/jvm/java-6-openjdk
#export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

# Works fine
export JDK_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME=/usr/lib/jvm/java-6-sun

# Works fine
#export JDK_HOME=/usr/lib/jvm/java-1.5.0-sun
#export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

# You might need to change IDEA_HOME if you installed it elsewhere
export IDEA_HOME="$HOME/bin/idea-9886"
#export IDEA_HOME="$HOME/bin/idea-9902"
export IDEA_VM_OPTIONS="$IDEA_HOME/bin/idea.vmoptions"
export IDEA_PROPERTIES="$IDEA_HOME/bin/idea.properties.file"

cd "$IDEA_HOME/bin"
export LIBXCB_ALLOW_SLOPPY_LOCK=1
./idea.sh
############ END idea (shell script) ############


All times are GMT -5. The time now is 04:13 AM.