<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Refresh icon view in App Drawer in real time]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">We wrote a small script and a desktop file to toogle Anbox via</p>
<pre><code>anbox-tool enable|disable
</code></pre>
<p dir="auto">see [<a href="https://wiki.ubuntuusers.de/Ubuntu_Touch/Anbox/#Automatisches-Umschalten-per-Icon" rel="nofollow ugc">https://wiki.ubuntuusers.de/Ubuntu_Touch/Anbox/#Automatisches-Umschalten-per-Icon</a>] .</p>
<p dir="auto">because Anbox is using energy, even when not in use. It works fine.</p>
<p dir="auto">Now I thought it would be nice to change the icon (like using a green one when Anbox is enabled, and a red one when it is disabled). I tried to use <code>cp</code> within the script to copy a new icon to <strong>home/phablet/.local/share/applications/</strong> . That works,  but it looks like the icons are cached somewhere, and are only  refreshed after unity8 is restarted, or the whole device.</p>
<p dir="auto">Would it be possible to change that in real time, so I could see just by the colour of the icon if Anbox is enabled or not?</p>
]]></description><link>https://forums.ubports.com/topic/3943/refresh-icon-view-in-app-drawer-in-real-time</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 18:24:41 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/3943.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Mar 2020 09:38:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Tue, 31 Mar 2020 09:27:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tobsend" aria-label="Profile: TobsEnd">@<bdi>TobsEnd</bdi></a><br />
Sorry, I didn't use chmod, but used a nautilus function to set it executable</p>
<p dir="auto"><code>ls -la</code> in the directory tells me:</p>
<p dir="auto"><code>rwxr-xr-x 1 heinrich heinrich   631 Mär 15 19:30 anboxtoggle.sh</code><br />
for the skript, so I guess you would have to use the sudo version.</p>
]]></description><link>https://forums.ubports.com/post/30388</link><guid isPermaLink="true">https://forums.ubports.com/post/30388</guid><dc:creator><![CDATA[hankschwie]]></dc:creator><pubDate>Tue, 31 Mar 2020 09:27:34 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sat, 28 Mar 2020 09:57:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hankschwie" aria-label="Profile: hankschwie">@<bdi>hankschwie</bdi></a> I do i have to use <code>chmod +x </code> or ```<br />
sudo chmod +x</p>
<pre><code class="language-to"></code></pre>
]]></description><link>https://forums.ubports.com/post/30300</link><guid isPermaLink="true">https://forums.ubports.com/post/30300</guid><dc:creator><![CDATA[TobsEnd]]></dc:creator><pubDate>Sat, 28 Mar 2020 09:57:46 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sat, 28 Mar 2020 08:45:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tobsend" aria-label="Profile: TobsEnd">@<bdi>TobsEnd</bdi></a><br />
Yes, you need to make the script executable. It will run without r/w rights later on.</p>
]]></description><link>https://forums.ubports.com/post/30299</link><guid isPermaLink="true">https://forums.ubports.com/post/30299</guid><dc:creator><![CDATA[hankschwie]]></dc:creator><pubDate>Sat, 28 Mar 2020 08:45:31 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Fri, 27 Mar 2020 22:03:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I tried to use the script, but it couldn't get it to work. I can see the red icon in the drawer but nothing happens when I push the button. Do I have to activate something so that the script can run properly?<br />
Do I need to make script executable with root rights?</p>
]]></description><link>https://forums.ubports.com/post/30287</link><guid isPermaLink="true">https://forums.ubports.com/post/30287</guid><dc:creator><![CDATA[TobsEnd]]></dc:creator><pubDate>Fri, 27 Mar 2020 22:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Mon, 16 Mar 2020 05:14:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisse" aria-label="Profile: chrisse">@<bdi>chrisse</bdi></a> Two Lomiri restarts <img src="https://forums.ubports.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=6722c86c489" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://forums.ubports.com/post/29976</link><guid isPermaLink="true">https://forums.ubports.com/post/29976</guid><dc:creator><![CDATA[Lakotaubp]]></dc:creator><pubDate>Mon, 16 Mar 2020 05:14:15 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 20:38:52 GMT]]></title><description><![CDATA[<p dir="auto">Two Unity8 restarts and it still works! Thanks!</p>
]]></description><link>https://forums.ubports.com/post/29972</link><guid isPermaLink="true">https://forums.ubports.com/post/29972</guid><dc:creator><![CDATA[chrisse]]></dc:creator><pubDate>Sun, 15 Mar 2020 20:38:52 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 19:49:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisse" aria-label="Profile: chrisse">@<bdi>chrisse</bdi></a></p>
<p dir="auto">Well, the icons survived a couple of unity8 restarts, and two device restarts, so it looks like the name was important...  For all anbox apps the names for the desktop files and their icons are identical except for the ending, so I thought that could do the trick.</p>
]]></description><link>https://forums.ubports.com/post/29965</link><guid isPermaLink="true">https://forums.ubports.com/post/29965</guid><dc:creator><![CDATA[hankschwie]]></dc:creator><pubDate>Sun, 15 Mar 2020 19:49:20 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 19:01:42 GMT]]></title><description><![CDATA[<p dir="auto">You're right, I just restarted Unity8 and they vanished.<br />
Tell me if your solution works before I transfer them again.<br />
Otherwise, I will transfer them to Downloads and copy them to ../applications everytime I restart Unity8 (not often)...</p>
]]></description><link>https://forums.ubports.com/post/29962</link><guid isPermaLink="true">https://forums.ubports.com/post/29962</guid><dc:creator><![CDATA[chrisse]]></dc:creator><pubDate>Sun, 15 Mar 2020 19:01:42 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 18:53:42 GMT]]></title><description><![CDATA[<p dir="auto">Hmmmm.... Don't know why, but the icons vanished from <strong>/home/phablet/.local/share/applications/</strong> after a restart of Unity8. I put them back in, but renamed them to match the desktop files, so they now are called <strong>anboxtoggleGREEN.png</strong> and <strong>anboxtoggleRED.png</strong>; changed that in the desktop files, too. Hope this will work permanently,</p>
]]></description><link>https://forums.ubports.com/post/29961</link><guid isPermaLink="true">https://forums.ubports.com/post/29961</guid><dc:creator><![CDATA[hankschwie]]></dc:creator><pubDate>Sun, 15 Mar 2020 18:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 18:37:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Everything works fine, thanks!</p>
]]></description><link>https://forums.ubports.com/post/29960</link><guid isPermaLink="true">https://forums.ubports.com/post/29960</guid><dc:creator><![CDATA[chrisse]]></dc:creator><pubDate>Sun, 15 Mar 2020 18:37:59 GMT</pubDate></item><item><title><![CDATA[Reply to Refresh icon view in App Drawer in real time on Sun, 15 Mar 2020 17:51:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I was able to solve this. I noticed that anbox apps are displayed immediately after installation, as soon as the desktop file is placed in <strong>/home/phablet/.local/share/applications</strong> . So I tried to work with two desktop files which are moved back and forth between <strong>/home/phablet/.local/share/applications</strong> and <strong>/home/phablet/Downloads</strong> . The <strong><a href="http://anboxtoggle.sh" rel="nofollow ugc">anboxtoggle.sh</a></strong> shovels those back and forth with each disable/enable run instead of the icons - they stay in place.</p>
<p dir="auto"><strong><a href="http://anboxtoogle.sh" rel="nofollow ugc">anboxtoogle.sh</a></strong> looks like this:</p>
<pre><code>#!/bin/bash
anboxtool=($(anbox-tool status)) 
atenabled=${anboxtool[5]}

