4

I have a full texlive ubuntu (2009) installation and typing something like

texdoc caption

returns the following error message: sh: 1: gnome-open: not found

if I type texdoc -f, I get the message:

absent  /home/user/texmf/texdoc/texdoc-bin.cnf
(*) absent  /home/user/texmf/texdoc/texdoc.cnf
absent  /home/user/texmf/texdoc/texdoc-dist.cnf
absent  /usr/local/share/texmf/texdoc/texdoc-bin.cnf
absent  /usr/local/share/texmf/texdoc/texdoc.cnf
absent  /usr/share/texmf/texdoc/texdoc.cnf

(*) This is the recommended configuration file for your personal preferences

Is there any way to avoid this error and make texdoc work?

  • sounds like you're using the distribution from the repositories, which is out of date. see how-to-install-vanilla-texlive-on-debian-or-ubuntu – cmhughes Jul 04 '12 at 04:35
  • Never tried this before, but texdoc -f gives me the same output (on 11.10, with TL 2009 from the repositories). However, texdoc works fine for me. I have a texdoc.cnf located at /usr/share/texmf-texlive/texdoc/texdoc.cnf, which is a symbolic link to /etc/texmf/texdoc/texdoc.cnf. You should probably take a look at this file if you want to set up a local texdoc.cnf at ~/texmf/texdoc/. – jon Jul 04 '12 at 04:37
  • Also: your problem sounds more like it is related to gnome-open. Try using the command on another file or URL: it should work for many different files (.pdf, .txt, , etc.) as well as URLs (and email, even). Failing that, does xdg-open work for you (assuming it is still used in 12.04)? – jon Jul 04 '12 at 04:41
  • 1
    Install gnome-open with sudo apt-get install libgnome2-0. – Paul Gaborit Jul 04 '12 at 06:29
  • 1
    Your title isn't very accurate: I suspect texdoc does work in some way (texdoc -l caption will probably give you a useful list of results). It just fails to open your document in a viewer. As a general rule, "does not work" is rarely the most useful description you can give in a title. By the way, the output of texdoc --version could also have been useful (happily I have a TL2009 installation at hand so I suspect it's 0.47). – mpg Jul 04 '12 at 07:41
  • @PolGab, your solution worked fine. Would you mind making it an answer so that I can mark it as solved? –  Jul 04 '12 at 11:27
  • @mpg: you are right! Here is my suggestion of new title: "texdoc can't find gnome-open (ubuntu 12.04, texlive 2009)". – Paul Gaborit Jul 04 '12 at 11:41
  • @mpg -- It may be more recent than that. On 11.10, my version is 0.61 (using TL 2009 from the repositories; I've manually updated many packages, but nothing to do with texdoc). – jon Jul 04 '12 at 16:20

2 Answers2

4

I suggest you set your preferred document viewers in ~/texmf/texdoc/texdoc.cnf (you may need to create this file), for example:

viewer_pdf = xpdf %s &
viewer_ps = gv %s &
viewer_dvi = xdvi %s &
viewer_txt = view

Of course you should replace xpdf etc with your actual preferred viewer, like evince or whatever. This should fix the issue, with the little bonus that you get to choose your viewers.

The problem is that texdoc tries to guess a viewer but for some reason it selects one that doesn't seem to be available, which shouldn't happen. I don't understand why it happens, but since 0.47 is an old release, this part of the code has been modified many times afterwards, and moreover, this behaviour was never reported before, I won't be investigating it much.

egreg
  • 1,121,712
mpg
  • 9,918
2

Install gnome-open via sudo apt-get install libgnome2-0.

Paul Gaborit
  • 70,770
  • 10
  • 176
  • 283