Author Topic: How can I Show/Hide Desktop Icons in Peppermint 6 (SOLVED)  (Read 4577 times)

Offline gpfromnc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: 9
  • New Forum User
    • View Profile
  • Peppermint version(s): 8 and 9
How can I Show/Hide Desktop Icons in Peppermint 6 (SOLVED)
« on: June 17, 2015, 08:01:42 am »
Hi All,
I've been using Peppermint 5 (32 bit) on my laptop (older Sony Vaio) for several months and I really like it.  One of the features that I use a lot is the show/hide Desktop icons (right click Desktop > Desktop Preferences > Advanced > Use Desktop As A Folder (check/uncheck)).  I've recently loaded Peppermint 6 (32 bit) on my wife's desktop machine. It is a newer home built and I chose 6 over 5 because of the newer kernel and hopefully better support for the geforce gtx 750ti graphics card in it.  It is a great OS and works perfectly.  It is noticeably quicker than the Ubuntu 14.04 install that it replaced.  The only thing that I can't find on the 6 install is the show/hide Desktop icons.  This little feature is certainly not make or break for me, but it is one of the little things that makes 5 such a great all around OS in my opinion.
Is there a quick way to do what I want to do in 6?  I have used dconf-editor to accomplish it, but it is a lot more clunky than the elegant solution in 5.
Thanks!
« Last Edit: June 18, 2015, 08:17:51 am by gpfromnc »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How can I Show/Hide Desktop Icons in Peppermint 6
« Reply #1 on: June 17, 2015, 02:01:00 pm »
Hi gpfromnc, and welcome to the forum :)

dconf-editor only really give you the 4 icons

Home
Computer
Network
Trash

and the ability to display mounted volumes.

But they're definitely more functional that they were in Peppermint 5 (such as right-click "Empty Rubbisg Bin").



Unless of course you mean "application" launchers for the desktop .. in which case (exactly the same as Peppermint 5) right-click an application in the main menu, then select "Add to desktop" .. then click on the file that just appeared on your desktop and select "Mark as Trusted".



All in all I think Peppermint 6 handles Desktop icons better than previous versions .. if slightly differently L)

Functional icons such as Trash/Computer/Network
more consistent spacing
easier icon changing
better ordering
icon resizing

[EDIT]

Oh, sorry I see what you mean .. I suppose it'd be possible to add a right-click context menu item for the desktop that toggles the "show-desktop-icons" gsetting

I'll look into it
« Last Edit: June 17, 2015, 02:14:12 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline gpfromnc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: 9
  • New Forum User
    • View Profile
  • Peppermint version(s): 8 and 9
Re: How can I Show/Hide Desktop Icons in Peppermint 6
« Reply #2 on: June 17, 2015, 02:58:07 pm »
Thanks for the reply PCNETSPEC.  I probably should have been clearer when explaining what I was looking for.  It is as you said, a way to toggle the desktop icons on and off easily in Peppermint 6.  My wife rarely shuts her machine down, and likes to see just the wallpaper she has up at the time if she's not actively using it.   When it isn't in use, the monitor generally has a picture of grandkid on it and they look way better without files and icons across their faces  ;D.   So being able to hide/unhide with a right click or perhaps a shortcut in the panel is what I'm looking for.   It works in 5 (though there is a submenu) and I thought/hoped I had just missed finding it in 6.
Thanks  for looking into this.   As I said, Peppermint is a great OS and this feature in 6 would just make it better!

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How can I Show/Hide Desktop Icons in Peppermint 6
« Reply #3 on: June 17, 2015, 03:54:25 pm »
OK, how about a menu item that toggles them on.off ?

First let's create a python script called toggle_nemo_desktop_icons in /usr/bin that queries the current state of the show-desktop-icons gsetting and sets it accordingly

Open a terminal and run:
Code: [Select]
sudo gedit /usr/bin/toggle_nemo_desktop_iconswhen a BLANK file opens make it read:
Code: [Select]
#!/usr/bin/env python
import subprocess as sp

#nemo
output = sp.check_output("gsettings get org.nemo.desktop show-desktop-icons", shell=True).strip("\n")
print output.strip("\n")
if output == "true":
  sp.call("gsettings set org.nemo.desktop show-desktop-icons false && nemo -n &", shell=True)
elif output == "false":
  sp.call("gsettings set org.nemo.desktop show-desktop-icons true && nemo -n &", shell=True)
SAVE the file and exit gedit.

