Você pode criar duas ações em ~ / .local / share / nemo / actions.
Arquivo remote_terminal1.nemo_action:
[Nemo Action]
Name=Open in remote terminal
Comment=Open current folder in remote terminal
Name[de]=Im entfernten Terminal öffnen
Comment[de]=Aktuellen Ordner im entfernten Terminal öffnen
Exec=<remote_terminal.py %F>
Icon-Name=terminal
Selection=none
Extensions=dir;
Dependencies=ssh;
Arquivo remote_terminal2.nemo_action:
[Nemo Action]
Name=Open in remote terminal
Comment=Open this folder in remote terminal
Name[de]=Im entfernten Terminal öffnen
Comment[de]=Diesen Ordner im entfernten Terminal öffnen
Exec=<remote_terminal.py %F>
Icon-Name=terminal
Selection=s
Extensions=dir;
Dependencies=ssh;
E finalmente um script Python remote_terminal.py (deve ser executável):
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
import subprocess
path = sys.argv[1]
if '/sftp:' in path:
sftp = path.split('/sftp:', 1)[1]
settings = {}
options, sep, settings['path'] = sftp.partition('/')
for opt in options.split(','):
name, sep, value = opt.partition('=')
settings[name] = value
cmd = ['gnome-terminal', '-e',
'ssh %(user)s@%(host)s -t "cd /%(path)s && bash --login"' % settings]
else:
cmd = ['gnome-terminal', '--working-directory', path]
subprocess.call(cmd)