Solved

How do I add a path entry?

Posted on 2004-10-15
5
434 Views
Last Modified: 2010-04-20
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!
0
Comment
Question by:hankknight
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
mmartha earned 500 total points
ID: 12321835
copy the /home/tools/gm-1.1.3/bin contents to /usr/bin

or you can make a soft link like this:

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

either way should work
0
 
LVL 16

Author Comment

by:hankknight
ID: 12322246
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!
0
 
LVL 2

Expert Comment

by:mmartha
ID: 12322353
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
0
 
LVL 16

Author Comment

by:hankknight
ID: 12322477
Thanks.

Now, how can I undo this in the future when I no longer need the graphics tool?
0
 
LVL 2

Expert Comment

by:mmartha
ID: 12323225
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
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question