Adding OS Logos
-
When the management agent is installed, some logos appear based on the OS installed. I would like to see how we can add more. I'm sure we would add a bunch of other ones like Arch, Manjoro, Kali, Parrot, etc...
Thanks
-
Sure you can add more, as long you can find the logo, it's pretty easy to contribute to XO code.
We can help you to add them and point you where to do so.
@Rajaa-BARHTAOUI or someone in XO team should be able to help on this
-
Sounds good. I'll work on finding the logos that are the size.
-
Let me check if I can find where we found ours, maybe it's trivial
-
So detected OS (the string reported by tools) is stored here: https://github.com/vatesfr/xen-orchestra/blob/8921d7861026a11a2e7007d8451489eee508bdf7/packages/xo-web/src/common/utils.js#L175-L203
Then, you have to get your icon called here: https://github.com/vatesfr/xen-orchestra/blob/8921d7861026a11a2e7007d8451489eee508bdf7/packages/xo-web/src/icons.scss#L1025-L1045
I'm asking XO devs about where we got those icons in the first place.
-
We probably used Fontawesome icons: eg https://fontawesome.com/icons/freebsd
Or https://fontawesome.com/icons/ubuntu
If you can't find the OS you seek there, you need to find a similar icon.
-
And we also use http://fizzed.com/oss/font-mfizz
So as you can see, the problem is not to add existing logo in our code, but find them in a correct format in the first place
-
https://simpleicons.org/ offers more than 1900 SVG icons of typical brands in a somewhat consistent style and they claim that the icons are free.
-
I found the ones that I was looking for. I can make an attempt at the code but not sure how to pull the files in.
I found archlinux in all simpleicons.org and font-mfizz.
/etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rollingI found kali (kali linux) in simpleicons.org
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2021.1"
VERSION_ID="2021.1"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debianI found manjaro in simpleicons.org
/etc/os-release
NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
PRETTY_NAME="Manjaro Linux"I found Pop!_OS in simpleicons.org
/etc/os-release
NAME="Pop!_OS"
VERSION="18.10"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.10"
VERSION_ID="18.10" -
So you can add easily the Arch Linux icon, because we use font-mfizz already.
For the rest, I don't know how to do it properly, but let's focus on getting Arch first!
-
Sounds good. I followed the font-mfizz github instructions and created a pull request with Kali, Manjaro, and Pop_OS! icon svg files.
Not sure when it will be reviewed and merged but they should be there at some point to help make things easier.
https://github.com/fizzed/font-mfizz
EDIT: ugh there are basic merge request for the official git from 2018.
-
Maybe there's a more recent fork? Unmaintained repos are a plague sometimes
-
Per your comment:
Then, you have to get your icon called here: https://github.com/vatesfr/xen-orchestra/blob/8921d7861026a11a2e7007d8451489eee508bdf7/packages/xo-web/src/icons.scss#L1025-L1045
I see Linux Mint in there:
}
&-linux-mint {
@extend .fa;
@extend .icon-linux-mint;But my MInts have no logo...
Did I do something wrong or is it maybe just in the process of being added? Or does it looks like they changed it so there is no dash in the middle anymore? 'linux-mint' vs 'linuxmint'
If it helps at all, Mint is in simpleicons.org too
NAME="Linux Mint"
VERSION="20.1 (Ulyssa)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20.1"
VERSION_ID="20.1"Thanks.
-
I added a dash to the /usr/lib/os-release file. (ID=linux-mint) I'm probably not supposed to modify it but it seems to have worked... for now.
-
If you are fixing something, please open a bug report and/or a pull request with your fix
-
Also pinging @pdonias
-
@olivierlambert This topic was last time discussed in June of 2021.
I am wondering if some sort of solution has been built to add icons to VMs which don't have icons next to them?
I have one VM with FreePBX and while in its core this is a modified CentOS yet the OS reports itself as Sangoma Linux. Another VM is virtualized TrueNAS Scale. Both VMs are bare iconlessThank you
-
The solution will be a revamp on icons to easily integrate any kind of OS icon in XO 6
-
-
Hi
Sorry for necroposting this one.
But it felt relevant, to ask if maybe we could put some Rocky in there are well?On my lab VMs I'm running Rocy8.9 at the moment. But If we could just get "rocky" in general with a generic Tux as the symbol, then that would be more than good enough.
xe vm-param-list uuid=LARGESTRING | grep distro os-version (MRO): name: Rocky Linux release 8.9 (Green Obsidian); uname: 4.18.0-513.11.1.el8_9.0.1.x86_64; distro: rocky; major: 8; minor: 9
-
@jr-m4 said in Adding OS Logos:
Hi
Sorry for necroposting this one.
But it felt relevant, to ask if maybe we could put some Rocky in there are well?On my lab VMs I'm running Rocy8.9 at the moment. But If we could just get "rocky" in general with a generic Tux as the symbol, then that would be more than good enough.
xe vm-param-list uuid=LARGESTRING | grep distro os-version (MRO): name: Rocky Linux release 8.9 (Green Obsidian); uname: 4.18.0-513.11.1.el8_9.0.1.x86_64; distro: rocky; major: 8; minor: 9
Actually I would personally prefer the Rocky Linux OS logo to please be the actual one for the distro! Having the general generic Tux as the symbol, is more when the distro is unknown but is recognised as Linux.