Want an option in your desktop’s context menu (right-click menu) that hides or un-hides all your desktop shortcuts in Ubuntu Unity or Gnome?
Ramvignesh, the guy sent me two simple scripts with this great idea. If you are interested, below will show you how to do it step by step.
1. How to Create Desktop Shortcuts in Ubuntu 14.04
Due to bug, you can’t drag and drop an application shortcut icon from Unity Dash result to desktop in Ubuntu 14.04 LTS.
But it’s still easy to create a desktop shortcut, all you need to do is:
- Open your file browser, navigate to Computer (from left sidebar)-> user -> share -> applications.
- Right click on a shortcut icon and select ‘Copy’
- Right-click on blank area of your desktop and select ‘Paste’
Finally you’re able to click the desktop shortcut to launch the application without worrying about user permission issue.
2. Create the scripts to show/hide desktop shortcuts
Thanks to Ramvignesh for the simple scripts.
Create a new folder called bin in user’s Home folder.
Go into bin folder and create 2 empty documents: show-desktop-shortcuts, hide-desktop-shortcuts
Edit 2 documents one by one and paste below contents into them. IMPORTANT: Replace handbook in red with your user name.
Finally make the 2 scripts executable by going to their context menu (right-click menu) -> Properties -> Permissions tab -> check the box where it says 'Allow executing file as program'.
3. Add The 2 Scripts As Options Into Desktop's Context Menu
Click the button below to bring up Ubuntu Software Center and install nautilus-actions, a graphical tool for configuring Nautilus' context menu.
Click install nautilus-actions
Now open nautilus-actions from Launcher and do:
- Create 2 new actions in Items list, name them to Show Desktop Shortcuts & Hide Desktop Shortcuts
- Under Action tab of both items, check the box says "Display item in location context menu"
- Type a name in Context label
- Under Command tab of both items, type in (browser) path to the two scripts in Path box.
- (Optional) Go the menu Edit -> Preferences, in first tab un-check the two boxes under Nautilus menu layout.
Finally, your desktop's context menu will look like below after reboot.
Enjoy!