{"id":34956,"date":"2021-10-13T15:26:31","date_gmt":"2021-10-13T15:26:31","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=34956"},"modified":"2021-10-13T15:26:31","modified_gmt":"2021-10-13T15:26:31","slug":"enable-dark-flatpak-apps-ubuntu-linux-mint","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/10\/enable-dark-flatpak-apps-ubuntu-linux-mint\/","title":{"rendered":"Toggle Light &#038; Dark Mode for Flatpak Apps in Ubuntu 20.04+ \/ Linux Mint"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon-250x250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-34957\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-logo-icon.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>Using Flatpak apps in Linux? You may found that Flatpak app appearance does not change when toggling light &#038; dark mode or switching to another app theme.<\/p>\n<p>As more and more apps publish Linux packages via Flatpak, I have a few of them installed in my Ubuntu laptop. However, the apps stick to the light theme whenever I switches to dark mode in Appearance settings. <\/p>\n<p>Since Flatpak runs in sandbox and does not have permission to access the &#8220;\/usr&#8221; directory, it does not use system theme according to <a href=\"https:\/\/docs.flatpak.org\/en\/latest\/desktop-integration.html\" rel=\"noopener\" target=\"_blank\">the document<\/a>. So, <b>some popular GTK themes are packaged as Flatpaks<\/b>. And, it detects the current system app theme and tries to install the Flatpak version of the theme if available during app installation or update.<\/p>\n<p>I&#8217;m working with default Yaru theme in the most time, so it automatically installs Yaru theme flatpak package but leaves Yaru Dark not installed. When I switching to Yaru Dark, it can&#8217;t find the match theme so falls back to the default Adwaita.<\/p>\n<h3>Install GTK Themes in Flatpak:<\/h3>\n<p>As all I said, <b>the solution is install the themes you use as Flatpak packages<\/b>.<\/p>\n<p>For Ubuntu 20.04 and higher that use the default Yaru app theme, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal and run command:<\/p>\n<ul>\n<li>Install the Dark theme by running command:\n<pre>flatpak install flathub org.gtk.Gtk3theme.Yaru-dark<\/pre>\n<\/li>\n<li>Or install the light theme if not exist via command:\n<pre>flatpak install flathub org.gtk.Gtk3theme.Yaru-light<\/pre>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-yarudark.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-yarudark.png\" alt=\"\" width=\"600\" height=\"204\" class=\"aligncenter size-full wp-image-34959\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-yarudark.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-yarudark-300x102.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>There are also elementary stylesheet, Deepin GTK theme, Linux Mint&#8217;s Mint-Y in different colors, Arc, Numix, and other themes in Flatpak package format. You can <b>find more themes via command<\/b>:<\/p>\n<pre>flatpak search gtk3theme<\/pre>\n<p>Then install your prefer theme via &#8220;<code>flatpak install flathub app-id<\/code>&#8221; command.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme.webp\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme-600x327.webp\" alt=\"\" width=\"600\" height=\"327\" class=\"aligncenter size-large wp-image-34960\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme-600x327.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme-300x163.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme-768x418.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/flatpak-searchtheme.webp 1366w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>After that, change app theme via Gnome Tweaks or System Settings to see the magic!<\/p>\n<h3>Make theme working for Qt apps:<\/h3>\n<p>Though I don&#8217;t have Qt applications as Flatpaks, according to the document, you need to open terminal and run following commands one by one to install the required runtime libraries:<\/p>\n<pre>flatpak install org.kde.KStyle.Adwaita<\/pre>\n<pre>flatpak install org.kde.PlatformTheme.QGnomePlatform<\/pre>\n<p>That&#8217;s all. Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>Using Flatpak apps in Linux? You may found that Flatpak app appearance does not change when toggling light &#038; dark mode or switching to another app theme. As more and more apps publish Linux packages via Flatpak, I have a few of them installed in my Ubuntu laptop. However, the apps stick to the light [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34957,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1472],"class_list":["post-34956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-flatpak"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34956","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=34956"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34956\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34957"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=34956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=34956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=34956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}