Self-challenge to report disks like Windows

Thank you @ricmarques,
I really wanted to give you a :heart: but I discovered I completely used up my quota for this day :joy:

2 Likes

@tkn , @ricmarques ,

Would you be willing to share the output from your use of the command:

findmnt -D -t nosquashfs,notmpfs

so that I can accumulate some test cases for simullating real environments? I don’t have network-mounted drives.

1 Like

server lake

SOURCE          FSTYPE   SIZE   USED  AVAIL USE% TARGET
//nas/public    cifs   457.4G 113.4G 343.9G  25% /home/user/nas
//nvr/test      cifs   453.9G  90.6G 363.3G  20% /home/user/test
//truenas/share cifs      21T  88.7G  20.9T   0% /home/user/share

server cw

SOURCE          FSTYPE SIZE  USED AVAIL USE% TARGET
//truenas/share cifs    21T 88.7G 20.9T   0% /home/user/share
3 Likes

Here it is:

SOURCE         FSTYPE        SIZE   USED  AVAIL USE% TARGET
udev           devtmpfs      7,7G    44K   7,7G   0% /dev
/dev/nvme0n1p6 ext4         51,2G  24,7G  23,9G  48% /
/dev/nvme0n1p7 ext4        572,3G 116,7G 426,4G  20% /home
portal         fuse.portal                           /root/.cache/doc
3 Likes

I don’t have network mounted shares in this machine, so my output is similar to @tkn’s (the only relevant difference is that I have an additional line for the / filesystem that is related to a “bind mount” that the Mozilla Firefox snap does to use the “hunspell” spell checker):

$ findmnt -D -t nosquashfs,notmpfs
SOURCE                              FSTYPE        SIZE   USED AVAIL USE% TARGET
udev                                devtmpfs      7,7G      0  7,7G   0% /dev
/dev/nvme0n1p7                      ext4         59,3G  34,9G 21,4G  59% /
/dev/nvme0n1p7[/usr/share/hunspell] ext4         59,3G  34,9G 21,4G  59% /var/snap/firefox/common/host-hunspell
/dev/nvme0n1p5                      ext4          1,8G 201,3M  1,5G  11% /boot
/dev/nvme0n1p8                      ext4          196G 161,6G 24,4G  82% /home
/dev/nvme0n1p1                      vfat          256M    38M  218M  15% /boot/efi
portal                              fuse.portal                          /run/user/1000/doc
3 Likes

I don’t use Hunspell, but i have Artha instead; an offline thesaurus that you can pop-up using a hotkey:

2 Likes

@pavlos , @ricmarques , @tkn , could I trouble you with requesting the report of the following command:

lsblk --pairs --paths -o PATH,FSTYPE,FSSIZE,FSUSED,FSAVAIL,FSUSE%,LABEL,MOUNTPOINT,SUBSYSTEMS | grep -v '"ext' | grep -v 'squashfs' | grep -v tmpfs | grep -v '"ntfs'
2 Likes
PATH="/dev/sda" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="scsi:pci"
PATH="/dev/nvme0n1" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="nvme:pci"
PATH="/dev/nvme0n1p4" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="block:nvme:pci"
PATH="/dev/nvme0n1p5" FSTYPE="swap" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="[SWAP]" SUBSYSTEMS="block:nvme:pci"
3 Likes
$ lsblk --pairs --paths -o PATH,FSTYPE,FSSIZE,FSUSED,FSAVAIL,FSUSE%,LABEL,MOUNTPOINT,SUBSYSTEMS | grep -v '"ext' | grep -v 'squashfs' | grep -v tmpfs | grep -v '"ntfs'
PATH="/dev/nvme0n1" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="nvme:pci"
PATH="/dev/nvme0n1p1" FSTYPE="vfat" FSSIZE="256M" FSUSED="38M" FSAVAIL="218M" FSUSE%="15%" LABEL="SYSTEM" MOUNTPOINT="/boot/efi" SUBSYSTEMS="block:nvme:pci"
PATH="/dev/nvme0n1p2" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="block:nvme:pci"
PATH="/dev/nvme0n1p6" FSTYPE="swap" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="[SWAP]" SUBSYSTEMS="block:nvme:pci"
3 Likes

server lake

PATH="/dev/sda" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="block:scsi:pci"
PATH="/dev/sdb" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="block:scsi:usb:pci"
PATH="/dev/nvme0n1" FSTYPE="" FSSIZE="" FSUSED="" FSAVAIL="" FSUSE%="" LABEL="" MOUNTPOINT="" SUBSYSTEMS="block:nvme:pci"
PATH="/dev/nvme0n1p1" FSTYPE="vfat" FSSIZE="511M" FSUSED="6.1M" FSAVAIL="504.9M" FSUSE%="1%" LABEL="" MOUNTPOINT="/boot/efi" SUBSYSTEMS="block:nvme:pci"
3 Likes

Thank you so much, you three! Very much appreciated!

[Edit: …]

That didn’t work as planned, I had hoped that lsblk would report something about the remote block devices. Apparently not.

So, I will need to limit myself to the more limited findmnt, which could present some unexpected cases because I won’t be working with clearly delimited strings from the pair assignments. My reason for wanting to use the lsblk was because of the “LABEL” value, to get the name assigned to disks by users.

Again, thank you for helping me get here! I will come back with a revised script.

3 Likes

So … here is result of where I am at …


[EDIT: updates for version 6]

Above is as rendered by opening the resulting HTML within Firefox.

YAD HTML doesn’t work. :frowning:
Firefox is not reacting to my attempts to open at specified size displaying only the above HTML.
Chrome (in snap) has incorporated too many network security restrictions to work for me.

I have tried using only Python3 modules, but I am having issues with graphics rendering. What I am getting is this:

Can anyone point out what I did wrong with the Python code?


I am looking for feedback on need to display the “Local” and “Remote” headers for the two groupings of drives. Should those headers be dropped ?


Script so far

#!/bin/bash

### 
###	VERSION 1 - Prototype with conceptual constructs
###
###	VERSION 2 - Logic modified for proper self-contained initialization
###
###	VERSION 3 - removed he sudo commands associated with wget
###
###	VERSION 4 - icon cache re-defined under User HOME directory
###
###	VERSION 5 - embedded icons, corrected parsing for values, 
###		defined width for group columns, border for group columns,
###		column banner headers, command line options to specify thresholds
###
###	VERSION 6 - implemented "App" approach using Python3
###
###	FUTURES:
###		- determine need to show different icon for 
###		  network or remote filesystem type
###		- sort out issues with JavaScript to hide any browser bars at sides
###		- sort out issues with JavaScript to hide any browser bars at top or bottom
###		- open on-demand browser display to fit size of generated page
###

createIcon_Roundel_MATE()
{
#roundel_MATE_url="https://upload.wikimedia.org/wikipedia/commons/0/07/Ubuntu_MATE_rondel_logo.svg"
#wget -q "${roundel_MATE_url}" -O- | tee "${roundel_MATE_icon}" >/dev/null

cat > "${roundel_MATE_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="160"
   height="160"
   id="svg4275"
   version="1.1"
   inkscape:version="0.48.4 r9939"
   sodipodi:docname="Ubuntu_MATE_rondel_2.svg">
  <defs
     id="defs4277" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="1"
     inkscape:cx="61.680222"
     inkscape:cy="110.98336"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1364"
     inkscape:window-height="701"
     inkscape:window-x="0"
     inkscape:window-y="27"
     inkscape:window-maximized="1"
     inkscape:snap-global="true"
     inkscape:snap-bbox="true"
     inkscape:bbox-nodes="true"
     inkscape:object-paths="true"
     inkscape:snap-intersection-paths="true"
     inkscape:snap-smooth-nodes="true"
     inkscape:snap-bbox-edge-midpoints="true"
     inkscape:snap-bbox-midpoints="true"
     inkscape:bbox-paths="true">
    <inkscape:grid
       type="xygrid"
       id="grid4292"
       empspacing="4"
       visible="true"
       enabled="true"
       snapvisiblegridlinesonly="true" />
  </sodipodi:namedview>
  <metadata
     id="metadata4280">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-892.36218)">
    <g
       id="g3769">
      <path
         id="path3171-7-3-3-8-7-0-9-6"
         d="m 152,972.36316 c 0,39.76274 -32.23625,71.99904 -72.00048,71.99904 C 40.23478,1044.3622 8,1012.1264 8,972.36316 8,932.59741 40.23428,900.36218 79.99902,900.36218 119.76325,900.36218 152,932.59741 152,972.36316 z"
         inkscape:connector-curvature="0"
         style="fill:#87a556;fill-opacity:1" />
      <path
         id="path9"
         transform="translate(0,892.36218)"
         d="M 80 35.96875 C 61.869052 35.96875 46.267386 47.015665 39.53125 62.71875 L 44.71875 65.78125 C 50.329479 51.832694 64.006851 42.03125 80 42.03125 C 82.057257 42.03125 84.067968 42.213676 86.03125 42.53125 L 86.03125 36.40625 C 84.057071 36.132235 82.051262 35.96875 80 35.96875 z M 98.03125 39.84375 L 98 46.5625 C 98.999796 47.099525 99.963014 47.691174 100.90625 48.3125 L 106.59375 44.96875 C 103.95096 42.956987 101.09159 41.224102 98.03125 39.84375 z M 80 50.9375 C 67.370826 50.9375 56.569753 59.093199 52.59375 70.40625 L 57.96875 73.59375 C 60.727993 64.010546 69.496914 57.03125 80 57.03125 C 82.076725 57.03125 84.087016 57.301071 86 57.8125 L 86 51.59375 C 84.061579 51.181998 82.053936 50.9375 80 50.9375 z M 115.3125 53.71875 L 110.09375 56.8125 C 115.02862 63.21832 117.96875 71.260756 117.96875 80 C 117.96875 88.906514 114.91903 97.066843 109.8125 103.53125 L 115.03125 106.625 C 120.66511 99.225062 124.03125 89.987567 124.03125 80 C 124.03125 70.165693 120.78909 61.061034 115.3125 53.71875 z M 102.28125 61.4375 L 97 64.53125 C 100.70804 68.608786 102.96875 74.0229 102.96875 80 C 102.96875 86.151805 100.56244 91.678961 96.65625 95.78125 L 102 98.9375 C 106.3908 93.841271 109.0625 87.209001 109.0625 80 C 109.0625 72.950265 106.50058 66.484185 102.28125 61.4375 z M 36.3125 74.71875 C 36.095316 76.448585 35.96875 78.209633 35.96875 80 C 35.96875 81.783206 36.104044 83.525524 36.3125 85.25 L 42.09375 81.84375 C 42.06432 81.233466 42.03125 80.618606 42.03125 80 C 42.03125 79.381394 42.06432 78.766534 42.09375 78.15625 L 36.3125 74.71875 z M 57.96875 86.40625 L 52.59375 89.5625 C 56.561349 100.88934 67.361082 109.0625 80 109.0625 C 82.053936 109.0625 84.061579 108.818 86 108.40625 L 86 102.15625 C 84.086506 102.65876 82.077118 102.9375 80 102.9375 C 69.496914 102.9375 60.727993 95.981891 57.96875 86.40625 z M 44.71875 94.21875 L 39.53125 97.28125 C 46.267386 112.98434 61.869052 124.03125 80 124.03125 C 82.026703 124.03125 84.018204 123.86504 85.96875 123.59375 L 85.96875 117.5 C 84.022609 117.80711 82.037303 117.96875 80 117.96875 C 64.006851 117.96875 50.329479 108.1673 44.71875 94.21875 z M 100.5 111.96875 C 99.693723 112.48627 98.846679 112.98083 98 113.4375 L 97.96875 120.15625 C 100.88651 118.84075 103.64682 117.23579 106.1875 115.34375 L 100.5 111.96875 z "
         style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.17073165999999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
      <path
         id="path5227"
         transform="translate(0,892.36218)"
         d="M 92.03125 27.46875 L 92 60.53125 L 120 44 L 92.03125 27.46875 z M 29.03125 63.46875 L 29 96.53125 L 57 80 L 29.03125 63.46875 z M 92 100 L 91.96875 133.03125 L 119.96875 116.5 L 92 100 z "
         style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;enable-background:new" />
    </g>
  </g>
