WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to use (dot) local/bin executables  (Read 3110 times)

gordon64

  • Guest
how to use (dot) local/bin executables
« on: June 27, 2015, 02:43:39 AM »
Hi

Please move if not related to the Base

1) I have not changed my .profile file so .local/bin is in my pathway

2) I am attempted to put a symbolic link from an unpacked folder executable into my .local/bin as this unpack is not under /usr/local/bin
----and failed
3) I then attempted to make a simple script and failed with that as well with contents
Quote
#!/bin/sh
/home/tc/firefox/firefox

PS I am aware and am using 64 bit coreplayer2's excellent firefox-latest that builds a TCZ that I am using to type this.
and as you can guess, my dependences are already loaded.

thanks for any help

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: how to use (dot) local/bin executables
« Reply #1 on: June 27, 2015, 03:36:32 AM »
What if you first  cd ~/firefox  before running  ./firefox ?
Download a copy and keep it handy: Core book ;)

Offline core-user

  • Full Member
  • ***
  • Posts: 191
  • Linux since 1999
Re: how to use (dot) local/bin executables
« Reply #2 on: June 27, 2015, 08:09:05 AM »
Maybe try
Code: [Select]
ln -s .local/bin/firefox/firefox firefxthen to run it
Code: [Select]
./firefx &
AMD, ARM, & Intel.

gordon64

  • Guest
Re: how to use (dot) local/bin executables
« Reply #3 on: June 27, 2015, 08:30:53 AM »
   Misalf

Code: [Select]
tc@box:~$ cd firefox
tc@box:~/firefox$ ls -al firefox*
-rwxr-xr-x 1 tc staff 162388 May 25 23:24 firefox
-rwxr-xr-x 1 tc staff 162392 May 25 23:24 firefox-bin
tc@box:~/firefox$ ./firefox-bin
sh: ./firefox-bin: not found
tc@box:~/firefox$ ./firefox
sh: ./firefox: not found

I think that fails as I would need to export that pathway in my profile.....and local/bin is supposed to be the answer for that
---but I am stumped at the moment.

core-user

It looks like you want me to unpack firefox into the .local/bin folder, is that correct?

Otherwise I am thinking you might have the sym link opposite to what I have always used,
that is.....you link the real location (home/tc/firefox/firefox) to the symbolic link loc.....(home/tc/.local/bin/firefox)

anyhow I copied firefox folder into local/bin
your link command work as you can't have the same name twice but I named sym link as wolf  with no success so far

Code: [Select]
tc@box:~/.local/bin$ ln -s firefox/firefox wolf
tc@box:~/.local/bin$ ls -al
total 12
drwxr-s--- 3 tc staff 4096 Jun 27 15:27 ./
drwxr-s--- 4 tc staff 4096 Jun 25 09:41 ../
drwxr-xr-x 8 tc staff 4096 Jun 27 15:09 firefox/
lrwxrwxrwx 1 tc staff   15 Jun 27 15:27 wolf -> firefox/firefox
tc@box:~/.local/bin$ wolf
sh: wolf: not found

any more suggestions are welcome

Offline core-user

  • Full Member
  • ***
  • Posts: 191
  • Linux since 1999
Re: how to use (dot) local/bin executables
« Reply #4 on: June 27, 2015, 10:45:28 AM »
Quote
2) I am attempted to put a symbolic link from an unpacked folder executable into my .local/bin as this unpack is not under /usr/local/bin----and failed
You create the link to the location of Firefox in your /home directory pointing to where you have put the Firefox executable, then you run it from your /home directory.

Code: [Select]
ln -s <what> <where>
Edit: As you seem to have linked it to 'wolf', try
Code: [Select]
./wolf
« Last Edit: June 27, 2015, 10:48:05 AM by core-user »
AMD, ARM, & Intel.

gordon64

  • Guest
Re: how to use (dot) local/bin executables
« Reply #5 on: June 27, 2015, 06:08:41 PM »
core-user

thanks for reply I do appreciate it.

first I deleted firefox folder out of local/bin and removed all previous sym links.
I still don't think you can run wolf from home/tc without a mod of your bin pathway sitting in .profile
However here are my test results

Code: [Select]
tc@box:~$ pwd
/home/tc
tc@box:~$ ln -s firefox/firefox .local/bin/wolf
tc@box:~$ ls -al .local/bin/wolf
lrwxrwxrwx 1 tc staff 15 Jun 28 00:57 .local/bin/wolf -> firefox/firefox
tc@box:~$ wolf
sh: wolf: not found
tc@box:~$ ln -s firefox/firefox ./wolf
tc@box:~$ ./wolf
sh: ./wolf: not found

