Tuesday, May 7, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 2093  / 3 Years ago, wed, august 11, 2021, 6:59:21

I want to map a key, say ctrl-shift-m to open a terminal, ssh into the mailhost, open pine and go into the compose mail pane. I already have ssh-key setup so i dont have to type my password while doing ssh, so that is not an issue.


More From » shortcut-keys

 Answers
7

This is how I do when I need:



1) Make a script with all commands needed



Example:



#!/bin/bash

ssh [email protected]

ssh some-command

others-commands

exit 0


2) Create the shortcut



Run gnome-control-center keyboard then go to "Shortcuts" > "Custom" > "+"



enter image description here



Name: Anything

Command: gnome-terminal -e "bash -c "/path/to/script ; exit ; exec bash""



Change "/path/to/script" for the correct path, and



delete "exit" if you don't want the terminal to close after the execution of the script.



Then choose the shortcut you wish.



Enjoy!


[#31950] Wednesday, August 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cisccla

Total Points: 66
Total Questions: 134
Total Answers: 115

Location: Croatia
Member since Fri, Sep 11, 2020
4 Years ago
cisccla questions
Tue, Nov 16, 21, 08:40, 3 Years ago
Thu, Sep 1, 22, 19:53, 2 Years ago
Fri, Apr 21, 23, 20:17, 1 Year ago
Thu, Dec 2, 21, 15:29, 2 Years ago
;