</svg>
EnDoFfIlE
}


createIcon_Roundel_UBUNTU()
{
#roundel_UBUNTU_url="https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo-ubuntu_cof-orange-hex.svg"
#wget -q "${roundel_UBUNTU_url}" -O- | tee "${roundel_UBUNTU_icon}" >/dev/null

cat >"${roundel_UBUNTU_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="285" height="285" viewBox="-142.5 -142.5 285 285" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle fill="#DD4814" r="141.732"/><g id="U" fill="#FFFFFF"><circle cx="-96.3772" r="18.9215"/>
<path d="M-45.6059,68.395C-62.1655,57.3316-74.4844,40.4175-79.6011,20.6065-73.623,15.7354-69.8047,8.3164-69.8047,0-69.8047-8.3164-73.623-15.7354-79.6011-20.6065-74.4844-40.4175-62.1655-57.3316-45.6059-68.395L-31.7715-45.2212C-45.9824-35.2197-55.2754-18.7026-55.2754,0-55.2754,18.7026-45.9824,35.2197-31.7715,45.2212Z"/></g>
<use xlink:href="#U" transform="rotate(120)"/><use xlink:href="#U" transform="rotate(240)"/></svg>
EnDoFfIlE
}


createIcon_Roundel_KUBUNTU()
{
#KDE - https://kde.org/stuff/clipart/logo/kde-logo-white-blue-source.svg
#Plasma - https://kde.org/stuff/clipart/logo/plasma-logo-colorful.svg
#kubuntu - https://upload.wikimedia.org/wikipedia/commons/1/1f/Kubuntu_logo.svg

cat > "${roundel_KUBUNTU_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="256mm" height="256mm" viewBox="0 0 256 256" version="1.1" id="svg344" inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" sodipodi:docname="kubuntu-logo.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
  <sodipodi:namedview id="namedview346" pagecolor="#ffffff" bordercolor="#000000" borderopacity="0.25" inkscape:showpageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" inkscape:zoom="0.2604753" inkscape:cx="-867.64464" inkscape:cy="401.18967" inkscape:window-width="1920" inkscape:window-height="1008" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="layer1"/>
  <defs id="defs341"/>
  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
    <path d="m 250.22594,125.44397 c 0,66.66682 -54.04734,120.7189 -120.71698,120.7189 -66.667958,0 -120.7132303,-54.05208 -120.7132303,-120.7189 0,-66.66736 54.0452723,-120.7113272 120.7132303,-120.7113272 66.66964,0 120.71698,54.0439672 120.71698,120.7113272 z" fill="#0064ff" id="path2" style="stroke-width:0.943086"/>
    <path d="m 96.29521,166.56162 c 1.175118,-0.98364 1.146247,-2.79626 0.0021,-3.81572 -3.881657,-3.45738 -7.285074,-7.58527 -10.026436,-12.33368 -12.096117,-20.95068 -7.282899,-47.02421 10.205512,-62.415765 1.151059,-1.01297 1.191016,-2.828979 0.02139,-3.818655 L 67.087049,59.322751 c -0.920905,-0.470319 -2.044696,-0.242167 -2.709389,0.550008 l -10.656198,12.69951 c -0.723078,0.861795 -0.75523,2.108837 -0.07735,3.006658 l 14.842861,19.660245 c -2.22812,4.511351 -3.947455,9.250358 -5.132661,14.122348 l -24.015403,5.52083 c -1.096345,0.25275 -1.873354,1.2279 -1.873354,2.35301 v 16.42289 c 0,1.12511 0.777009,2.1012 1.873354,2.35302 l 23.996476,5.51705 c 1.168845,4.80124 2.879697,9.53651 5.155082,14.12178 l -14.846355,19.66524 c -0.677882,0.89784 -0.64573,2.1446 0.07735,3.00655 l 10.21731,12.17621 c 0.856317,1.02043 2.377399,1.15434 3.398962,0.29977 z" fill="#ffffff" id="path4" style="stroke-width:0.943086"/>
    <path d="m 181.72483,133.65448 c -1.43914,-0.52622 -2.99522,0.40556 -3.3055,1.906 -1.05343,5.09078 -2.9264,10.10139 -5.66797,14.84985 -12.09601,20.95067 -37.08311,29.81946 -59.15701,22.36999 -1.45232,-0.49039 -3.04523,0.38289 -3.31684,1.89185 l -6.81945,37.89794 c 0.0528,1.03269 0.81294,1.89182 1.83054,2.07197 l 16.3267,2.8783 c 1.10814,0.19533 2.20402,-0.39989 2.64255,-1.43632 l 9.60438,-22.68409 c 5.02195,-0.32614 9.98541,-1.20713 14.79705,-2.61611 l 16.78883,18.03748 c 0.7667,0.82331 2.00028,1.00816 2.97447,0.44512 l 14.22272,-8.21143 c 0.9742,-0.56211 1.43066,-1.72304 1.10152,-2.79814 l -7.22027,-23.54041 c 3.5724,-3.41301 6.81852,-7.26176 9.65153,-11.52545 l 24.45425,3.02541 c 1.11566,0.13758 2.17947,-0.51396 2.56425,-1.57116 l 5.43692,-14.93661 c 0.45549,-1.2515 -0.18856,-2.63593 -1.4401,-3.09335 z" fill="#ffffff" id="path6" style="stroke-width:0.943086"/>
    <path d="m 110.51237,76.126482 c 0.26413,1.509316 1.84937,2.391101 3.30362,1.90975 4.93519,-1.632765 10.21175,-2.516439 15.6939,-2.516439 24.19302,0 44.36658,17.205014 48.95185,40.046297 0.30191,1.50327 1.85411,2.44638 3.29706,1.92672 l 36.23057,-13.04289 c 0.86762,-0.56302 1.23165,-1.64946 0.87799,-2.62178 l -5.66982,-15.578188 c -0.38478,-1.057108 -1.44858,-1.708403 -2.56521,-1.570335 l -24.44763,3.024199 c -2.79343,-4.185327 -6.03766,-8.043872 -9.66382,-11.505942 l 7.22594,-23.558779 c 0.33006,-1.075497 -0.12654,-2.236248 -1.10059,-2.798799 l -14.22269,-8.211364 c -0.97422,-0.562551 -2.20776,-0.377611 -2.97451,0.445892 l -16.77656,18.02286 c -4.74182,-1.388036 -9.69776,-2.273969 -14.80739,-2.59641 l -9.60723,-22.689727 c -0.43853,-1.035982 -1.53441,-1.631633 -2.64255,-1.43632 l -15.65334,2.760225 c -1.31182,0.231331 -2.18891,1.481591 -1.95879,2.793801 z" fill="#ffffff" id="path8" style="stroke-width:0.943086"/>
  </g>
</svg>
EnDoFfIlE
}


