Skip to content

標籤: Raspberry Pi

把VNC設置成開機服務(Jessie)

此文章用於把VNC設置成開機服務。

1. Install Tight VNC server:

sudo apt-get install tightvncserver

2. Start it manually and enter new VNC password.

vncserver :1

3. Create a new file /etc/systemd/system/vncserver@.service

4. (Optional) Replace the parameters in the unit file, if you want to.

5. Run

sudo systemctl daemon-reload && sudo systemctl enable vncserver@1.service

6. Reboot.

以下是/etc/systemd/system/vncserver@.service的內容:

開機自動運行VNC程式(Jessie)

此文章用於把VNC設置成開機啟動,如此方法不行,則可以參考另一篇設置成開機服務的文章。

  1. Install the VNC server.
    sudo apt-get install tightvncserver
  2. Launch vncserver for the first time to set up a password.
    vncserver :1
  3. Create a file as /etc/init.d/vncserver (be sure to modify the USER, GEOMETRY, NAME, etc.)
  4. sudo chmod +x /etc/init.d/vncserver
  5. sudo update-rc.d vncserver defaults

以下是/etc/init.d/vncserver的內容:

讓Raspberry Pi成為你的電腦開關伺服器

Note: This post and the accompanying software packages have been updated several times since this was originally posted. The most up-to-date releases and instructions can always be found in the GitHub Repo.

I have a very power hungry desktop computer that I use for video editing and large file storage. When I’m travelling with my laptop, I obviously can’t carry all my files and data with me, so I occasionally use “remote desktop” to access my desktop from the road. I also use a Plex Media Server to stream content from my desktop computer. However, the computer has to be on for me to be able to do this. This means I need to leave the computer on all the time, just in case I need to access it. This wastes power, costs me money, and harms the environment. My Raspberry Pi, on the other hand, consumes a minuscule amount of power, and is always on anyways, serving other purposes. In this tutorial, I’ll show you how to run a simple mobile-friendly website from your Raspberry Pi that will allow you to remotely wake up your power-hungry computer, so you can remotely access it. When you’re done, just put it back to sleep from within the remote desktop service (or use the mobile app plus a small background server running on your desktop to put it back to sleep – this is described in the instructions). The app pings the computer from the Raspberry Pi to inform you of when the computer has woken up and established network connectivity. Follow along after the break…