Fedora Linux Support Community & Resources Center
Old 17th July 2017, 02:01 PM
CrazyCaver Offline
Registered User
Join Date: Dec 2008
Posts: 116
HowTo add ssh launcher with kmenuedit

Hello everyone -

This problem has been bugging me for several months. I have not found any way to make it work. Even Google does not have an answer!

I want to create a menu item in KDE to launch ssh and connect to a specific server. The command line looks like this:

ssh -4 -l bgee server.mynetwork.net
This command works perfectly from a bash shell. When I use kmenuedit to create an item, no error is produced. However, the item does not launch. I get an icon in the plasma bar for about 2 seconds - then nothing. PS does not show any running ssh process. No error message is produced.

On the Advanced page of kmenuedit I have tried both checking and unchecking the "run in a terminal" box. It makes no difference.

I created a bash shell script to launch ssh. The script runs correctly when run from bash, but fails when run from a KDE menu item. I even tried launching it as a parameter to bash. No happiness.

What the heck is going on? How can I create a KDE menu item that runs ssh?

Thanks - Bill Gee
Reply With Quote
Old 17th July 2017, 02:51 PM
ocratato Online
Registered User
Join Date: Oct 2010
Location: Canberra
Posts: 2,650
Re: HowTo add ssh launcher with kmenuedit

Is ssh set up to login without prompting for a password ?

If not, then it may be failing to get the tty device for the password prompt.

It will need to be run with "run in a terminal" set, otherwise where does it connect stdin and stdout to?
Has anyone seriously considered that it might be turtles all the way down?
That's very old fashioned thinking.
The current model is that it's holographic nested virtualities of turtles, all the way down.
Reply With Quote
Old 17th July 2017, 05:01 PM
HaydnH's Avatar
HaydnH Offline
Registered User
Join Date: Feb 2005
Location: London, UK
Posts: 509
Re: HowTo add ssh launcher with kmenuedit

Just to be clear, ssh in a terminal is likely launching but is failing to connect automatically and therefore exiting bringing the terminal window with it. For example, trying running 'gnome-terminal -e ls' and 'gnometerminal -e "sleep 5"' from the command line, the terminal windows will close either immediately or after 5 seconds for those commands as the commands they're running have finished.

I don't know KDE at all, but if you add a ">> ~/myssh.log 2>&1" to the end of your menuItem command you'll pipe the STDOUT and STDERR to a logfile which might give you some insight as to whats going on.
Reply With Quote
Old 17th July 2017, 06:33 PM
CrazyCaver Offline
Registered User
Join Date: Dec 2008
Posts: 116
Re: HowTo add ssh launcher with kmenuedit

Hi Ocratato - As per my original note, I tried it with "Run in terminal" both checked and unchecked. SSH is NOT set to login without a password.

Hi HaydnH - I tried running with a command line "konsole -e /usr/bin/ssh -4 -l bgee server.mynetwork.net". It does not work. As per your suggestion, I added STDOUT and STDERR redirection to the command line. No output file was created.

By accident I discovered the culprit seems to be the use of command-line options! I created a KDE menu item with a command line of "/usr/bin/ssh bgee@server.mynetwork.net" and that works. I had to change the ssh_config file to force use of IPv4 (which is a different problem).

This is, by the way, on Fedora 25. I also tried it on a test Fedora 26 system and got the same result. If any command line parameters are passed to ssh, then the launch fails. Why would that be??? It makes no sense.

I now know a work-around. It is really annoying, but it gets me further down the road. The only two command-line parameters I really needed can be implemented in another way.

Bill Gee
Reply With Quote

add , howto , kmenuedit , launcher , ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kmenuedit changes appear to be done but are not saved broadstairs Using Fedora 9 21st November 2011 10:28 AM
KMenuEdit Complitric Using Fedora 4 23rd August 2005 03:07 AM
KMenuEdit & ShortKey semhoun Using Fedora 8 29th January 2005 06:05 AM
KDE and Kmenuedit Furry_Fighter Using Fedora 6 10th October 2004 12:55 AM

Current GMT-time: 00:53 (Saturday, 21-10-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat