Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: serve VGA screen via vncserver [KDE]?

  1. #1

    Default serve VGA screen via vncserver [KDE]?

    Hi, I've opensuse tumbleweed and I'd like to attach vncserver to the VGA screen - to see over vnc what I have on normal monitor. Now when I run vncserver remotely over ssh, it creates separate KDE session, I can work normally with the computer over vnc, but I cannot continue what I left on the monitor, nor see the login screen when I power up the computer via wake on lan.

    Is it possible to see via vnc what I have on monitor connected to remote pc (just like on windows)? I would prefer to run vncserver manually only when I need it (1. ssh me@mysusepc -L 5990:mysusepc:5900, 2. run vncserver on mysusepc, 3. vnc client connect to forwarded localhost:5990 and work, 4. kill the vncserver after all is done or shutdown computer). Thank you.

    Btw. would you believe opensuse is currently the only distro that works with my AMD ryzen 5 2400G? I love it ;-)

  2. #2
    Join Date
    Sep 2012
    Posts
    7,098

    Default Re: serve VGA screen via vncserver [KDE]?

    There are x11vnc, x0vncerver and some others. x0vncserver is part of TigerVNC which is the default VNC server for openSUSE. This links describes how to share real screen among other: https://en.opensuse.org/VNC

  3. #3

    Default Re: serve VGA screen via vncserver [KDE]?

    Thank you, I have read that, but it is not very helpful, that's why I'm asking here. I can launch x0vncserver (which serves actual screen on monitor) from Konsole in KDE GUI, when I am locally connected, then I see the real screen over vnc. But I cannot launch it *later* from remote ssh session, which is exactly what I'm after - I want to run x0vncserver manually and attach it to tty7 with GUI, but I don't know how to do that. When I try to run x0vncserver from ssh, I get error: unable to open display "".

  4. #4
    Join Date
    Sep 2012
    Posts
    7,098

    Default Re: serve VGA screen via vncserver [KDE]?

    Quote Originally Posted by pruda View Post
    When I try to run x0vncserver from ssh, I get error: unable to open display "".
    Of course you need to set correct display, this is just standard X11 workflow that I assumed you are familiar with. Display depends on your DM, it is either :0 or :1 (GDM will launch second X server). Also note that at least GNOME defaults to Wayland today and Wayland cannot be forwarded at all.

    You may need to also set correct XAUTHORITY variable if connection to display is refused, you can check its value in GUI session.

  5. #5

    Default Re: serve VGA screen via vncserver [KDE]?

    JFYI, there is a KDE application named krfb that allows you to share the screen via VNC e.g. Might be easier to use...

    Support for Wayland is being worked on (in kwin and krfb), but I think it's not in yet in the latest stable versions.

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: serve VGA screen via vncserver [KDE]?

    Your question was a good push for me to review current openSUSE documentation...

    It looks like at least for LEAP 15 (and likely Tumbleweed) the architecture has radically changed, and I'm not sure for the better.
    Bottom line to answer your question is that configurations don't seem to be laid out in an easy to view configuration file like before, and now configurations are associated with individual User accounts.

    The relevant documentation
    https://doc.opensuse.org/documentati...e/cha.vnc.html

    But, I found that woefully insufficient... and the new architecture is immensely large and complex.
    .I've not set up multiple configurations, so my "understandings" after the following install steps are part understanding, part speculation, part observation of the available info.

    Probably the most important info I'd direct you to is the ending section of the xvnc MAN pages, but that may not make sense until you wade through the LEAP documentation, help file and earlier parts of the MAN pages. Wow. Nothing is that simple anymore unless you bend to just use defaults...

    After identifying the likely design basics,
    I recommend the following...

    1. Install Remote Administration (VNC) using YaST.
    It seems that xinetd (and an xorg x server) is no longer required and the YaST module integrates with firewalld opening up the VNC default VNC ports for the VNC client and Java web client.

    2. Test whether your VNC server is running, notice that you have to specify xvnc.socket. Unlike previous openSUSE, xinetd is no more. The king is dead, long live the king!(Well, not really. See below)
    Code:
    systemctl status xvnc.socket
    3. Now, I don't yet see a way to list all existing VNC configurations, only that of 6 existing configurations that only 2 are enabled(one VNC client and one Java client). That's not too helpful. Interestingly, you will also find the following xvnc service which at the moment I suspect is dynamically created.
    Code:
    /usr/lib/systemd/system/xvnc@.service
    OK, now my current observations which are subject to change...

    Whereas prior VNC servers were deployed by xorg xservers, now that's not the case but optionally available. As a socket type service, VNC server is supposed to be actively listening but not actually running. When a client connects, VNC server manually starts up and negotiates a connection with the client. Since multiple VNC clients might connect simultaneously on the same initial port, a new port is negotiated for each client... Sort of how FTP secondary connections is done. Also, if you don't want the xvnc app to have to start up on demand, supposedly it's possible to install and run the xinetd as a service like previous VNC versions.

    It seems that client configuration files are no longer supported (that I can find).
    Instead, the new design seems to be based not on generic configurations but a configuration associated with each User (Boy, I bet that'll go over well in larger deployments supporting many Users... Not!)
    User authentication can be set up a number of different ways, it looks like openSUSE is likely set up to support configured system Users (because of the installed pam module).

    So,
    Based on my documentation read, that's your likely road to configuring what you want...
    Whether you use a Password file (I might recommend that so the VNC user might not automatically have full locally logged in permissions) or some other form of authentication, you'll need to configure settings specific to that User.

    Minor mention... The openSUSE documentation says that the web client uses Javascript. Unless something has changed and all other documentation is wrong, that is incorrect... The web browser client still uses Java, no Javascript.

    Other minor technical thing to look at... Since xvnc now can be accessed both over the network and locally by sockets, I guess that both a network socket as well as Unix socket is now used? Or, something new?

    As for your other question about X over ssh, I'm pretty sure nothing there has changed... It's no longer supported in a default VNC now that VNC has deprecated xinetd somewhat... So, you'll need to install xinetd for X over SSH.

    HtH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: serve VGA screen via vncserver [KDE]?

    A few more VNC observations and speculation...

    Deploying VNC by socket may be a workaround for Wayland... In theory, I'm thinking that the VNC might be able to present the network connection through a UNIX socket, thereby making Wayland believe that even remote network displays could be local displays (pure speculation, will need testing). But, it's telling that an xorg xserver is no longer required.

    Am thinking that new implementation using sockets might be a big performance boost.

    But,
    IMO it's sad to see a step backward from the perspective of a Network Administrator, having to individually configure each and every User if defaults are not acceptable.

    That is, unless I'm missing something which is very, very possible.

    IMO,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: serve VGA screen via vncserver [KDE]?

    I found that the ArchLinux Wiki for TigerVNC might provide answers, and step by step instructions for specific configurations...

    https://wiki.archlinux.org/index.php/TigerVNC

    In it,
    You'll find
    https://wiki.archlinux.org/index.php...al_config_file

    And the following
    https://wiki.archlinux.org/index.php...NC#System_mode
    which is more likely what you should create in /etc/systemd/system/ (copy the existing Unit file using the following command, then modify the display number in the file name)
    Code:
    cp /usr/lib/systemd/system/xvnc@.service /etc/systemd/system/xvnc@1.service
    Instead of the system mode link I'm referring you to above, consider the User Mode and Multi-User mode configurations instead.

    To my eye,
    The above builds on how openSUSE has already set up vnc server.
    You do also have the option to set up x0vncserver which is TigerVNC's own, custom implementation that possibly simplifies but isn't as versatile as running xvnc server... It's not set up by default but the Arch Wiki describes how to do so.

    Without actually setting up, it looks to me that following the above, a VNC client can specify a particular display number when connecting and a custom configuration will be applied.
    Still bothers me a bit that there are supposedly 6 configurations that already exist (2 enabled and active), but no way I've yet found to activate or view those configurations.

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: serve VGA screen via vncserver [KDE]?

    Wow, Mr. TSU, that's hell of a reply! Thank you for your time and interest in my problem. I admire your knowledge. That will take some time to follow and try ;-)

    I will follow the archwiki links, thank you for them, but I cannot get rid of feeling, that we are missing something really easy and following longer yet worse trail. Why when I log in locally, run x0vncserver from konsole, it CAN bind correctly to the VGA screen and then I can see the physical screen perfectly from remote, still I cannot specify this screen from another ssh session or tty? Maybe just the display numbers changed from :0 :1 to something new, just like eth0 has now a name machine specific (+non memorable) and king ifconfig, who ruled linux since year one, is dead. I still hope we just need to provide something like /dev/tty7 and done
    Btw. I have used OpenSUSE several years back and I loved those one click installs from firefox. But as soon as I wanted something, that was two-click in buntus, it appeared to be very complicated in opensuse. This seems to be fine example. Life isn't easy, is it?

    Quote Originally Posted by arvidjaar View Post
    Of course you need to set correct display, this is just standard X11 workflow that I assumed you are familiar with. Display depends on your DM, it is either :0 or :1 (GDM will launch second X server). Also note that at least GNOME defaults to Wayland today and Wayland cannot be forwarded at all.

    You may need to also set correct XAUTHORITY variable if connection to display is refused, you can check its value in GUI session.
    Thank you, correct display number (or name) is probably the core of the poodle, but which is that in the new KDE? I did not miss the warning in documentation "A machine can reliably accept VNC connections only if it uses a display manager that supports the XDMCP protocol. While gdm, lxdm, or lightdm support XDMCP, the KDE 5 default display manager sddm does not support it.", yet I see it works, but only when I launch x0vncserver from the logged in KDE session.

    Quote Originally Posted by wolfi323 View Post
    JFYI, there is a KDE application named krfb that allows you to share the screen via VNC e.g. Might be easier to use...

    Support for Wayland is being worked on (in kwin and krfb), but I think it's not in yet in the latest stable versions.
    Thanks for suggestion, trying it now, but I fail to launch that from another session same as x0vncserver. I will yet have to test it, how will it behave after restart. It told me, that it uses display "HDMI-3", but it does not see this display name from another sessions.

  10. #10
    Join Date
    Sep 2012
    Posts
    7,098

    Default Re: serve VGA screen via vncserver [KDE]?

    Quote Originally Posted by pruda View Post
    Thank you, correct display number (or name) is probably the core of the poodle, but which is that in the new KDE?
    Log into KDE session, check display (echo $DISPLAY) and try to use the same value when starting x0vncserver.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •