{"id":139,"date":"2014-05-18T23:36:05","date_gmt":"2014-05-18T23:36:05","guid":{"rendered":"http:\/\/brucemyers.com\/?p=139"},"modified":"2020-09-15T14:37:44","modified_gmt":"2020-09-15T14:37:44","slug":"tweaking-ubuntu-unity-to-show-all-of-an-apps-windows","status":"publish","type":"post","link":"https:\/\/brucemyers.com\/?p=139","title":{"rendered":"Tweaking Ubuntu Unity To Show All Of An Apps Windows"},"content":{"rendered":"<p>In OS X, clicking on a dock icon shows all open windows for the app. In Ubuntu, clicking on a launcher icon only shows the most recently used open window. This is annoying if you want to copy files between two folders or view all Xpad note windows.<\/p>\n<h3>Ubuntu 18.04<\/h3>\n<p>In Terminal<br \/>\nsudo apt install dconf-tools<br \/>\ndconf-editor<br \/>\norg \/ gnome \/ shell \/ extensions \/ dash-to-dock<br \/>\nChange <code>click-action<\/code> custom value to <code>minimize<\/code><br \/>\nAnother change to match 16.04 functionality when scrolling over app icon:<br \/>\nChange <code>scroll-action<\/code> custom value to <code>cycle-windows<\/code><\/p>\n<p>For Ubuntu 16.04 read on.<br \/>\n<!--more--><\/p>\n<h3>Ubuntu 16.04<\/h3>\n<p>This has been reported as a bug <a href=\"https:\/\/bugs.launchpad.net\/unity\/+bug\/1055478\">here<\/a><br \/>\nA previous suggestion for how to change this is <a href=\"http:\/\/askubuntu.com\/questions\/127143\/how-do-i-revert-the-alt-tab-behavior-so-that-switching-to-an-app-brings-to-the-f\" title=\"workaround\">here<\/a><br \/>\nThe above suggestion does not work for Ubuntu 14.04 Unity 7.2.<br \/>\nUsing these <a href=\"http:\/\/askubuntu.com\/questions\/28470\/how-do-i-build-unity-from-source\">instructions<\/a>, I was able to figure out how to tweak and recompile Unity.<\/p>\n<p><strong>Warning: This is for advanced users only. Software updates can render the desktop unusable. To recover, Ctrl-Alt-F1, login, rm ~\/.compiz-1\/<\/strong><\/p>\n<p>1. Install the build dependancies.<br \/>\n<code>sudo apt-get build-dep unity<br \/>\nsudo apt-get build-dep nux<br \/>\n<\/code><br \/>\n2. Create a directory called \/SourceCache\/staging\/ or \/home\/''username''\/staging<\/p>\n<p>3. In that directory create a script called unity.sh containing the following to set environment variables.<br \/>\n<code><br \/>\n#!\/bin\/bash<\/code><\/p>\n<p><code>PREFIX=\/SourceCache\/staging<\/p>\n<p><\/code><code>export XDG_DATA_DIRS=\"$PREFIX\/share:$XDG_DATA_DIRS\"<br \/>\nexport LD_LIBRARY_PATH=\"$PREFIX\/lib\/\"<br \/>\nexport PKG_CONFIG_PATH=\"$PREFIX\/lib\/pkgconfig\/\"<br \/>\n<\/code><\/p>\n<p>4. Change the file permissions<br \/>\n<code><br \/>\nchmod +x unity.sh<br \/>\n<\/code><br \/>\nExecute the script once before doing builds.<\/p>\n<p>5. In the staging directory:<br \/>\n<code><br \/>\napt-get source unity<br \/>\n<\/code><\/p>\n<p>6. There will now be a unity... directory in the staging directory where ... is version information.<\/p>\n<p>7a. <strong>Ubuntu 14.04<\/strong> Open the file unity...\/launcher\/ApplicationLauncherIcon.cpp<\/p>\n<p>or<\/p>\n<p>7b. <strong>Ubuntu 16.04<\/strong> Open the file unity...\/launcher\/WindowedLauncherIcon.cpp<\/p>\n<p>8. Near the end of the ActivateLauncherIcon(ActionArg arg) method you will find the following lines:<br \/>\n<code><br \/>\nelse \/\/ #3 above<br \/>\n{<br \/>\nFocus(arg);<br \/>\n}<br \/>\n<\/code><\/p>\n<p>9. Change the code to the following and save:<br \/>\n<code><br \/>\nelse \/\/ #3 above<br \/>\n{<br \/>\nfor (auto const&amp; win : GetWindows(WindowFilter::USER_VISIBLE))<br \/>\nwm.Raise(win-&gt;window_id());<br \/>\nFocus(arg);<br \/>\n}<br \/>\n<code><\/code><\/code><\/p>\n<p><code><code>10. In the unity... directory<br \/>\n<code><br \/>\nmkdir build<br \/>\ncd build<br \/>\ncmake .. -DCMAKE_INSTALL_PREFIX=\/SourceCache\/staging\/ -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON<br \/>\nmake -j4<br \/>\nmake install<br \/>\n<code><br \/>\nThis builds Unity and installs it in ~\/.compiz-1<\/code><\/code><\/p>\n<p><code><code>11. Logout and login to use the custom version.<\/p>\n<p>To go back to the standard Unity, remove the ~\/.compiz-1 directory.<\/p>\n<p><strong>Updated June 7, 2016<\/strong>: Updated for Ubuntu 16.04<br \/>\n<strong>Updated October 24, 2018<\/strong>: Updated for Ubuntu 18.04<\/p>\n<p><\/code><\/code><\/code><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In OS X, clicking on a dock icon shows all open windows for the app. In Ubuntu, clicking on a launcher icon only shows the most recently used open window. This is annoying if you want to copy files between two folders or view all Xpad note windows. Ubuntu 18.04 In Terminal sudo apt install &hellip; <a href=\"https:\/\/brucemyers.com\/?p=139\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Tweaking Ubuntu Unity To Show All Of An Apps Windows<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[31],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-misc","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brucemyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":8,"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/brucemyers.com\/index.php?rest_route=\/wp\/v2\/posts\/139\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/brucemyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brucemyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brucemyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}