createIcon_Roundel_LUBUNTU()
{
#https://upload.wikimedia.org/wikipedia/commons/3/3a/Lubuntu_logo_only.svg

cat > "${roundel_LUBUNTU_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 600 600" height="600" width="600" id="svg83" version="1.1" sodipodi:docname="icon512.svg" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
  <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="709" id="namedview21" showgrid="false" inkscape:zoom="0.43212893" inkscape:cx="232.56948" inkscape:cy="273.06665" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="svg83"/>
  <metadata id="metadata89">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title/>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs id="defs87"/>
  <g id="g750" transform="matrix(1.0986335,0,0,1.0986335,-2.9941007e-6,-3.3078078e-4)">
    <g id="g3647" transform="matrix(-7.1710344,0,0,7.1710908,6330.5859,-133.95867)">
      <g style="fill:#ffffff;fill-opacity:1" transform="matrix(0.415288,0,0,0.415288,609.13611,80.906538)" id="g4835-5-6-3"/>
      <g style="fill:#ffffff;fill-opacity:1" transform="matrix(-0.21579109,0.35482154,-0.35482154,-0.21579109,919.22927,-144.75119)" id="g4835-5-6-3-7"/>
      <g style="fill:#ffffff;fill-opacity:1" transform="matrix(-0.20731956,-0.35983709,0.35983709,-0.20731956,958.85963,231.66525)" id="g4835-5-6-3-1"/>
      <path id="path2819-8-3-8-5" d="m 806.64135,56.760424 c 0,-21.029496 17.04896,-38.080006 38.07982,-38.080006 21.03003,0 38.07837,17.05051 38.07837,38.080006 0,21.029757 -17.04834,38.077585 -38.07837,38.077585 -21.03086,0 -38.07982,-17.047828 -38.07982,-38.077585 z" style="fill:#0068c8;fill-opacity:1;stroke-width:1.76783657" inkscape:connector-curvature="0"/>
    </g>
    <g transform="matrix(1.6332749,0,0,1.6332749,-943.27495,-701.28981)" id="g3185" style="fill:#ffffff">
      <g transform="matrix(0.99888162,0,0,0.99809723,-380.89834,-1118.5405)" id="g3147-6" style="fill:#ffffff">
        <path id="path3149-8" d="m 1116.8938,1689.4194 c -5.9501,-6.4533 -9.8718,-14.7504 -11.0814,-23.4444 -1.2096,-8.694 0.2983,-17.7464 4.2608,-25.5789 3.9625,-7.8325 10.362,-14.4102 18.0827,-18.5864 7.7206,-4.1761 16.7282,-5.9321 25.4522,-4.9618 14.0311,1.5606 27.0437,10.436 33.618,22.9295 l 79.0542,10.904 h -90.1007 c -5.6213,-7.1952 -14.1129,-12.0817 -23.1583,-13.3266 -6.4597,-0.889 -13.1604,0.045 -19.131,2.6661 -5.9705,2.6213 -11.1929,6.9222 -14.9103,12.2794 -3.7173,5.3573 -5.9185,11.7546 -6.2844,18.265 -0.3659,6.5104 1.1045,13.1141 4.1982,18.8541 z" style="fill:#ffffff;fill-opacity:1;stroke:none" inkscape:connector-curvature="0"/>
        <g transform="translate(15,2)" id="g3159-3" style="fill:#ffffff">
          <path style="fill:#ffffff;fill-opacity:1;stroke:none" d="m 1113.0085,1717 -121.00003,-87 c -5.79688,11.4486 -8.0911,24.6415 -6.49942,37.3749 1.59169,12.7335 7.06282,24.9557 15.49945,34.6251 11.0648,12.6815 27.2298,20.7807 44.0118,22.0513 -7.9223,-2.5599 -15.1793,-7.1499 -20.8872,-13.2109 -5.7079,-6.0609 -9.8546,-13.5801 -11.935,-21.6416 -2.383,-9.2343 -2.0312,-19.1565 1,-28.1988 z" id="path3151-3" inkscape:connector-curvature="0"/>
          <path id="path3153-6" d="m 1106.2919,1740.501 -106.31654,-29.9171 c -0.85695,9.9442 1.09424,20.1153 5.57014,29.0365 4.476,8.9212 11.4632,16.5656 19.9473,21.8232 12.5858,7.7995 28.4343,10.1316 42.7334,6.2881 -14.3249,0.096 -28.5169,-7.0219 -37.0072,-18.5599 -4.7934,-6.514 -7.8065,-14.3248 -8.6296,-22.3704 z" style="fill:#ffffff;fill-opacity:1;stroke:none" inkscape:connector-curvature="0"/>
        </g>
        <path style="fill:#ffffff;fill-opacity:1;stroke:none" d="m 1169.7781,1675.729 c -1.9753,4.1002 -3.3486,8.4898 -4.0625,12.9847 -2.2142,13.9416 1.9287,28.0237 6.0575,41.5228 4.1289,13.499 8.3376,27.5466 6.255,41.5085 -1.5555,10.428 -6.6401,20.1889 -13.7567,27.9681 -7.1166,7.7792 -16.2003,13.6286 -25.9621,17.6121 -16.0797,6.5616 -34.1667,8.1034 -51.125,4.3581 v 46.4118 l 13.9455,-33.13 c 18.0735,4.1247 37.4229,2.4559 54.5233,-4.7024 12.2473,-5.1268 23.4211,-13.1088 31.4777,-23.6621 8.0567,-10.5533 12.8628,-23.7392 12.5223,-37.0119 -0.4093,-15.9555 -7.944,-30.7436 -15.2368,-44.9408 -7.2927,-14.1972 -14.6821,-29.0987 -14.7632,-45.0592 -0.01,-1.2875 0.035,-2.5753 0.125,-3.8597 z" id="path3155-5" inkscape:connector-curvature="0"/>
      </g>
      <g transform="translate(-8)" id="g3179" style="fill:#ffffff">
        <g id="text3142" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.22270203px;line-height:125%;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none" transform="matrix(1.0005173,0,0,0.99948297,0.16863416,0)"/>
        <g id="text3152" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20.98835564px;line-height:125%;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none" transform="matrix(1.0005173,0,0,0.99948297,9,0)"/>
      </g>
    </g>
  </g>
</svg>
EnDoFfIlE
}


createIcon_Roundel_XUBUNTU()
{
#https://upload.wikimedia.org/wikipedia/commons/a/af/Xubuntu_logo.svg

cat > "${roundel_XUBUNTU_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="600" height="600" id="svg3681" version="1.1" sodipodi:docname="distributor-logo-xubuntu.svg" inkscape:version="1.0 (1.0+r73+1)">
  <sodipodi:namedview inkscape:document-rotation="0" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="709" id="namedview11" showgrid="false" inkscape:zoom="0.59078531" inkscape:cx="271.162" inkscape:cy="323.63222" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="svg3681"/>
  <defs id="defs3683"/>
  <metadata id="metadata3686">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title/>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g id="g1037">
    <circle r="300" cy="300" cx="300" id="path12878" style="fill:#0044aa;fill-opacity:1;stroke:none;stroke-width:9.375"/>
    <g id="g1029">
      <path id="path12949" d="m 212.82393,166.14904 c -4.33594,21.51937 1.89488,46.15172 10.60547,75.9375 0.52594,1.79709 -0.49312,4.09659 -1.41356,4.36453 -3.95494,1.15134 -10.73588,-0.075 -12.04828,-2.76863 -6.78732,-13.9365 -10.01494,-28.18837 -17.94366,-41.90821 -5.48428,-9.49004 -11.15747,-18.54507 -17.91506,-24.66797 -8.20819,-7.43728 -14.64028,-8.89885 -23.42288,-5.22947 -11.07919,4.62881 -17.77247,15.72684 -20.06831,25.67869 -2.32978,10.09931 -1.35506,21.75778 0.46781,31.875 2.14547,11.90765 4.87491,21.30459 8.38303,32.44734 -2.67656,7.91381 -18.78534,51.34781 -22.6799,81.45891 -4.9996,38.65443 -19.060034,155.61225 109.81303,142.60884 47.5335,-4.79616 86.26706,-21.45478 122.92134,-38.54635 16.797,-7.83225 37.86853,-17.93653 58.125,-29.0625 20.26632,-11.13131 39.06741,-22.99575 53.4375,-35.62499 14.39335,-12.64979 24.87769,-26.50669 22.96875,-40.3125 -3.0764,-22.24875 -17.83153,-38.7885 -37.5,-51.5625 -19.74168,-12.82144 -53.451,-24.73566 -77.81409,-31.85391 -31.96706,-9.33985 -56.71463,-12.97022 -86.71716,-14.60269 -1.68,-30.39656 2.37169,-70.39631 -16.87537,-93.69872 -4.45763,-5.39681 -10.95591,-8.82787 -18.75,-9.375 -12.52566,0.50438 -29.54869,4.86666 -33.57366,24.84263 z" style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.375"/>
      <g style="fill:#ffffff;stroke:#ffffff;stroke-opacity:1" transform="matrix(1.6173551,0,0,1.6173551,-1485.5115,-62.807462)" id="g153">
        <path d="m 1212.5374,120.93165 c -5.8954,-4.87644 -52.1257,68.06508 -41.903,75.63449 6.1468,4.59854 44.5364,-73.03416 41.903,-75.63449 z" id="path13" style="fill:#ffffff;stroke:#ffffff;stroke-width:3.96997pt;stroke-opacity:1"/>
        <path d="m 1159.3921,110.71143 c -2.9179,-3.3877 -18.4008,75.21764 -11.2416,78.69798 6.1468,4.59855 16.8525,-74.60891 11.2416,-78.69798 z" id="path18" style="fill:#ffffff;stroke:#ffffff;stroke-width:3.96997pt;stroke-opacity:1"/>
      </g>
    </g>
  </g>
</svg>
EnDoFfIlE
}


createIcon_Roundel_BUDGIE()
{
#https://upload.wikimedia.org/wikipedia/commons/9/91/Ubuntu_Budgie_No_Wordmark.svg

cat > "${roundel_BUDGIE_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="256" width="256" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 256 256" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <title>budgie-remix Logo</title>
 <metadata>
  <rdf:RDF>
   <cc:Work rdf:about="">
    <dc:format>image/svg+xml</dc:format>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
    <dc:title>budgie-remix Logo</dc:title>
    <dc:creator>
     <cc:Agent>
      <dc:title>HEXcube and Joshua "Foggalong" Fogg</dc:title>
     </cc:Agent>
    </dc:creator>
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/>
    <dc:source>Budgie Logo by Yuri Henrique</dc:source>
    <dc:description>Official logo for budgie-remix</dc:description>
   </cc:Work>
  </rdf:RDF>
 </metadata>
 <circle cy="128" cx="128" r="128" fill="#404552"/>
 <path id="budgie" fill="#fff" d="m172 150c-17.556 0-32.315 12.472-37 29-0.98896 3.4889-1.6694 4.6841-3 7-1.7157 2.9862-5.1986 7.2988-10 10-3.9063 2.1976-7.2726 4.0674-12.303 3.3096-1.3094-0.19726-3.6295-0.56196-5.951-1.8976-3.7-2.13-4.92-4-7.75-9.41 0.40401 5.7738-0.34048 7.8803 2.5 18 5.6541 20.144 27.381 36 53 36 18.991 0 36.592-7.9151 46.496-19.998 3.6222-4.4191 6.3498-7.9058 9-14 2.4112-5.5448 3.0022-12.653 3.004-19.002 0.006-21.556-17.013-39-38-39z"/>
 <use xlink:href="#budgie" transform="matrix(-.5 .86603 -.86603 -.5 302.85 81.149)" height="100%" width="100%" y="0" x="0"/>
 <use xlink:href="#budgie" transform="matrix(-.5 -.86603 .86603 -.5 81.149 302.85)" height="100%" width="100%" y="0" x="0"/>
</svg>
EnDoFfIlE
}


