Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-05-09 01:00:55

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Viewnior icon - how to use previous version.

Spent too much time on this. I've tried the following folders to replace the new icon with the old pink one that is better on multiple fronts:

/usr/local/share/icons/hicolor/48x48/apps/
/usr/local/share/icons/hicolor/scalable/apps/

/usr/local/share/icons/Papirus/48x48/apps/
/usr/local/share/icons/Papirus/scalable/apps/

home folder

~/.local/share/icons/hicolor/48x48/apps/
/.local/share/icons/hicolor/scalable/apps/

~/.local/share/icons/Papirus/48x48/apps/
/.local/share/icons/Papirus/scalable/apps/

Each folder has the old (pink) multimedia-photo-viewer.svg and a symlink called viewnior.svg which points to it.

Nothing, even tried resetting with

'xfce4-panel -r'

Starting to think the icon is hard-coded?

Last edited by Sadfa (2022-05-09 10:57:57)

Offline

#2 2022-05-09 02:05:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Viewnior icon - how to use previous version.

Not sure if this is the case, but make sure you update the icon cache after placing a new icon into an existing icon's theme folders. For example:

sudo gtk-update-icon-cache -f /usr/share/icons/Papirus

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-05-09 11:14:47

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

THE CACHE!!

Thanks ToZ, it's been a while.

The 'hicolor' wasn't going to work because I'm using Papirus, yes.

BTW the icon in the Whisker menu is not changing (yet? May require restart?).

For anyone that wants the code for themselves (keeping in mind that the Whisker menu might not update, or not update without a restart?)

 ## Image Viewer tweaks
 ## --------------------
 ##  Open the Image Viewer, Viewnoir
 ##    Scrollbars just get in the way when you're trying to enjoy images.
 ##      Right-click to untick Scrollbar (click and drag mouse to scroll)
 ##      (or)
viewnior & sleep 1;  kill -9 $(pidof viewnior)
sed -i 's/show-scrollbar=true/show-scrollbar=false/g' ~/.config/viewnior/viewnior.conf

 ##  Someone thought it would be an idea to change the icon of Viewnior to a
 ##   gaudy, samey, blue, green and yellow one. To fix:
sudo mkdir -p /usr/local/share/icons/Papirus/{16x16,22x22,24x24,32x32,48x48,64x64,scalable}/apps/

 ##  Create the icon svgs themselves (scraped from Papirus, sorry I didn't see
 ##   any 96x96 or 128x128 version)

sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
 <path fill="#ff766a" d="m1 1c-1 0-1 1-1 1v9h16v-9s0-1-1-1z"/>
 <path fill="#d22f7a" d="m0 11v3c0 1 1 1 1 1h14c1 0 1-1 1-1v-3z"/>
 <path fill="#fef8e2" fill-rule="evenodd" d="m11 4c1.1046 0 2 0.89543 2 2s-0.895 2-2 2c-1.1046 0-2-0.8954-2-2s0.8954-2 2-2z"/>
 <path style="fill:#3f3f3f" d="m 0,10.999997 v -0.52123 c 0,0 1.1538,-0.8686522 1.4782,-0.9444509 0.32439,-0.075821 0.70748,0.1857574 1.1012,0.2705865 0.39371,0.084373 0.98149,0.1986404 1.1649,0.2057784 0.18345,0.0068 0.51542,-0.018243 0.90113,-0.044923 0.38571,-0.025996 1.0244,-0.04994 1.2236,-0.047431 0.19921,0 0.6965,0.031241 1.2266,0.068182 0.5301,0.036942 1.2582,0.098853 1.4234,0.1161491 0.1652,0.0171 0.35938,0.04903 0.57974,0.08369 0.22036,0.03443 0.60186,0.08631 0.73683,0.100677 0.13496,0.01402 0.44784,0.06317 0.81088,0.101133 0.36303,0.03808 0.94399,0.05108 1.1118,0.03694 0.16778,-0.01414 0.51944,-0.355643 0.91135,-0.4861923 0.3919,-0.130527 0.82403,-0.2500399 1.1527,-0.2204866 0.329,0.029416 2.178,0.7603809 2.178,0.7603809 v 0.521219 h -14.058 z"/>
</svg>' > /usr/local/share/icons/Papirus/16x16/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" version="1">
 <path style="fill:#ff766a" d="m 2,2.00001 c -0.554,0 -1,0.446 -1,1 v 12 h 20 v -12 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 15,6.50011 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 15,6.00011 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="m 2.0005,2.00021 c -0.554,0 -1,0.446 -1,1 V 3.5002 c 0,-0.55399 0.44599,-0.99998 0.99998,-0.99998 h 18 c 0.554,0 1,0.446 1,1 v -0.5 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="fill:#d22f7a" d="m 1.0005,15.00001 v 3.9999 c 0,0.55399 0.44599,0.99998 0.99998,0.99998 h 18 c 0.554,0 1,-0.446 1,-1 v -3.9999 z"/>
 <path style="fill:#3f3f3f" d="m 1,15.00001 v -0.695046 c 0,0 1.4422,-1.158224 1.8477,-1.259254 0.40547,-0.101054 0.88433,-0.01879 1.3764,0.09416 0.49212,0.112583 1.2268,0.305762 1.4561,0.315285 0.2293,0.0097 0.64423,-0.02432 1.1264,-0.05978 0.48213,-0.03472 1.2804,-0.06672 1.5294,-0.06324 0.24899,0 0.87058,0.04171 1.5332,0.0909 0.66258,0.04932 1.5727,0.131764 1.7792,0.154835 0.20649,0.02292 0.44921,0.06532 0.72468,0.111538 0.27544,0.04585 0.75228,0.115149 0.92103,0.134195 0.16869,0.01873 0.55979,0.08416 1.0136,0.134962 0.45378,0.05072 1.18,0.06811 1.3897,0.04932 0.20971,-0.01879 0.64928,-0.486804 1.1392,-0.660891 0.48986,-0.174014 1.03,-0.333373 1.4409,-0.293968 0.411,0.03892 2.722,1.250118 2.722,1.250118 v 0.694985 h -17.571 z"/>
 <path style="opacity:0.2" d="M 1.0005,19.00001 V 19.5 c 0,0.554 0.446,1 1,1 h 18 c 0.554,0 1,-0.446 1,-1 v -0.49999 c 0,0.55399 -0.44599,0.99998 -0.99998,0.99998 h -18 c -0.55399,0 -0.99998,-0.44599 -0.99998,-0.99998 z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="20" height=".5" x="1" y="15"/>
</svg>' > /usr/local/share/icons/Papirus/22x22/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1">
 <path style="fill:#ff766a" d="M 3,3 C 2.446,3 2,3.446 2,4 V 16 H 22 V 4 C 22,3.446 21.554,3 21,3 Z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 16,7.5001 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 16,7.0001 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="m 3.0005,3.0002 c -0.554,0 -1,0.446 -1,1 v 0.49999 c 0,-0.55399 0.44599,-0.99998 0.99998,-0.99998 h 18 c 0.554,0 1,0.446 1,1 v -0.5 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="fill:#d22f7a" d="m 2.0005,16 v 3.9999 c 0,0.55399 0.44599,0.99998 0.99998,0.99998 h 18 c 0.554,0 1,-0.446 1,-1 v -3.9999 z"/>
 <path style="fill:#3f3f3f" d="m 2,16 v -0.695046 c 0,0 1.4422,-1.158224 1.8477,-1.259254 0.40547,-0.101054 0.88433,-0.01879 1.3764,0.09416 0.49212,0.112583 1.2268,0.305762 1.4561,0.315285 0.2293,0.0097 0.64423,-0.02432 1.1264,-0.05978 0.48213,-0.03472 1.2804,-0.06672 1.5294,-0.06324 0.24899,0 0.87058,0.04171 1.5332,0.0909 0.66258,0.04932 1.5727,0.131764 1.7792,0.154835 0.20649,0.02292 0.44921,0.06532 0.72468,0.111538 0.27544,0.04585 0.75228,0.115149 0.92103,0.134195 0.16869,0.01873 0.55979,0.08416 1.0136,0.134962 0.45378,0.05072 1.18,0.06811 1.3897,0.04932 0.20971,-0.01879 0.64928,-0.486804 1.1392,-0.660891 0.48986,-0.174014 1.03,-0.333373 1.4409,-0.293968 0.411,0.03892 2.722,1.250118 2.722,1.250118 v 0.694985 h -17.571 z"/>
 <path style="opacity:0.2" d="m 2.0005,20 v 0.49999 c 0,0.554 0.446,1 1,1 h 18 c 0.554,0 1,-0.446 1,-1 V 20 c 0,0.55399 -0.44599,0.99998 -0.99998,0.99998 h -18 C 2.44653,20.99998 2.00054,20.55399 2.00054,20 Z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="20" height=".5" x="2" y="16"/>
</svg>' > /usr/local/share/icons/Papirus/24x24/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" version="1">
 <path opacity=".2" d="m2 26.5v1c0 0.831 0.669 1.5 1.5 1.5h25c0.831 0 1.5-0.669 1.5-1.5v-1c0 0.831-0.669 1.5-1.5 1.5h-25c-0.831 0-1.5-0.669-1.5-1.5z"/>
 <path fill="#ff766a" d="m3.5 4c-0.831 0-1.5 0.669-1.5 1.5v16.5h28v-16.5c0-0.831-0.669-1.5-1.5-1.5h-25zm26.094 23.5c-0.25305 0.25267-0.6122 0.40475-1 0.40625l-25.094 0.094h25c0.43994 0 0.8198-0.20022 1.0938-0.5z"/>
 <path fill="#fff" opacity=".2" d="m3.5 4c-0.831 0-1.5 0.669-1.5 1.5v1c0-0.831 0.669-1.5 1.5-1.5h25c0.831 0 1.5 0.669 1.5 1.5v-1c0-0.831-0.669-1.5-1.5-1.5h-25z"/>
 <path fill-rule="evenodd" opacity=".2" d="m22 10c2.2091 0 4 1.7909 4 4s-1.7909 4-4 4-4-1.7909-4-4 1.7909-4 4-4z"/>
 <path fill="#fffee4" fill-rule="evenodd" d="m22 9c2.2091 0 4 1.7909 4 4s-1.7909 4-4 4-4-1.7909-4-4 1.7909-4 4-4z"/>
 <path fill="#d22f7a" d="m2 22v4.5s0 1.506 1.5 1.5l25.1-0.1c0.776-0.003 1.4-0.624 1.4-1.4v-4.5z"/>
 <path style="fill:#3f3f3f" d="m 2,21.999964 v -1.042419 c 0,0 2.0192793,-1.73732 2.5869016,-1.888862 0.5677023,-0.151568 1.2381487,-0.02828 1.9271757,0.141248 0.6890171,0.168871 1.7176675,0.897475 2.0386801,0.911756 0.3210526,0.01459 0.9020155,-0.03648 1.5770616,-0.08965 0.675027,-0.05212 1.792671,-0.100072 2.141285,-0.09486 0.348623,0 1.218947,0.06255 2.146584,0.136336 0.927706,0.07401 2.201886,0.197655 2.490998,0.232251 0.289111,0.0344 0.628934,0.09799 1.01464,0.167321 0.385645,0.0688 1.053341,0.172715 1.28945,0.201291 0.236179,0.02801 0.783751,0.126263 1.419056,0.202437 0.635325,0.0761 1.652065,0.102157 1.945676,0.07401 0.293622,-0.02828 0.909066,-0.211227 1.594963,-0.472352 0.685847,-0.261022 1.442157,-0.500048 2.017379,-0.440943 C 26.763873,20.097468 30,20.957698 30,20.957698 v 1.042418 H 5.3990335 Z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="28" height="1" x="2" y="22"/>
