Font Permissions
Hello -
In Linux Mint I have installed some new fonts in the usr/share/truetype folder. To make them visible to my non-root account, in permissions I have set the Group to my user account name, e.g. "myAccount" and ran fc-cache. All works well. My question is, what if I wanted more user accounts to be able to use these fonts than just the one I have selected in "Group"? I don't see an entry for "All Users". Thank you. |
Hi there!
I dont know how to do it using the GUI in Linux Mint, but from a command line, you can give everybody ('o' = others) the right to read a file or a directory with: Code:
chmod o+r /path/to/file Code:
-rw-r----- 1 HMW staff 0 6 Okt 08:46 foobar Code:
chmod o+r foobar Code:
-rw-r--r-- 1 HMW staff 0 6 Okt 08:46 foobar HMW |
By default, fonts in linux mint are located in /usr/share/fonts. I'm not sure if it was just a mistake or if that's where you actually installed the new fonts, but normally it should have been /usr/share/fonts/truetype. Also by default fonts have 755 and are owned by root:root. So that means that every user on the system can use the fonts - that's the default behaviour.
So what do you want to do exactly? Do you want to actually restrict the access of some users to certain fonts or do you want the fonts to be accessible by anyone? Did you specify the font location when you ran fc-cache? |
Thanks for the replies.
I have imported several fonts from my Windows HD and had to change the permissions for Linux. In the gui you simply set the group to "root" and other users will be able to see them. If there were more accounts on this machine than me and root, I would want them all to be able to see the fonts. Now I have Times Roman (Arial they can keep). I am a big fan of legacy typefaces. I ran sudo fc-cache -fv and it seems to find everything OK. The fonts show up in the font viewer, etc. |
Quote:
|
On my system, the fonts folders are owned by root, with read-only access for others. I expect Mint is the same. Anything put in them (using sudo in your case) will inherit those permissions, which is exactly what you need. You didn't need to touch the group setting.
|
Quote:
|
You can also put fonts for a specific user in $HOME/.fonts which saves using su/sudo and works fine for a single-user computer.
|
Just a small nit - I'm not sure the licence for Windows includes allowing the fonts to be used under a Linux distribution.
|
Quote:
|
Quote:
The fonts were reported to come from a Microsoft system. And those do come with truetype fonts... or at least did when I knew of them. Now if the fonts came from someone else then they wouldn't have come from a Microsoft system. That was why I said "small nit". |
Not trying to contradict anyone, but I'm trying to imagine the funny scenario where some people (don't know who regulates this stuff, anyway) came into your company and looked for unlicensed fonts on your linux system!
|
Quote:
The only sure way to prevent them is to be able to say "no Microsoft here". https://www.microsoft.com/typography/faq/faq11.htm |
I'm looking at the fonts directly from a Windows 7 installation and see the following copyright information for various fonts:
Arial, Times New Roman, Courier New, Impact: The Monotype Corporation Georgia, Trebuchet MS, Tahoma, Tahoma, Calibri, Comic Sans MS: Microsoft Lucida Console: Bigelow & Holmes Quote:
|
Do you have a /etc/fonts directory that contains ./ ../ conf.avail/ conf.d/ fonts.conf fonts.dtd?
If so, you should create a file, local.conf, in that directory of the form: Code:
cat local.conf In each of your font directories; e.g., /usr/local/share/fonts/MSfonts, you need to execute two commands: Code:
su - <become root> Code:
mkfontdir Quote:
Doing the above will make all fonts available to all applications for all users without any fooling around. The directories and files are owned by root and group root. To make them available, you need to execute (once) as root Code:
su - Now all this depends on the existence of /etc/fonts -- if you don't have that, you're stuck with the really old fashioned way, sorry. If you copy MS fonts to your Linux system, well, that's up to you. Hope this helps some. |
All times are GMT -5. The time now is 02:01 AM. |