How do you create functional desktop icons in KDE?
I'm trying to create a desktop icon to a simple command. Since I'm having trouble getting the KDE buttons for "suspend to RAM" to work properly, but I can successfully issue the command "s2ram -f" from a terminal window, I thought maybe the easiest thing would be to create a desktop icon that runs a simple file with "sudo s2ram -f" in it. Then I could just click the file on my desktop and have the system go to sleep.
Can anyone walk me through how to do this? I'm assuming this would be a sort of desktop configuration file. (KDE 4.0.4 on SUSE 11.0) Thanks! Michael |
I am not sure how to make a launcher in KDE 4 (I still use KDE 3.5). However, you should be able to use the .desktop file below. Copy and paste it into a text editor and save it as as Suspend to RAM.desktop in your Desktop folder.
Code:
[Desktop Entry] |
In Kmenuedit ==> command = 'kmenuedit' you
can make all the entries, you want. Good Luck ! |
Code:
[Desktop Entry] |
Thanks for the replies. I tried making such a launcher as suggested, but when I click it, I just get the bouncing icon for about 30 seconds, then nothing. The system does not go into suspend to RAM. It seems to be doing something for a while, but who know what? Am I close, or is this just impossible??
|
Have you made it executable?
|
Quote:
Quote:
Meanwhile here are step-by-step instructions for a newbie: R-click on an empty bit of your desktop. In the menu that pops up, click on Create New -> then Link to application Type in Suspend instead of the default blue Link to application. Just type, (blued text is replaced by what you type) or use the backspace / delete keys if you must. Click on the Application Tab Description: Enter Suspend Comment: Enter Suspend Command: Enter kdesu s2ram -f Click OK Click on your new icon (it looks like a blue gear) It works? If yes, you can give it a better icon: R-Click the Suspend icon on your desktop Click on Properties Click the blue gear icon in the new "Properties" window that opens. Decide upon a more suitable icon from those offered. Click on it. Click OK Click OK You are done. Sigh. |
Quote:
Furthermore, there is no "Create new" option on right click of my desktop, which of course I tried long before I posted the question. If it were that easy, I would have done it long ago. My desktop is (KDE 4.0.4 >= 20080505) "release 15.2" - on right click it gives me (run command, add widgets, add panel, configure desktop, etc.). None of these seem to lead to the creation of a desktop config file. I just created the file from scratch, called it suspend.desktop and check it's properties against existing desktop config files. I subsequently tried every combination of property settings I could think of on the permissions and application tabs. Selecting "run in terminal" seems to pop a window up briefly, but does not put the system into suspend. |
Then I suspect the problem lies with KDE4.0.4
KDE4 is still undergoing heavy development, and many things just "don't work" yet, or are broken. You could argue that it is "not fit for release", but the developers are following the "Release early, release often" philosophy. You may have to be patient. |
That's quite possible. I was toying with upgrading to 4.1, but wanted to get familiar with the system using as stable a desktop as I could. Maybe I should try Gnome? I still may do the KDE 4.1 upgrade prior to the official release in SUSE 11.1.
Anyway, I continued playing around with things, and it looks like one can create "starter" icons on this desktop by clicking "Add Widgets" and choosing "Generic Icon". However, the properties tab only shows permissions, not application, so I'm not sure how to actually make it do anything. In the meantime, I have continued experimenting with the suspend to RAM issue using pw-utils and kpowersave, and it looks like I might have it working. That was the main issue, but it would still be nice to know how to easily create runnable icons on the desktop. |
If you want a stable desktop you should stick with KDE 3.5.x for the next six months at least. Creating functional icons on your desktop is easy with KDE 3.5.x (See post #7 above). So, indeed, is just about everything else: It's a highly functional and stable desktop, but it is not going to be developed any further: What you have is it.
As I said, KDE 4.x is still under development: By all means use it, but some things will be broken. |
update and correction
I found this thread in google and wanted to update it even though it's old. It is probably not relevant to the original poster (after four years) but others may find this helpful.
Code:
chmod +x nameofscript Since KDE4 by default doesn't have icons on the desktop you need to navigate to the username/home/Desktop folder to follow the instructions with dolphin or konqueror. Right clicking an empty space there will give you the option to Create New -> Link to Application You can then follow the advice in the previous post, it worked for my script. |
All times are GMT -5. The time now is 07:13 PM. |