Author Topic: [Explained] How to add desktop icons in LXDE?  (Read 7846 times)

Offline teddyred

  • Sr. Member
  • ****
  • Posts: 337
[Explained] How to add desktop icons in LXDE?
« on: January 01, 2011, 10:16:10 AM »
I'm trying some other desktop flavors and cannot find a way to add Computer [PCManFM], /Home, Network and Trash icons to the desktop.  I had no problem doing this in Zen and KDE4.
Did find a way to add and move panel icons after much searching.
I downloaded pclinuxos-tweak and task-gnome hoping it would do the trick but tweak is not fully functional.
Believe it's missing some dependencies.
Sure would appreciate some help with this.
« Last Edit: January 02, 2011, 05:29:07 AM by teddyred »

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: How to add desktop icons in LXDE?
« Reply #1 on: January 01, 2011, 11:16:50 AM »
I might be able to help a little here. Go to PCC> and pull out the applications you want on the Desktop. If you right-click they offer 'Add to Desktop'. Left-click and they appear. However, that doesn't get you a Trash or a My Computer (/home) icon.
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: How to add desktop icons in LXDE?
« Reply #2 on: January 01, 2011, 11:39:51 AM »
Why not a My Computer (/home) icon?

Try this:

1 Open a editor and wrote

Code: [Select]
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=MyHome
Type=Application
Comment=Show home directory
Terminal=false
Exec=pcmanfm ~
Icon=folder_home.png
Encoding=UTF-8

2. Save it under /home/<user>/Desktop

Now display a new starter on your desktop could MyHome, click on it...

« Last Edit: January 01, 2011, 11:41:39 AM by Leiche »

Offline teddyred

  • Sr. Member
  • ****
  • Posts: 337
Re: How to add desktop icons in LXDE?
« Reply #3 on: January 01, 2011, 11:40:09 AM »
Thanks, BJ....yes I can add app icons to the desktop as you've explained, but cannot find a way to add those shown in the file manager such as 'home', etc.
I've been searching in Google but haven't found it explained as yet.

Offline teddyred

  • Sr. Member
  • ****
  • Posts: 337
Re: How to add desktop icons in LXDE?
« Reply #4 on: January 01, 2011, 11:48:41 AM »
Thanks, leiche...........
I did add the link for Home to the desktop, but the icon shows a question mark.  Clicking on properties shows a red circular X with no way to select a proper icon as is done in other DE's.
Also would like to have a link for 'network' and 'trash'.

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: How to add desktop icons in LXDE?
« Reply #5 on: January 01, 2011, 11:50:13 AM »
You get for trash

Code: [Select]
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Trash
Type=Application
Comment=recycling
Terminal=false
Exec=pcmanfm trash:///
Icon=emptytrash.png
Encoding=UTF-8

Networrk will come...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: How to add desktop icons in LXDE?
« Reply #6 on: January 01, 2011, 11:58:55 AM »
Quote
Clicking on properties shows a red circular X with no way to select a proper icon as is done in other DE's.

Here you can change your favorite icon under Icon=

1. Open your Editor and, edit the Icon=folder_home.png , maybe in Icon=firefox.png. You find your icons in the /usr/share/icons directory ;)

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: How to add desktop icons in LXDE?
« Reply #7 on: January 01, 2011, 12:12:44 PM »
Sorry, i'm not sure, what you mean with
Quote
Also would like to have a link for 'network'
NetApplet or a directory for sharing?

NetApplet you can use this:

Code: [Select]
cp /usr/share/applications/net_applet.desktop /home/<user>/Desktop/
Good Luck  :)

Offline teddyred

  • Sr. Member
  • ****
  • Posts: 337
Re: How to add desktop icons in LXDE?
« Reply #8 on: January 01, 2011, 12:53:18 PM »
leiche, that procedure worked, but that's a heck of a way to add such common icons to the desktop.  If pclinuxos-tweak was workable, it would add them automatically.
The 'network' icon is for shares (samba) on the local network.
Thanks for your help!

Offline coco

  • Sr. Member
  • ****
  • Posts: 379
  • El dinero no lo es todo .. dicen los que lo tienen
Re: How to add desktop icons in LXDE?
« Reply #9 on: January 01, 2011, 01:08:20 PM »
PCLinuxOS Magazine Issue 46, November 2010