createIcon_Roundel_CINNAMON()
{
#https://upload.wikimedia.org/wikipedia/commons/5/5b/UbuntuCinnamon.svg

cat > "${roundel_CINNAMON_icon}" <<-EnDoFfIlE
<svg width="108" height="108" viewBox="0 0 108 108" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M54 108C83.8234 108 108 83.8234 108 54C108 24.1766 83.8234 0 54 0C24.1766 0 0 24.1766 0 54C0 83.8234 24.1766 108 54 108Z" fill="#DD682A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M77.4857 15L65.0638 22.0906C69.7567 23.6623 73.9837 26.2329 77.4857 29.5463V15ZM9 53.5118L21.5294 46.3599C21.0174 48.6632 20.7475 51.0564 20.7475 53.5118C20.7475 55.9672 21.0174 58.3603 21.5294 60.6637L9 53.5118ZM25.5428 53.9208C25.5408 53.7847 25.5399 53.6484 25.5399 53.5118C25.5399 53.3752 25.5408 53.2388 25.5428 53.1027V53.9208ZM77.4857 92L65.0897 84.9242C69.7723 83.3517 73.9902 80.7845 77.4857 77.4772V92ZM43.2278 32.6418C46.547 30.9105 50.3294 29.9304 54.3437 29.9304C66.7095 29.9304 76.8749 39.2301 78.0764 51.1427H82.9999C81.7824 36.5509 69.4193 25.0828 54.3437 25.0828C49.4367 25.0828 44.8166 26.2982 40.7748 28.4412L43.2278 32.6418ZM36.7495 31.0245L39.2279 35.2686C33.8946 39.593 30.4923 46.1589 30.4923 53.5118C30.4923 58.3365 31.9619 62.8208 34.4772 66.5578L55.0958 43.131L58.3798 48.9353L35.3288 74.8382C29.3564 69.6291 25.5891 62.0059 25.5891 53.5118C25.5891 44.3638 29.96 36.2247 36.7495 31.0245ZM83 55.8809H78.0676C77.9423 57.049 77.7286 58.191 77.4432 59.3057L66.1131 46.855L38.8646 77.4745C43.3332 80.3018 48.645 81.9407 54.3437 81.9407C69.4193 81.9407 81.7826 70.4747 83 55.8809Z" fill="white"/>
</svg>
EnDoFfIlE
}


createIcon_Roundel_STUDIO()
{
#https://upload.wikimedia.org/wikipedia/commons/4/4a/Ubuntustudio_v3_logo_only.svg

cat > "${roundel_STUDIO_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="534.27728" height="535.35321" id="svg2" inkscape:version="0.48.4 r9939" sodipodi:docname="Ubuntustudio_v3_logo-alt[1].svg">
  <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="706" id="namedview3007" showgrid="false" fit-margin-top="10" fit-margin-left="10" fit-margin-right="10" fit-margin-bottom="10" inkscape:zoom="0.87857143" inkscape:cx="210" inkscape:cy="219.95761" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2"/>
  <title id="title14594">Ubuntu Studio v3</title>
  <defs id="defs4">
    <linearGradient id="linearGradient3927">
      <stop id="stop3929" style="stop-color:#000000;stop-opacity:1" offset="0"/>
      <stop id="stop3931" style="stop-color:#525252;stop-opacity:1" offset="1"/>
    </linearGradient>
    <linearGradient x1="-654.12848" y1="579.76819" x2="-654.12848" y2="402.60345" id="linearGradient3933" xlink:href="#linearGradient3927" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.94157008,0,0,1,-52.592035,0)"/>
  </defs>
  <metadata id="metadata7">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title>Ubuntu Studio v3</dc:title>
        <dc:creator>
          <cc:Agent>
            <dc:title>Cory Kontros</dc:title>
          </cc:Agent>
        </dc:creator>
        <dc:description>New Ubuntu Studio logo based on the Ubuntu logo 1st used in Ubuntu 10.04.</dc:description>
        <dc:date>August 8th 2010</dc:date>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <path inkscape:connector-curvature="0" style="fill:#009bf9;fill-opacity:1;stroke:none" id="path10060-3" d="M 267.13867,10 C 124.93166,10 10,124.93165 10,267.13867 c 0,142.20702 114.93166,258.21456 257.13867,258.21456 142.20702,0 257.13859,-116.00754 257.13859,-258.21456 C 524.27726,124.93165 409.34569,10 267.13867,10 z m 53.79466,39.808006 c 2.79222,-0.350526 5.73006,-0.80599 8.60719,0 38.3713,10.757914 71.1305,29.595929 98.98218,58.098304 2.42047,2.41351 4.32297,6.43199 5.37956,9.68308 2.01053,6.01946 0.84345,12.00079 -2.15181,17.21432 -1.7971,3.12953 -4.26014,5.58159 -7.5312,7.53125 -8.72325,5.19974 -19.95664,4.18548 -26.89742,-3.22595 -23.25962,-23.80328 -47.57096,-38.35519 -79.61609,-47.339425 -11.5092,-3.219007 -17.20707,-15.388509 -13.98664,-26.897233 2.41691,-8.632055 8.83745,-14.014558 17.21423,-15.062633 z m -54.87047,66.705434 c 39.1346,0 77.8623,14.38461 107.58932,44.11179 59.45406,59.45399 59.45406,156.80023 0,216.25461 -59.45438,59.45436 -155.72466,59.45409 -215.17887,0 -5.33739,-5.18875 -8.34775,-13.2426 -6.45536,-20.44204 1.89372,-7.19926 7.86333,-12.09404 15.06255,-13.98651 7.19939,-1.89363 15.25329,0.0319 20.44198,5.37944 43.66174,43.66165 113.41894,43.66165 157.08059,0 43.66166,-43.66181 43.66166,-114.49473 0,-158.1564 -43.66165,-43.6618 -113.41885,-43.6618 -157.08059,0 -7.67205,8.44808 -20.60098,9.82377 -29.04917,2.15171 -8.44807,-7.67204 -9.82379,-21.67691 -2.1517,-30.12509 0.44398,-0.49305 1.65954,-0.62936 2.1517,-1.074 29.72718,-29.72718 68.45485,-44.11182 107.58955,-44.11182 z m 0,71.00904 c 20.79728,0 41.26022,7.90764 57.02233,23.66959 31.52447,31.52464 31.52447,83.59616 0,115.1208 -31.52464,31.52444 -82.52019,31.52444 -114.04482,0 -31.52448,-31.52464 -31.52448,-83.59616 0,-115.1208 15.76211,-15.76195 36.22514,-23.66959 57.02249,-23.66959 z m -195.812777,7.53124 c 3.607802,-0.0319 7.41359,0.34429 10.758889,2.15178 8.921212,4.85168 12.520352,14.9947 9.683112,24.74557 -8.61376,32.14658 -8.61376,60.3802 0,92.52698 3.09867,11.54246 -3.52032,22.72238 -15.062557,25.8213 -11.542527,3.0986 -23.798426,-3.52016 -26.897341,-15.06239 -10.314106,-38.4933 -10.314106,-75.55192 0,-114.04489 0.843605,-3.31193 3.122612,-6.04038 5.379549,-8.60713 4.151984,-4.80038 10.125768,-7.44989 16.138348,-7.53122 z m 65.629517,18.29022 c 4.38037,-0.44792 8.95214,0.80605 12.91076,3.22595 7.91719,4.84104 12.23769,14.74814 9.68295,23.66966 -5.47815,20.44478 -5.47815,36.57762 0,57.0225 2.95403,11.01541 -4.04706,22.86592 -15.06247,25.82125 -11.0154,2.95403 -21.7902,-4.04703 -24.74553,-15.06245 -7.103,-26.50824 -7.103,-52.03197 0,-78.54019 0.97126,-3.85397 2.47199,-8.05017 5.37952,-10.75891 3.38773,-3.1709 7.45449,-4.93257 11.83477,-5.37953 z m 130.18326,13.9867 c -10.53185,0 -20.93475,4.79617 -29.04921,12.91063 -16.229,16.22902 -16.229,41.86933 0,58.09823 16.22896,16.229 41.86931,16.229 58.09831,0 16.22895,-16.2289 16.22857,-41.86921 0,-58.09823 -8.11451,-8.11446 -18.51751,-12.91063 -29.0491,-12.91063 z m 140.94206,165.68764 c 4.73285,-0.64419 9.63551,0.60914 13.98657,3.22597 3.26383,1.9624 5.74578,4.39578 7.53121,7.53121 2.97469,5.22561 4.18758,12.27859 2.15187,18.29019 -1.07075,3.24662 -2.95058,6.20269 -5.3795,8.60721 -27.96428,28.39153 -60.56846,46.41666 -98.9822,57.02236 -11.5216,3.1743 -23.72242,-3.54066 -26.89733,-15.06255 -3.17433,-11.52157 3.54063,-22.6465 15.0625,-25.82142 32.0806,-8.85718 56.2621,-23.6288 79.61613,-47.33936 3.48517,-3.69282 8.17783,-5.81255 12.91075,-6.45533 z"/>
</svg>
EnDoFfIlE
}


