Results 1 to 2 of 2

Thread: Create a shortcut for a program that launches in terminal

  1. #1

    Default Create a shortcut for a program that launches in terminal

    I'd like to create a launcher for ParaView that requires a terminal shell in order to launch. It is just a pain having to enter the couple of lines to launch it from Konsole.

    cd /home/user/Document/ParaView(version)/bin
    ./paraview

    Lemme know what you think. I'd just like to add something to the quick launch panel.

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Create a shortcut for a program that launches in terminal

    So you did not mention your desktop that you use. In KDE you can copy this into a text editor and save it in your /home/username/Desktop folder when using Folder View as the file ParaView.desktop

    Code:
    [Desktop Entry]
    Comment[en_US]=
    Comment=
    Exec=./paraview
    GenericName[en_US]=
    GenericName=
    Icon=exec
    MimeType=
    Name[en_US]=ParaView
    Name=ParaView
    Path=/home/user/Document/ParaView(version)/bin
    StartupNotify=true
    Terminal=true
    TerminalOptions=
    Type=Application
    X-DBUS-ServiceName=
    X-DBUS-StartupType=none
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    X-SuSE-translate=true
    You mark it executable with the terminal command:

    chmod +x ~/Desktop/ParaView.desktop

    You could also create a bash script file to do this:

    Code:
    #!/bin/bash
    
    #: Title       : /home/thomasrepetti/bin/pf
    #: Date Created: Sat Jun 11 09:26:13 CDT 2011
    #: Last Edit   : Sat Jun 11 09:26:13 CDT 2011
    #: Author      : thomasrepetti
    #: Version     : 1.00
    #: Description : 
    #: Options     : 
    
    cd /home/user/Document/ParaView(version)/bin
    
    ./paraview
    
    exit 0
    # End Of Script
    Copy the above file into a text editor and save the file as pf in your ~/bin folder (/home/username/bin/pf):

    To mark the bash script file executable run the terminal command:

    Code:
    chmod +x ~/bin/pf
    Then, to run pf, open a terminal session and type the command:
    Code:
    pf
    Perhaps something here might be useful.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

Posting Permissions

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