Please support VectorLinux!

Author Topic: SOLVED:set softlink  (Read 3968 times)

ghartl1

  • Vectorite
  • ***
  • Posts: 379
SOLVED:set softlink
« on: September 18, 2008, 12:23:49 pm »
hi

i use soho 5.9 and installed frostwire..it is located in /opt...there is a directory called frostwire now. and in this directory is the script "runfrostwire.sh"

so...how should i set a symlink to start the app?so that it is available in usr/bin..i assume
please the exact syntax...

thanks in advance

greets günter
« Last Edit: September 19, 2008, 12:06:20 pm by ghartl1 »

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: set softlink
« Reply #1 on: September 18, 2008, 12:57:23 pm »
maybe:
ln -s /opt/frostwire/runfrostwire.sh /usr/bin/frostwire

edit:
or, you could add /opt/frostwire/ to your path and then no need for symlink

ghartl1

  • Vectorite
  • ***
  • Posts: 379
Re: set softlink
« Reply #2 on: September 19, 2008, 07:13:05 am »
hi

i already set the softlink /ln -s /opt/frostwire/frostwire.sh  /usr/bin/frostwire

but it wont start from the usr directory

in kde i simply put the execute command to opt/frostwire/frostwire.sh
that works

if i type which frostwire....the system wont find the proggi

so how can i set the path? and in which file? so the system knows where frostwire is located

regards günter

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: set softlink
« Reply #3 on: September 19, 2008, 08:45:01 am »
PATH=$PATH:/opt/frostwire/
will add the directory to your path.

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: set softlink
« Reply #4 on: September 19, 2008, 09:18:35 am »
You can also set your default path (on a user by user basis) in your .bashrc file in your home directory.  You'll find a statement like this:

export PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/opt/bin:/usr/X11/bin:/usr/local/games:/usr/games/:

Add /opt/frostwire: to the end of that statement and beginning with next login it will always be in your path.

HTH,
Cait
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

ghartl1

  • Vectorite
  • ***
  • Posts: 379
Re: set softlink
« Reply #5 on: September 19, 2008, 10:56:02 am »
i did as you told me

wachbirn:$ echo $PATH
/usr/local/bin:/usr/bin:/usr/sbin:/bin:/opt/bin:/usr/X11/bin:/usr/local/games:/usr/games:/opt/Adobe/Reader8/bin/:/opt/frostwire:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin

sp opt is in the path...is it necessary to put the complete path in the variable (e.g /opt/frostwire/frostwire_noarchxxx/runfrostwire.sh ??)
and my frostwire proggi is in no bin-directory...btw

the system still cant find the proggi

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: set softlink
« Reply #6 on: September 19, 2008, 11:19:52 am »
Yes, you need the complete path minus the actual executable.  In your case it would be /opt/frostwire/frostwire_noarchxxx
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: set softlink
« Reply #7 on: September 19, 2008, 11:59:38 am »
...is it necessary to put the complete path in the variable [executable] (e.g /opt/frostwire/frostwire_noarchxxx/runfrostwire.sh ??)...

Absolutely, this makes all the difference.  I believe the symlink would have worked if the full path was known and used.  We were creating a symlink for a script that wasn't even there - no wonder it did not work.

Example)
as root: ln -s /opt/frostwire/frostwire-4.17.0.noarch/runfrostwire.sh /usr/bin/frostwire

But you need to make sure the bolded part is 100% correct.  If the system complains that /usr/bin/frostwire already exists then remove that file first (as root, rm /usr/bin/frostwire), and then create the symlink.

edit: updated path in symlink based on your post below
« Last Edit: September 19, 2008, 12:08:50 pm by newtor »

ghartl1

  • Vectorite
  • ***
  • Posts: 379
Re: set softlink
« Reply #8 on: September 19, 2008, 12:02:32 pm »
didnt work either

here my path:

wachbirn:$ which frostwire
which: no frostwire in (/usr/local/bin:/usr/bin:/usr/sbin:/bin:/opt/bin:/usr/X11/bin:/usr/local/games:/usr/games:/opt/Adobe/Reader8/bin/:wachbirn:/opt/frostwire/frostwire-4.17.0.noarch/runFrostwire.sh/:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin)

as you can see, i even put the exact path in....it didnt work with the directory before /opt/frostwire/frostwirearchxx/

which frostwire output:

wachbirn:$ which frostwire
which: no frostwire in (/usr/local/bin:/usr/bin:/usr/sbin:/bin:/opt/bin:/usr/X11/bin:/usr/local/games:/usr/games:/opt/Adobe/Reader8/bin/:wachbirn:/opt/frostwire/frostwire-4.17.0.noarch/runFrostwire.sh/:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin)


any other suggestions?

greets günter






ghartl1

  • Vectorite
  • ***
  • Posts: 379
Re: set softlink
« Reply #9 on: September 19, 2008, 12:05:45 pm »
got it...

you were right...the complete path should be set for the symlink..now it works

thanks

greets günter
forget the post before

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: set softlink
« Reply #10 on: September 19, 2008, 12:07:13 pm »
Gunter:

You included the executable in your path.  As I noted before you put in the complete path WITHOUT the executable.  Your PATH declaration is still wrong.

Change:  

/opt/frostwire/frostwire-4.17.0.noarch/runFrostwire.sh/

(which doesn't exist, since the last / defines it as a directory)

to:

/opt/frostwire/frostwire-4.17.0.noarch/

That will work.
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: SOLVED:set softlink
« Reply #11 on: September 19, 2008, 12:09:02 pm »
Yes, correcting the symlink obviates the need for the PATH statement.  I'd remove the erroneous path entry fom your .bashrc file to speed searches.

Glad you got it working.
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

ghartl1

  • Vectorite
  • ***
  • Posts: 379
Re: SOLVED:set softlink
« Reply #12 on: September 19, 2008, 12:10:53 pm »
already put the original bashrc in place

thanks anyway

greets günter