createIcon_Roundel_KYLIN()
{
#https://upload.wikimedia.org/wikipedia/commons/2/29/Ubuntu_Kylin_logo.svg

cat > "${roundel_KYLIN_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="534.27728" height="535.35321" id="svg2" inkscape:version="0.48.4 r9939" sodipodi:docname="Ubuntustudio_v3_logo-alt[1].svg">
  <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="706" id="namedview3007" showgrid="false" fit-margin-top="10" fit-margin-left="10" fit-margin-right="10" fit-margin-bottom="10" inkscape:zoom="0.87857143" inkscape:cx="210" inkscape:cy="219.95761" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2"/>
  <title id="title14594">Ubuntu Studio v3</title>
  <defs id="defs4">
    <linearGradient id="linearGradient3927">
      <stop id="stop3929" style="stop-color:#000000;stop-opacity:1" offset="0"/>
      <stop id="stop3931" style="stop-color:#525252;stop-opacity:1" offset="1"/>
    </linearGradient>
    <linearGradient x1="-654.12848" y1="579.76819" x2="-654.12848" y2="402.60345" id="linearGradient3933" xlink:href="#linearGradient3927" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.94157008,0,0,1,-52.592035,0)"/>
  </defs>
  <metadata id="metadata7">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title>Ubuntu Studio v3</dc:title>
        <dc:creator>
          <cc:Agent>
            <dc:title>Cory Kontros</dc:title>
          </cc:Agent>
        </dc:creator>
        <dc:description>New Ubuntu Studio logo based on the Ubuntu logo 1st used in Ubuntu 10.04.</dc:description>
        <dc:date>August 8th 2010</dc:date>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <path inkscape:connector-curvature="0" style="fill:#009bf9;fill-opacity:1;stroke:none" id="path10060-3" d="M 267.13867,10 C 124.93166,10 10,124.93165 10,267.13867 c 0,142.20702 114.93166,258.21456 257.13867,258.21456 142.20702,0 257.13859,-116.00754 257.13859,-258.21456 C 524.27726,124.93165 409.34569,10 267.13867,10 z m 53.79466,39.808006 c 2.79222,-0.350526 5.73006,-0.80599 8.60719,0 38.3713,10.757914 71.1305,29.595929 98.98218,58.098304 2.42047,2.41351 4.32297,6.43199 5.37956,9.68308 2.01053,6.01946 0.84345,12.00079 -2.15181,17.21432 -1.7971,3.12953 -4.26014,5.58159 -7.5312,7.53125 -8.72325,5.19974 -19.95664,4.18548 -26.89742,-3.22595 -23.25962,-23.80328 -47.57096,-38.35519 -79.61609,-47.339425 -11.5092,-3.219007 -17.20707,-15.388509 -13.98664,-26.897233 2.41691,-8.632055 8.83745,-14.014558 17.21423,-15.062633 z m -54.87047,66.705434 c 39.1346,0 77.8623,14.38461 107.58932,44.11179 59.45406,59.45399 59.45406,156.80023 0,216.25461 -59.45438,59.45436 -155.72466,59.45409 -215.17887,0 -5.33739,-5.18875 -8.34775,-13.2426 -6.45536,-20.44204 1.89372,-7.19926 7.86333,-12.09404 15.06255,-13.98651 7.19939,-1.89363 15.25329,0.0319 20.44198,5.37944 43.66174,43.66165 113.41894,43.66165 157.08059,0 43.66166,-43.66181 43.66166,-114.49473 0,-158.1564 -43.66165,-43.6618 -113.41885,-43.6618 -157.08059,0 -7.67205,8.44808 -20.60098,9.82377 -29.04917,2.15171 -8.44807,-7.67204 -9.82379,-21.67691 -2.1517,-30.12509 0.44398,-0.49305 1.65954,-0.62936 2.1517,-1.074 29.72718,-29.72718 68.45485,-44.11182 107.58955,-44.11182 z m 0,71.00904 c 20.79728,0 41.26022,7.90764 57.02233,23.66959 31.52447,31.52464 31.52447,83.59616 0,115.1208 -31.52464,31.52444 -82.52019,31.52444 -114.04482,0 -31.52448,-31.52464 -31.52448,-83.59616 0,-115.1208 15.76211,-15.76195 36.22514,-23.66959 57.02249,-23.66959 z m -195.812777,7.53124 c 3.607802,-0.0319 7.41359,0.34429 10.758889,2.15178 8.921212,4.85168 12.520352,14.9947 9.683112,24.74557 -8.61376,32.14658 -8.61376,60.3802 0,92.52698 3.09867,11.54246 -3.52032,22.72238 -15.062557,25.8213 -11.542527,3.0986 -23.798426,-3.52016 -26.897341,-15.06239 -10.314106,-38.4933 -10.314106,-75.55192 0,-114.04489 0.843605,-3.31193 3.122612,-6.04038 5.379549,-8.60713 4.151984,-4.80038 10.125768,-7.44989 16.138348,-7.53122 z m 65.629517,18.29022 c 4.38037,-0.44792 8.95214,0.80605 12.91076,3.22595 7.91719,4.84104 12.23769,14.74814 9.68295,23.66966 -5.47815,20.44478 -5.47815,36.57762 0,57.0225 2.95403,11.01541 -4.04706,22.86592 -15.06247,25.82125 -11.0154,2.95403 -21.7902,-4.04703 -24.74553,-15.06245 -7.103,-26.50824 -7.103,-52.03197 0,-78.54019 0.97126,-3.85397 2.47199,-8.05017 5.37952,-10.75891 3.38773,-3.1709 7.45449,-4.93257 11.83477,-5.37953 z m 130.18326,13.9867 c -10.53185,0 -20.93475,4.79617 -29.04921,12.91063 -16.229,16.22902 -16.229,41.86933 0,58.09823 16.22896,16.229 41.86931,16.229 58.09831,0 16.22895,-16.2289 16.22857,-41.86921 0,-58.09823 -8.11451,-8.11446 -18.51751,-12.91063 -29.0491,-12.91063 z m 140.94206,165.68764 c 4.73285,-0.64419 9.63551,0.60914 13.98657,3.22597 3.26383,1.9624 5.74578,4.39578 7.53121,7.53121 2.97469,5.22561 4.18758,12.27859 2.15187,18.29019 -1.07075,3.24662 -2.95058,6.20269 -5.3795,8.60721 -27.96428,28.39153 -60.56846,46.41666 -98.9822,57.02236 -11.5216,3.1743 -23.72242,-3.54066 -26.89733,-15.06255 -3.17433,-11.52157 3.54063,-22.6465 15.0625,-25.82142 32.0806,-8.85718 56.2621,-23.6288 79.61613,-47.33936 3.48517,-3.69282 8.17783,-5.81255 12.91075,-6.45533 z"/>
</svg>
EnDoFfIlE
}


createIcon_Roundel_UNITY()
{
#https://upload.wikimedia.org/wikipedia/commons/2/2c/Unity_desktop_environment_logo_2022.svg

cat > "${roundel_UNITY_icon}" <<-EnDoFfIlE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="160" height="160" id="svg4275" version="1.1" inkscape:version="1.0.2 (e86c870879, 2021-01-15)" sodipodi:docname="favicon-light.svg">
  <defs id="defs4277"/>
  <sodipodi:namedview id="base" pagecolor="#9005d5" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="1" inkscape:pageshadow="2" inkscape:zoom="1.28" inkscape:cx="-2.5763975" inkscape:cy="-19.644808" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1366" inkscape:window-height="681" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:snap-global="true" inkscape:snap-bbox="true" inkscape:bbox-nodes="true" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:snap-smooth-nodes="true" inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-bbox-midpoints="true" inkscape:bbox-paths="true" showborder="false" inkscape:showpageshadow="false" inkscape:document-rotation="0">
    <inkscape:grid type="xygrid" id="grid4292" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true"/>
  </sodipodi:namedview>
  <metadata id="metadata4280">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
        <dc:title/>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-892.36218)">
    <path id="path12" style="fill:#5A06C3;fill-opacity:1;stroke:none;stroke-width:0.0990867;stroke-linejoin:round;paint-order:stroke markers fill" d="M 79.95989,900.36218 A 72.000003,72.000003 0 0 0 8,972.36226 72.000003,72.000003 0 0 0 80.00007,1044.3622 72.000003,72.000003 0 0 0 152,972.36226 72.000003,72.000003 0 0 0 80.00007,900.36218 a 72.000003,72.000003 0 0 0 -0.0402,0 z m 0.79043,23.03994 a 48.960002,48.960002 0 0 1 9.44567,0.9199 l -6.99953,12.12354 a 35.999998,35.999998 0 0 0 -2.44614,-0.0833 35.999998,35.999998 0 0 0 -2.44585,0.0829 l -6.1e-4,-0.001 a 35.999995,35.999995 0 0 0 -15.55402,4.74003 35.999995,35.999995 0 0 0 -0.003,0.002 35.999995,35.999995 0 0 0 -11.87872,11.09826 l 8.9e-4,0.001 a 35.999998,35.999998 0 0 0 -2.44614,4.23684 l -13.99907,1.6e-4 a 48.960002,48.960002 0 0 1 9.4454,-16.35994 l -10e-4,-0.001 a 48.959999,48.959999 0 0 1 9.80956,-8.59453 l 3.44389,5.96518 5.27938,-3.048 -3.44389,-5.96503 a 48.959999,48.959999 0 0 1 12.34693,-4.1977 l 7.7e-4,0.001 a 48.960002,48.960002 0 0 1 9.44537,-0.91976 z m 15.48482,2.67131 10.2934,1.6e-4 c 0.69458,1.5e-4 1.33197,0.36712 1.6889,0.95562 l 5.15094,8.5856 c 0.15074,0.22917 0.31686,0.60891 0.2929,1.08302 -0.0144,0.28447 -0.0968,0.60389 -0.2929,0.94357 l -5.15094,8.59602 c -0.3571,0.58827 -0.99412,0.95444 -1.68876,0.95443 l -10.29354,-1.5e-4 c -0.34737,2.3e-4 -0.68089,-0.0884 -0.97155,-0.25241 v 0 c -0.29058,-0.16409 -0.53786,-0.40399 -0.71705,-0.70262 L 89.395,937.6408 c -0.37624,-0.62705 -0.37629,-1.39821 0,-2.02525 l 5.15168,-8.58709 c 0.17847,-0.29421 0.4256,-0.5345 0.71736,-0.69785 0.29072,-0.1652 0.62378,-0.25711 0.9711,-0.25718 z m -20.00726,6.77466 c 0.0819,0.14929 0.16776,0.29834 0.25821,0.44723 z m 41.40398,7.31371 v 3.1e-4 a 48.960002,48.960002 0 0 1 9.44553,16.36008 h -0.008 a 48.959996,48.959996 0 0 1 2.53797,12.79222 h -6.98198 v 6.096 h 6.98272 a 48.959996,48.959996 0 0 1 -2.53826,12.79208 h 0.007 a 48.960002,48.960002 0 0 1 -9.44552,16.36021 l -6.99954,-12.12337 a 35.999998,35.999998 0 0 0 2.44614,-4.23639 h -0.007 a 35.999992,35.999992 0 0 0 3.67218,-15.83993 35.999992,35.999992 0 0 0 -0.001,-0.004 35.999992,35.999992 0 0 0 -3.67187,-15.83726 l 0.008,1.6e-4 a 35.999998,35.999998 0 0 0 -2.44513,-4.23655 z m -83.25892,21.31279 10.01985,0.16281 c 0.68802,0.0151 1.32359,0.38383 1.6709,0.98539 l 5.14662,8.91451 c 0.17388,0.30073 0.26402,0.6338 0.2673,0.96753 l -1.5e-4,-1.5e-4 c 0.003,0.33368 -0.081,0.6678 -0.25003,0.9723 l -4.86832,8.75958 c -0.35493,0.63935 -1.02277,1.02498 -1.75394,1.01263 l -10.01241,-0.16803 c -0.34403,-0.007 -0.67572,-0.10137 -0.96307,-0.27236 -0.28843,-0.16917 -0.53456,-0.41154 -0.70827,-0.71229 L 27.77479,973.182 c -0.34717,-0.60158 -0.348,-1.33705 -0.0168,-1.94042 l 4.85983,-8.75362 c 0.12309,-0.24513 0.36905,-0.57888 0.79162,-0.79519 0.25356,-0.12976 0.57128,-0.21819 0.96351,-0.21818 z m 0.0511,26.7273 h 13.99907 a 35.999998,35.999998 0 0 0 2.44599,4.23654 l -0.0101,0.0174 a 35.999998,35.999998 0 0 0 27.43572,15.83996 l -6.98941,12.1064 6.99953,-12.1233 a 35.999998,35.999998 0 0 0 2.44584,0.083 35.999998,35.999998 0 0 0 2.44644,-0.084 l 6.99924,12.1237 a 48.960002,48.960002 0 0 1 -9.44553,0.9199 48.960002,48.960002 0 0 1 -9.44567,-0.9199 l -0.01,0.017 a 48.959999,48.959999 0 0 1 -12.34708,-4.1977 l 3.44403,-5.9652 -5.27938,-3.0481 -3.44403,5.9653 a 48.959999,48.959999 0 0 1 -9.80927,-8.5942 l 0.0101,-0.017 a 48.960002,48.960002 0 0 1 -9.44552,-16.36008 z m 72.08103,9.17748 c 0.7253,-0.0122 1.38793,0.37033 1.73996,1.00459 l 4.82158,8.68474 c 0.16422,0.2992 0.24815,0.6306 0.24378,0.9623 -0.002,0.3317 -0.0885,0.6635 -0.26075,0.9619 l -5.10554,8.8427 c -0.34463,0.5967 -0.97595,0.9621 -1.65855,0.9768 l -9.93041,0.1667 c -0.27163,0.016 -0.68031,-0.03 -1.07573,-0.2856 -0.23722,-0.1535 -0.47072,-0.3825 -0.66525,-0.7194 l -4.82993,-8.6886 c -0.32825,-0.5986 -0.32667,-1.3275 0.0179,-1.9242 l 5.10555,-8.8428 c 0.1721,-0.29854 0.41352,-0.54111 0.6986,-0.70946 v 0 c 0.28508,-0.16824 0.61394,-0.26178 0.95935,-0.26759 z"/>
  </g>
