User Tools

Site Tools


config:terminal-sharing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:terminal-sharing [2026/11/04 17:27] – Wuffconfig:terminal-sharing [2026/11/05 14:26] (current) – Wuff
Line 15: Line 15:
  
 # Local desktop tmux wrapper (No-Exit Edition) # Local desktop tmux wrapper (No-Exit Edition)
-if [[ -z "$TMUX" && -z "$SSH_CONNECTION" && -n "$DISPLAY" && $- == *i* ]]; then+if [[ -z "$TMUX" && -z "$SSH_CONNECTION" && -n "$DISPLAY" && $- == *i* && -z "$BASH_EXECUTION_STRING" ]]; then
     # Unique session name     # Unique session name
     SESSION_NAME="term_$(date +%s)_$$"     SESSION_NAME="term_$(date +%s)_$$"
Line 124: Line 124:
 tmux kill-server tmux kill-server
 </code> </code>
 +
 +To use tmux via cinnamon applet "ssh launcher", a wrapper script needs to be used:
 +<code bash ~/.local/bin/ssh-tmux>
 +#!/bin/bash
 +# Called by the SSH Launcher applet as: ssh-tmux ssh [flags] <host>
 +host="${@: -1}"
 +name="ssh_${host//[^A-Za-z0-9_-]/_}"
 +exec tmux new-session -A -s "$name" "$(printf '%q ' "$@")"
 +</code>
 +<code bash>
 +chmod +x  ~/.local/bin/ssh-tmux
 +</code>
 +and in the ssh launcher settings, a custom command needs to be set for the terminal launcher. Note that the absolute path with proper username is required here and ~ does not work:
 +<code>
 +gnome-terminal -- /home/USER/.local/bin/ssh-tmux
 +</code>
 +
config/terminal-sharing.1793813278.txt.gz · Last modified: by Wuff