Remote desktop, video playback issues
#1
I have the 11/29 nightly build of Mobian running on my Manjaro Pinephone, booted from a micro-SD card. Overall it's quite stable and surprisingly the phone's voice and SMS functions basically "just worked" with a Tracfone SIM for the AT&T network.

I have ssh server running on it which is great for working from the command line, but it would be nice to also be able to have remote desktop working. On my Debian desktop and laptop systems I normally run x11vnc for this, but since Mobian is using Wayland I assume something else is needed. What's the best choice?

Also I'm noticing that video playback of mp4 files is very choppy. HD videos (1080p) just show a few frames per second. I downconverted some to 480p and those work better but are still far from smooth. To get smooth playback I need to go down to 240p - VHS quality. (Actually on the small Pinephone screen it doesn't look bad!) This happens both with the default video player and VLC. Are there any tweaks that can improve this, or is it just a matter of waiting for further development? (On a related topic, where are default programs like default video player set? I'd like to make VLC the default unless there's a reason not to.)
  Reply
#2
(11-29-2020, 08:03 PM)Zebulon Walton Wrote: I have ssh server running on it which is great for working from the command line, but it would be nice to also be able to have remote desktop working. On my Debian desktop and laptop systems I normally run x11vnc for this, but since Mobian is using Wayland I assume something else is needed. What's the best choice?

From what I understand, there is a way to use x11vnc with -rawfb, but I haven't found out what the magic is just yet.
  Reply
#3
Hello,

About the video stream, I use a VDR server with a USB DVB-TNT dongle. Too many frames are missing, there is a big delay between the video and the sound. I use 'mpv'. With some records get on some playback site, the sound and video are good.

With 'mpv', I use 'mpv --opengl-es=yes'.

For 'mpv' :
  Reply
#4
ayourk Wrote:From what I understand, there is a way to use x11vnc with -rawfb, but I haven't found out what the magic is just yet.

Having remote desktop working would make a lot of things easier with the Pinephone. I've managed to get X forwarding working with some applications but performance is terrible. (The X wire protocol dates to the late 1980s and it's a pig. Emulating it in Wayland probably makes matters even worse.)

This package gnome-remote-desktop in Debian buster looks like it might do the trick. It's supposed to support both X and Wayland. Mobian though looks like it's based on Debian bullseye (the upcoming Debian 11) which is still under development and I have no idea of the status of this package in that version. Haven't had time to experiment with it.

https://packages.debian.org/buster/gnome...te-desktop
https://shebangthedolphins.net/gnulinux_...sktop.html
  Reply
#5
(05-06-2021, 02:13 PM)Zebulon Walton Wrote:
ayourk Wrote:From what I understand, there is a way to use x11vnc with -rawfb, but I haven't found out what the magic is just yet.

Having remote desktop working would make a lot of things easier with the Pinephone. I've managed to get X forwarding working with some applications but performance is terrible. (The X wire protocol dates to the late 1980s and it's a pig. Emulating it in Wayland probably makes matters even worse.)

This package gnome-remote-desktop in Debian buster looks like it might do the trick. It's supposed to support both X and Wayland. Mobian though looks like it's based on Debian bullseye (the upcoming Debian 11) which is still under development and I have no idea of the status of this package in that version. Haven't had time to experiment with it.

https://packages.debian.org/buster/gnome...te-desktop
https://shebangthedolphins.net/gnulinux_...sktop.html

I learned that there are 2 x11vnc type projects for Wayland:  wayvnc and waypipe
  Reply
#6
Before I got my PinePhone I thought I could just run Barrier on both devices and it would be awesome, but no go. I could not get the devices to find each other.
So I tried KDE Connect and It lacked the all important clipboard sharing functionality Sad .

I decided that being able to share the clipboard would make the lack of desktop-sharing much more tolerable.
Sidenote: I connect to my phone (ssh) on one of 3 networks USB, Wifi or WifiHotspot so I have a script, SetHostRoute.sh,  to find which network the phone is connected.

Here is my clipboard sharing script:
PasteToMobian.sh
Code:
#!/bin/bash

tempFile=/tmp/tempHost.txt

# Uncomment to set ssh hostname manually
    # echo "ssh_hostname_here" > $tempFile