</svg>
EnDoFfIlE
}


#createIcon_RoundelMATE()
#{
#cat > "${roundel_MATE_icon}" <<-EnDoFfIlE
#EnDoFfIlE
#}


webWrapHead()
{
	###
	###	Create Web Page Wrapper Head
	###

	#margin:		0, 0, 1px, 0 ;
echo "
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\" >

<html xmlns=\"http://www.w3.org/1999/xhtml\" >
<head>

<style type="text/css" >

html {
	background-color: #000 ;
}

div {
	margin: 0px ;
	padding: 0px ;
	border-spacing: 0px ;
	background-color: #000 ;
	color:		#eee ;
}

table,tr,td {
	margin: 0px ;
	padding: 1px ;
	border-spacing: 0px ;
	background-color: #000 ;
	color:		#eee ;
}

.textUpper {
	margin:		0 ;
	margin-bottom:	0px ;
	font-family:	Ubuntu ;
	font-size:	12px ;
	font-weight:	normal
	/* padding:	10px ; */
}

.textLower {
	margin:		0 ;
	margin-top:	0px ;
	font-family:	Ubuntu ;
	font-size:	12px ;
	font-weight:	normal
	/* padding:	10px ; */
}

.bigger {
	font-size:	15px ;
	font-weight:	900 ;
}

.biggernet {
	font-size:	15px ;
	font-weight:	900 ;
	font-style:	italic ;
	color:		orange ;
}

/***********************************************/

.dash-grid {
	width:			580px ;
	display:		grid ;
	grid-template-columns:	1fr 1fr ;
	grid-template-rows:	1fr ;
	gap: 2px
}

.dash-item-1 {
	grid-column:		1 / span 1 ;
	grid-row:		1 / span 1 ;
	justify-self:		center ;
	background-color:	#000000 ;
	border:			1px solid #8FCF8F ;
	/*
	*/
}

.dash-item-2 {
	grid-column:		2 / span 1 ;
	grid-row:		1 / span 1 ;
	justify-self:		center ;
	background-color:	#000000 ;
	border:			1px solid #8FCF8F ;
	/*
	*/
}

.dashBanner {
	margin-left:	15px ;
	font-size:	20px ;
	font-family:	Ubuntu ;
	font-weight:	900 ;
	color:		#8FDF8F ;
	/*
	font-color:	#FF0000 ;
	*/
	text-shadow:	2px 2px 4px black, 0px 0px 7px white, 0px 0px 14px gray ;
}

/***********************************************/

</style>

<script>
	<!--
	sidebar.onFirefoxLoad = function(event) {
		document.getElementById("contentAreaContextMenu")
	        	.addEventListener("popupshowing", function (e) 
				{	sidebar.showFirefoxContextMenu(e); }, false);
					toggleSidebar();
				};
	-->

	bSide = window.top.document.getElementById("sidebar-box") ;
</script>


</head>
<body style='background-color: #000 ; vertical-align: top ' >
<div class='dash-grid' >

" > ${displayHtml}

} #webWrapHead()


webWrapFoot()
{
	echo "
</div>
	<script>
		window.addEventListener("load", sidebar.onFirefoxLoad, false) ;

		bSide.addEventListener("load", sidebar.onFirefoxLoad, false) ;

		browser.sidebarAction.close() ;

		/*
		<!--
		-->
		*/
		bSide.style.display = 'none';
	</script>
</body>
</html>
" >> ${displayHtml}
} #webWrapFoot()


populateIcons()
{
	roundel_MATE_icon="${icons}/Ubuntu__MATE_Roundel.svg"

	if [ ! -s "${roundel_MATE_icon}" ]
	then
		###	Only perform test if icons not at expected location
		if [ ! -d "${icons}" ]
		then
			mkdir -v "${icons}" 2>&1 | awk '{ printf("\t %s\n", $0 ) }'
			if [ -d "${icons}" ]
			then
				chmod -v 775 "${icons}" 2>&1 | awk '{ printf("\t %s\n", $0 ) }'
				chown -v ${primaryUserID} "${icons}" 2>&1 | awk '{ printf("\t %s\n", $0 ) }'

				echo -e "\n\t CONFIRMED: Setup ... required icon repository created at '${icons}' ..."
				ls -ld "${icons}" | awk '{ printf("\t %s\n", $0 ) }'
			else
				echo -e "\n\t Unable to create required icon repository at '${icons}'. Unable to proceed.\n" ; exit 1
			fi
		fi

		createIcon_Roundel_MATE

		if [ -s "${roundel_MATE_icon}" ]
		then
			echo -e "\n\t CONFIRMED: Setup ... required icon saved at '${roundel_MATE_icon}' ..."
			ls -l "${roundel_MATE_icon}" | awk '{ printf("\t %s\n", $0 ) }'
		else
			echo -e "\n\t Unable to download required icon from the master source location [${roundel_MATE_url}]. Unable to proceed.\n" ; exit 1
		fi
	fi

	roundel_UBUNTU_icon="${icons}/Ubuntu__Standard_Roundel.svg"

	if [ ! -s "${roundel_UBUNTU_icon}" ]
	then
		createIcon_Roundel_UBUNTU

		if [ -s "${roundel_UBUNTU_icon}" ]
		then
			echo -e "\n\t CONFIRMED: Setup ... required icon saved at '${roundel_UBUNTU_icon}' ..."
			ls -l "${roundel_UBUNTU_icon}" | awk '{ printf("\t %s\n", $0 ) }'
		else
			echo -e "\n\t Unable to download required icon from the master source location [${roundel_UBUNTU_url}]. Unable to proceed.\n" ; exit 1
		fi
	fi

	###
	###	FUTURES:  Add additional logic to download icons representing the other OS flavours.
	###

	###
	###	The command to create the following string assignment representing a PNG image:
	###		base64 -w 0 image.png > image.txt
	###

	###
	###	Install the basic drive icon that is used
	###
	###	Extract embedded image to PNG image on disk for use by HTML
	###
	echo "iVBORw0KGgoAAAANSUhEUgAAADAAAAAlCAYAAAAEGWqvAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kb9Lw0AcxV9/iKIVBwuKOGSoThakFXHUKhShQqgVWnUwufQXNGlIUlwcBdeCgz8Wqw4uzro6uAqC4A8Q/wBxUnSREr+XFFrEeHDch3f3HnfvAH+jwlQzOAmommWkkwkhm1sVul8RRB+GEEdMYqY+J4opeI6ve/j4ehflWd7n/hz9St5kgE8gnmW6YRFvEE9vWjrnfeIwK0kK8TnxhEEXJH7kuuzyG+eiw36eGTYy6XniMLFQ7GC5g1nJUImniCOKqlG+P+uywnmLs1qpsdY9+QtDeW1lmes0R5HEIpYgQoCMGsqowEKUVo0UE2naT3j4Rxy/SC6ZXGUwciygChWS4wf/g9/dmoV4zE0KJYCuF9v+GAO6d4Fm3ba/j227eQIEnoErre2vNoCZT9LrbS1yBAxsAxfXbU3eAy53gOEnXTIkRwrQ9BcKwPsZfVMOGLwFetfc3lr7OH0AMtRV6gY4OATGi5S97vHuns7e/j3T6u8H1Exyzg7r/gAAAAAGYktHRAC2ALIAdYBx6QYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfqBAwABC8L4HNhAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAoBJREFUWMPtWLuO2kAUPX7MWEJii2iLlWgYabUNNit+IFKQKLajSaR8SpKfSJRvCBVgGxIqlg2p2W/YJlSrwCoKkVCAmyIxMbO2MWCTxqexZN+ZOWfmzL1XBjJkOAjKrgPevntPjDEoipIoESLCw8MUb16/UlITMLj5QkIIqJqWym6ulkvc3d2h+uxpbF5q3MDrwZCKKZIHAFXTUBQC1zdDSlRAf/CZikJAS5G8B03TUCwKdLqfKBEBjtslIQR0XT/axdR1HSXThNv5SAcJsN0OmVYZus6Onl10naFkWnDcLu0loG27ZJllMHZ88h4YYzBNC7bToZ0EtNoOWeUyGP9/5NciOIdpWWjZDsUS0GzZZJUvwRjfp0ykAs4NWNYlmm2bIutAvV6n2WwGoj9xiqKAiNZP/zv5u78gRRaegNigdeQxq9UK+XweuVwOjUZjPclGaimVSuj1eo+IyFU3aLEwkfIc20jLm+KPmUwmqFarm5c9KIUFCQgSFBUTRXoX0bJIwzDCBRiGkXixCrPFvuMjBTDG4DVqnvL5kznuX95jMV/grH0G45uROKmok5bjOOfhAjjnkDvN6fMprl5c4fbXLcaLMS4+XER2lGE+DiO77X7Jl16uS7rch8gKWY7h5OcJtK8aGNjGBEEE0oK3VqwT8OPUOUXzexNLZYnz4XloZY5rq0PtJ/dkj05AthD/wWG51r+FGUKPeJulorJLVMbyx8tJJtJCUR7dx0J+0kHPMPH+sVsFHNK8bbPHofYBAFVVwwUoigIhBMbjceILJ3GBC4VCdBYajUao1WqoVCqxe5pdd5yIoKpq7A3x5vDG9Pv97FdMhgwZMmTIkCHDX/wGM4dl7bE7Le4AAAAASUVORK5CYII=" |
	base64 -d > "${device}"

	if [ -s "${device}" ]
	then
		echo -e "\n\t CONFIRMED: Setup ... required icon saved at '${device}' ..."
		ls -l "${device}" | awk '{ printf("\t %s\n", $0 ) }'
	fi
} #populateIcons()


