{"id":35889,"date":"2021-11-28T16:12:21","date_gmt":"2021-11-28T16:12:21","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=35889"},"modified":"2021-11-28T16:12:21","modified_gmt":"2021-11-28T16:12:21","slug":"pin-folders-to-files-context-menu-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/11\/pin-folders-to-files-context-menu-ubuntu\/","title":{"rendered":"Pin Custom Folders to Left Panel &#8216;Files&#8217; Icon Context Menu in Ubuntu 20.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-35890\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/file-manager-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>In Windows 10, user may right-click on the &#8216;File Explorer&#8217; icon on panel to access pinned folders (e.g., <i>Desktop<\/i>, <i>Downloads<\/i> and <i>Documents<\/i>) quickly. <\/p>\n<p>Ubuntu has first implemented this feature in Ubuntu 21.10, though it seems to be not working properly due to <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/nautilus\/+bug\/1950075\" rel=\"noopener\" target=\"_blank\">bug<\/a>. <i><b>Ubuntu 20.04<\/b><\/i> may manually add the context (right-click) menu options so user can right-click on the &#8216;Files&#8217; icon to choose open favorite folders quickly.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/quick-access-folders.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/quick-access-folders.png\" alt=\"\" width=\"600\" height=\"318\" class=\"aligncenter size-full wp-image-35891\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/quick-access-folders.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/quick-access-folders-300x159.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Step 1: Copy File Manager .desktop file to local folder:<\/h3>\n<p>The file manager&#8217;s shortcut icon is handled by the relative <code>.desktop<\/code> file located in &#8220;\/usr\/local\/applications&#8221; directory. It&#8217;s recommended to copy the file to local user directory, so the changes will function for current user only.<\/p>\n<p>1. Press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. When it opens, copy the file to local directory via command:<\/p>\n<pre>sudo cp \/usr\/share\/applications\/org.gnome.Nautilus.desktop ~\/.local\/share\/applications\/<\/pre>\n<p>2. The file pasted into local directory is still owned by root. You may change the ownership by running command:<\/p>\n<pre>sudo chown $USER:$USER ~\/.local\/share\/applications\/org.gnome.Nautilus.desktop<\/pre>\n<p><i>Here <code>$USER<\/code> returns your current username.<\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop-600x229.webp\" alt=\"\" width=\"600\" height=\"229\" class=\"aligncenter size-large wp-image-35892\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop-600x229.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop-300x114.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop-768x293.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/copy-nautilus-desktop.webp 774w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Step 2: Edit the .desktop file and add more actions:<\/h3>\n<p>Now edit the <i>.desktop<\/i> file by running command in terminal:<\/p>\n<pre>gedit ~\/.local\/share\/applications\/org.gnome.Nautilus.desktop<\/pre>\n<p>This command will open the file in Gedit text editor. When it opens, do following steps one by one:<\/p>\n<p>1.) First, comment the &#8220;<b>DBusActivatable=true<\/b>&#8221; line by adding &#8216;<b>#<\/b>&#8216; at the beginning to disable it. Or, the &#8216;Exec&#8217; value will be overrided.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus-600x205.webp\" alt=\"\" width=\"600\" height=\"205\" class=\"aligncenter size-large wp-image-35893\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus-600x205.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus-300x102.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus-768x262.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/disable-nautilusdbus.webp 1007w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>2.) Add more values to &#8220;<b>Actions<\/b>&#8220;, such as <i>downloads<\/i>, <i>documents<\/i>, <i>videos<\/i> and whatever as you prefer. And, separate them via &#8216;<b>;<\/b>&#8216; without blank space.<\/p>\n<p>Accordingly, add the &#8220;[Desktop Action downloads]&#8221;, &#8220;[Desktop Action documents]&#8221;, &#8220;[Desktop Action videos]&#8221; segments in the bottom. And, each segment has:<\/p>\n<ul>\n<li>&#8220;<b>Name<\/b>&#8221; to display in the right click menu.<\/li>\n<li>&#8220;<b>Exec<\/b>&#8221; command to open the desired folder, usually <code>nautilus \/home\/USERNAME\/folder<\/code><\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions-600x382.webp\" alt=\"\" width=\"600\" height=\"382\" class=\"aligncenter size-large wp-image-35894\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions-600x382.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions-300x191.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions-768x489.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/nautilus-desktopactions.webp 1007w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Step 3: Restart Gnome Shell to apply change:<\/h3>\n<p>After saving the file, restart Gnome Shell. In Ubuntu 20.04 default Xorg session, simply press <b>Ctrl+Alt+F2<\/b>, then try <b>r<\/b> in pop-up dialog and hit Enter.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/restart-gnome.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/restart-gnome.jpg\" alt=\"\" width=\"471\" height=\"239\" class=\"aligncenter size-full wp-image-10248\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/restart-gnome.jpg 471w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/restart-gnome-450x228.jpg 450w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/a><\/p>\n<p>The &#8216;<b>Files<\/b>&#8216; icon in left dock panel should now take use of the <code>.desktop<\/code> file in user directory and provide the quick access folders you set via right-click menu.<\/p>\n<p>That&#8217;s all. Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>In Windows 10, user may right-click on the &#8216;File Explorer&#8217; icon on panel to access pinned folders (e.g., Desktop, Downloads and Documents) quickly. Ubuntu has first implemented this feature in Ubuntu 21.10, though it seems to be not working properly due to bug. Ubuntu 20.04 may manually add the context (right-click) menu options so user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":35890,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[689],"class_list":["post-35889","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-gnome"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/35889","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=35889"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/35889\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/35890"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=35889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=35889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=35889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}