This question is probably related to:
Remotely start session on display :0 and Starting x11vnc remotely when X server is already running
For this answer, I will assume systemd as service manager, SDDM as desktop manager, and x11vnc as VNC server. For different resources, adaptation is not involved.
If you have booted your computer remotely, through wake-on-lan, for example, and have no physical access to your keyboard as to enter the user password on KDE's login screen, you will not be able to open the X display through SSH by simply starting a VNC session, such as
$ x11vnc --display $DISPLAY
The output of the command will be somehow verbose, but reading through it you will find something on the lines of
20/12/2019 19:32:35 *** XOpenDisplay failed ($DISPLAY) *** x11vnc was unable to open the X DISPLAY: "$DISPLAY", it cannot continue. ***
because there is no X-session authenticated yet.
If we read further through the output, we will find
** If NO ONE is logged into an X session yet, but there is a greeter
login program like "gdm", "kdm", "xdm", or "dtlogin" running, you
will need to find and use the raw display manager MIT-MAGIC-COOKIE
file. Some examples for various display managers:
gdm: -auth /var/gdm/:0.Xauth -auth /var/lib/gdm/:0.Xauth
kdm: -auth /var/lib/kdm/A:0-crWk72
-auth /var/run/xauth/A:0-crWk72
xdm: -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
dtlogin: -auth /var/dt/A:0-UgaaXa
That is what we need to do, find and use the raw display manager MIT-MAGIC-COOKIE file.
Along the output of
$ systemctl status sddm
we will find something like
CGroup: /system.slice/sddm.service
|-650 /usr/bin/sddm
`-660 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{$somelongstring} -background none -noreset -displayfd 17 -seat seat0 vt1
Simply fetch x11vnc the aforementioned cookie file,
# x11vnc --display $DISPLAY -auth /var/run/sddm/{$somelongstring}
Note that such operation needs to be executed as root.
Now you will have an X11 VNC server running on your machine, and will be able to unlock the greeter screen from a VNC connection through any device, which may be your smartphone as well.
Perhaps someone can come up with a simpler and/or easier solution, where SSH and VNC connections are not needed, and a line of command would suffice. This approach, however, is rather fast and should solve your problem.
For different service managers, desktop managers, and VNC servers, the commands here have to be adapted accordingly.