</svg>' > /usr/local/share/icons/Papirus/32x32/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
 <path fill="#ff766a" d="m44 40v-32c0-1.108-0.892-2-2-2h-36c-1.108 0-2 0.892-2 2v32c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2z"/>
 <path fill-rule="evenodd" opacity=".2" d="m32 15c3.3137 0 6 2.6863 6 6s-2.6863 6-6 6-6-2.6863-6-6 2.6863-6 6-6z"/>
 <path fill="#fffee4" fill-rule="evenodd" d="m32 14c3.3137 0 6 2.6863 6 6s-2.6863 6-6 6-6-2.6863-6-6 2.6863-6 6-6z"/>
 <path fill="#fff" opacity=".2" d="m6 6c-1.108 0-2 0.892-2 2v1c0-1.108 0.892-2 2-2h36c1.108 0 2 0.892 2 2v-1c0-1.108-0.892-2-2-2z"/>
 <path fill="#d22f7a" d="m4 32v8c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2v-8z"/>
 <path style="fill:#3f3f3f" d="m 4,32 v -1.390108 c 0,0 2.8845,-2.316482 3.6955,-2.518491 0.81097,-0.202107 1.7687,-0.03759 2.7529,0.188328 0.98427,0.225177 2.4537,1.029502 2.9123,1.048535 0.45862,0.01945 1.2885,-0.04865 2.2528,-0.119546 0.96428,-0.06944 2.5609,-0.13344 3.0589,-0.12648 0.498,0 1.7412,0.08343 3.0665,0.181796 1.3252,0.09864 3.1455,0.263536 3.5584,0.309679 0.41299,0.04585 0.89844,0.130654 1.4494,0.223087 0.5509,0.09171 1.5046,0.230308 1.8421,0.268401 0.33739,0.03745 1.1196,0.168322 2.0272,0.269922 0.90758,0.101426 2.36,0.136213 2.7794,0.09864 0.41944,-0.03759 1.2986,-0.414608 2.2784,-0.762792 0.97975,-0.348037 2.0601,-0.666753 2.8818,-0.587943 C 39.37735,29.162187 44,30.609795 44,30.609795 v 1.389986 H 8.858 Z"/>
 <path opacity=".2" d="m4 40v1c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2v-1c0 1.108-0.892 2-2 2h-36c-1.108 0-2-0.892-2-2z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="40" height="1" x="4" y="32"/>
</svg>' > /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
 <path style="opacity:0.2" d="m 4,52 0,2 c 0,1.662 1.338,3 3,3 l 50,0 c 1.662,0 3,-1.338 3,-3 l 0,-2 c 0,1.662 -1.338,3 -3,3 L 7,55 C 5.338,55 4,53.662 4,52 Z"/>
 <path style="fill:#ff766a" d="M 7,8 C 5.338,8 4,9.338 4,11 l 0,33 56,0 0,-33 C 60,9.338 58.662,8 57,8 L 7,8 Z m 52.188,47 c -0.5061,0.50534 -1.2244,0.8095 -2,0.8125 L 7,56.0005 l 50,0 c 0.87988,0 1.6396,-0.40044 2.1876,-1 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="M 7 8 C 5.338 8 4 9.338 4 11 L 4 12 C 4 10.338 5.338 9 7 9 L 57 9 C 58.662 9 60 10.338 60 12 L 60 11 C 60 9.338 58.662 8 57 8 L 7 8 z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 44,19 c 4.4182,0 8,3.5818 8,8 0,4.4182 -3.5818,8 -8,8 -4.4182,0 -8,-3.5818 -8,-8 0,-4.4182 3.5818,-8 8,-8 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 44,18 c 4.4182,0 8,3.5818 8,8 0,4.4182 -3.5818,8 -8,8 -4.4182,0 -8,-3.5818 -8,-8 0,-4.4182 3.5818,-8 8,-8 z"/>
 <path style="fill:#d22f7a" d="m 4,44 0,9 c 0,0 0,3.012 3,3 L 57.2,55.8 C 58.752,55.794 60,54.552 60,53 l 0,-9 z"/>
 <path style="fill:#3f3f3f" d="m 4,43.999979 v -1.737364 c 0,0 4.0385587,-2.895534 5.1738033,-3.148103 1.1354047,-0.252613 2.4762977,-0.04713 3.8543517,0.235412 1.378034,0.281453 3.435335,1.06208 4.07736,1.085883 0.642105,0.02432 1.804031,-0.06081 3.154124,-0.149414 1.350053,-0.08687 3.585341,-0.166786 4.282568,-0.1581 0.697247,0 2.437896,0.104242 4.293169,0.227226 1.855413,0.123354 4.403773,0.329426 4.981995,0.387085 0.578223,0.05733 1.25787,0.163313 2.02928,0.278869 0.77129,0.114666 2.106683,0.28786 2.578901,0.335485 0.472359,0.04669 1.567502,0.210438 2.838112,0.337396 1.27065,0.126828 3.30413,0.170261 3.891353,0.123352 0.587243,-0.04713 1.818131,-0.519043 3.189925,-0.954253 1.371694,-0.435036 2.884313,-0.833414 4.034759,-0.734905 C 53.527746,40.228448 60,42.262876 60,42.262876 V 44.00024 H 10.798067 Z"/>
 <path style="fill:#ffffff;opacity:0.1" d="M 4 44 L 4 45 L 60 45 L 60 44 L 4 44 z"/>
