Quote from
infobro on May 13, 2021, 4:47 pm
Hi all,
I had been plagued by the noVNC menu icons not showing and I finally tracked down the issue to a python2.7 mimetypes missing type for .svg.
This may have been a mis-fire on the build of the edgeLinux 2.0.0 or a glitch with mailcap or something similar, but, the fix that I put in place corrected the issue.
Your mileage may vary but here's what was up.
You can check to see if the mimetype for .svg is going to be rendered using this command on the edgeLinux command-line:
python -c 'import mimetypes; mimetypes.init(); print mimetypes.types_map[".svg"]'
If the type is missing you'll get something like this:
Traceback (most recent call last):
File "<string>", line 1, in <module>
KeyError: '.svg'
Which means the mapping is missing in /usr/lib/python2.7/mimetypes.py
Add an appropriately sorted entry to the types_map array
'.svg' : 'image/svg+xml',
(don't forget the comma if you aren't adding it to the end of the array, which you shouldn't - it should go before '.swf')
After that you should have your menu icons on the noVNC window.
Hi all,
I had been plagued by the noVNC menu icons not showing and I finally tracked down the issue to a python2.7 mimetypes missing type for .svg.
This may have been a mis-fire on the build of the edgeLinux 2.0.0 or a glitch with mailcap or something similar, but, the fix that I put in place corrected the issue.
Your mileage may vary but here's what was up.
You can check to see if the mimetype for .svg is going to be rendered using this command on the edgeLinux command-line:
python -c 'import mimetypes; mimetypes.init(); print mimetypes.types_map[".svg"]'
If the type is missing you'll get something like this:
Traceback (most recent call last):
File "<string>", line 1, in <module>
KeyError: '.svg'
Which means the mapping is missing in /usr/lib/python2.7/mimetypes.py
Add an appropriately sorted entry to the types_map array
'.svg' : 'image/svg+xml',
(don't forget the comma if you aren't adding it to the end of the array, which you shouldn't - it should go before '.swf')
After that you should have your menu icons on the noVNC window.