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

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:


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

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:


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 :slight_smile:

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.

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.

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.