ssh – Paolo Redaelli https://monodes.com/predaelli A civil engineer with a longlife fondness for Software Libero Sat, 10 May 2025 08:08:14 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 91795679 Applicazioni da remoto https://monodes.com/predaelli/2025/03/07/applicazioni-da-remoto/ https://monodes.com/predaelli/2025/03/07/applicazioni-da-remoto/#respond Fri, 07 Mar 2025 16:54:52 +0000 https://monodes.com/predaelli/?p=12923 Oh, dimenticavo di aver già scritto di waypipe, a proposito dei giochi 3d. Quasi 5 anni fa!

Ora la parte noiosa. Spesso mi collego (con ssh, ça va san dire) alle mie macchine di casa da remoto dove è già attiva una sessione “desktop” che oggigiorno è Wayland. Così qualsiasi programma Gnome o che usa le librerie Gtk – cioè moltissimi – verrà visualizzato sul desktop Wayland e non sul dektop remoto.

waypipe ssh $HOST” funziona a meraviglia, ma l’aggiunta di queste righe al vostro .bashrc è utile quando non state usando una sessione Wayland (cioè Windows):

if [ -n "$SSH_CLIENT" ]; then
  if [ -n "$WAYLAND_DISPLAY" ]; then
    echo "Remote session with waypipe, everything will be OK" 
  else 
    echo "Remote session, forcing GTK to X11"
    export GDK_BACKEND=x11
  fi
fi

]]>
https://monodes.com/predaelli/2025/03/07/applicazioni-da-remoto/feed/ 0 12923
How do I paste from PuTTY into Vim 8.0? https://monodes.com/predaelli/2019/01/22/5144/ https://monodes.com/predaelli/2019/01/22/5144/#respond Tue, 22 Jan 2019 18:46:35 +0000 https://monodes.com/predaelli/?p=5144 How do I paste from PuTTY into Vim 8.0?

Well, nice question, as I found it quite annoying that the usual right click on the mouse doesn’t work. In fact


Open a web browser, copy / paste some text from a website (eg. GitHub)
Use PuTTY 0.67 to SSH to a Linux VM (eg. Ubuntu 16 Xenial Xerus)
Open a file in Vim
Hit i to change into Insert mode
Right-click to paste the clipboard contents
Issue
Unfortunately, when I right-click in the PuTTY session, rather than pasting clipboard contents, what’s actually happening is that Vim is going from INSERT mode to (insert) VISUAL mode. I don’t think I’ve ever seen anything like this before.

Luckly it seems that there’s an easy workaround.


Adapt to it: With mouse mode turned on, the new way to paste is shift-right-click (at least in PuTTY)

]]>
https://monodes.com/predaelli/2019/01/22/5144/feed/ 0 5144