3

I have a VNC machine running kde4 as the desktop environment, I logged into the VNC machine and the desktop was just displaying a black screen. To remedy this I ssh'd into the VNC host and ran pkill -ABRT kwin This made the graphical environment reappear, although some elements such as the task bar at the bottom and the window decorations which have icons for closing / minimising the windows are missing. The more pertinent issue however is that, while mouse inputs work, I cannot use my keyboard in any window that I open, and keyboard shortcuts are not registering either.

I think that if I was able to, restarting the machine would solve my issue, however this option is not available to me, i.e. I have to fix this as a non-root user from an ssh session. However when I try to start plasma-desktop from the ssh session I get the following feedback:

connect /tmp/.X11-unix/X0: No such file or directory plasma-desktop(xxxxx): 
KUniqueApplication: Cannot find the D-Bus session server:  "/usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed."

plasma-desktop(xxxxx): KUniqueApplication: Pipe closed unexpectedly.

Any help or suggestions anyone can provide would be much appreciated.

Guilty
  • 133
  • 1
  • 3
  • Which version of kwin are your running ? On which backend (X11 / Wayland) ? – MC68020 Oct 05 '22 at 11:31
  • The backend is X11, `kwin --version` is now returning an error: `kwin: FATAL ERROR while trying to open display localhost:15.0` in the ssh session for me unfortunately so not sure. It is kde4 if that narrows down what kwin version it is. – Guilty Oct 05 '22 at 11:44
  • Kde**4** ? Do you explictely mean **not kde-plasma-5** ? Dead sure ? If so then I am afraid I just can't help. – MC68020 Oct 05 '22 at 12:11
  • Yes it is kde4, the command I have is kwin, not kwin_x11 – Guilty Oct 05 '22 at 13:13

1 Answers1

2

Writing regarding >= kde-plasma-5.13 with x11 backend :

Just many (if not all) processes of the kde-plasma framework are launched and controlled via dbus.
Therefore one should, as far as possible, refrain from killing processes and ask dbus to properly terminate those processes and relaunch them right after instead :

If getting into trouble with the DE, then, from console, try, in the following order :

kwin_x11 --replace

Then

plasmashell --replace
MC68020
  • 6,281
  • 2
  • 13
  • 44
  • The machine is using kde4 not kde5, as such I don't have a `plasmashell` command, but a `plasma-desktop` command, and I don't have a `kwin_x11` command but a `kwin` command. – Guilty Oct 05 '22 at 13:15
  • @Guilty : Then try A/ *kstart kwin --replace* B/ *killall plasmashell* C/ *kstart plasmashell* WARNING : Since I am no longer using KDE4, I cannot not test this and therefore cannot give any sort of guarantee it can be of any help to you. – MC68020 Oct 05 '22 at 13:25
  • Thanks but these commands fail because they cant find DISPLAY (because there is none as I am in ssh) – Guilty Oct 05 '22 at 18:07