Reply
Thread Tools
SeRi@lDiE's Avatar
Posts: 919 | Thanked: 37 times | Joined on Aug 2006 @ /dev/null
#1
Has any body been able to run blueserial.sh?
I download it the tar and pass the files to my documents in the Nokia 770 but when I executed it said device not found...

Any ideas?

Thank You.
 
SeRi@lDiE's Avatar
Posts: 919 | Thanked: 37 times | Joined on Aug 2006 @ /dev/null
#2
Any body?

Thank You.
 
Posts: 5 | Thanked: 1 time | Joined on Aug 2006
#3
I am setup blueserial.sh to. I have other problem. When I execute .sh it founded my cellur and ask the question to connect it. After confirm connection .sh write post: 33: cu: not found. cu is in the same folder with .sh. Continue thinking....
 
Posts: 264 | Thanked: 28 times | Joined on May 2006
#4
If you don't tell the Linux shell (sh) where to find a command, it searches through an environment variable called $PATH.
$PATH contains a colon ( : ) separated list of directories and those directories are searched in sequence to look for your command. If it doesn't find it in any of those directories, you'll get the "not found" response.

The default $PATH for user is /usr/bin:/bin

The default $PATH for root is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

You can see your $PATH with the command echo $PATH

To execute a command that's not in your $PATH, you must enter a fully qualified path to the command or a relative path. Fully qualified paths start with / like this: /home/usr/bin/cu or ~/bin/cu ( ~ expands to the user's home directory).
Relative paths start at the current directory like this ./cu or ./bin/cu ( . expands to the current directory). The pwd command prints your current directory.

Now, it's often desirable to execute commands without having to type in the full path to it. To do this, you can either move the command to a directory in your $PATH like /usr/bin or add the command's directory to your default $PATH.

While it's easier to just move the command to /usr/bin, most Linux users prefer to add directories to their $PATH which I'll explain how to do on the 770.

Typically, a user modifies his environment by editing his ~/.profile which is run during the login process but alas, xterm doesn't use the login process but it will look for a variable called $ENV and run whatever command it points to.

I have my $ENV point to a file called .shrc in my home directory. Files and directories that start with . are hidden. To see hidden files and directories, use the -a or -A option to ls like this ls -lA

Here is my .shrc file:
Code:
export VISUAL=/bin/vim
export PATH=$PATH:~/bin
alias ll='ls -l'
alias l='ls -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

cd $HOME
I created a directory in my home directory called bin where I store my local shell scripts and such and I've appended it to my $PATH. I've also defined a few aliases that I use to save a few keystrokes and added a cd $HOME so you'll be in your home directory when you start xterm.

Now we just need to set the $ENV variable to point to ~/.shrc. After a bit of trial and error I found that the easiest place to do this is in the file:
/etc/osso-af-init/af-defines.sh

Search down to where the MyDocs directory is defined and add this line:
export ENV=$HOME/.shrc

That's it. Now any command in your home bin directory are executable without having to type the full path to it.

Sorry if this is too simple as this is basic Linux stuff everybody should know.

I could have just said: zape638, copy cu to /usr/bin
 
Posts: 2 | Thanked: 0 times | Joined on Oct 2006
#5
I have moved cu and blueserial.sh into /usr/bin and it still doesn't work. I still get: root is not in the sudoers file (why should it be?). The incident will be reported.
/usr/bin/blueserial.sh: 33: cu: not found

I also tried running cu directly by doing ./cu or /usr/bin/cu... and it says 'not found'. How is that possible?? I'm running it directly.

Anyone get this to work yet? Any help would be appreciated!

TIA
 
SeRi@lDiE's Avatar
Posts: 919 | Thanked: 37 times | Joined on Aug 2006 @ /dev/null
#6
Originally Posted by seraph
I have moved cu and blueserial.sh into /usr/bin and it still doesn't work. I still get: root is not in the sudoers file (why should it be?). The incident will be reported.
/usr/bin/blueserial.sh: 33: cu: not found

I also tried running cu directly by doing ./cu or /usr/bin/cu... and it says 'not found'. How is that possible?? I'm running it directly.

Anyone get this to work yet? Any help would be appreciated!

TIA
Sorry to come back to this old post but I have the same error as the above post....

I am not sure why is it that I am doing wrong...
 
Posts: 264 | Thanked: 28 times | Joined on May 2006
#7
I just played with it a bit and I think the cu program may have been compiled wrong or something.
As far as the sudoers bit, if you're running the script as root, remove the sudos from the .sh file.
 
SeRi@lDiE's Avatar
Posts: 919 | Thanked: 37 times | Joined on Aug 2006 @ /dev/null
#8
Originally Posted by BanditRider
I just played with it a bit and I think the cu program may have been compiled wrong or something.
As far as the sudoers bit, if you're running the script as root, remove the sudos from the .sh file.
Yea I figure that much to take the sudoers call out of the script but I think I will agree with you about the cu been compiled wrong because I can run it just fine in my Laptop runing FC6 it just calls on a few tools that are only in maemo... This would be a grate IT/IS assesment tool.
 
Posts: 62 | Thanked: 3 times | Joined on Feb 2006 @ Italy
#9
Originally Posted by BanditRider
Sorry if this is too simple as this is basic Linux stuff everybody should know.
I could have just said: zape638, copy cu to /usr/bin
Great tutorial instead! This is really useful, thank you from me and all the other non-linux-ready guys here; this is a great example on how to explain stuff.
 
Posts: 264 | Thanked: 28 times | Joined on May 2006
#10
You're most welcome.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:35.