Command working on command line but not in shell script
Hello,
on my Raspberry Pi I've installed tightvnc server. in order to start the server, I've gotta write on the command line: Quote:
PHP Code:
PHP Code:
Can anyone help? |
How are you logging in?
What is in the shell script? |
Quote:
PHP Code:
|
Perhaps:
Code:
/usr/bin/vncserver -- ':1' & Code:
echo "PATH:" |
Quote:
Unfortunately the suggested command results in: PHP Code:
PHP Code:
|
Quote:
Code:
#!/bin/sh |
Quote:
|
That is answered in posts 3 and 5.
|
Hmmm... I must be getting old or blind as I don't see any script contents.
|
A picture of his script then?
http://imgur.com/a/drNRw Keeping in mind that shell scripts can be just lists of commands. Currently, his is a shell script with one line and one command. Also, he is logging in with SSH as this user, as mentioned: Quote:
Code:
#!/bin/bash -x |
Quote:
PHP Code:
|
As i said:
Please use this as the script - but TYPE IT IN and do NOT copy and paste it. Code:
#!/bin/bash -x |
Quote:
The result of the manually typed code in the shell script, that you suggested unfortunately is: PHP Code:
|
Just the second line then. Leave out the #!/bin/bash -x
Still type it though. Code:
/usr/bin/vncserver -- ':1' & |
Let me grab my magnifying glass.
What's the content of: Code:
$DISPLAY Code:
ls -l /bin/bash /bin/sh |
All times are GMT -5. The time now is 04:01 AM. |