</svg>' > /usr/local/share/icons/Papirus/64x64/apps/multimedia-photo-viewer.svg


 ##   Create the actual viewnior links...
sudo ln -s /usr/local/share/icons/Papirus/16x16/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/16x16/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/22x22/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/22x22/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/24x24/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/24x24/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/32x32/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/32x32/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/48x48/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/64x64/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/64x64/apps/viewnior.svg

 ##   ...including what seems to be the thing to do, which is use the 48x48 icon as a 'scalable' icon?
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/scalable/apps/multimedia-photo-viewer.svg
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/scalable/apps/viewnior.svg

 ##   Update icon cache
sudo gtk-update-icon-cache -f /usr/share/icons/Papirus

I may have removed my detest for GitHub in the OP but I do still detest GitHub strongly.

---


EDIT: WOOPS!

I forgot mimetypes for applications like Default Applications and hopefully if this ticket is added and acted upon, apps like Thunar (right-click menu), 'Open with...' etc.

Again, thanks ToZ ('for' the loop trick smile )!

 ##   Don't forget mimetypes, application-vnd.kde.kphotoalbum-import.svg
 ##                           x-content-image-dcf.svg
 ##                           x-content-image-picturecd.svg

 ##   Setup 'mimetypes' folders
cd /usr/local/share/icons/Papirus/
sudo mkdir -p /usr/local/share/icons/Papirus/{16x16,22x22,24x24,32x32,48x48,64x64}/mimetypes/
sudo mkdir -p /usr/local/share/icons/Papirus/{96x96,128x128}/

 ##   The '96' folder cleverly symlinks to '48', and likewise '128' to '64'.
sudo ln -s /usr/local/share/icons/Papirus/48x48/mimetypes  96x96/mimetypes
sudo ln -s /usr/local/share/icons/Papirus/64x64/mimetypes  128x128/mimetypes

 ##   Symlink to icons
for i in 16 22 24 32 48 64; do
  sudo ln -s /usr/local/share/icons/Papirus/"$i"x"$i"/apps/multimedia-photo-viewer.svg \
                                            "$i"x"$i"/mimetypes/application-vnd.kde.kphotoalbum-import.svg

  sudo ln -s /usr/local/share/icons/Papirus/"$i"x"$i"/apps/multimedia-photo-viewer.svg \
                                            "$i"x"$i"/mimetypes/x-content-image-dcf.svg

  sudo ln -s /usr/local/share/icons/Papirus/"$i"x"$i"/apps/multimedia-photo-viewer.svg \
                                            "$i"x"$i"/mimetypes/x-content-image-picturecd.svg
done;


 ##   Again, update icon cache
sudo gtk-update-icon-cache -f /usr/share/icons/Papirus

Last edited by Sadfa (2022-06-07 05:08:15)

Offline

#4 2022-06-02 03:36:01

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

Hi team and Toz, my installs still have this problem with the Viewnior icons being different in different places and friend isn't appreciating this. I'm not either, tbh. Any ideas why the  above icon changes are not propagating to things like the Whisker Menu, Thunar's context menu (for image files)? It is thankfully working in the Window Buttons area and in the top left of the Viewnior app itself when open.

In case I didn't mention earlier, I really need to  avoid making duplicate copies of the '.desktop' files so if this can be solved at the icon level using  /usr/local/share/icons that would be much preferred.