colourUsage()
{
	# Define color based on usage percentage
	if [ "${dUse}" -lt ${threshWarn} ]; then
		statColour="green"
	elif [ "${dUse}" -lt ${threshRisk} ]; then
		statColour="orange"
	else
		statColour="red"
	fi
} #colourUsage()


getOpSysType()
{
	test ${dbg} -eq 1 && test -n "${testor}" && { echo ${testor} >&2 ; }
	#/etc/X11/default-display-manager
	#	/usr/sbin/arctica-greeter
	#	/usr/sbin/lightdm
	#	/usr/sbin/lightdm-gtk-greeter
	#	/usr/sbin/slick-greeter
	#
	#	# cd /home ; cat ${primaryUserID}/.dmrc
	#	[Desktop]
	#	Session=mate
	#
	#	# primaryUserSession=$( eval grep '^Session=' ~${primaryUserID}/.dmrc | cut -f2 -d"=" )
	#	mate

	case "${testor}" in
		"mate" )
			#Ubuntu MATE
			flavIcon="file://${roundel_MATE_icon}"
			#/usr/share/xsessions/mate.desktop
			;;
		"ubuntu" | "gnome" )
			#Ubuntu Desktop
			flavIcon="file://${roundel_UBUNTU_icon}"
			#/usr/share/wayland-sessions/gnome.desktop
			#/usr/share/xsessions/gnome.desktop
			;;
		"kde-plasma" | "kubuntu" )
			#Kubuntu
			flavIcon=""
			#/usr/share/wayland-sessions/plasma.desktop
			#/usr/share/xsessions/plasma.desktop
			;;
		"Lubuntu*" | "LXDE*" )
			#Lubuntu
			#/usr/share/xsessions/lubuntu.desktop
			#/usr/share/xsessions/lxqt.desktop
			flavIcon=""
			;;
		"xubuntu" )
			#Xubuntu
			flavIcon=""
			#/usr/share/xsessions/xubuntu.desktop
			;;
		"budgie-desktop" )
			#Ubuntu Budgie
			flavIcon=""
			;;
		"cinnamon" )
			#Ubuntu Cinnamon
			flavIcon=""
			;;
		"xfce" )
			#Ubuntu Studio
			flavIcon=""
			;;
		"ukui" )
			#Ubuntu Kylin
			flavIcon=""
			;;
		"unity" )
			#Ubuntu Unity
			flavIcon=""
			;;
		* )
			flavIcon=""
			;;
	esac
	test ${dbg} -eq 1 && test -n "${flavIcon}" && { echo ${flavIcon} >&2 ; }
} #getOpSysType()


getDriveType()
{
	# Logic to be finalized for optional addition
	# of GUI hint of network-based drive

	#findmnt -l -t nfs,nfs4,cifs,smb3,sshfs
	#TARGET                SOURCE                              FSTYPE OPTIONS
	#/mnt/nas              //192.168.1.50/share                cifs   rw,relatime,vers=3.0,iocharset=utf8
	#/home/user/network    192.168.1.10:/volume1/homes         nfs4   rw,relatime,vers=4.1,rsize=131072
	#/mnt/remote           user@host:/home/user                fuse.s rw,nosuid,nodev,relatime,user_id=1000


	#findmnt -D -t nfs,nfs4,cifs,smb3
	#SOURCE                      FSTYPE   SIZE  USED AVAIL USE% TARGET
	#//192.168.1.50/share        cifs     1.8T  1.2T  600G  67% /mnt/nas
	#192.168.1.10:/volume1/homes nfs4     5.4T  2.0T  3.4T  37% /home/user/network

	# Need equivalent lsblk report for an instance of each type of remote mounted filesystem
	#lsblk --output-all --pairs --paths ${drive} | sed 's+["][ ]+"\n+g' >${devDat}

	echo "" >>/dev/null
} #getDriveType()


diskHtml()
{
	cat <<-EnDoFfIlE
<div style='width: 280px ; align-items: right ; margin: 0,0,0,0' >

<table style='width: 270px ;' >
        <!-- Container -->
<tr>
<td style='width: 54px ; height: 54px' >

<span style='position: absolute ;
	' >
EnDoFfIlE

	if [ \( "${dName}" = "/" \) -a \( -n "${flavIcon}" \) ]
	then
		cat <<-EnDoFfIlE
	<img style='z-index: 99 ;
		position: relative ;
		top: 0%; left: 0% ;
		transform: translate(50%, -150%) ;
		width: 25px ;
		height: 25px ; ' src="${flavIcon}" >

	<img style='z-index: 1 ;
		position: relative ;
		top: 0%; left: 0% ;
		transform: translate(-63%, -50%) ;
		width: 48px ;
		height: 37px ; ' src="file://${icons}/DRIVE__Local.png" >
</span>
EnDoFfIlE
	else
		cat <<-EnDoFfIlE
	<img style='z-index: 1 ;
		position: relative ;
		top: 0%; left: 0% ;
		transform: translate(0%, -50%) ;
		width: 48px ;
		height: 37px ; ' src="file://${icons}/DRIVE__Local.png" >
</span>
EnDoFfIlE
	fi
	
	cat <<-EnDoFfIlE
</td>

<td>
	<table>
    	<tr>
	<td>
EnDoFfIlE

	if [ -n "${dNet}" ]
	then
        	echo -e "\t\t<p class='textUpper' > <span class='biggernet' >${dName}</span> &nbsp; [${dPath}] &nbsp; ${dUse}%</p>"
	else
        	echo -e "\t\t<p class='textUpper' > <span class='bigger' >${dName}</span> &nbsp; [${dPath}] &nbsp; ${dUse}%</p>"
	fi

	cat <<-EnDoFfIlE
	</td>
    	</tr>
    	<tr>
	<td>
            	<!-- Bar Bounds -->
        	<div style='width: 200px ;
			background-color: #ddd ;
			margin: 0 ;
			'>
            		<!-- Bar Measure -->
            		<div style='width: ${dUse}% ;
	    			background-color: ${statColour} ;
				height: 15px ;
				text-align: left ;
				line-height: 15px ;
				color: white ;
				font-weight: bold ;
				' >
            		</div>
		</div>
	</td>
    	</tr>
    	<tr>
	<td>
       		<p class="textLower" >${dFree} ${dUniF}B &nbsp; free of &nbsp; ${dSiz} ${dUniS}B</p>
	</td>
    	</tr>
	</table>
</td>
</tr>
</table>
</div>
EnDoFfIlE

} #diskHtml()


