Results 1 to 7 of 7

Thread: I need help in making a desktop icon to execute a file

  1. #1

    Default I need help in making a desktop icon to execute a file

    openSUSE 12.3
    KDE 4.10.5

    I have a Python file (script ?) that I want to be able to execute from my desktop.
    It is an independent script that downloads activity from my credit card accounts.

    While I was testing it, I would have to open Konsole, position myself in the proper directory and execute this:

    Python Getupdate.py

    How do I create an icon on my desktop that will do this ?

    thanks
    openSUSE 13.2

  2. #2
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: I need help in making a desktop icon to execute a file

    On 12/20/2013 02:56 PM, hextejas wrote:
    >
    > openSUSE 12.3
    > KDE 4.10.5
    >
    > I have a Python file (script ?) that I want to be able to execute from
    > my desktop.
    > It is an independent script that downloads activity from my credit card
    > accounts.
    >
    > While I was testing it, I would have to open Konsole, position myself in
    > the proper directory and execute this:
    >
    > Python Getupdate.py
    >
    > How do I create an icon on my desktop that will do this ?
    >
    > thanks
    >


    Just make an icon on your desktop and change its command to this:

    Code:
    python /path/to/script
    --
    Was I helpful? Click that little star so that I can brag about it to my
    invisible friends
    Bring the Penguins Back! https://features.opensuse.org/316767

  3. #3
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: I need help in making a desktop icon to execute a file

    Not sure if this applies to older versions of KDE but at least in 4.11.3, its really easy to have "proper" (aka like windows) desktop icons in KDE. Just right click the desktop and select the desktop settings and change the menu that says Layout to the Folder option (see here). After applying the changes just right click the desktop and select Create New > Link to Application. Set its name to be whatever you want, and then in the Application tab, change its command to be like so:
    Code:
    python /path/to/script
    This should actually work with all executable files as long as they have the +x permission for your user. Here is a screenshot just to show you that it does work

    http://paste.opensuse.org/view/raw/27127143

    PS: You can open Konsole in Dolphin by pressing F4 and it will sync to your present working directory. So if you are in /home/gum/Documents/Programming and you press F4, Konsole will cd to that directory before appearing.
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  4. #4
    Join Date
    Jun 2008
    Location
    NZ
    Posts
    1,562

    Default Re: I need help in making a desktop icon to execute a file

    Quote Originally Posted by alanbortu View Post
    Not sure if this applies to older versions of KDE but at least in 4.11.3, its really easy to have "proper" (aka like windows) desktop icons in KDE. Just right click the desktop and select the desktop settings and change the menu that says Layout to the Folder option (see here). After applying the changes just right click the desktop and select Create New > Link to Application. Set its name to be whatever you want, and then in the Application tab, change its command . . .
    no need to change to Folder View if you are already using Default desktop.
    Simply open up Dolphin and create the icon/shortcut in the Desktop folder

  5. #5
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: I need help in making a desktop icon to execute a file

    Quote Originally Posted by farcusnz View Post
    no need to change to Folder View if you are already using Default desktop.
    Simply open up Dolphin and create the icon/shortcut in the Desktop folder
    I'm not a fan of the way the KDE default desktop does icons, I prefer the way it is with Folder View, it just seems more intuitive. Default Desktop relies on the widget to display a folders contents and it just feels like there is a widget for something that shouldnt really appear as a widget. I suppose it was my mistake in not mentioning that in the post, so to each their own.
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  6. #6

    Default Re: I need help in making a desktop icon to execute a file

    In kde I prefer adding in the application menu
    then you can put it in the panel and desktop
    People who do not break things first will never learn to create anything

  7. #7
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: I need help in making a desktop icon to execute a file

    Quote Originally Posted by conram View Post
    In kde I prefer adding in the application menu
    then you can put it in the panel and desktop
    This is pretty neat. Its even funner (if you have 2 monitors) when you download Homerun and set it as the desktop layout on one of the screens. Or put the Homerun Launcher in the panel, really cool widget.
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

Posting Permissions

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