Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

How do I add a path entry?

Hello.

Right now, to resize an image, I have to use the following:

         /home/tools/gm-1.1.3/bin/gm convert bigpic.jpg  -resize 100x50 +profile "*" thumbnail.jpg

I don't want to have to include the full path.  Instead, I would like to use the following:

         gm convert bigpic.jpg  -resize 100x50 +profile "*" thumbnail.jpg

This needs to work for all users, including nobody.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of mmartha
mmartha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hankknight

ASKER

So, I should log in with root access and type in the following command?

           ln -s /home/tools/gm-1.1.3/bin/gm /usr/bin/gm

Is that right (I don't want to mess anything up!)

Thanks!
Avatar of mmartha
mmartha

You don't have to logout from your normal user session. You can do:

$ su -
Password: (input root pasword here)

This will give you root access :D (will switch you in the console to the root account actually... su means switch user)

# ln -s /home/tools/gm-1.1.3/bin/gm /usr/bin/gm

and then you can exit from the root account with "exit" as follows:

root@localhost # exit
user@localhost $

:D
Thanks.

Now, how can I undo this in the future when I no longer need the graphics tool?
to remove the link the following command must be issued:

# rm /usr/bin/gm

If you copied the directory contents, you must remove them from the /usr/bin directory with the rm command. If you did this, I recommend to undo it now, and create the link, because is easier to manage the link than the binary contents of the file.

Be happy :D

MMartha