User Tools

Site Tools


linux_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_tips [2013/02/16 22:19]
sgripon [Get a remote display]
linux_tips [2016/04/16 11:06] (current)
sgripon
Line 7: Line 7:
   user@ubuntumachine>​ X :1 -query raspberrypi.local   user@ubuntumachine>​ X :1 -query raspberrypi.local
   ​   ​
-Then FIXME because it doesn'​t work:+Then FIXME because it doesn'​t work for me (I switched to VNC server):
  
   user@ubuntumachine>​xhost +raspberrypi.local   user@ubuntumachine>​xhost +raspberrypi.local
Line 13: Line 13:
   pi@raspberrypi.local>​ export DISPLAY=ubuntumachine.local:​1   pi@raspberrypi.local>​ export DISPLAY=ubuntumachine.local:​1
   pi@raspberrypi.local>​ lxsession   pi@raspberrypi.local>​ lxsession
 +  ​
 +===== Set library path when shared library is not found =====
 +
 +  export LD_LIBRARY_PATH=/​usr/​local/​lib
 +  ​
 +If you want to export the variable at startup, add the same line in /​etc/​profile.
 +
 +This kind of issue can also be linked to a bad update of shared libraries links, usually after a manual installation. To update link, launch this command as root:
 +
 +  ldconfig
 +
 +===== Launch a command a startup =====
 +
 +Just add a script in /etc/init.d
 +
 +  nano myscript
 +  chmod +x myscript
 +
 +And register it:
 +
 +  sudo update-rc.d myscript defaults
 +
 +Example for the script:
 +
 +<​code>​
 +#! /bin/sh
 +
 +case "​$1"​ in
 +  start) ​
 +    echo -n "​Starting server: "
 +    # Run myServer in the backround, with both stdout and stderr saved in /​var/​log/​myServer.log,​ and use nohup to protect against HUP signals.
 +    nohup /​usr/​local/​Arnl/​examples/​myServer ​ >/​var/​log/​myServer.log 2>&1 &
 +    echo "​myServer"​
 +    ;;
 +  stop)
 +    echo -n "​Stopping all myServer processes: "
 +    killall myServer
 +    echo "​myServer"​
 +    ;;
 +  restart)
 +    # Re-run this script with stop and start arguments.
 +    $0 stop
 +    sleep 5
 +    $0 start 
 +    ;;
 +  reload|force-reload)
 +    echo "​WARNING reload and force-reload not supported by this script
 +esac
 +</​code>​
linux_tips.1361049569.txt.gz ยท Last modified: 2013/02/16 22:19 by sgripon