I put a script on my desktop.
How can I use my own icon for it ?
I put a script on my desktop.
How can I use my own icon for it ?
On Sat 31 May 2014 02:06:01 AM CDT, andy77586 wrote:
I put a script on my desktop.
How can I use my own icon for it ?
Hi
Right click on the script and select properties, you should then be
able to click on the icon in the properties box and browse to the icon
of your choice.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
There is no properties box, just General, Permissions, Info, and Preview.
Hi
So on the general tab do you see the icon? Is so click on that. Alas I only use GNOME, but would have thought it’s the same setup in KDE…
Does the file have a name.desktop extension? It seems you need that to change the icon. And the .desktop file should point to your actual script.
I dont know if there is a cleaner way to do this though
The desktop icon is reboot.sh.
Should I rename it to just reboot ?
I renamed it to reboot.desktop and could change the icon.
But now the script won’t run.
Some progress.
Hi
Move the script to your ~/bin (~/ is /home/your user) and then create a desktop shortcut to the script, the change the desktop shortcut icon.
A somename.desktop file is not a script, but it links to it via the exec= entry;
http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html
Well .desktop files just point (link) to the actual program that needs to be run so if you open other .desktop files you should get an idea of what they are like.
andy77586 wrote:
>
> There is no properties box, just General, Permissions, Info, and
> Preview.
>
>
Right click the icon on the desktop. A context menu appears, which
should have Properties at the bottom. Click this. A multi-tab dialog
should appear. Select the General tab.
If the desktop icon links to an executable program, you will see the
icon embedded in a button; click this, and browse to a new icon of your
choice.
If, on the other hand, the desktop icon links to a document, you will
see the current icon, but it is not in a clickable buttton. In this
case, there is a button a bit lower down labelled File Type Options.
Click this. You get a new dialog where the icon is now in a clickable
button. Click this and choose a new icon.
*********** To reply by e-mail, make w single in address **************
Ian Gay wrote:
> If, on the other hand, the desktop icon links to a document, you will
> see the current icon, but it is not in a clickable buttton. In this
> case, there is a button a bit lower down labelled File Type Options.
> Click this. You get a new dialog where the icon is now in a clickable
> button. Click this and choose a new icon.
>
> The new icon may not show on desktop until KDE is restarted.
But that will change the icon for all files of that type (like *.c files).
I changed the icon for one script that was on the desktop. Now it and another script on the desktop no longer work when clicking on it.
However, they work from a console ?
Time for a long break.
Andy
I miss Windows exes that have the icon embedded in the executable.
Yes like I said *.desktop files link to the actual executable. You will need the file to be something like this
[Desktop Entry]
Comment=Open Kwrite
Exec=/usr/bin/kwrite %U
Name=abc
Type=Application
**
The .desktop file cannot be your script it must point to your script in the Exec= part.*
What file are you referring to?
When I click on this, it said it could not launch logoff.sh.
[Desktop Entry]
Comment=Log Off
Exec=~/Scripts/logoff.sh
Name=abc
Type=Application
Do you get any errors? I tried it with a bash script and its working fine for me.
What I did was make a name.desktop file and then set the exec to ~/bin/test and finally
chmod u+x ~/bin/test
If you could share the script that might help figure out why its not working.
This works fine when run from a console, so the script must be o.k.
Andy
#!/bin/bash
chmod +x *.sh
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
contents of logoff.desktop
When I click on it, it says “Can not launch logoff.sh.”
[Desktop Entry]
Comment[en_US]=Log Off
Comment=Log Off
Exec=Scripts/logoff.sh
GenericName[en_US]=
GenericName=
MimeType=
Name[en_US]=abc
Name=abc
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
andy77586 wrote:
>
> This works fine when run from a console, so the script must
be o.k.
>
> Andy
>
> # Logout from within OpenSuse
> #
> #!/bin/bash
Doesn’t #!/bin/bash need to be the first line of the script? I
think any other line than the first and it is just interpreted
as a comment.
It isn’t a requirement to be the first line.
The same script works fine in Puppy Slacko 5.6.0.