LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2007, 06:01 PM   #1
tm2383
Member
 
Registered: Oct 2006
Posts: 185

Rep: Reputation: 15
linking to a program


Hi,
Can anyone help with this. I have just installed a program and after installing it got this script on screen:



============================================
Creating "./pymol" startup script with
PYMOL_PATH=/home/TimM/bin/pymol
============================================
If you need to move PyMOL in the future,
re-run "./setup.sh" afterwards.
============================================
You may now want to copy or link:
"/home/TimM/bin/pymol/pymol"
to something like "/usr/local/bin/pymol"
============================================
Enjoy!

TimM@linux-eslv:~/bin/pymol>
[/HTML]

I would like to be able to type :

[HTML]./pymol[/HTML]

at a command prompt without cd'ing to the directory that pymol is in first i.e. /home/TimM/bin/pymol

How do I create such a link?

Thanks,
Tim
 
Old 03-29-2007, 06:17 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
The command is
Code:
ln -s <path to program> <path to wherever you want the link>
so in this case it would be
Code:
ln -s /usr/local/bin/pymol ~/bin/pymol/pymol
(~ means /home/username)
 
Old 03-29-2007, 06:18 PM   #3
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
You can create a symbolic link using ln:

ln -s [path of file to link] [path of link]

example ... if I wanted to create a symbolic link in my root home directory:
Code:
ln -s /home/TimM/bin/pymol/pymol ~home/pymol
Then if you are in your home directory ... you can run ./pymol
 
Old 03-29-2007, 07:15 PM   #4
tm2383
Member
 
Registered: Oct 2006
Posts: 185

Original Poster
Rep: Reputation: 15
Hi,
Thanks for the replies. Something strange is happening now though. When I type ./ pymol, I still get pymol not found.Even when I CD to the pymol folder and type ./pymol, my Suse linux takes me back to the log in screen. Any ideas?? I've tried reinstalling again, but with no change.

Thanks again,
Tim
 
Old 03-29-2007, 07:27 PM   #5
tm2383
Member
 
Registered: Oct 2006
Posts: 185

Original Poster
Rep: Reputation: 15
Ah, I see what is happening now. When I log in under the name on which the program was originally installed, I can cd to bin, then pymol, then ./pymol and it works.
Should I have installed it as root so that all users could access it?
Symbolic link still doesnt see to work though.

Tim
 
Old 03-29-2007, 07:38 PM   #6
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
What message do you get when you try to execute using the link ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking program with .a libraries rudy2 Programming 2 04-22-2005 05:36 AM
Problems linking a C library into a C++ program sfrdll Programming 3 06-21-2004 01:36 PM
a simple dynamic linking program kris273 Programming 3 04-18-2004 06:26 AM
C++, linking, and program distribution leiavoia Programming 11 08-24-2003 05:35 PM
Linking program in g++? Eits0 Programming 6 06-27-2002 08:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration