FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008

    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

  2. #2
    Join Date
    Oct 2010

    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?

  3. #3
    Join Date
    Feb 2005
    London, UK

    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.

  4. #4
    Join Date
    Dec 2008

    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

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts