Installing Microsoft Fonts in Fedora Template

Hallo! I am new to Qubes OS. I need to install Microsoft Fonts to open and save Word docs in Fedora. I tried to install msttcore-fonts-installer in a template but failed because i guess because the firewall restrictions. I tried with “sudo rpm –i —httpproxy 127.0.0.1:8082 msttcore-fonts-installer.rpm” Did not work. Is there a safe way or do i need to disable the firewall? I read the instructions here but there is no answer other than reduce template strictness? [qubes-users] Install ttf-mscorefonts-installer on debian 11

Try using environment variables, like it is described in the docs:

export HTTP_PROXY=http://127.0.0.1:8082 http_proxy=$HTTP_PROXY \
         HTTPS_PROXY=$HTTP_PROXY https_proxy=$HTTPS_PROXY \
         ALL_PROXY=$HTTP_PROXY all_proxy=$ALL_PROXY \
         NO_PROXY=127.0.0.1 no_proxy=$NO_PROXY

It seems like your command is failing because with rpm you might need to specify port separately, from man rpm:

       --httpproxy HOST
              The  host HOST will be used as a proxy server for all http and ftp trans‐
              fers.  This option may also be specified by configuring the macro %_http‐
              proxy.

       --httpport PORT
              The TCP PORT number to use for the http  connection  on  the  proxy  http
              server instead of the default port.  This option may also be specified by
              configuring the macro %_httpport.
2 Likes

How do i try environment variables? How do i do that technical wise? I have knowledge about linux but not that advanced.

This did not work: sudo rpm -i --httpproxy 127.0.0.1 --httpport 8082 msttcore-fonts-installer-2.6-1.noarch.rpm

Follow the link to documentation, it is explained there

1 Like

I was able to install the fonts however i reduced the security of the template when changing the Networking value from default to sys-firewall, then ran sudo rpm -i fontinstaller.rpm
The installer fetches the fonts online.

Is there another way to install the fonts that doesn’t reduce the security/isolation of the template?

Hello there, indeed you have a way to do so without weakening that much the isolation of your template!

I just did the following and it went very well:

  1. Install the fonts in a Fedora AppVM (preferably a disposable):
    sudo dnf install curl cabextract xorg-x11-font-utils fontconfig
    curl -LO https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
    sudo rpm -ivh --nodigest --nofiledigest msttcore-fonts-installer-2.6-1.noarch.rpm
    
  2. Send the fonts to your template:
    qvm-move /usr/share/fonts/msttcore/
    

and select your template in the Dom0 dialog box that will pop-up.

  1. In the TemplateVM, install the fonts system-wide:
    sudo mv /home/user/QubesIncoming/dispXXXX/msttcore/ /usr/share/fonts/
    

It’s done! The fonts are installed in your template, and you did not have to connect it to the internet!

:warning: You should always be careful about the files you send to a TemplateVM. If provided by M$crosoft, it would be a good idea to verify the checksums of the fonts in the AppVM before sending them, and in the TemplateVM after receiving them.

Hope that it fills your need :slight_smile:

P.S. : I used this guide for the first part: How to Install Microsoft Fonts on Fedora - LinuxCapable

1 Like

Thank you very very much. Your suggestions worked. I note that I couldn’t use “mv” which couldn’t find msttcore, so I used “cp -r” instead of “mv”. Also I concluded in the Template with: sudo fc-cache -f -v

1 Like

Where can I find sha256 for the fonts to compare to?

I couldn’t find them online, but just so you know, here are the values I got when running the calculations myself:

8316b1b5c1e47aad6220e10c83537cd32704e99e7885aabf56a1d897b3d3f1ee ./calibri.ttf
b899c4cdc0c7193c37d8d6720afe17b6e2f618a47a3c196e5598f245a1a6942e ./corbel.ttf
d374f4cc7819ad7a57204543b5ab01aa1580725bf2571eb66a25155216d90f3b ./trebucbi.ttf
5fc2218b5ef0ca1edabe1e694eb6a710f505c8c865a27e377c79d987a9a336e2 ./calibrib.ttf
3f1d76cbf72de8cf7afbb6c4f3fcce5e5e89b92c8647310908aa42c44bd29b5c ./trebucit.ttf
10d099c88521b1b9e380b7690cbe47b54bb19396ca515358cfdc15ac249e2f5d ./webdings.ttf
edf8a7c5bfcac2e1fe507faab417137cbddc9071637ef4648238d0768c921e02 ./courbd.ttf
82d2fbadb88a8632d7f2e8ad50420c9fd2e7d3cbc0e90b04890213a711b34b93 ./georgiab.ttf
735808619bb3f40ea10746aabb2bdea275c7f2c8a00cfeb5d765fcca1c834adb ./constan.ttf
e9f66a22402b92c5cd9dfc9c5b4d93f1fbe4fa865841dfe031d33288ab3bb4a8 ./candara.ttf
00f1fc230ac99f9b97ba1a7c214eb5b909a78660cb3826fca7d64c3af5a14848 ./impact.ttf
6f1570e0b419d4afc36959f6429e542ab42ee9d255366cd77e16e50abe9b5386 ./verdanaz.ttf
9de4ef7b2cb04285224a23c1b7725a80a3852d321a6006b1a22b559cd5450ae9 ./consolai.ttf
4fbab6e3f15a3fa7341a7630865f40aade9068270d3c75ef6633f466eb1a8f60 ./cambriaz.ttf
fde29212db82cd4bf9e118863561c0295dc55c84cb617041798ce9e7363997b9 ./calibrii.ttf
3bbe9306646e401914bd337d380ad0e808aa1d0ecde869e3a8097aac48a56a7f ./times.ttf
deeaff659011f0357b2714fe184bafb934708c3f11c70c4a7c607f8809611845 ./corbeli.ttf
0cc8026b8cadc19cf7b34b0c733adcc85e8ba44ea56150530b5f64fd6994cb73 ./fonts.dir
c74da119f4e6e9eae27feb637aa1cc6e696929d17d04ff84f93e5aeedee5fd84 ./verdana.ttf
1523f19bda6acca42c47c50da719a12dd34f85cc2606e6a5af15a7728b377b60 ./georgiai.ttf
507cf89bc137dd086b8dbdfeebcdc139d724a206abd2a9cc32c75e9ce6ff2cf3 ./candarai.ttf
0cc8026b8cadc19cf7b34b0c733adcc85e8ba44ea56150530b5f64fd6994cb73 ./fonts.scale
b82c53776058f291382ff7e008d4675839d2dc21eb295c66391f6fb0655d8fc0 ./comic.ttf
bb3e4ca1acd0b9e09aa09617e4dad0a18ae0c34ed384a6fe5985b5310fc042de ./tahoma.ttf
66b7706fa9e94a9c2907eefe84a1560b081f5aeea624b73a43043d4a2e817ea9 ./constanb.ttf
fc9a9a90cbd828a22733e1f61f089663b95c7304a7b9beef33e3ee454608b73d ./cambriai.ttf
7fb57eb4c64f249356bb62e2b84ce4ebeb46b89b2d119a2d0888362a278c07ba ./calibriz.ttf
48c036482be2cd50beb203a424e221a1a82a7f9cd60b00430233fc7ca131cb14 ./candaraz.ttf
dccbfb201fce3996776dfb28bc64c8fdb9d8d2aaa077c6964ac3326ef01fb66d ./candarab.ttf
b69a5b33e997c3bc55f35dde8267cb93fe5fbdc3ecbc23b1d987602a9fd2b1f2 ./trebuc.ttf
7fea7f91f1140721bd7837a36ed2b1c856215f3ac08e6d2eb29c1afe235d0900 ./trebucbd.ttf
48d9bc613917709d3b0e0f4a6d4fe33a5c544c5035dffe9e90bc11e50e822071 ./andalemo.ttf
66dbfa20b534fba0e203da140fec7276a45a1069e424b1b9c35547538128bbe8 ./courbi.ttf
ee6d7fe208a7285cf93d6a94c4a172500fa5b69f98cc7e94898b120db74d2e8a ./corbelb.ttf
23b32c48f969e88e430b65a11311393180e2ab95be9309a5b286f473a7899f39 ./consolaz.ttf
fb28b821d4f2ea8f8c9441210b1c8b4a26f799288f9ee276ed8efbac529219ca ./timesi.ttf
6778c7532967aacd43db63a495003aa5a7d1f0fc04eacc2429961ff50d94c9c0 ./corbelz.ttf
6715838c52f813f3821549d3f645db9a768bd6f3a43d8f85a89cb6875a546c61 ./cour.ttf
0aa76048bde8acfafafa3f59ae94a7bfb6613a74d367b3fcb841cd180a7d7a16 ./cambriab.ttf
873361465d994994762d0b9845c99fc7baa2a600442ea8db713a7dd19f8b0172 ./comicbd.ttf
5839c5f5e550e3b1c7059a11b8be0064ee61bf3eb26dc6aae7f3fd5491533aec ./verdanab.ttf
1b551e2d9396970fcf7a9d0b823f8df87f389b18c51f646a4b40701a39463aec ./arialbd.ttf
a45201fa83c9d4bc0700621609d6609555b76d1b7d868b5f7607c8cd481485b5 ./ariali.ttf
5f8d58e719a7d724be036145f506acf38b0942e253a7c331887c7056b93deac8 ./consola.ttf
55b95fc06b6e32ea757fa420163077d8374b8fd8f3be586904203feaa4a19f98 ./timesbd.ttf
0ecfc6ee791cdd71f429ec1afb57486a4a32f8c4796567d384357287c92485f2 ./timesbi.ttf
5295a046a10ef96b7050891920212295ee8e86e4dd8177ceb6cf054ec1dba5f1 ./consolab.ttf
8aa9def1b2b1abf0ef3a3095daf11fafd9557d9221b2ff57e52465b24a83812d ./constani.ttf
df49c8c8ef30e534ca3e762b157a79aab775f3eeb229706014b0003a994a9b67 ./arial.ttf
7d0bb20c632bb59e81a0885f573bd2173f71f73204de9058feb68ce032227072 ./georgia.ttf
f3f6b09855b6700977e214aab5eb9e5be6813976a24f894bd7766e92c732fbe1 ./couri.ttf
dad7c04acb26e23dfe4780e79375ca193ddaf68409317e81577a30674668830e ./ariblk.ttf
c983e037d8e4e694dd0fb0ba2e625bca317d67a41da2dc81e46a374e53d0ec8a ./georgiaz.ttf
1b323c7f64258f7e0a3b97101569af8dd49f09a4c7c08ad3864719a821a7545b ./verdanai.ttf
e381b167b14c83b499487778a70f523d944445dc37487da3a98c8bc4ede50852 ./arialbi.ttf
37a083be091532f379dfdcea441ca3e3a3f4aa30e3d8dcf958fe18134219d5b0 ./constanz.ttf

Thank you. The values match.

You’re welcome, happy to help!

1 Like