Opened 7 years ago

Last modified 4 years ago

#6629 reopened defect

Activities can't access fonts installed in the home dir

Reported by: khaled Owned by: mstone
Priority: normal Milestone:
Component: distro Version:
Keywords: Cc: bert, marco, fedejofa, sridhar@…
Blocked By: Blocking:
Deployments affected: Action Needed: design
Verified: no

Description

I installed some fonts under ~/.fonts/ and a custom fontconfig file ~/.fonts.conf, but applications can't access any since they are running in their own isolated homes.

Change History (10)

comment:1 Changed 6 years ago by marco

  • Component changed from sugar to security
  • Owner changed from marco to mstone

comment:2 Changed 6 years ago by mstone

  • Resolution set to invalid
  • Status changed from new to closed

Assuming that the files are world-readable (and that the directories are world-traversable), then Activities should be to read them. Since $HOME (and hence "~") are different from /home/olpc, the actitivies will need to explicitly informed of the files' locations.

comment:3 Changed 6 years ago by bert

  • Resolution invalid deleted
  • Status changed from closed to reopened

But this would force every activity to manually set the necessary environment variables, or symlink to the font directories. Not only does that introduce a dependency on the "olpc" user name, but also it is impractical to expect every activity to do so.

Instead, the "system" should set things up so that it just works. Since Rainbow is the component that re-routes the activities' home dirs, it seems natural for it to be responsible for ensuring they do not break. Possibly it could leave the responsibility to Sugar.

But a mechanism to generally solve that is needed. It could work by allowing the activity environment vars to be customized, and/or for a set of directories and files linked into each activity's home.

comment:4 Changed 6 years ago by gregorio

  • Milestone Never Assigned deleted

Milestone Never Assigned deleted

comment:5 Changed 6 years ago by bert

  • Action Needed set to never set
  • Component changed from security to distro

Quoting http://wiki.laptop.org/go/Fonts#By_copying_.ttf_files

Note that many guides to fonts for the X Window System suggest you can install fonts in a .fonts directory in the user's home directory.

This could easily be solved by adding /home/olpc/.fonts to the system's font path. Since the XO is a single user system by design, that does seem to be the Right Thing.

comment:6 Changed 6 years ago by fedejofa

This could easily be solved by adding /home/olpc/.fonts to the system's font path. Since the XO is a single user system by design, that does seem to be the Right Thing.


Hi, im student from Uruguay and would like this to be solved. Could that be the definitive solution? It would be nice if children here could add fonts. Especially, it would be nice to add to the machine a capital letter font by default to the machines. In spanish, a MAYUS.ttf. I guess this was another ticket, but i guess is a simple problem that it would be nice if gets solved.
Srry for using this comunication way.
And thx for the work.

comment:7 Changed 6 years ago by mstone

  • Action Needed changed from never set to design
  • Cc bert marco fedejofa added

It's fine; thank you for reminding me about it. Thoughts:

a) this will get fixed faster if someone contributes a patch that fixes it.
b) regarding Bert's desire to 'generally' solve this -- what do you think of the approach taken in pre-rainbow-0.8.0's rainbow-sugarize assistant script?

comment:8 Changed 4 years ago by sridhar

  • Cc sridhar@… added

comment:9 Changed 4 years ago by sridhar

I've tried this in os202, and this looks to be fixed. Fonts placed in /home/olpc/.fonts are available in Write.

comment:10 Changed 4 years ago by bert

Well, I'd assume it only works because the security is disabled. Not exactly a "fix" I'd say ;)

Note: See TracTickets for help on using tickets.