I am trying to create a telnet shortcut. I cant seem to find a way to do this. Any ideas?
Asked
Active
Viewed 1,158 times
0
-
Assuming the telnet shortcut actually is a command, are you familiar with creating a `.desktop` file with a complicated command? In other words: what is the command you want to make the shortcut run? – Jacob Vlijm Aug 17 '15 at 16:22
-
Yes the shortcut is a command. All I am running is telnet
– Josh Aug 17 '15 at 16:48so telnet server 10025. I tried to create a .desktop file. But I had no luck. did it from the GUI and SSH. -
See this: http://askubuntu.com/a/527787/72216 further below, in the "complicated commands" -section. – Jacob Vlijm Aug 17 '15 at 16:58
-
2possible duplicate of [How do I use a shell command as a launcher shortcut?](http://askubuntu.com/questions/527783/how-do-i-use-a-shell-command-as-a-launcher-shortcut) – Jacob Vlijm Aug 17 '15 at 16:59
-
Please let me know if it actually solves the problem (or not). – Jacob Vlijm Aug 17 '15 at 17:00
-
@JacobVlijm Am I actually creating a script here? I think thats where im confused. Would I create a telnet.sh file, and then link it to the .Desktop file? – Josh Aug 17 '15 at 17:19
-
Nono, like this: `Exec=/bin/bash -c "your-usual-command-to-run-telnet"` should be the Exec= line. If you make the `.desktop` file executable, you can just double click on it to run the command inside it. – Jacob Vlijm Aug 17 '15 at 17:23
-
@JacobVlijm. I created a simple file that just has Exec=/bin/bash -c "telnet-link" and put it in a telnet.desktop file. I then did chmod +x telnet desktop. Then I ran it and it says: There was an error launching the application. – Josh Aug 17 '15 at 17:40
-
Not sure what it sais :) . Re- reading, your question is not a *literal* dupe. The use of the `.desktop` file as a standalone launcher or as a Unity launcher makes no difference however. Let me know if you manage :) – Jacob Vlijm Aug 17 '15 at 17:48
-
It doesnt seem to be working. I must be missing something. I have tried several times with the .desktop launcher. I just want to create the link so the user doesnt have to remember the string and type it in every time. – Josh Aug 17 '15 at 17:50
-
Could you post a link to the complete `.desktop` file you created? (We'llremove some comments afterwards). Does it need to run in a terminal btw? – Jacob Vlijm Aug 17 '15 at 17:51
-
just curious, why didn't you post your .desktop file? – Jacob Vlijm Aug 17 '15 at 19:11
-
@JacobVlijm I was getting to that but I got side tracked and saw his post first. :) The only thing that was different was under Exec I had a link to the file (/home/user/files/telnet.sh) and in users files telnet.sh was there. Which was probably my issue! – Josh Aug 17 '15 at 19:17
1 Answers
0
Using a simple desktop file:
Create a new file in
~/.local/share/applicationsnano ~/.local/share/applications/telnet.desktopAdd the lines below
[Desktop Entry] Name=Telnet localhost Comment=Telnet client Exec=telnet localhost Icon=terminal Type=Application Terminal=true Categories=Utility; StartupNotify=true StartupWMClass=telnetThe line
Exec= …, two possibilitiesExec=telnet localhostI'm using
localhostas target host. replacelocalhostwith your target host.
OR
Exec=/full/path/to/your/telnet_scriptUse your own script if you want, eg
#!/bin/bash telnet localhostMake the script executable and add the full path to your script to the
Exec=property
A.B.
- 89,123
- 21
- 245
- 323
-
-
@A.B. Please dont remove it worked nicely. I was able to create it without the script. I justr executed the telnet string. As I agree it seems like its covered alot(because I probably ready every post) After spending hours trying to create it. It wa s not working. JacobVlijm thank you as well for your help. I consider myself a noob. But am willing to learn. Becuase who likes Windows :) Thanks again!!! – Josh Aug 17 '15 at 18:56