if [ "$atenabled" == "YES" ]; then
      anbox-tool disable
	mv /home/phablet/Downloads/anboxtoggleRED.desktop /home/phablet/.local/share/applications/anboxtoggleRED.desktop
	mv /home/phablet/.local/share/applications/anboxtoggleGREEN.desktop /home/phablet/Downloads/anboxtoggleGREEN.desktop 
else
      anbox-tool enable
	mv /home/phablet/Downloads/anboxtoggleGREEN.desktop /home/phablet/.local/share/applications/anboxtoggleGREEN.desktop
	mv /home/phablet/.local/share/applications/anboxtoggleRED.desktop /home/phablet/Downloads/anboxtoggleRED.desktop 
fi
</code></pre>
<p dir="auto">The desktop file  <strong>anboxtoggleGREEN.desktop</strong>:</p>
<pre><code>[Desktop Entry]
Name=Anboxtoggle
Type=Application
Terminal=false
Icon=/home/phablet/.local/share/applications/anbox-green.png
Categories=Utility
Comment=Switch between anbox enabled and disabled
X-Ubuntu-Touch=true
Exec=/home/phablet/.local/share/applications/anboxtoggle.sh 
</code></pre>
<p dir="auto">For <strong>anboxtoggleRED.desktop</strong> you just need to change the icon name in the Icon line to <strong>anbox-red.png</strong>. You need two different icon pictures, called <strong>anbox-red.png</strong> and <strong>anbox-green.png</strong>, as well  (just grab some from the net, and change the colours with gimp or a similar program, if neccessary).<br />
Make the other files executable, and put the two icon files and one of the desktop files in <strong>/home/phablet/.local/share/applications/</strong>, the other <strong>desktop file in  /home/phablet/Downloads/</strong>. (If Anbox currently is runnig, put <strong>anboxRed.desktop</strong> in <strong>.../applications</strong>, if not <strong>anboxtoggleGREEN.desktop</strong>.)</p>
<p dir="auto">Now there should be just one icon in the app drawer, indicating if anbox is enabled or not, changing is colour with every call.</p>
<p dir="auto">Have fun!</p>
]]></description><link>https://forums.ubports.com/post/29952</link><guid isPermaLink="true">https://forums.ubports.com/post/29952</guid><dc:creator><![CDATA[hankschwie]]></dc:creator><pubDate>Sun, 15 Mar 2020 17:51:27 GMT</pubDate></item></channel></rss>