I tried the advice here (https://stackoverflow.com/questions/718 … a-portable) and added a png file (rather than an svg file) to the 48x48/apps/ folder but alas nothing.

I made sure to place the files in both Papirus and Papirus-Maia folders and tried:

sudo gtk-update-icon-cache -f /usr/share/icons/Papirus
sudo gtk-update-icon-cache -f /usr/share/icons/Papirus-Maia

 # and also...
xfce4-panel -r

but to no avail.

Offline

#5 2022-06-02 09:54:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Viewnior icon - how to use previous version.

Sadfa wrote:

above icon changes are not propagating to things like the Whisker Menu

If you've edit the item in Whiskermenu, it will have created a new .desktop file in ~/.local/share/applications that may specify another icon name. This will take precedence. You can delete that .desktop file so that Whiskermenu uses the default icon.

Thunar's context menu (for image files)?

These are the files in the icon theme's "mime" directories. If you want to change the mime icon, you will need to follow the same process for these icons.


I tried the advice here (https://stackoverflow.com/questions/718 … a-portable) and added a png file (rather than an svg file) to the 48x48/apps/ folder but alas nothing.

Depending on the theme and where you put the file, mixing svg and png might not work.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2022-06-03 03:10:02

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

Hi Toz! Thanks for your response,

ToZ wrote:

If you've edit the item in Whiskermenu, it will have created a new .desktop file in ~/.local/share/applications that may specify another icon name.

Alas, not the origin of the problem. I made certain not to edit it like that, ensuring no custom '.desktop' file and have checked that folder too.

ToZ wrote:

These are the files in the icon theme's "mime" directories. If you want to change the mime icon, you will need to follow the same process for these icons.

Is there a way to do this using /usr/local/share/icon automatically?

Btw, can also report the 'Select Application' application uses the incorrect icon for Viewnior, another application, and a few different 'x-content/' mimetypes.


ToZ wrote:

Depending on the theme and where you put the file, mixing svg and png might not work.

I tried svg and png both, both together in the folder at the same time and on their own in the folders, which are:

/usr/local/share/icons/Papirus/48x48/apps/
/usr/local/share/icons/Papirus-Maia/48x48/apps/

EDIT: Also tried only the svg files (ie. multimedia-photo-viewer.svg and symlinked viewnior.svg) in the following locations, running the 'cache update' command above (adjusted for each different theme, obviously) and `xfce4-panel -r'
/usr/local/share/icons/ePapirus/48x48/apps/
/usr/local/share/icons/Papirus-Dark/48x48/apps/
/usr/local/share/icons/Papirus-Light/48x48/apps/
/usr/local/share/icons/Papirus-Maia-Dark/48x48/apps/
/usr/local/share/icons/Papirus-Maia-Light/48x48/apps/
/usr/local/share/icons/Papirus/
/usr/local/share/icons/Papirus-Maia/
/usr/local/share/icons/ePapirus/
END EDIT

Have also tried resetting system. sad

This is hard. Online resources don't seem to reach a proper conclusion, which is why I'm also trying equally hard to fix this the proper way + using tools/resources that should be used.

Last edited by Sadfa (2022-06-03 03:43:41)

Offline

#7 2022-06-03 11:25:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Viewnior icon - how to use previous version.

Here is the process that I use to override icons from an icon theme.

First, I make a directories-only copy of the icon theme I want to override. We'll use Papirus as our base (for the base, you want to use as complete a theme as possible):

cd /usr/share/icons/Papirus/ && find .  -type d -exec mkdir -p "/home/toz/.icons/customPapirus/{}" \;

...replace the destination folder as required.

Second, copy over the Papirus/index,html file over to your newly created theme:

cp /usr/share/icons/Papirus/index.html /home/toz/.icons/customPapirus

Third, edit the index.html file you just copied over and make the following changes:
- change the name to "customPapirus"
- Optionally change the comment
- change the "Inherits=" line to inherit from your current theme. If your current theme is Papirus-Dark-Maia, then:

Inherits=Papirus-Dark-Maia

...what this means is that if the system can't find any given icon in your custom icon theme, it will then search Papirus-Dark-Maia, and if it can't find it there it will continue to traverse the Inherits= entries of each theme until it finds one. For example:

[Icon Theme]
Name=customPapirus
Comment=custom Papirus icon theme
Inherits=Papirus-Dark-Maia
.....

Now, you're new icon theme is set up. Since we haven't added any icons to it, if you select it, it will act exactly as Papirus-Dark-Maia. Any new icons that we want to override, we will add to our custom theme.

Lets override the viewnior app icon. If you look at the contents of the viewnior package, you will see that it ships an icon and puts it in the following directories:
- /usr/share/icons/hicolor/16x16
- /usr/share/icons/hicolor/22x22
- /usr/share/icons/hicolor/24x24
- /usr/share/icons/hicolor/32x32
- /usr/share/icons/hicolor/48x48
- /usr/share/icons/hicolor/scalable/apps
...this gives us an idea of where to put the replacement icon images. Also note, that the Papirus icon theme uses svg image.

In this example, I'm going to link the existing multimedia-photo-viewer.svg file to viewnior.svg (you can also add a new file here):

cd /home/toz/.icons/customPapirus
for i in 8 16 18 22 24 32 42 48 64 84 96 128; do ln -s /usr/share/icons/Papirus/"$i"x"$i"/apps/multimedia-photo-viewer.svg "$i"x"$i"/apps/viewnior.svg; done

...don't worry about the errors, it just means the icon doesn't exist in the source directory and can be skipped.

Now update the icon cache for your new icon theme:

gtk-update-icon-cache -f /home/toz/.icons/customPapirus

...and assuming your new icon theme has been selected, start viewnior to see it using the new icon in the tasklist (window buttons):
v1.png
Check whiskermenu to see the new icon:
v2.png
and right-click on an image in thunar and see its icon displayed in the Open With dialog:
v3.png


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2022-06-03 15:53:53

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

Brilliant ToZ,

I think I might know where I went wrong, I wasn't placing/using an 'index.theme' file!

I did an attempt in the /usr/local/share/ folder (rather than in the local /home/sadfa/ folder. and it didn't work but may I need to add all the files like you did not just most of them. Should the new "theme" appear in the 'Appearance' window > 'Icons' tab because its not for some reason.

Will report soon.

Thanks!!

Offline

#9 2022-06-03 17:47:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Viewnior icon - how to use previous version.

Sadfa wrote:

I did an attempt in the /usr/local/share/ folder (rather than in the local /home/sadfa/ folder.

That folder is write protected so you'll need to run the commands as root, or within a root terminal.

Should the new "theme" appear in the 'Appearance' window > 'Icons' tab because its not for some reason.

Yes it should, but you need to close out and re-open the appearance settings dialog for it to be recognized.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2022-06-04 04:09:21

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

Thanks ToZ, smile it works after I copied the correct 'index.theme' file. Initially I copied the 'Papirus-Maia' one thinking it would be the correct in my case, but it has no 'app' folders at all! Also made another mistake smile

As elated as I am I think that I've discovered an inconsistency. I'd like to propose a ticket despite being unable to post to GNOME Gitlab:

TO BE ADDED to the GNOME GITLAB (see below) wrote:

Title: INHERITED icon themes non-customizable from local folder.

Priority: High (due to others having problems)

Description:
I think I've discovered an inconsistency, which needs fixing because others online have tried and failed to solve it.

Previously [I improved the folder icons that are a part of Papirus-Maia](https://forum.xfce.org/viewtopic.php?pid=67364). That worked without requiring I copy an 'index.theme' file to create a whole new theme, whereas it seems when a theme falls back to another in the inheritance chain, gtk fails to check first for icons in /usr/local/share/icons/ folder.

I put forward that this is an oversight and bug. The need to [create a whole new theme, thoughtfully explained here](https://forum.xfce.org/viewtopic.php?pid=67345#p67345) adds extra layers of needless redundancy that are not warranted and could lead to problems in future. I don't believe this level of complexity is warranted for non-power users nor even for most power users unless they are developing an icon pack, it has caused quite a bit of confusion online and a number of forums have failed to explain how to do it as ToZ so clearly has. I put forward that the same process of checking first the "local" folder, needs to occur for themes in the "Inherits" chain.

The person who identified this issue will respond via the [Xfce forum here](https://forum.xfce.org/viewtopic.php?pid=67345), they have been unable to use the GNOME Gitlab.

I looked at https://gitlab.gnome.org/Community/gent … icon-cache and found no tickets related to 'inherited' or 'inherits', so it'd be great if someone may add it, please.

EDIT:

EDIT: I've struck out my previous thought about it being a GTK issue, and am referring the issue to maintainers of the Whisker Menu and Thunar (see below)

As such, I think I'll actually go back on the setup, and adopt the basic folder structure that doesn't yet work (ie.. a 'Papirus' folder with no index.theme). I'll inform the friend that an inconsistency may need resolving first.

Thanks in advance to anyone who posts this ticket on my behalf or who explains why I'm incorrect.

Last edited by Sadfa (2022-06-07 07:21:54)

Offline

#11 2022-06-05 00:46:11

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

Hi folks and ToZ,

As I remember, unfortunately the GNOME Gitlab does indeed require Google ReCapture and that means they are also basically lying when they say that "it doesn't involve any third-party authentication mechanism" (https://gitlab.gnome.org/users/sign_up). Google in some respects is an authentication mechanism and may be used to identify people depending on their security level.

If someone would be so kind as to post the above ticket, or explain why I'm incorrect, I'd be extra, SUPER-DUPER appreciative. smile

EDIT: struck out for same reason.

Last edited by Sadfa (2022-06-07 07:24:06)

Offline

#12 2022-06-05 01:14:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Viewnior icon - how to use previous version.

I don't think its a bug that you are seeing. It is working the way it is intended. Although you can copy icons into an existing icon theme's directories, you need to make sure that the icon theme is capable of displaying them (there are a lot of idiosyncrasies that need to be considered). The best way to do this is to contact the icon theme creator and ask them to add the icons.

My approach is simply a workaround that has you create your own custom theme that inherits from another theme - still allowed as per the icon theme spec.

I don't think this is a gnome bug.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2022-06-05 06:52:22

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

To me, the main idiosyncrasy is that its not consistent. I did the same thing for Papirus-Maia,I put SVG (the same filetype) into a folder structure that matches, and there is nothing in the index.theme file that expressly prohibits this.

Maybe I need a more concrete example of how this is not an extensibility flaw/bug. A person should be able to extend upon a theme without bothering the maintainer. New theme's should be reserved for a new theme eg. a person wants to draw the icons in a watercolour, paper cut-out style. To me that equals making a new theme. Adjusting a hue in an icon is not cause to contact the maintainer or make a new theme.

Extensibility needs to be taken into account and it looks to me like the 'chosen theme' is extensible but the 'inherited theme' is not. To me, it is this a basic implementation flaw that creates confusion online and unanswered problems.

As a highly skilled person, it may not difficult for someone like yourself, but for me and at least three others who tried to ask online recently it was difficult. Noone in those forums could instruct them. Even when your instructions were great I made a couple mistakes. I would say that one in 30 people will ask about this themselves, as it is cosmetic. This means maybe about 100 people are bothered in some way by this.

Maybe I'm not seeing something. I need to see that it should be this difficult. A new theme is overkill in my opinion and I am uncomfortable to suggesting this to anyone.

EDIT: Actually maybe I am mistaken. I forget that the intuitive method works for the Window Buttons, the Workspace Switcher and in the App itself, just not for the Whisker Menu, Thunar Right-click menu and the Select Applications menu. I'll check myself soon if the mimetypes folder (I accidentally removed it) fixes the latter. How might the problem arise only in those few apps?

EDIT 2: As promised, reporting back to say unfortunately the Thunar right-click menu and the Select Applications app DO NOT use /usr/local/ without making a new theme. I'll make a ticket and again report back when done so smile.

Last edited by Sadfa (2022-06-06 05:34:54)

Offline

#14 2022-06-06 10:20:18

Sadfa
Member
Registered: 2021-03-27
Posts: 47

Re: Viewnior icon - how to use previous version.

I'd like to propose a ticket for the Thunar and xfce-panel repos despite being unable to post to Xfce Gitlab due to Google ReCapture:

TO BE ADDED to the XFCE GITLAB (see below) wrote:

Title: Icons in /usr/local/share/icons/ not adopted in Whisker Menu

Priority: High (due to others having problems)

Description:
An inconsistency exists, which needs fixing because others online have tried and failed to solve it.

Placing a custom icon for, eg. Viewnior into /usr/local/share/icons/Papirus/ [as described here](https://forum.xfce.org/viewtopic.php?pid=67091#p67091) works fine for the Window Buttons, the Workspace Switcher, the Default Applications app and the Viewnior App itself. Strangely, however the Whisker Menu, Thunar's menu when right-clicking on an image, the Open With... app ignore the user's attempt to extend the theme.

I put forward that this is inconsistent, and an oversight/bug. The need to [create a whole new theme, thoughtfully explained here](https://forum.xfce.org/viewtopic.php?pid=67345#p67345) adds needless layers of redundancy that are not warranted, could lead to problems in future, but importantly its not semantically correct. Unless a person is really producing many icons, a theme stylistically different from the current, this complexity is unwarranted, not for non-power users nor even for most power users. On various forums in the lead up to my OP, I realized it caused confusion. Forums failed to answer how to solve it as ToZ so clearly has.

Xfce does need to be consistent, and I put forward that the ability to extend upon a theme must be possible if the exact same folder and file structure is used, eg:

/usr/local/share/icons/Papirus/16x16/apps/viewnior.svg

The person who identified this issue will respond via the [Xfce forum here](https://forum.xfce.org/viewtopic.php?pid=67345), they have been unable to use the Xfce Gitlab due to Google ReCapture.

Again thanks in advance to anyone who posts it.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 12 queries executed - Memory usage: 717.35 KiB (Peak: 766.63 KiB) ]