Hi, I would like to create a desktop icon that will launch the terminal window and automatically exectute a given command (ssh to a remote server in this case).
How would I go about doing this?
Thanks.
launch terminal with command from desktop?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
launch terminal with command from desktop?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- jungle_boy
- Level 7
- Posts: 1812
- Joined: Thu Aug 19, 2010 2:51 pm
- Location: Amazon Rainforest
Re: launch terminal with command from desktop?
1- You need to create a shell script:
2- Make it executable and change permissions:
3- Right click on desktop and create a launcher to your shell script
More informations in:
http://www.freeos.com/guides/lsst/
Code: Select all
#!/bin/bash
#here_the_commands_to
#link_a_remote_server
#fi
Code: Select all
#chmod +X name_of_your_shell_script
#chmod -R 777 name_of_your_shell_script
More informations in:
http://www.freeos.com/guides/lsst/
Samsung Odyssey, Octa-core, i5 9300H, Geforce GTX 1650, 16GB RAM, SSD SAMSUNG NVMe 500GB
LM 21 Cinnamon
LM 21 Cinnamon
Re: launch terminal with command from desktop?
But that won't open a terminal window. Or will the desktop sniff that it is a script and run it in a terminal for you? I think it shouldn't so it probably doesn't.
The terminal (mate-terminal at least, as well as the old xterm) can take an argument -e <command> to run a command in the terminal. I tried mate-terminal -e ssh <host> but it terminated immediately for some reason. xterm worked though, but you may have to install xterm as it's not in Mint by default (not in mine anyway)
The terminal (mate-terminal at least, as well as the old xterm) can take an argument -e <command> to run a command in the terminal. I tried mate-terminal -e ssh <host> but it terminated immediately for some reason. xterm worked though, but you may have to install xterm as it's not in Mint by default (not in mine anyway)