{"id":3846,"date":"2014-08-27T14:54:02","date_gmt":"2014-08-27T14:54:02","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=3846"},"modified":"2014-09-29T15:26:09","modified_gmt":"2014-09-29T15:26:09","slug":"show-hide-desktop-shortcuts-via-context-menu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2014\/08\/show-hide-desktop-shortcuts-via-context-menu\/","title":{"rendered":"Show \/ Hide Desktop Shortcuts in Ubuntu via Context Menu"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/06\/Ubuntu-tips-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/06\/Ubuntu-tips-icon.png\" alt=\"hide or show desktop shortcuts in Ubuntu\" width=\"250\" height=\"250\" class=\"aligncenter size-full wp-image-3557\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/06\/Ubuntu-tips-icon.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/06\/Ubuntu-tips-icon-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p><b>Want an option in your desktop&#8217;s context menu (right-click menu) that hides or un-hides all your desktop shortcuts in Ubuntu Unity or Gnome?<\/b><\/p>\n<p><i>Ramvignesh<\/i>, 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.<\/p>\n<p><b>1. How to Create Desktop Shortcuts in Ubuntu 14.04<\/b><\/p>\n<p>Due to <a href=\"https:\/\/bugs.launchpad.net\/unity\/+bug\/1241972\" target=\"_blank\">bug<\/a>, you can&#8217;t drag and drop an application shortcut icon from Unity Dash result to desktop in Ubuntu 14.04 LTS.<\/p>\n<p>But it&#8217;s still easy to create a desktop shortcut, all you need to do is:<\/p>\n<ol>\n<li>Open your file browser, navigate to Computer (from left sidebar)-> user -> share -> applications.<\/li>\n<li>Right click on a shortcut icon and select &#8216;Copy&#8217;<\/li>\n<li>Right-click on blank area of your desktop and select &#8216;Paste&#8217;<\/li>\n<\/ol>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-desktop-shortcuts-ubuntu.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-desktop-shortcuts-ubuntu.jpg\" alt=\"Create Desktop Shortcuts Ubuntu\" width=\"580\" height=\"355\" class=\"aligncenter size-full wp-image-3848\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-desktop-shortcuts-ubuntu.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-desktop-shortcuts-ubuntu-300x183.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Finally you&#8217;re able to click the desktop shortcut to launch the application without worrying about user permission issue.<\/p>\n<p><b>2. Create the scripts to show\/hide desktop shortcuts<\/b><\/p>\n<p>Thanks to <i>Ramvignesh<\/i> for the simple scripts.  <\/p>\n<\/ul>\n<li>Create a new folder called <b>bin<\/b> in user&#8217;s Home folder.<\/li>\n<li>Go into bin folder and create 2 empty documents: <b>show-desktop-shortcuts<\/b>, <b>hide-desktop-shortcuts<\/b><\/li>\n<li>Edit 2 documents one by one and paste below contents into them. <span style=\"color:red;\">IMPORTANT: Replace handbook in red with your user name.<\/span>\n<ul>\n<li>for <b>show-desktop-shortcuts<\/b> file:\n<pre>#!\/bin\/bash\n#\ncd \/home\/<span style=\"color:red;\">handbook<\/span>\/Desktop\nfor f in .* ; do \nnew=`echo \"$f\" | cut -c 2-`\nmv \"$f\" \"$new\"\ndone<\/li>\n\n\n\t<li>for <b>hide-desktop-shortcuts<\/b> file:\n\n\n\n<pre>#!\/bin\/bash\n#\ncd \/home\/<span style=\"color:red;\">handbook<\/span>\/Desktop\nfor f in * ; do\nmv \"$f\" \".${f#.}\"\ndone<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/show-hide-desktop-shortcuts2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/show-hide-desktop-shortcuts2.jpg\" alt=\"show-hide-desktop-shortcuts2\" width=\"600\" height=\"326\" class=\"aligncenter size-full wp-image-4015\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/show-hide-desktop-shortcuts2.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/show-hide-desktop-shortcuts2-300x163.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Finally make the 2 scripts executable by going to their context menu (right-click menu) -> <b>Properties<\/b> -> <b>Permissions<\/b> tab -> check the box where it says 'Allow executing file as program'.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/allow-execute.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/allow-execute.jpg\" alt=\"allow-execute\" width=\"360\" height=\"408\" class=\"aligncenter size-full wp-image-3850\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/allow-execute.jpg 360w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/allow-execute-264x300.jpg 264w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/a><\/p>\n<p><b>3. Add The 2 Scripts As Options Into Desktop's Context Menu<\/b><\/p>\n<p>Click the button below to bring up Ubuntu Software Center and install nautilus-actions, a graphical tool for configuring Nautilus' context menu.<\/p>\n<p style=\"text-align:center;\"><a href='' class='arconix-button arconix-button-large arconix-button-blue'> Click install nautilus-actions<\/a><\/p>\n<p>Now open nautilus-actions from Launcher and do:<\/p>\n<ol>\n<li>Create 2 new actions in Items list, name them to Show Desktop Shortcuts & Hide Desktop Shortcuts<\/li>\n<li>Under <b>Action<\/b> tab of both items, check the box says \"Display item in location context menu\"<\/li>\n<li>Type a name in Context label\n<p>\t<a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items.jpg\" alt=\"create-context-menu-items\" width=\"600\" height=\"301\" class=\"aligncenter size-full wp-image-3851\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items-300x150.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/li>\n<li>Under <b>Command<\/b> tab of both items, type in (browser) path to the two scripts in Path box.<br \/>\n<a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items2.jpg\" alt=\"create-context-menu-items2\" width=\"600\" height=\"256\" class=\"aligncenter size-full wp-image-3852\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items2.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/create-context-menu-items2-300x128.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/li>\n<li>(Optional) Go the menu <\/b>Edit -> Preferences<\/b>, in first tab un-check the two boxes under <b>Nautilus menu layout<\/b>.<\/li>\n<\/ol>\n<p>Finally, your desktop's context menu will look like below after reboot.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/desktop-context-menu.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/desktop-context-menu.jpg\" alt=\"desktop-context-menu\" width=\"600\" height=\"289\" class=\"aligncenter size-full wp-image-3853\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/desktop-context-menu.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/08\/desktop-context-menu-300x144.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>Want an option in your desktop&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1137,1136,855],"class_list":["post-3846","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-context-menu","tag-desktop-shortcuts","tag-ubuntu-14-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=3846"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3846\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=3846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=3846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=3846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}