I use "gv" command in my scripts to view *.pdf or *.ps files (I do that instead of using "acroread" or "okular" because "gv" has a nice option "-watch" that allows me to see changes in a troff or LaTex file I am working on while using "vi" editor.) However in my new laptop (Dell-Precision-M with ubuntu 14-04 installed) "gv" keeps giving me trouble by always complaining like that:

$gv test.pdf

Warning: Cannot convert string "--Helvetica-Medium-R-Normal---140---P-*-ISO8859-1" to type FontStruct

Warning: Cannot convert string "--Helvetica-Medium-R-Normal---120---P-*-ISO8859-1" to type FontStruct

Warning: Cannot convert string "--Helvetica-Medium-R-Normal---100---P-*-ISO8859-1" to type FontStruct

Warning: Cannot convert string "--Helvetica-Bold-R-Normal---120---P-*-ISO8859-1" to type FontStruct

Frankly, I don't care about those fonts, and anyway, I think it is some kind of a bug (since neither acroread nor okular ever complained about that). So, I tried to simply suppress that warning mgs, by using any options available for "gv" command to be quiet, silent, etc, which could be found in "man gv" or "gv --help", like "-quiet", "-infoSilent", "-dsc", "-eof", -- but to no avail. The "gv" is hell-bent on screaming out those four lines no matter what is a target file. I could've live with that, but in my scrips a few lines after "gv" command I have a "vi" command and those complaints mess up my text in "vi".

Any way of fixing that?

  • 1
    You mean, aside from installing the fonts? – Thomas Dickey Sep 24 '16 at 13:25
  • That is right -- aside from installing the fonts... – Al Kap Sep 24 '16 at 14:39
  • 1
    evince and okular also watch the file for changes and automatically reload it. – Gilles 'SO- stop being evil' Sep 24 '16 at 18:20
  • @Gilles: this is interesting info. But I looked into the okular list of options and haven't seen anything like that. There is one, "--unique "Unique instance" control" with unclear to me function; is it the one you are talking about? If not, anything else? – Al Kap Sep 25 '16 at 0:04
  • @AlKap There's no command line option. I think both evince and okular have this option in their settings, but in both cases it's on by default. – Gilles 'SO- stop being evil' Sep 25 '16 at 0:06

I would fix it by installing the fonts. On my Debian system, those are in the xfonts-75dpi and xfonts-100dpi packages. Red Hat uses different package names.

Other people simply ignore warnings, which are usually sent to the standard error:

gv test.pdf 2>/dev/null
  • thanks, but I'd rather prefer to simply quiet down my gv. I have no problems to live without those fonts. – Al Kap Sep 24 '16 at 15:14
  • " 2>/dev/null"; wow! that simple! It worked; thanks!!! – Al Kap Sep 24 '16 at 16:14
  • no problem (if it works, you can mark it accepted) – Thomas Dickey Sep 24 '16 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.