logicNew()
{
	# Get infor for individual disk
	grep "^${drive}" "${devHarvest}" >${devDat}

	# Get partition label & path
	#	SOURCE
	dPath="${drive}"

	#	LABEL
	if [ "$( awk '{ print $7 }' <${devDat} )" = "/" ]
	then
		test ${dbg} -eq 1 && echo "root" >&2
		dName="/"
	else
		if [ -n "$( echo "${drive}" | grep -v '^/dev/' )" ]
		then
			dName=$( awk '{ n=split( $7, vals, "/" ) ; print vals[n] }' <${devDat} | tr '[a-z]' '[A-Z]' )
		else
			dName=$( awk '{ print $8 }' <${devDat} | tr '[a-z]' '[A-Z]' )
		fi
	fi

	# Get disk usage as percentage
	#	USE%
	dUse=$( awk '{ gsub( /%/, "", $6 ) ; print $6 }' <${devDat} )
	#echo "${dUse}" >&2

	# Get disk capacity in GB
	#	SIZE
	vals=$( awk '{ print $3 }' <${devDat} | awk '{ cnt=length($1) ; printf("%s %s\n", substr( $1, 1, cnt-1), substr( $1, cnt) ) ; }' )
	dSiz=$(echo ${vals} | awk '{ gsub( $1, ",", "." ) ; pos=index( $1, "." ) ; if( pos == 0 ){ print $1 }else{ print substr( $1, 1, pos-1) } ; }' )
	dUniS=$(echo ${vals} | awk '{ print $2 }' )
	#echo "$vals | $dSiz $dUniS" >&2

	# Get free space
	#	AVAIL
	vals=$( awk '{ print $5 }' <${devDat} | awk '{ cnt=length($1) ; printf("%s %s\n", substr( $1, 1, cnt-1), substr( $1, cnt) ) ; }' )
	dFree=$(echo ${vals} | awk '{ gsub( $1, ",", "." ) ; pos=index( $1, "." ) ; if( pos == 0 ){ print $1 }else{ print substr( $1, 1, pos-1) } ; }' )
	dUniF=$(echo ${vals} | awk '{ print $2 }' )
	echo "vals='${vals}'    dFree='${dFree}'    dUniF='${dUniF}'" >&2
} #logicNew()


getUsageLocal()
{
	#logicOld
	logicNew
} #getUsageLocal()

getUsageNetwork()
{
	#logicOld
	logicNew

	dNet=$( awk '{ print $2 }' <${devDat} )
	case ${dNet} in
		"nfs"* )
			;;
		"cifs" )
			;;
		"smb3" )
			;;
		* )
			dNet="-"
			;;
	esac
} #getUsageNetwork()


#####################################################################################
#####################################################################################

demo=0
dbg=0

test $(hostname) = "OasisMega1" && dbg=2

threshWarn=70
threshRisk=90
while [ $# -gt 0 ]
do
	case "${1}" in
		"--demo" )	demo=1	; shift ;;
		"--debug" )	dbg=1	; shift ;;
		"--warn" )	threshWarn=$2 ; shift ; shift ;;
		"--risk" )	threshRisk=$2 ; shift ; shift ;;
	esac
done

# sudo:x:27:ericthered
primaryUserID=$( grep '^sudo:' /etc/group | cut -f4 -d":" | cut -f1 -d"," )
if [ -z "${primaryUserID}" ]
then
	echo -e "\n\t Unable to identify the Primary User ID.  Unable to proceed.\n" ; exit 1
fi
	
base=$(basename "${0}" ".sh" )

displayHtml="/home/${primaryUserID}/Downloads/${base}_report.html"
devLocal="/home/${primaryUserID}/Downloads/${base}_drivesLocal.txt"
devNetwk="/home/${primaryUserID}/Downloads/${base}_drivesNetwk.txt"
devDat="/home/${primaryUserID}/Downloads/${base}_driveRaw.txt"
pythonDash="/home/${primaryUserID}/Downloads/${base}_dash.py"

icons="/home/${primaryUserID}/.config/icons"
device="${icons}/DRIVE__Local.png"


###
###	Initialize graphics
###

populateIcons


# HTML and CSS for the progress bar

rm -f ${displayHtml}
webWrapHead

for dType in local network
do
	first=1

	###
	###	Harvest Drive Info
	###

	case ${dType} in
		"local" )
			echo -e "\n\t Processing locally mounted drives ..."
			#
			#	lsblk --output-all --pairs --paths
			#
			fTypes="nosquashfs,notmpfs,nodevtmpfs,nofuse.portal"
			devProps="SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET,LABEL"
			rm -f "${devLocal}"
			rm -f "${devLocal}.tmp"

		if [ ${demo} -eq 1 ]
		then
			{	cat <<-EnDoFfIlE
/dev/sdb3	ext4 191.2G  76.7G 104.7G 40% /		DB001_F1
/dev/sdb7	ext4 288.2G 269.8G   3.7G 94% /DB001_F2	DB001_F2
/dev/sdb8	ext4 288.2G 265.4G   8.1G 92% /DB001_F3	DB001_F3
/dev/sdb9	ext4 288.2G 251.1G  22.5G 87% /DB001_F4	DB001_F4
/dev/sdb12	ext4 191.2G 162.4G    19G 85% /DB001_F5	DB001_F5
/dev/sdb13	ext4 191.2G 171.5G    10G 90% /DB001_F6	DB001_F6
/dev/sdb14	ext4 287.3G 260.7G    12G 91% /DB001_F7	DB001_F7
/dev/sdb4	ext4  91.5G  21.3G  65.5G 23% /DB001_F8	DB001_F8
//truenas/share cifs    21T  88.7G  20.9T  0% /home/user/share
EnDoFfIlE
			} | sort -k7,7 > "${devLocal}.tmp"
		else
			findmnt -D -n -r -t ${fTypes} -o ${devProps} | sort -k7,7 > "${devLocal}.tmp"
		fi

			head -1 "${devLocal}.tmp" >"${devLocal}"
			tail -n +2 "${devLocal}.tmp" |
				grep -v '^//' |
				awk '{
					if( NF == 7 ){
						n=split( $0, vals, "/" ) ;
						printf("%s %s\n", $0, vals[n] ) ;
					}else{
						print $0 ;
					} ;
				}' | sort -k8,8 >>"${devLocal}"
			rm -f "${devLocal}.tmp"

			echo -e "\t\t Detected $(wc -l "${devLocal}" | awk '{ print $1 }' ) local drives ..."

			#driveList=$(df -h | grep '^/dev/' | sort -k1,1 | sort -k6,6 | awk '{ print $1 }' )
			driveList=$( awk '{ print $1 }' <"${devLocal}" )
			usageCommand="getUsageLocal"
			devHarvest="${devLocal}"

			dashPosn="dash-item-1"
			dashBanner="Local"
			countLocal=$( echo "${driveList}" | wc -w | awk '{ print $1 }' )
			;;
		"network" )
			echo -e "\n\t Processing network-attached drives ..."
			#
			#	findmnt -D -t nfs,nfs4,cifs,smb3	(specifically network-type filesystems)
			#
			fTypes="nfs,nfs4,cifs,smb3"
			devProps="SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET,LABEL"
			rm -f "${devNetwk}"

		if [ ${demo} -eq 1 ]
		then
			{	cat <<-EnDoFfIlE
//nas/public    cifs   457.4G 113.4G 343.9G  25% /home/user/nas
//nvr/test      cifs   453.9G  90.6G 363.3G  20% /home/user/test
//truenas/share cifs      21T  88.7G  20.9T   0% /home/user/share
EnDoFfIlE
			} |	awk '{ 
					n=split( $0, vals, "/" ) ;
					printf("%s %s\n", $0, vals[n] ) ;
				}' | sort -k8,8 >"${devNetwk}"
		else
			findmnt -D -n -r -t ${fTypes} -o ${devProps} | 
				awk '{ 
					n=split( $0, vals, "/" ) ;
					printf("%s %s\n", $0, vals[n] ) ;
				}' | sort -k8,8 >"${devNetwk}"
		fi

			echo -e "\t\t Detected $(wc -l "${devNetwk}" | awk '{ print $1 }' ) network-mounted drives ..."

			driveList=$( awk '{ print $1 }' <"${devNetwk}" )
			usageCommand="getUsageNetwork"
			devHarvest="${devNetwk}"

			dashPosn="dash-item-2"
			dashBanner="Remote"
			countNetwk=$( echo "${driveList}" | wc -w | awk '{ print $1 }' )
			;;
	esac

	###
	###	Parse and Display Drive Info
	###

	if [ -n "${driveList}" ]
	then
		echo -e "<div class='${dashPosn}' >\n<span class='dashBanner'>${dashBanner}</span>" >> ${displayHtml}

	for drive in ${driveList}
	do
		test ${first} -eq 0 && { echo "<div style='height: 10px ; width: 280px'></div>" >> ${displayHtml} ; } 

		${usageCommand}

		colourUsage

		flavIcon=""
		if [ "${dName}" = "/" ]
		then
			testor=${GDMSESSION}
			if [ -z "${testor}" ]
			then
				if [ -n "$( ps -e | grep 'mate-session' )" ]
				then
					testor="mate"
				else
					testor="ubuntu"
				fi
			fi

			getOpSysType
		fi


		if [ "${dName}" != "/" ]
		then
			getDriveType
		fi


		diskHtml >> ${displayHtml}

		first=0
	done #drive
		echo "</div>" >> ${displayHtml}
	fi #driveList
done #dType

webWrapFoot


echo -e "\n\t GENERATED: Report created as HTML file ..."
ls -l ${displayHtml} | awk '{ printf("\t %s\n", $0 ) }'


###
###	Display the HTML "dashboard"
###


###
###	Preferred Method - YAD
###
###	Issues: bug with handling of the "--html" flag
###
#yad --html --title="Disk Usage" --width=800 --height=800 --center --no-buttons < ${displayHtml}


###
###	Alternate Method - Firefox
###
###	Issues: unable to programmatically hide all browser sidebars, menus and panels
###
#sudo -i -u ${primaryUserID} firefox --new-tab ${displayHtml}
#su - ${primaryUserID} -c "firefox --new-tab ${displayHtml}"


###
###	Alternate Method - Python3
###
###	Issues: unable to programmatically hide all browser sidebars, menus and panels
###	- Simply points to the local file
###	- CSS and JS links inside the HTML work automatically
###

# head = 28
# drive = 72
if [ ${countLocal} -gt ${countNetwk} ]
then
	count=${countLocal}
else
	count=${countNetwk}
fi

winWidth=$( expr 300 \* 2 )
winHeight=$( expr ${count} \* 72 )
winHeight=$( expr ${winHeight} + 28 )

cat > "${pythonDash}" <<-EnDoFfIlE
import webview
import cairosvg

# Create the window with specified dimensions
webview.create_window(
    'Mounted Drives' ,
    '${displayHtml}' ,
    width=${winWidth},
    height=${winHeight},
    resizable=True
)

webview.start()
EnDoFfIlE

python3 "${pythonDash}" 2>>/dev/null &


exit 0
3 Likes