Thrashrokz33
September 18th, 2012, 03:07 AM
Update: Solved. It was as easy as using Gnome-terminal -e /pathtofile as the shortcut command.
I'm trying to ssh into a server with a bash script so I don't have to type "ssh -l user server" into gnome-terminal every time.
My script works on it's own:
#!/bin/bash
ssh -l myusername theserver.edu
And I'm trying to set a keyboard shortcut, so that I can just hit ctrl+alt+[ and have it open gnome-terminal, and run that script.
I've tried, as a shortcut command:
gnome-terminal && /pathtofile/myscript.sh
and it just opens a blank terminal. Which command should I run so that it opens a blank terminal, and then inside that terminal window, it runs my ssh connect command?
And the reason I can't just make the shortcut to the bash file itself, is that it opens up the wrong program, something called Openssh.
I'm trying to ssh into a server with a bash script so I don't have to type "ssh -l user server" into gnome-terminal every time.
My script works on it's own:
#!/bin/bash
ssh -l myusername theserver.edu
And I'm trying to set a keyboard shortcut, so that I can just hit ctrl+alt+[ and have it open gnome-terminal, and run that script.
I've tried, as a shortcut command:
gnome-terminal && /pathtofile/myscript.sh
and it just opens a blank terminal. Which command should I run so that it opens a blank terminal, and then inside that terminal window, it runs my ssh connect command?
And the reason I can't just make the shortcut to the bash file itself, is that it opens up the wrong program, something called Openssh.