Usually we install a package on Ubuntu 12.04 LTS using the apt-get command (or the Ubuntu Software Center) and we have the application available to us via the Dash Search Icon with all the necessary binaries in the user PATH.
However, some applications are not bundled as apt packages and we need to install them ourselves. In this case, one major issue is that of not having a launcher icon and not having the binary in user PATH.
Let's see the example of manual PHP Eclipse i.e. PDT installation
You need to be root user for this,
I usually keep manually installed applications in /opt directory
Download eclipse package using wget or using your browser https://eclipse.org/pdt/#download
cd /opt/
mkdir php_eclipse
cd php_eclipse
cp -rf eclipse-php-mars-1-linux-gtk-x86_64.tar.gz .
tar -xvfz eclipse-php-mars-1-linux-gtk-x86_64.tar.gz
Type eclipse in the Search bar and you can see your newly installed eclipse icon.
Click on it and your application launches.
cd eclipse
The eclipse binary is within the eclipse directory at the 1st level
You may also need to give permissions for the user to execute from this directory. I usually give
chmod -r myusername.root /opt/php_eclipse
Now, if you do ./eclipse from command link you launch eclipse and you will see its icon appear on the Dash Bar.
However when you close the application the launcher goes away and it also does not have the 'Lock to Launcher' option.
We also need to create a link in /usr/bin/ to make the eclipse binary available from any path to the user.
cd /usr/bin/
ln -s /opt/php_eclipse/eclipse/eclipse php_eclipse
This will create a link like this in /usr/bin/,
php_eclipse -> /opt/php_eclipse/eclipse/eclipse
Now, you can launch eclipse using ./eclipse from any path.
Now, we need a launcher icon. Launcher icons have a .desktop file which has the necessary configuration.
Create one for your PDT and you have a freshly baked icon right on the launcher bar.
cat /usr/share/applications/php_eclipse.desktop
[Desktop Entry]
Type=Application
Name=PHP Eclipse
Comment=Eclipse Integrated Development Environment for PHP (PDT)
Icon=/opt/php_eclipse/eclipse/icon.xpm
Exec=php_eclipse
Terminal=false
Categories=Development;IDE;PHP;
I didn't like the default icon so I downloaded another image ( converted it to .xpm), placed it in /opt/php_eclipse/eclipse/ and used that as my icon ;)
However, some applications are not bundled as apt packages and we need to install them ourselves. In this case, one major issue is that of not having a launcher icon and not having the binary in user PATH.
Let's see the example of manual PHP Eclipse i.e. PDT installation
You need to be root user for this,
I usually keep manually installed applications in /opt directory
Download eclipse package using wget or using your browser https://eclipse.org/pdt/#download
cd /opt/
mkdir php_eclipse
cd php_eclipse
cp -rf eclipse-php-mars-1-linux-gtk-x86_64.tar.gz .
tar -xvfz eclipse-php-mars-1-linux-gtk-x86_64.tar.gz
Type eclipse in the Search bar and you can see your newly installed eclipse icon.
Click on it and your application launches.
cd eclipse
The eclipse binary is within the eclipse directory at the 1st level
You may also need to give permissions for the user to execute from this directory. I usually give
chmod -r myusername.root /opt/php_eclipse
Now, if you do ./eclipse from command link you launch eclipse and you will see its icon appear on the Dash Bar.
However when you close the application the launcher goes away and it also does not have the 'Lock to Launcher' option.
We also need to create a link in /usr/bin/ to make the eclipse binary available from any path to the user.
cd /usr/bin/
ln -s /opt/php_eclipse/eclipse/eclipse php_eclipse
This will create a link like this in /usr/bin/,
php_eclipse -> /opt/php_eclipse/eclipse/eclipse
Now, you can launch eclipse using ./eclipse from any path.
Now, we need a launcher icon. Launcher icons have a .desktop file which has the necessary configuration.
Create one for your PDT and you have a freshly baked icon right on the launcher bar.
cat /usr/share/applications/php_eclipse.desktop
[Desktop Entry]
Type=Application
Name=PHP Eclipse
Comment=Eclipse Integrated Development Environment for PHP (PDT)
Icon=/opt/php_eclipse/eclipse/icon.xpm
Exec=php_eclipse
Terminal=false
Categories=Development;IDE;PHP;
I didn't like the default icon so I downloaded another image ( converted it to .xpm), placed it in /opt/php_eclipse/eclipse/ and used that as my icon ;)
Comments
Post a Comment