2

I have two computers running Kubuntu 18.04.

From the client, I connect to the server with ssh, all is going well:

ssh -X $SERVER_IP 'export $(dbus-launch); plasmashell'

I'm able to interact with the desktop as if I was on the server.

But the problem is that I have two plasma shell at the same time, the client's and the server's.

So I tried to create an xsession .desktop file to launch ssh instead of kde on the client.

Without success.

I'm able to launch a graphical program (like xterm) in which I launch ssh but in that case, I have no window manager, so I can't close the windows I open.

So my question is:

How to construct a /usr/share/xsession/remote.desktop file that would be able to:

  • launch the kde WM: /usr/bin/kwin
  • launch a SSH session: /usr/bin/ssh -X .....

Note: I perform all my test on virtualbox computers.

Ideas?

0

Two step:

  1. Create a script that will launch kwin and ssh
  2. Create the ad-hoc xsession file

1. Create a /usr/bin/startssh file:

kwin&
ssh -X $SERVER_IP 'export $(dbus-launch); plasmashell; exit'

Make it executable:

chmod +x /usr/bin/startssh

2. Create a /usr/share/xsession/remote.desktop file:

[Desktop Entry]
Type=XSession
Exec=/usr/bin/startssh
TryExec=/usr/bin/startssh
DesktopNames=Remote ssh
Name=remote-ssh
X-KDE-PluginInfo-Version=5.12.7 # line dumbly copied from plasma.desktop file

3. Restart the display manager

sudo systemctl restart sddm.service

Next step: find a clean way to terminate the ssh session, but it will be for another question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.