Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2012, 03:35 AM   #1
fionnbharr
Junior Member
fionnbharr began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2012
Device: None
External viewers, various Linux Desktops

Howdy, all;

Having some trouble with Calibre calling external viewers under Linux.

If I'm using a KDE interface, I can see external viewers for PDF, ODT, HTML, whatever -- just fine.

If I'm using the LXDE interface, nothing is called; I cannot use any external viewer. Each external program is properly set-up and associated with the proper types of files (both by filename and by 'magic number').

This is the same physical machine; just the user interface (KDE/LXDE) is changing.

Is this a known issue? Is there a workaround?

Thanks!
fionnbharr is offline   Reply With Quote
Old 03-15-2012, 04:10 AM   #2
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
I assume this can be fixed by getting the filename associations right under LXDE. Are you using PCManFM to set the file association? It claims Freedesktop.org interoperability, which is usually all that is needed under Linux for most apps.

In any case, a work around would be to use the Open With GUI Plugin. Once installed, by default (I think) it is included in the context menu for the library (right click on an ebook) but you can use Preferences -> Toolbar to change this. You can add any app to any ebook format. This is also a way to use the internal viewer for a format via "View", but have the option for an external viewer via "Open with"

Last edited by wallcraft; 03-15-2012 at 04:16 AM.
wallcraft is offline   Reply With Quote
Advert
Old 03-15-2012, 10:50 AM   #3
fionnbharr
Junior Member
fionnbharr began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2012
Device: None
Hi, Wallcraft;

As I described in the OP, all file associations under LXDE work fine -- and this includes using pcmanfm.

Is there some .config or .rc file for Calibre that specifies the associated file viewers?
fionnbharr is offline   Reply With Quote
Old 03-15-2012, 10:56 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,068
Karma: 34462775
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by fionnbharr View Post
Hi, Wallcraft;

As I described in the OP, all file associations under LXDE work fine -- and this includes using pcmanfm.

Is there some .config or .rc file for Calibre that specifies the associated file viewers?
No there is only the preference: Use internal viewer

It is up to the OS if the tick is missing.
theducks is offline   Reply With Quote
Old 03-15-2012, 11:30 AM   #5
fionnbharr
Junior Member
fionnbharr began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2012
Device: None
post deleted in error

Last edited by fionnbharr; 03-15-2012 at 11:37 AM.
fionnbharr is offline   Reply With Quote
Advert
Old 03-15-2012, 11:32 AM   #6
fionnbharr
Junior Member
fionnbharr began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2012
Device: None
Quote:
Originally Posted by theducks View Post
No there is only the preference: Use internal viewer

It is up to the OS if the tick is missing.
Hi, theducks;

Let me clarify what I said in the OP: the external viewers do indeed work under Linux.

If I use the KDE, start Calibre, and try to view, say, a PDF file from the library, then okular is called and it shows the PDF file just fine.

If I use Gnome, start Calibre, and view the PDF, then okular is also called (it's my preference over the Gnome-default evince), and I can view it just dandy.

If I use LXDE, start Calibre, and view the PDF, something doesn't work: an Error box with the message "No such file or directory" is displayed.

Under LXDE, pcmanfm displays PDFs just fine -- okular is selected as the preferred PDF viewer.

This has nothing to do with using the tick-box to choose the internal Calibre viewer or not; it also has nothing to do with the OS, since the OS isn't changing between using KDE or LXDE. The error message "No such file or directory" indicates that Calibre is looking for *something*, but it's misdirected to a nonexistent file or directory.

How can I change that behavior?

Thanks!
fionnbharr is offline   Reply With Quote
Old 03-15-2012, 11:51 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 22,280
Karma: 124547460
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't experience the same behavior running Linux Mint 12 LXDE. As long as calibre isn't configured to view the filetype with its internal viewer, it opens fine in whatever is configured as the default app for the system. ODT, PDF, RTF or whatever. Granted... I only ever use one desktop environment at a time per system, so I don't know what (if any) quirks might arise from switching between multiple DE's on the same system. I just know the issue doesn't seem to be endemic to LXDE itself.
DiapDealer is online now   Reply With Quote
Old 03-15-2012, 08:37 PM   #8
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by fionnbharr View Post
As I described in the OP, all file associations under LXDE work fine -- and this includes using pcmanfm.
From Ray's Notebook - Desktop - File Associations:
Quote:
Desktop file mangers like Nautilus and Thunar allow a user to open a file by double-clicking (or similar) on the displayed name or icon of the target file. The application launched depends on the desktop's file associations. By default, freedesktop.org desktops use the associations given in /usr/share/applications/defaults.list. This configuration file sets associations for a recognized MIME type by listing one or more applications suitable for opening files of that type; the lists name desktop entry files to register applications. When a user selects a file to open via Nautilus or Thunar, for example, the choice of applications comes from the list in defaults.list for the MIME type of the selected file. The first application listed for a type becomes the default for that type. The text file defaults.list uses a simple and clear format.

Use a file manager to change the default application for opening files of a given (MIME) type. The details differ by file manager. For Nautilus, Thunar, and PCManFM, at least, start by right-clicking on a file of the desired type. In Thunar, select Open With and then Open with Other Application from the pop-up menus. In PCManFM, select Open With. In Nautilus with GNOME 3, select Properties from the menu, then click the Open With tab; with GNOME 2, select Open with Other Application from the menu.
My suggestion was to explicitly set the default application using PCManFM, i.e. right click and select Open With. Then see if this carries through to Calibre. Also look at /usr/share/applications/defaults.list to see if it looks right.
wallcraft is offline   Reply With Quote
Old 03-16-2012, 01:41 AM   #9
fionnbharr
Junior Member
fionnbharr began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2012
Device: None
Interesting ... the /usr/share/applications/defaults.list simply isn't present (where did it go?), and neither is ~/.local/share/applications/defaults.list.

And according to the latest documentation I have, it seems that xdg-open is broken. (I'm using Arch, so see here: https://wiki.archlinux.org/index.php...it_should_work )

I'm sure there's a workaround somewhere. I'm working on it.

Last edited by fionnbharr; 03-16-2012 at 01:42 AM. Reason: fix link
fionnbharr is offline   Reply With Quote
Old 05-02-2013, 03:00 AM   #10
pv2008
Junior Member
pv2008 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: Kindle Touch
Hi,

I am seeing the same problem too: LXDE on Debian, external viewers won't open (in my case pdf documents). Juts wondering if you actually found a workaround - apart from using Calibre's internal viewer which I found to take a very long time to start when loading pdf files.
pv2008 is offline   Reply With Quote
Old 05-02-2013, 04:04 AM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by pv2008 View Post
using Calibre's internal viewer which I found to take a very long time to start when loading pdf files.
No help for your problem, just some insight. Calibre's viewer is essentially a ePub viewer and everything is converted prior to viewing.
DoctorOhh is offline   Reply With Quote
Old 05-03-2013, 01:17 AM   #12
pv2008
Junior Member
pv2008 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: Kindle Touch
Quote:
Originally Posted by DoctorOhh View Post
No help for your problem, just some insight. Calibre's viewer is essentially a ePub viewer and everything is converted prior to viewing.
I see. That does explain the slowness because my pdf files are usually technical books. Another slight annoyance is that I can't even do "Open Containing Folder". This is on the latest 0.9.28 release.

Cheers.
pv2008 is offline   Reply With Quote
Old 05-03-2013, 01:31 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 36,787
Karma: 16422043
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Since open containing folder is also delegated to your OS and your OS is broken that's hardly surprising. You need to fix xdg-open for your desktop, or switch to a non-broken desktop.
kovidgoyal is offline   Reply With Quote
Old 05-03-2013, 01:44 AM   #14
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,648
Karma: 23307774
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
See this old thead for more hints:

https://www.mobileread.com/forums/showthread.php?t=84767

Also I found this, might be helpful:

https://wiki.archlinux.org/index.php/LXDE
Quote:
If not using a display manager you would like to add
export DESKTOP_SESSION=LXDE
to your ~/.bash_profile in order xdg-open to function properly.
...
The application menu works by resolving the .desktop files located in /usr/share/applications. Many desktop environments run programs that supersede these settings to allow customization of the menu. LXDE has yet to create an application menu editor but you can manually build them yourself if you are so inclined. Third party menu editor can be found in AUR - lxmed
To add or edit a menu item, create or link to the .desktop file in /usr/share/applications. Consult the desktop entry specification on freedesktop.org for structures of .desktop files.

Last edited by Adoby; 05-03-2013 at 01:59 AM.
Adoby is offline   Reply With Quote
Old 12-29-2013, 05:38 PM   #15
flups
Junior Member
flups began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2012
Device: prs-350
I found a solution for Ubuntu 13.04.
  1. Open /usr/bin/xdg-open as root
  2. go to the sub routine open_lxde()
  3. After the line
    local file="$(echo "$1" | sed 's%^file://%%')"
    add the following two lines:
    local printf=/usr/bin/printf
    file="$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"

The problem is, that the lxde_open() is quite of buggy. This sub tries to convert an URI that starts with "file://" to an absolute path, but I fails to deal with special chars like %20. So
file:///home/lib/Isaac%20Asimov.pdf
becomes
/home/lib/Isaac%20Asimov.pdf
This is not a valid file name. So the known "file or directory not found"-window appears.

I c&p the above two lines from the "open_generic" subroutine where this is done right.

Thanks to Kovod for the hint with xdg-open.

"Guten Rutsch" from Germany and a happy new year!

Last edited by flups; 01-18-2014 at 04:41 PM.
flups is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pdf viewers cindiaugustine Kobo Tablets 2 11-15-2011 07:38 PM
This really is going to remove the need for desktops Dopedangel Android Devices 1 01-06-2011 06:08 AM
804 viewers of Kindle Forum! daffy4u Amazon Kindle 7 12-25-2010 07:52 PM
PRS-600 Linux kernel doesn't detect PRS-600 external memory sinkpen Sony Reader 4 10-30-2009 01:50 PM
Poll:Will PDAs be Relevant when Desktops Fit in Your Pocket? Bob Russell Alternative Devices 8 06-16-2005 09:57 AM


All times are GMT -4. The time now is 09:28 AM.


MobileRead.com is a privately owned, operated and funded community.