# Check if the temp file created by SetHostRoute.sh exists.
if [ -f "$tempFile" ]; then
    # Set tempFile contents as $hostRoute
    hostRoute=$(</tmp/tempHost.txt)
    # Make sure SetHostRoute.sh found mobian (via usb||wifi||hotspot)
    if [ $hostRoute != "notset" ]; then

        # Get the clipboard
        clipb="`xclip -o -sel clip`"
        # Unify file path formats (file vs. file path)
        clipc=${clipb/file:\/\//}

        # Check if clipboard contents are a file (or a path), if so scp the file to the mobian's home directory
        if [ -f  "$clipc" ]; then
            scp "$clipc" $hostRoute:/home/mobian/
            notify-send Clipboard2Mobian "$clipc
            Copied via $hostRoute"
        else
        # Clipboard contents are not a file, so.. Treat as text and copy to Mobian's clipboard (using a temp file to preserve all special characters)
            echo "$clipb" > ~/.clipSync.txt
            ssh $hostRoute wl-copy -n < ~/.clipSync.txt &
            rm ~/.clipSync.txt
            notify-send Clipboard2Mobian "Text Copied via
            $hostRoute"
        fi
    else
    # SetHostRoute.sh didn't find an ssh route and printed "notset" to the tempfile.
        notify-send Clipboard2Mobian "No Route to Mobian..."
    fi
else
    # SetHostRoute.sh has yet to execute (ie. no tempFile) so.. Run it and then re-run this script.
    notify-send Clipboard2Mobian "No Route to Mobian..."
    /home/mj/Scripts/SetHostRoute.sh &&
    sleep 5s
    /home/mj/Scripts/xClipboard/PasteToMobian.sh
fi


This script finds my phone on one of the 3 networks and writes the hostname to a temp file (It runs at startup or I re-run it if I switch networks):
SetRouteToMobian.sh

Code:
#!/bin/bash

notify-send Clipboard2Mobian "Finding a Route to Mobian..."
hostRoute="notset"
echo $hostRoute > /tmp/tempHost.txt

ping -q -c 1 10.66.0.1 > /dev/null
if [ $? -eq 0 ]; then
    hostRoute="mobianusb"
    echo $hostRoute > /tmp/tempHost.txt
    notify-send Clipboard2Mobian "$hostRoute Route Set!"
    else
        ping -q -c 1 192.168.3.108 > /dev/null
        if [ $? -eq 0 ]; then
            hostRoute="mobianwifi"
            echo $hostRoute > /tmp/tempHost.txt
            notify-send Clipboard2Mobian "$hostRoute Route Set!"
            else
                ping -q -c 1 10.42.0.1 > /dev/null
                if [ $? -eq 0 ]; then
                    hostRoute="mobianhotspot"
                    echo $hostRoute > /tmp/tempHost.txt
                    notify-send Clipboard2Mobian "$hostRoute Route Set!"
                    else
                        notify-send Clipboard2Mobian "...No Route To Mobian"
                fi
        fi
fi
It all works just fine but I'm curious if there is a better way to do this Smile

I'm also curious to see if clipboard sharing on the pinephone exists in some other form.

If anyone is interested I'll post the script for doing the reverse and copying from Pinephone's clipboard.

Cheers!
  Reply
#7
ayourk Wrote:I learned that there are 2 x11vnc type projects for Wayland:  wayvnc and waypipe

Wayland really doesn't seem quite ready for prime time, I'm still using X on my desktop and laptop systems. I know how old and crufty X is and how ugly it is internally (I did development of X apps back in the early 1990s) but most Unix/Linux graphical programs are designed for it. I'm also used to the network transparency of X and Wayland's lack of that feature to me sticks out like a sore thumb.

Anyway, I looked into wayvnc and it is not currently available as a Debian package. However I found instructions to build from source for Debian bullseye, maybe I'll give that a try:

https://github.com/any1/wayvnc/issues/81
  Reply
#8
I'd like to get this working too.
I suppose one option is to install Gnome Shell/GDM (https://wiki.mobian-project.org/doku.php...vironments) and then just switch to a X11 session when you want to VNC?
But I'm sure there must be a way to get it working under Wayland.
  Reply
#9
(05-06-2021, 10:40 PM)Zebulon Walton Wrote:
ayourk Wrote:I learned that there are 2 x11vnc type projects for Wayland:  wayvnc and waypipe

Wayland really doesn't seem quite ready for prime time, I'm still using X on my desktop and laptop systems. I know how old and crufty X is and how ugly it is internally (I did development of X apps back in the early 1990s) but most Unix/Linux graphical programs are designed for it. I'm also used to the network transparency of X and Wayland's lack of that feature to me sticks out like a sore thumb.

Anyway, I looked into wayvnc and it is not currently available as a Debian package. However I found instructions to build from source for Debian bullseye, maybe I'll give that a try:

https://github.com/any1/wayvnc/issues/81

Yeah, when I get some time, I'm going to look into developing the necessary Debian packages for this.
  Reply
#10
I just booted up on a mobian SD card for test purposes and built wayvnc from source using the script from the link I posted above. It works!

A few notes...

I built the program in /usr/src/wayvnc. The resulting executable is /usr/src/wayvnc/build/wayvnc. After copying this to /usr/local/bin I found that running "wayvnc" would result in missing libraries. It turns out there are libraries under build that are needed. So to do the complete job of copying wayvnc to /usr/local/bin do the following:

Code:
sudo -i
cd /usr/src/wayvnc/build
cp wayvnc /usr/local/bin
cd subprojects/neatvnc
cp -a * /usr/lib
cd ../aml
cp -a * /usr/lib

EDIT: I realize now I probably should have copied the libraries to /usr/local/lib instead of /usr/lib, the former being more appropriate for software installed outside the apt system. Not a big deal since it's just a handful of files but maybe I'll move them next time I boot up the Pinephone.

After doing this, everything needed to run wayvnc is in your search path. I also found that simply running wayvnc with no options didn't seem to work and found that by default it only listens to 127.0.0.1. The man page for wayvnc can be found here:

https://www.mankier.com/1/wayvnc

There are a number of options but I just used the following so it would listen to any address on port 5900:

Code:
wayvnc 0.0.0.0 5900

There are also options to add authentication and encryption and to use a config file but I haven't had time to try those out. (Might not bother since I'd only be using this on my home LAN.) More informaton here:

https://github.com/any1/wayvnc

So now I need to just set up an easy way to launch it from the Pinephone screen.

For reference, here is the build script, it does everything and took around 10 or 15 minutes to run (I didn't time it exactly).

Code:
#!/bin/bash

# Install dependencies
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -y \
  build-essential make cmake autoconf git ninja-build meson scdoc pkg-config \
  zlib1g-dev libpixman-1-dev libturbojpeg0-dev libgbm-dev \
  libgnutls28-dev \
  libdrm-dev libdrm-common libxkbcommon-dev libxkbcommon-tools libxkbcommon0 \
  wayland-protocols waylandpp-dev wayland-scanner++ libwayland-dev

set -xe

# Build, copied straight from README
git clone https://github.com/any1/wayvnc.git
git clone https://github.com/any1/neatvnc.git
git clone https://github.com/any1/aml.git

mkdir wayvnc/subprojects
cd wayvnc/subprojects
ln -s ../../neatvnc .
ln -s ../../aml .
cd -

mkdir neatvnc/subprojects
cd neatvnc/subprojects
ln -s ../../aml .
cd -

cd wayvnc
meson build
ninja -C build
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Has anyone got briar-desktop running on mobian? vusra 5 2,861 06-19-2023, 03:02 PM
Last Post: vusra
  Modem Firmware Upgrade - Modem Busy - USB Issues biketool 10 4,509 09-23-2022, 05:15 AM
Last Post: biketool
  Sending Pinephone SMS from Desktop biketool 5 2,745 09-13-2022, 01:46 PM
Last Post: anonymous
  Lot of issues after flashing mobian to emmc with tow-boot benedikt55 5 2,498 08-30-2022, 01:14 PM
Last Post: benedikt55
  Telegram not as desktop app user641 0 737 08-05-2022, 08:45 AM
Last Post: user641
  Hardware VIdeo Acceleration on Mobian biketool 3 2,448 06-21-2022, 01:01 PM
Last Post: biketool
  Working video players? jojuma 10 4,347 06-10-2022, 01:13 AM
Last Post: as365n4
  Anyone tried Signal Desktop ragreenburg 20 13,749 05-23-2022, 04:41 AM
Last Post: Anna
  gpsd issues io. 5 2,921 05-07-2022, 03:31 AM
Last Post: wibble
  Issues with Mobian? Start here. tophneal 0 4,693 04-21-2022, 11:27 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)