How-To: Remote Control Your Phone from Desktop via VNC
#1
Do you wish there was an easy hands-free way to interact with your PP's touch GUI while sitting in front of your desktop system?
Would you like to compose, read, and send SMSs and IMs using your full size keyboard? Interact with your mobile apps using your desktop's mouse, and screen?
Is there a way to cut and paste between your phone and Desktop?
Maybe you would like to initiate and end hands-free or speakerphone calls without touching your phone?

These and more are all possible using VNC to remotely interact with the GUI of your Pinephone.

Let's start with your Pinephone; mine is running Mobian but the instructions should work for other distros; use your system's package installer. (this is for systems running Weyland for video, x11(and mir/surfaceflinger) uses a different VNC server)
Code:
sudo apt install wayvnc
once wayvnc is installed the way I run it is with a launch script I keep in my home directory, I named my script V (the 0.0.0.0 allows incoming connections from outside localhost)
Code:
#! /bin/bash
wayvnc 0.0.0.0
make our script V executable
Code:
chmod +x  V
launch manually on the pinephone's shell console like this
Code:
./V
The VNC server on your phone is now waiting for a client to connect, as configured is not secured and is unencrypted.

This setup when run on your Weyland video server Pinephone will let your login when the VNC server is running on your PP without any security or password config on either side.  The VNC server script above is launched and killed manually so it is not running all of the time in this config, you save precious battery when mobile. If you wanted you could make a desktop entry to give you a GUI launcher for the sell script, just kill that shell window to kill the server.

Now install the VNC viewer GUI on your desktop Linux machine(other OSs also have VNC client software)
Code:
sudo apt instal tigervnc-viewer
Now in this insecure home LAN setup just run ./V on your Pinephone, then set the phone's LAN IP address in the tigervnc-viewer GUI running on your desktop system and click connect; a window with your PP's interactive GUI will appear on your desktop machine.

In options I recommend reviewing the cut/paste options in tigervnc-viewer Input tab,  clicking the 'show dot when no cursor' in the also in Input tab so you have a way to see your mouse in some server configs, as well as ensuring that in the Security tab the encryption and authentication options including none as in my example are to your preference.

This is all you need to remote control your phone via desktop; it is a near perfect way to interact with your Weyland Pinephone.  This setup  also works if you are using the PP as your wifi(or USB cable or Bluetooth) tether hotspot just be sure to update the PP's IP address. This quick tryout setup is only viable in a situation where the phone and laptop are on a private WLAN with no possibility of other users, any other situation where the VNC server is running gives all users who can scan the network for open VNC port free GUI access to your PP with no barriers. It is easy to set a user name and password as well as encryption for the connection, a secure setup requires editing a .conf file on your PP with username and password as well as generating an RSA key.  see https://github.com/any1/wayvnc

If you have trouble with cut/paste showing boxes rather than text it is a font matching problem and I have solved this by using the on-phone web browser for some non-English languages rather than my desktop's; there are better ways to solve the problem though.
VIew the wayvnc git for secure setup and running instructions https://github.com/any1/wayvnc

I find that if I am doing heavy interaction with my PP while in my office VNC, an SSH session, as well as Filezilla to move files around makes everything so easy I rarely need to touch my charging PP except to wake it up if it goes into standby mode and disconnects from the WLAN.
  Reply
#2
Yes, wayvnc works quite well, I've been using it for a few years now. What I do though is have it listening only to localhost (127.0.0.1) connections. Then port 5900 is tunneled through an ssh session to use it. (The ssh server runs automatically at boot time and permits key-based login only, password logins are disabled.)
  Reply
#3
(10-11-2024, 09:36 AM)Zebulon Walton Wrote: Yes, wayvnc works quite well, I've been using it for a few years now. What I do though is have it listening only to localhost (127.0.0.1) connections. Then port 5900 is tunneled through an ssh session to use it. (The ssh server runs automatically at boot time and permits key-based login only, password logins are disabled.)

A great way to get bulletproof security, and easier if only used occasionally.  SSH is probably one of the most hardened services.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there an progam to forward calls and texts to my desktop dallytaur 2 1,407 11-01-2023, 04:55 AM
Last Post: Samurai_Crow
  Article: NuttX RTOS for PinePhone: Feature Phone UI in LVGL, Zig and WebAssembly lupyuen 64 24,641 09-09-2023, 09:49 AM
Last Post: WhiteHexagon
  Article: NuttX RTOS for PinePhone: Phone Calls and Text Messages lupyuen 2 1,892 05-03-2023, 05:03 PM
Last Post: lupyuen
  [Stupid Question] Where is the phone camera software?! newusername 5 3,681 10-10-2022, 03:58 AM
Last Post: newusername
  Control HBIAS through a linux OS twiclo 0 1,200 10-04-2022, 03:20 PM
Last Post: twiclo
Question New user/phone here - initial update issues sexywheat 2 2,143 06-29-2022, 04:27 PM
Last Post: sexywheat
  Which apps can I run on this phone? poppyhodler 2 2,865 06-07-2022, 12:18 PM
Last Post: jenniferjohn12
  Phone Operation which SW Realease (mute funtion)? scrwbigtek 0 1,020 05-25-2022, 07:35 AM
Last Post: scrwbigtek
  Jami on the Pine phone ? bcnaz 7 6,548 04-03-2022, 12:10 PM
Last Post: Fish
  First time pine phone user Matt73 3 3,023 03-10-2022, 02:04 AM
Last Post: Matt73

Forum Jump:


Users browsing this thread: 3 Guest(s)