4 Steps to a Mozilla Shortcut
Written By: Rage_A_Holic
Sensei's Note:
This NHF assumes you are using KDE and have a need to make shortcuts on
your desktop (ala Windoze). It covers basic icon linking with programs
that need console commands to run them.
1) Write a bash shell script.
2) Make the script executable.
3) Add Mozilla icons to your /usr/share/icons file
4)Create a desktop shortcut
1) Write a bash shell script (not as hard as it sounds)
In a text editor (kwrite, kedit, vi, emacs), type the following:
#!/bin/bash
cd /path/to/package
exec ./mozilla
Save your new script as mozilla.script or whatever you'd like and place it
in your /home/username-here directory (you don't need the .script prefix,
but I like to use it for organizational purposes). Change /path/to/package
to reflect the location of the package folder that was created during the
Mozilla installation. Mine is in /home/brian/package.
2) Make the script executable
In a terminal, type the following:
chmod +x mozilla.script
What you've done here is you've used the chmod +x filename command to make
the script executable.
3) Add Mozilla icons to your /usr/share/icons file
You can find a Mozilla desktop icon in the package/ folder. The pathname
is package/icons/mozicon50.xpm...there is also a mozicon16.xpm, but it's
microscopic. In order to make the Mozilla icon available, you need to
move it to /usr/share/icons (the default icon location in most
RedHat-based distros). To do this, you need to have root privileges...so
either use the "su" command or login as root. At a terminal, type the
following:
cp /pathname/to/package/icons/mozicon50.xpm
/usr/share/icons
4) Create a desktop shortcut
KDE:
Open KFM and cd to /home/user/Desktop. Right-click in the window and
choose: new application. Name the shortcut appropriately and then you need
to assign a path to the program; but in our case, we are going to use the
path to the script instead of the path to the program. Since the script is
saved in /home/username-here, the path to the script would be
/home/username-here/name.script. By making the shortcut point towards the
script, a click on the shortcut executes the script that in turn, executes
the ./mozilla script.
Select the mozicon50 icon and you're done.
GNOME:
I haven't used GNOME yet, so I can't provide instructions on how to
create icons in the GNOME/Enlightenment environment. If anyone can fill
me in, I'll update the NHF and give credit where credit is due.
|