Results 1 to 5 of 5

Thread: How to make a shortcut in a desktop that executes a program

  1. #1

    Default How to make a shortcut in a desktop that executes a program

    Hello everyone,
    even though this is a simple task I always have problems to do this.
    I want to execute the following

    #!/bin/bash
    java -jar JabRef-2.6.jar


    or in other words this is the command I use in konsole to make the application to launch.

    Then usually I try to create a desktop in the icon either by using
    a. create link to location
    or
    b. create link to application.

    where I select as file the file
    myfile.sh that contains the two lines of code I posted above (see again below)
    "#!/bin/bash
    java -jar JabRef-2.6.jar"

    I do this file executable by using the chmod +x.

    Sometimes I think this works while others like now I only receive the cursor bouncing for sometime before it dissapears.

    Could you please help me.
    Regards
    Alex

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,828
    Blog Entries
    15

    Default Re: How to make a shortcut in a desktop that executes a program

    Hi
    You need to provide the full path to the jar file, or cd to the location if your wanting to default there. For example if it's in you home bin directory;
    Code:
    #!/bin/bash
    java -jar ~/bin/JabRef-2.6.jar
    or
    Code:
    #!/bin/bash
    cd ~/bin
    java -jar JabRef-2.6.jar
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How to make a shortcut in a desktop that executes a program

    I would like to thank you malcom for two reasons.
    1. What you proposed me worked
    2. I really like your avatar.

    Could you please also tell me if it is possible to get some outputs (from kde?) when I try something ? For example in this case only one icon bouncing was visible and thus I could not understand what was wrong.

    Best Regards

  4. #4

    Default Re: How to make a shortcut in a desktop that executes a program

    Hello alaios,

    Quote Originally Posted by alaios
    Could you please also tell me if it is possible to get some outputs (from kde?) when I try something ? For example in this case only one icon bouncing was visible and thus I could not understand what was wrong.
    KDE has the option to open a terminal so you can see the output of the program.

    To do this right click on your icon.
    Select Properties, a new window will appear.
    Select the tab Application, now select Advanced Options.
    Make sure you check the option Run in terminal.

    Good luck!
    Where did I put my coffee cup?
    dir -R /home/* | grep "coffee cup"

  5. #5
    Join Date
    Mar 2009
    Location
    sri mayapur, west bengal, india
    Posts
    958

    Default Re: How to make a shortcut in a desktop that executes a program

    On Sun, 14 Nov 2010 18:06:01 +0530, alaios
    <alaios@no-mx.forums.opensuse.org> wrote:

    > Could you please also tell me if it is possible to get some outputs
    > (from kde?) when I try something ? For example in this case only one
    > icon bouncing was visible and thus I could not understand what was
    > wrong.


    the easiest (if not most elaborate / detailed) way is to start your
    program from a terminal. usually you'll get output describing what's going
    on and/or wrong.

    --
    phani.

Posting Permissions

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