Now its possible that the error is not in anything you guys have suggested. As I have tried and failed in what I hope are reasonable tests maybe the fault lies in my .profile file.

To test this I did an edit to change the backup of yes=1 to no=0 reboot and then clicked on the logout and it is still showing me the normal mounted partition to backup......Reboot failed to save the edit using the wbar editor.

Maybe some kind soul can have a look at these owner perms especially for .profile

Quote
tc@box:~$ ls -al
total 1148
drwxr-s--- 14 tc   staff    4096 Jun 28 01:00 ./
drwxr-xr-x  3 root root     4096 Jun 25 08:53 ../
drwxr-s---  2 tc   staff    4096 Jun 25 08:53 .X.d/
-rw-------  1 tc   staff      97 Jun 28 00:44 .Xauthority
-rwxr-xr-x  1 tc   staff     275 Jun 25 08:53 .Xdefaults
-rw-rw-r--  1 tc   staff    1764 Jun 28 01:05 .ash_history
-rw-r--r--  1 tc   staff     446 May 30 15:28 .ashrc
drwx--S---  4 tc   staff    4096 Jun 28 00:57 .cache/
drwx--S---  6 tc   staff    4096 Jun 28 00:44 .config/
drwx--S---  3 tc   staff    4096 Jun 25 09:41 .dbus/
drwxr-sr-x  3 tc   staff    4096 Jun 25 08:53 .fltk/
drwxr-s---  4 tc   staff    4096 Jun 25 09:41 .local/
drwx--S---  4 tc   staff    4096 Jun 25 09:41 .mozilla/
-rw-r--r--  1 tc   staff     920 May 30 15:28 .profile
-rwxr-xr-x  1 tc   staff     103 Jun 25 08:53 .setbackground
lrwxrwxrwx  1 root staff      20 Jun 28 00:44 .wbar -> /usr/local/tce.icons
drwxr-sr-x  4 tc   staff    4096 Jun 28 00:44 .wmx/
-rwx------  1 tc   staff     379 Jun 28 00:44 .xsession
drwxr-sr-x  2 tc   staff    4096 Jun 25 09:41 Desktop/
drwx--S---  3 tc   staff    4096 Jun 28 00:44 Downloads/
drwxr-sr-x  3 tc   staff    4096 Jun 27 15:57 TCZ/
-rw-r--r--  1 tc   staff     549 Jun 27 09:10 alsa-only-error
-rw-r--r--  1 root staff    9743 Jun 27 09:14 asound.state
-rw-rw-r--  1 tc   staff      82 Jun 27 03:46 asoundrc
-rw-------  1 tc   staff    2836 Jun 27 08:45 bookmarks-2015-06-27.json
-rw-r--r--  1 tc   staff 1045931 Jun 27 08:36 corebook.pdf
drwxr-xr-x  8 tc   staff    4096 Jun 28 00:44 firefox/
-rw-r--r--  1 tc   staff   10072 Jun 26 03:13 lspciv
-rw-r--r--  1 tc   staff    3343 Jun 27 04:10 rules
lrwxrwxrwx  1 tc   staff      15 Jun 28 01:00 wolf -> firefox/firefox

thanks in advance

gordon64

  • Guest
Re: how to use (dot) local/bin executables
« Reply #6 on: June 27, 2015, 08:33:39 PM »
Just an update to my .profile query

my error, I forgot to back up in rebooting so silly me.
I have since tested my system as I use a permanent home and opt and have removed those lines from my .filetool list.

2) I have just tested my pathway and local/bin is there
Code: [Select]
echo $PATH
/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/ondemand

so I am none the wiser on my current issue but at least we have eliminated a bad .profile file as being the culprit.

I am sure I am missing something obvious....like I am an idiot but feel free to make further or new suggestions.

cheers

Offline core-user

  • Full Member
  • ***
  • Posts: 191
  • Linux since 1999
Re: how to use (dot) local/bin executables
« Reply #7 on: June 29, 2015, 01:58:26 AM »
Try running
Code: [Select]
chmod +x wolf then
Code: [Select]
./wolf
AMD, ARM, & Intel.

gordon64

  • Guest
Re: how to use (dot) local/bin executables
« Reply #8 on: June 29, 2015, 03:12:44 AM »
core-user

thanks for persistance, I have not forgotten you.

if you look at my code box reply 5 the bottom shows wolf is already executable according to my eyesight.

I have just done a rebuild so for the moment I shall have start afresh.

cheers

gordon64

  • Guest
Re: how to use (dot) local/bin executables
« Reply #9 on: July 04, 2015, 01:56:19 AM »
please mark as solved.

The top post gives a slightly misleading error message.

The solution was to use a sym link for /lib to /lib64.

All credit to coreplayer2 whose code in firefox-latest gave me the solution.