Whats the best way for KDE5 with FreeBSD 12 to take control of the screen

Hi,

Having reinstalled my server I do want to user a windows system to view a mail or pictures, things like that. But I don't have a physical screen, so i want to connect from a laptop to my server and work from it remotely.

I know old methods with X11 and VNC with gnome of XFCE but I was expecting to find a new method or way in KDE5 with FreeBSD 12. After few attempts nothing really worked.

That's why I created this thread to see if there are persons out here that have a solution with the latest KDE5.

Thanks in advance,

Best Regards,

Relictrix
 
The desktop environment you want to use has nothing to do with it.

You have a bunch of options: good old XDMCP (not sure whether sddm supports this), VNC, maybe even Anydesk .. I personally prefer Microsoft's remote desktop here, it's implemented in net/xrdp. Im having several issues with it, but in general, it works.
 
I would suggest x11vnc. It runs *inside* the same session that it is run from rather than creating a new Xorg instance. Then you can connect using a vnc client.
 
Hi,

Thanks Zirias and kpedersen for your replies.

Let talk a bit about the architecture and these are the components that i have setup:
* SDDM: Is a component that takes care of the login screen.
* KDE5 : KDE Plasma Desktop
* Wayland: New windows system that might be replaced Xorg

So i followed this guide and started KDE with SDDM , not with startx or XDM: https://www.freebsd.org/doc/handbook/x11-wm.html

In the FAQ of wayland this is written:
Is Wayland network transparent / does it support remote rendering?

No, that is outside the scope of Wayland. To support remote rendering you need to define a rendering API, which is something I've been very careful to avoid doing. The reason Wayland is so simple and feasible at all is that I'm sidestepping this big task and pushing it to the clients. It's an interesting challenge, a very big task and it's hard to get right, but essentially orthogonal to what Wayland tries to achieve.


This doesn't mean that remote rendering won't be possible with Wayland, it just means that you will have to put a remote rendering server on top of Wayland. One such server could be the X.org server, but other options include an RDP server, a VNC server or somebody could even invent their own new remote rendering model. Which is a feature when you think about it; layering X.org on top of Wayland has very little overhead, but the other types of remote rendering servers no longer requires X.org, and experimenting with new protocols is easier.


It is also possible to put a remoting protocol into a wayland compositor, either a standalone remoting compositor or as a part of a full desktop compositor. This will let us forward native Wayland applications. The standalone compositor could let you log into a server and run an application back on your desktop. Building the forwarding into the desktop compositor could let you export or share a window on the fly with a remote wayland compositor, for example, a friend's desktop.


So there we can conclude we still need another component like RDP or VNC or Xorg.

So lets try the x11vnc that kpedersen is speaking about. I am not a real hero in this , so what are the next steps to setup x11vnc in relation with SDDM , KDE5 and Wayland as explained above. I prefer a step by step so everybody reading this thread can easily follow... I hope :)

Best Regards,

Kim
 
FreeBSD has the unique* ability to to use a network protocol enabled graphics system (X11) directly without having to use Wayland underneath, so I suggest reducing your overhead and use Xorg directly :)

So; SDDM starts your X11 session, your session runs KDE5 and x11vnc, done.

You might find that KDE5 has a settings menu to auto run applications; you could also put "x11vnc" in there if you do not want to deal with modifying your session file.

I use slightly more traditional tech than SDDM and KDE5 so unfortunately I am not really in the position to create a step by step.
 
Ok thanks for information kpedersen, no issue. If anybody else can help me with setting up x11vnc that would be great.
 
Hi,

Here the steps i did on a VM:
#STEPS A#
* # pkg install x11/kde5
* Add this line to /etc/fstab to mount this file system automatically during system startup: proc /proc procfs rw 0 0
* /etc/rc.conf :
dbus_enable="YES"
hald_enable="YES"
* pkg install x11/sddm
*
Add this line to /etc/rc.conf: sddm_enable="YES"

#STEPS B#
And then the part that according to me is not wayland but X11 and i don't want to use X11 or Xorg:
* pkg install Xorg
* ~/.xinitrc: exec ck-launch-session startkde

#STEPS C#
* pkg install net/tightvnc
* su - user1
* ~/.vnc/xstartup : exec ck-launch-session startkde
* vncserver :1 -geometry 800x600

Questions:
* I thought that i would get a screen after STEPS A but I did not get one. Anybody an idea why?
* After STEPS B i received a screen but ok then I use the Xorg again, I want to move to the new wayland.
* After STEPS C I could connect via a VNC client but I have the impression that it is creating a new session not like kpedersen was saying like x11nvc in the session itself. Who could help me with x11vnc setup?

Best Regards,

R
 
You dont want to be using vncserver because that is for a standalone instance of Xvnc and not your desktop. I have something like this in my .xsession (or .xinitrc)

Code:
# background color
xsetroot -solid gray

# normal mouse cursor
xsetroot -cursor_name left_ptr

# start an xterm
xterm &

# start screen sharing
x11vnc &

# start my window manager
cwm

With the x11vnc command, you probably want some arguments to state what port it listens on, colors etc. Try this whilst logged into your existing session and from the command line until you decide on one that works.

Does sddm run .xinitrc or .xsession. The standard xdm runs .xsession
 
This is my approach for using Remote Desktop Protocol to connect from one FreeBSD workstation running KDE5-Window Manager/Desktop to another FreeBSD workstation that lacks direct GPU driver support.

1) FreeBSD 12.0-RELEASE workstation/server (without direct GPU driver) runs XRDP server with support of the following:

pkg install xrdp

pkg install xorg

pkg install kde5



a) After installation of the above packages I enter the following in /etc/rc.conf to start the services at boot time

xrdp_enable="YES" #XRDP connection manager
xrdp_sesman_enable="YES" #XRDP session manager

c) Read more in /usr/local/etc/xrdp dir for information on xrdp settings:

xrdp.ini
sesman.ini
startwm.sh


2) FreeBSD 11.2-RELEASE workstation running KDE5 with direct GPU support.


pkg install freerdp #freerdp client that includes "xfreerdp"

a) Then, from within the terminal console, I enter the following:

xfreerdp +glyph-cache /relax-order-checks /u:myusername /v:10.1.10.10 /w:1060 /h:1080

(The above line can be placed in ez to remember executable sh script)

b) While in the login screen of xrdp server I choose Xorg session

c) Read more man xfreerdp to learn about it
 
Hi,

Ok i tried the x11vnc one.

.xinitrc:
Code:
#background color                                                            
xsetroot -solid gray                                                          


#normal mouse cursor
xsetroot -cursor_name left_ptr                                                

#start                                                                        
xterm &                                                                      

#start screen                                                                
x11vnc -wait 50 -display :0 -auth /var/run/sddm/* -forever -o /var/log/x11vnc.log -bg

The x11vnc does not work but my KDE is still launching. When I switch to TTY1 and log in with root and then do this command manually:
x11vnc -wait 50 -display :0 -auth /var/run/sddm/* -forever -o /var/log/x11vnc.log -bg

Then I can connect but I only see a black screen and my mouse moving.
 
Back
Top