Now let's make it executable .. back in the terminal run:
Code: [Select]
sudo chmod +x /usr/bin/toggle_nemo_desktop_icons
OK, now to create  the menu item that runs that script .. run:
Code: [Select]
sudo gedit /usr/share/applications/toggle_nemo_desktop_icons.desktopwhen a BLANK file opens, make it read:
Code: [Select]
[Desktop Entry]
Type=Application
Name=Show/Hide Desktop Icons
Comment=Show/Hide Desktop Icons
Icon=wmtweaks
Exec=toggle_nemo_desktop_icons
Terminal=false
Categories=GTK;Settings;
SAVE the file and close gedit.

You should now have a menu item at

menu > Preferences > Show/Hide Desktop Icons



Please be aware that whilst the desktop icons are OFF, there will be NO right-click desktop context menu
(otherwise I could have added it as a context menu item)

And though I can't see there being any problems .. remember you can always still use dconf Editor.
« Last Edit: June 17, 2015, 04:20:43 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline gpfromnc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: 9
  • New Forum User
    • View Profile
  • Peppermint version(s): 8 and 9
Re: How can I Show/Hide Desktop Icons in Peppermint 6
« Reply #4 on: June 18, 2015, 08:16:10 am »
WOW!  Thanks PCNETSPEC.
This is exactly what I was looking for.  It could not possibly work any better.   I added the menu item as an application launcher panel item and now she can toggle the icons/files on/off with a single click. I leaned something, and my missus is thrilled.
Thanks!

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How can I Show/Hide Desktop Icons in Peppermint 6 (SOLVED)
« Reply #5 on: June 18, 2015, 08:34:02 am »
You're most welcome gpfromnc .. thanks for marking the topic solved :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2315
  • Karma: 614
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: How can I Show/Hide Desktop Icons in Peppermint 6
« Reply #6 on: June 18, 2015, 08:55:22 am »
Hi gpfromnc,
 


EDIT: I just noticed that you did this while I was typing up the directions about how to do it! Good for you!! Maybe someone else can use these instructions.



Sounds like your wife and I both prefer clean workspaces/desktops !  :P

The solution offered by PCNetSpec works really well (so well that I now have it set up as well), but (correct me if I am wrong) as I understand you, you would like to use as few mouse clicks as possible to get to the toggle. To get to it as quickly as possible, add it to the panel in an Application Launch Bar (either the existing one over on the right end of the panel or in a new one that you can add and place on the left end of the panel next to the main menu button). That way you do not even need to open the menu: it is always present and can be clicked on to toggle the icon visibility.

In case you do not know how to do this, here is how to do it:

Right-click on an empty portion of the panel somewhere near the middle of the panel. You will see a pop-up menu the looks like the one in this screenshot (click on it to see it better):



Now select the entry named Add / Remove Panel Items near the top. You will see the following window:



Click on the button named Add and the next window that shows up looks like this:



Now scroll down until you see the entry named Application Launch Bar and click on it. The first window now will have two entries named Application Launch Bar at the bottom. Click on the bottom-most one (that is the one you just added). It is empty at the moment. If you wish to have it on the left end of the panel then click several times on the button at the right named Up until the Application Launch Bar is just below the entry named Menu (see my second picture above).

Now click on the button on the right named ...Edit to open this window:



In the left pane nothing is currently in the Application Launch Bar so it is empty, and in the right pane is a list of your menu categories. Open the one named Preferences by clicking on the little box with a + sign it, and scroll down to find your toggle to Show/Hide Desktop Icons and click on it. Then click on the button in the middle named Add and your left side of the window now contains the toggle as in this picture:



If you wish to add more items to this Application Launch Bar, continue adding items from the right side list until you are finished. Then click on the button named Close. In the remaining window also click on the button named Close and you are finished.

I hope that this helps to speed up your work for you and also your wife !!  8)

Regards,

-- Slim
« Last Edit: June 18, 2015, 08:57:17 am by Slim.Fatz »
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline gpfromnc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: 9
  • New Forum User
    • View Profile
  • Peppermint version(s): 8 and 9
Re: How can I Show/Hide Desktop Icons in Peppermint 6 (SOLVED)
« Reply #7 on: June 18, 2015, 10:38:59 am »
Thank you Slim.Fatz.  Your addition is clear and I have no doubt will help someone else.  I'm really sold on Peppermint for a lot of reasons, but chief among them is the flexibility, simplicity and beauty of LXDE.  And the community here has been absolutely great. 
Anyway, thanks again.