Place Icons On Your Desktop:

http://pclosmag.com/html/Issues/201011/page11.html
pclinuxos64-test04.iso :(       Chakra64 2012.2 :)

"Comprométete con algo difícil; esto te hará bien. Si no tratas de hacer algo más allá de lo que ya dominas, jamás progresarás." Ronal E. Osborn
"Si algo vale la pena hacerlo, vale la pena hacerlo incluso si no se sabe hacer bien." G. K. Chester

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: How to add desktop icons in LXDE?
« Reply #10 on: January 01, 2011, 06:11:50 PM »
Hi,

The method to put icons on desktop in LXDE is as simple as this:

Go to the menu, display any that you want an icon launcher on the destkop, right-click on the menu, and choose "add a shortcut to desktop".

Another way is to go to /usr/share/applications from within a console or from PCManFM, and simply copy the desktop file that interest you to the /home/user/Desktop directory.

For the icon "Home", it's a bit different, because there is no desktop file all made, so as I needed one for PCLinuxOS Openbox Bonsai (and Edu), as it uses Lxpanel and imitates the ways of Lxde version, I made one.

You will find a copy for it at packages translations section:
[-T-] PCManFM home.desktop

PS: for Trash I think Leiche method must be the right one. For network, what client do you usually use for your Samba share ?

PS-2 : Leiche, what about submitting your Trash.desktop file at the packages translation section ?


« Last Edit: January 01, 2011, 06:17:39 PM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: How to add desktop icons in LXDE?
« Reply #11 on: January 02, 2011, 03:43:52 AM »
An easy method to create a Home desktop icon ---
Open PCManFM > click to open ~/Desktop > click File - New Window > in the new window, go to /usr/share/applications > scroll down to your PCManFM file > left click it and hold - drag it to the other opened PCManFM (i.e. to /home/<you>/Desktop). Now you have the desktop icon. To change it to use another name, such as MyHome, open it in leafpad as root and edit the Name= line to change to the name you want.

Edit: You can change the icon by editing the line for it in the file.
« Last Edit: January 02, 2011, 05:38:27 AM by Neal »

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3729
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: How to add desktop icons in LXDE?
« Reply #12 on: January 02, 2011, 04:43:17 AM »


PS: for Trash I think Leiche method must be the right one. For network, what client do you usually use for your Samba share ?

PS-2 : Leiche, what about submitting your Trash.desktop file at the packages translation section ?




Hi melodie,

do what you thing is the right way :)

Offline teddyred

  • Sr. Member
  • ****
  • Posts: 337
Re: How to add desktop icons in LXDE?
« Reply #13 on: January 02, 2011, 05:28:15 AM »
Thanks for everyone's suggestions.  Not sure if I will go any further with this LXDE install.  Hopefully as it matures, it will become more user friendly.

By the way, my primary installation is ZenMini which is fully tricked out and secondary is PCLOS KDE4.
My reason for trying LXDE was hoping for a KDE3-like environment.

I will modify the subject to 'explained'.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: How to add desktop icons in LXDE?
« Reply #14 on: January 02, 2011, 05:35:10 AM »
An easy method to create a Home desktop icon ---
Open PCManFM > click to open ~/Desktop > click File - New Window > in the new window, go to /usr/share/applications > scroll down to your PCManFM file > left click it and hold - drag it to the other opened PCManFM (i.e. to /home/<you>/Desktop). Now you have the desktop icon. To change it to use another name, such as MyHome, open it in leafpad as root and edit the Name= line to change to the name you want.




Hi,

Doing this way you will just have an icon bearing the image of a folder, with "My Home" as a name. By using the file I have pulled out of it, you will have the image of a little house wearing "My Documents" as a name, as you have in PCLinuxOS Openbox Bonsai, and in PCLinuxOS Edu RC2.

Here is the latest containing the max translations:
http://www.pclinuxos.com/forum/index.php/topic,82830.msg690246.html#msg690246

Would you mind adding it to a package next time you will update... PCManFM for instance ?

Hi Leiche, I don't have time to test your desktop file in one of my installs just now. Does this desktop file work ? Is it likely to be added to a package in a close future ? If so, I think it could be a good idea to submit it for translations. :)



melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode