Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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 4 '12 at 4: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 4 '12 at 4: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 4 '12 at 4:41
1  
Install gnome-open with sudo apt-get install libgnome2-0. –  Paul Gaborit Jul 4 '12 at 6: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 4 '12 at 7:41
show 3 more comments

2 Answers

up vote 2 down vote accepted

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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