i have a VNC set up with my phone because i use Linux for some things android cant do. i would like to know how to restart the computer from my phone without having to go to my computer and physically type the commands.

sudo -s

export DISPLAY=:0.0

xhost +

/usr/lib/vino/vino-server &

i tried Google but i couldn't find anything any help would be nice.


i did the Terminal thing but it didnt work it looks like this

#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /home/jonluke/SSH.sh & exit 0 ~ ~ ~ ~ ~ ~ ~ ~ ~ 

1 Answer

If you want to start VNC at boot, save your script to a location on disk as a .sh, run chmod a+x yourscriptname in a terminal (to make it executable) and add it to /etc/rc.local;

#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /path/to/your/script & exit 0 

Note the trailing & and the final exit 0; this will run the script and then continue the boot process and not block anything.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy