• Re: [gentoo-user] Virtual Desktop with a Virtual Monitor?

    From Wol@21:1/5 to Mark Knecht on Sun Nov 7 22:10:01 2021
    On 07/11/2021 20:39, Mark Knecht wrote:
    Hi,
    I've been playing with a Raspberry Pi 4 as a utility divice for a
    couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the desktop functionality through VNC. I can still ssh X apps, and both
    xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    I get that this must be possible as essentially VirtualBox is able
    to do this. I wonder if there's a way for mere mortals to do something similar?

    I'm guessing the reason there isn't a virtual desktop is because
    nobody's logged in AT THE PI and started one!

    Just start Xorg over ssh, or plasma-wayland, or whatever. Sorry I don't
    (yet) know how to do it, I need to find out because I want to do exactly
    the same :-)

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to All on Sun Nov 7 21:50:01 2021
    Hi,
    I've been playing with a Raspberry Pi 4 as a utility divice for a
    couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the
    desktop functionality through VNC. I can still ssh X apps, and both
    xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    I get that this must be possible as essentially VirtualBox is able
    to do this. I wonder if there's a way for mere mortals to do something
    similar?

    Thanks,
    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to neil@digimed.co.uk on Mon Nov 8 00:10:01 2021
    On Sun, Nov 7, 2021 at 3:34 PM Neil Bothwick <neil@digimed.co.uk> wrote:

    On Sun, 7 Nov 2021 13:39:34 -0700, Mark Knecht wrote:

    I've been playing with a Raspberry Pi 4 as a utility divice for a
    couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the desktop functionality through VNC. I can still ssh X apps, and both xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    Try x2go instead of VNC. It uses SSH to establish the connection and
    start a desktop session, so there is no need for the user to have a
    desktop running on the remote machine beforehand.

    Looks interesting. Thanks Neil.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Mark Knecht on Sun Nov 7 23:40:02 2021
    On Sun, 7 Nov 2021 13:39:34 -0700, Mark Knecht wrote:

    I've been playing with a Raspberry Pi 4 as a utility divice for a
    couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the desktop functionality through VNC. I can still ssh X apps, and both
    xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    Try x2go instead of VNC. It uses SSH to establish the connection and
    start a desktop session, so there is no need for the user to have a
    desktop running on the remote machine beforehand.


    --
    Neil Bothwick

    Last words of a Windows user: = Why does that work now?

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmGIVEEACgkQ92eFu0QS MJjVZg//Qh8+tAC+8X8d3REVHWw0hsuYe0FLjNGfToFNA1isuMfmQANJ1mdqCYkw 8hjpt08XAk+Pz5tZJ7OxaPCnzspmODo2niisiLrNA49I5So/3jQ4Lf1ThW9Aa+ST L/g6PDkY0Oin/IvKNk6CKr6FLLIEJQ8bPZ7RgRRa6aBmHE42CfwBdmCuOb9Oza1W h49NaKuEwZTsxHkdV4VF1w9PBEWHWaUxdbuTZZrk1uPGmfzoFAsbevVxhawQl/t4 TpLYugJp3TecqJXcPv2tsRw6l9vkk/EHHihC8ky75srau6zskg7R0y9F6ynKHxpt dKv4wrpE2jiwk71L/Xo/6LJ3uYYk9OZSe9qkaxEcVvgaq/1KQhOvPQl33q0ERn/u QOarX7PY0VLe7VvH9odLlvfKjeiKYsAf32AHR1wXCtX3iBPguGu4An0+8pauUjWK 39AwjQsdsoot+hjnYbvFyES6+pssGNXZO50dKqk5lVFT0uegVl91VuFQ41I0zSED XvAUXkrWsrZB33O8yKdquz2fmYS4nqdD9db7uXdwyBnxiGzOP6jjyXlfUk8fOQhC QgHsbjnEJRhgaHYqkPdW7bNeDWRU352DlrreCtOMNLY+fBy6KysTKBx7+EdZ9UfC A/2r/bcvcEnflcgeQkjWBwDXia7r/SXLN4a8NOFevSBFIn2wqS4=
    =pGre
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to antlists@youngman.org.uk on Sun Nov 7 23:40:01 2021
    On Sun, Nov 7, 2021 at 2:04 PM Wol <antlists@youngman.org.uk> wrote:

    On 07/11/2021 20:39, Mark Knecht wrote:
    Hi,
    I've been playing with a Raspberry Pi 4 as a utility divice for a couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the desktop functionality through VNC. I can still ssh X apps, and both xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    I get that this must be possible as essentially VirtualBox is able
    to do this. I wonder if there's a way for mere mortals to do something similar?

    I'm guessing the reason there isn't a virtual desktop is because
    nobody's logged in AT THE PI and started one!

    Just start Xorg over ssh, or plasma-wayland, or whatever. Sorry I don't
    (yet) know how to do it, I need to find out because I want to do exactly
    the same :-)

    Cheers,
    Wol


    Wol,
    Yeah, you may be right, although it wasn't what I was thinking. If
    I start Xorg over ssh then it's running there but visible here. Then I
    need to do some sort of disconnect, leaving it running so X apps can
    go on working.

    If it was like a true 'virtual monitor' then in my mind it's
    running there, not getting displayed on a physical screen, and I
    connect to it like it was a real monitor but it would just be a VNC
    connection and not some sort of way of leaving X11 hanging, or so I
    thought.

    I did find this which is more or less what you're suggesting:

    https://unix.stackexchange.com/questions/327532/how-to-remotely-log-in-with-full-graphical-desktop-over-x11

    Turns out the RP4 OS is doing something different than Ubuntu
    running on the RP4. In the case of the RP OS VNC connects but tells me
    it cannot display the desktop at this time. In the case of Ubuntu
    running on the RP4 VNC just doesn't connect.

    If I find a solution I'll check back in. Possibly someone else has
    some ideas and we'll get a response in the next few days.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to antlists@youngman.org.uk on Mon Nov 8 17:40:02 2021
    On Sun, Nov 7, 2021 at 2:04 PM Wol <antlists@youngman.org.uk> wrote:

    On 07/11/2021 20:39, Mark Knecht wrote:
    Hi,
    I've been playing with a Raspberry Pi 4 as a utility divice for a couple of purposes - a backup server for here at home as well as an astrophotography manager to run my camera and mount. So far everything
    is fine when I have a monitor attached. I can ssh in and run X apps,
    and I can run the VNC client and control the desktop.

    What I find, however, is that when I boot the RP4 without the
    monitor attached, which I would be doing most all the time, I lose the desktop functionality through VNC. I can still ssh X apps, and both xdpyinfo and xrandr still say the X resolution is 1920 x 1280, but
    there doesn't appear to be a real desktop for VNC to latch onto.

    I get that this must be possible as essentially VirtualBox is able
    to do this. I wonder if there's a way for mere mortals to do something similar?

    I'm guessing the reason there isn't a virtual desktop is because
    nobody's logged in AT THE PI and started one!

    Just start Xorg over ssh, or plasma-wayland, or whatever. Sorry I don't
    (yet) know how to do it, I need to find out because I want to do exactly
    the same :-)

    Cheers,
    Wol


    It seems so far that it's even a little more onerous than that:

    In the case where the monitor is detached at boot two modules are not
    loaded - fuse & nvmem_rmem. Other than that the module list appears
    identical.

    If I ssh into the RP4 when it's running RPi OS (previously called
    Raspbian apparently) but with the monitor DISCONNECTED when I boot
    then screenfetch says there's no GPU. Plugging in the monitor after
    it's booted doesn't change anything:

    mark@science:~$ ssh -X pi@192.168.86.84
    pi@192.168.86.84's password:
    Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l

    <SNIP>
    pi@raspberrypi:~ $ screenfetch -nN
    pi@raspberrypi
    OS: Raspbian 10 buster
    Kernel: armv7l Linux 5.10.63-v7l+
    Uptime: 0m
    Packages: 2038
    Shell: 723
    Resolution: 5760x1080
    DE: KDE5
    WM: KWin
    CPU: ARMv7 rev 3 (v7l) @ 4x 1.5GHz [29.6°C]
    GPU:
    RAM: 61MiB / 7898MiB

    pi@raspberrypi:~ $ lspci -vm -k
    Device: 00:00.0
    Class: PCI bridge
    Vendor: Broadcom Limited
    Device: Device 2711
    Rev: 10
    Driver: pcieport

    Device: 01:00.0
    Class: USB controller
    Vendor: VIA Technologies, Inc.
    Device: VL805 USB 3.0 Host Controller
    SVendor: VIA Technologies, Inc.
    SDevice: VL805 USB 3.0 Host Controller
    Rev: 01
    ProgIf: 30
    Driver: xhci_hcd

    pi@raspberrypi:~ $

    However, booting with the monitor ATTACHED now shows the GPU, or at
    least a DRM framebuffer possibly, in screenfetch. The PCI devices are
    the same:

    pi@raspberrypi:~ $ screenfetch -nN
    pi@raspberrypi
    OS: Raspbian 10 buster
    Kernel: armv7l Linux 5.10.63-v7l+
    Uptime: 0m
    Packages: 2038
    Shell: 935
    Resolution: 3840x1080
    DE: KDE5
    WM: OpenBox
    CPU: ARMv7 rev 3 (v7l) @ 4x 1.5GHz [37.9°C]
    GPU: vc4drmfb
    RAM: 144MiB / 7898MiB
    pi@raspberrypi:~ $

    pi@raspberrypi:~ $ lspci -vm -k
    Device: 00:00.0
    Class: PCI bridge
    Vendor: Broadcom Limited
    Device: Device 2711
    Rev: 10
    Driver: pcieport

    Device: 01:00.0
    Class: USB controller
    Vendor: VIA Technologies, Inc.
    Device: VL805 USB 3.0 Host Controller
    SVendor: VIA Technologies, Inc.
    SDevice: VL805 USB 3.0 Host Controller
    Rev: 01
    ProgIf: 30
    Driver: xhci_hcd

    pi@raspberrypi:~ $

    I will repeat this experiment using Ubuntu in a little while to see if
    the missing GPU is an OS or hardware thing. In this hardware it looks
    like the GPU hardware is behind the PCI bridge.

    Still to look into Neil's x2go suggestion.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Stiasny@21:1/5 to Mark Knecht on Mon Nov 8 20:30:02 2021
    On 08.11.21 17:34, Mark Knecht wrote:
    In the case where the monitor is detached at boot two modules are not
    loaded - fuse & nvmem_rmem. Other than that the module list appears identical.


    At the moment I can't help you to solve this in software but there may
    be a hardware solution. There are fake monitor plugs. This is just a
    plug without a cable that makes the device think that there is a monitor attached even if there isn't. Search for "HDMI dummy plug" or similar.


    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to gentoo@lists.stiasny.priv.at on Mon Nov 8 20:50:01 2021
    On Mon, Nov 8, 2021 at 12:23 PM Andreas Stiasny
    <gentoo@lists.stiasny.priv.at> wrote:

    On 08.11.21 17:34, Mark Knecht wrote:
    In the case where the monitor is detached at boot two modules are not loaded - fuse & nvmem_rmem. Other than that the module list appears identical.


    At the moment I can't help you to solve this in software but there may
    be a hardware solution. There are fake monitor plugs. This is just a
    plug without a cable that makes the device think that there is a monitor attached even if there isn't. Search for "HDMI dummy plug" or similar.


    Andreas


    Actually, if it works and I have little doubt it does, that's a great solution for my needs. I see Amazon has 1920x1080 plugs but also has
    virtual 4K plugs. All under $10.

    Thanks!

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to lperkins@openeye.net on Tue Nov 9 15:40:02 2021
    On Mon, Nov 8, 2021 at 1:31 PM Laurence Perkins <lperkins@openeye.net> wrote:



    -----Original Message-----
    From: Mark Knecht <markknecht@gmail.com>
    Sent: Monday, November 8, 2021 11:48 AM
    To: Gentoo User <gentoo-user@lists.gentoo.org>
    Subject: Re: [gentoo-user] Virtual Desktop with a Virtual Monitor?

    On Mon, Nov 8, 2021 at 12:23 PM Andreas Stiasny <gentoo@lists.stiasny.priv.at> wrote:

    On 08.11.21 17:34, Mark Knecht wrote:
    In the case where the monitor is detached at boot two modules are
    not loaded - fuse & nvmem_rmem. Other than that the module list
    appears identical.


    At the moment I can't help you to solve this in software but there may
    be a hardware solution. There are fake monitor plugs. This is just a
    plug without a cable that makes the device think that there is a
    monitor attached even if there isn't. Search for "HDMI dummy plug" or similar.


    Andreas


    Actually, if it works and I have little doubt it does, that's a great solution for my needs. I see Amazon has 1920x1080 plugs but also has virtual 4K plugs. All under $10.

    Thanks!

    Mark


    So, I don't use the PI variants with GUI or even with a monitor very often, but as I recall if the HDMI port isn't attached at boot it then disables it to save the video memory.

    If you then try to use one of the VNC servers that's designed to share the running X session, you'll find that there isn't a running X session.

    But what you should still be able to do is install the "vncserver" command to fire up an X server that isn't attached to the physical output, only the VNC.
    You may need to configure it to also start your preferred display manager, etc depending on whether or not the distro you're running does that automatically for you.

    If you want to be able to plug in a monitor later though you'll probably need one of the dummy plugs to prevent the output from being switched off and ignored.

    LMP

    So I don't yet know how they do it but I purchased a copy of a product called StellarMate OS yesterday.

    https://stellarmate.com/

    It's a Pi variant that is set up to control
    astrophotography equipment. It's able to run headless and has a web server
    that I can access from Chrome on my main Linux box.

    https://drive.google.com/file/d/1I6QYXay6rTy_-CDFQpsQBaSaiyOjNFDJ/view?usp=sharing

    Screen resolution drops from 1920x1080 with the monitor attached to
    1600x900 headless,
    but other than that it appears to work fine. Interestingly the taskbar
    across the top isn't
    accessible, at least yet, but I can run anything I have an icon on the desktop.

    I'll be studying how they do this (although I think the headless
    monitor plug is probably the
    easiest solution) so if someone (Wol?) wants to work offline, get in touch.

    Cheers,
    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)