You are not logged in.
Pages: 1
Xubuntu 18.04.4
I installed Arduino from flatpak. Works fine but doesn't create the mime type for the .ino files.
The 'Mime Type Editor' in the GUI under Settings is not an editor, just a viewer - even if it is called 'editor'.
I tried running it from the terminal:
sudo /usr/bin/xfce4-mime-settings
Still doesn't give any editing tools.
So, how do I add a new type?
Thanks
Last edited by Bill53 (2020-04-18 13:54:42)
Offline
Hello and welcome.
It's a manual process as there is no Xfce gui tool to do this, but it is not difficult. The arduino mime entry can be found here.
Copy the contents of this file to one called "arduino.xml" and place it in either:
/usr/share/mime/packages - for system-wide use
~/.local/share/mime/packages - for single-user use
Then run:
sudo update-mime-database /usr/share/mime
...or:
update-mime-database ~/.local/share/mime
...depending on where you put the file.
The mimetype should then show up in xfce4-mime-settings.
Last edited by ToZ (2020-04-18 12:10:13)
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
Thanks ToZ,
it's just that the link gives me a 404 ...
Tried searching github for 'arduino mime' no result.
But never mind.
If it is a manual process, might as well search for how to create the mime type.
Thanks again.
Cheers
Offline
Fixed the link. Here is the arduino mime file from its source code.
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
Fixed the link? WOW! That was fast! Thanks!
Meanwhile i found this, just in case someone comes across with the same issue.
For completeness.
https://coderwall.com/p/qjda2q/create-n … -in-ubuntu
In a nutshell:
Create the MIME-type file in:
/usr/share/mime/packages/
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/todo">
<comment>Todos Text file</comment>
<glob pattern="*.TODO"/>
<glob pattern="*.todo"/>
</mime-type>
</mime-info>
(This is a minimum. Combine this to your requirements with the xml file at the link above)
Then:
$ sudo update-mime-database /usr/share/mime
Give it an icon:
It MUST BE an svg type with the same name as you saved the XML file!
Save the icon to:
/usr/share/icons/gnome/scalable/mimetypes
!! This seems to be a Xubuntu specific directory !! (Xubuntu 18.04.4)
Then:
$ sudo gtk-update-icon-cache /usr/share/icons/gnome -f
Refresh the file browser.
Find more details and better explanation at the link above.
Last edited by Bill53 (2020-04-18 13:40:15)
Offline
Pages: 1
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 535.77 KiB (Peak: 536.61 KiB) ]