Auto-start the server

This process entirely relies on pre-configured python scripts and user input. Follow the on-screen instructions carefully and stick to the manual. In this phase we will create an entry in a system file that allows for the automatic launch of our server.

  • Start by downloading Pi-server on your Raspberry Pi.
  • Extract the folder and put it in the desired location; a suggestion is the 'Documents' folder of your Rapsberry Pi.
  • Go to the 'Tools' folder and create a shortcut with the program 'shortcut generator.py' by double clicking it.
    • If you get prompted click 'cancel' and set the permission of the .py files so that they can be executed by 'nobody'.
  • Test the shortcut file by doubleclicking it.
    • You can move the shortcut to your desktop.
    • The shortcut launches the terminal with a geometry that works for full-HD screens.
    • If the terminal is too big, right click the shortcut and edit it with a 'Text Editor'.
    • Modify the line that starts with 'Exec' and look for '--geometry=238x65'  Modify the highlighted numbers if the terminal doesn't fit the screen.
      • Lower the numbers if the terminal is too big.
      • Increase the numbers if the terminal is too small.
      • Please note that there are no spaces in '--geometry=238x65'.
      • Save the shortcut file, and try with the new settings.
      • Remodify if needed.

 

  • Now run the 'autorun creator.py' program from the ‘Tools’ folder.
    • When prompted by the terminal, point it to the shortcut file.
      • Do this by right-clicking the shortcut file and click 'copy path(s)' Right click the shortcut, copy the path and past the path in in the terminal by right clicking and clicking 'Paste'.
      • Paste this path in the terminal by right clicking in it and clicking paste.
      • Press enter.
      • If you pointed the program to the correct file, it will create an autostart entry.
  • Autostart might not work if the file permissions aren't set properly.
    • Right click the 'server.py' file and verify that the file permissions are:
      • View content: Anyone
      • Change content: Only owner
      • Execute: Nobody
  • Reboot the Raspberry Pi.

You now have a fully functioning server that launches itself when booted!