Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2015, 03:48 AM   #1
clupus
Junior Member
clupus began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2015
Device: Nook
Calibre messes around with the keymaps

Hello,

I am unsure where to ask/what to do.

My situation: I have a server machine running multiple virtual linux hosts. One of these contains a vncserver (call this host vnc). Another contains my calibre library (call thsi host nas). Unfortunately the server is located quite far from where I sit now and thus the connection with the database is quite slow (I wait 5-10 sec if I click on a book before calibre is responsible again). Thus I want to do the management of the ebook database via VNC (tightvnc at the moment). Due to some other considerations I have a virtual host with more computational power (call it work).
I now start calibre on the tightvncserver either from vnc locally or via ssh X11 forwarding from work. Both ways I get the same behaviour: The keymapping get's messed up. If I type "abcdef" I get "asdfgh" which is the home line of my keyboard! Any other program I tried (gnome-terminal, gedit,...) had the correct mapping.
If I start calibre on either vnc or work ssh via X11 forwarding to my desktop machine the keymap is correct but the program is much too slow to work with it (even slower than exporting the folder via NFS and running calibre locally).

From all the tests I did I guess that calibre tries to be smart about the keymaps but fails in the case of vnc.

The only output I get from calibre are:
Quote:
Qt: XKEYBOARD extension not present on the X server.
Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Exception in thread Thread-5:
Traceback (most recent call last):
File "threading.py", line 810, in __bootstrap_inner
File "site-packages/calibre/gui2/device.py", line 401, in run
File "site-packages/calibre/gui2/device.py", line 263, in detect_device
File "site-packages/calibre/devices/scanner.py", line 325, in scan
File "site-packages/calibre/devices/scanner.py", line 179, in __call__
RuntimeError: DeviceScanner requires the /sys filesystem to work.
Maybe any of you guys has had a similar issue or knows the problem (plus ideally a workaround).
If not it would be nice to know how to reach the developers of the quit nice program to submit a bug report if needed.

Chris
clupus is offline   Reply With Quote
Old 09-08-2015, 03:51 AM   #2
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: 45,255
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does not do anything with keymaps, indeed calibre has no keybaord handling code at all. That is the job of Qt. Whatever vnc program you are using is likely incompatible with Qt. Personally, I use tigervnc, which works fine.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-08-2015, 06:58 AM   #3
clupus
Junior Member
clupus began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2015
Device: Nook
Hello again,
can you point me to another QT application such that I can verify your statement and report a bug vs the QT libs?
I tried with kwrite (which uses QT as I might remember correctly) but this worked out correctly (no issues with the keymappings).
Thanks
clupus is offline   Reply With Quote
Old 09-08-2015, 08:19 AM   #4
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: 45,255
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Qt comes with plenty of demo programs, just make sure you are using qt 5.4, which is the version of qt calibre uses.
kovidgoyal is offline   Reply With Quote
Old 09-08-2015, 08:20 AM   #5
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: 45,255
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And let me just say, that if I were you, I'd solve the problem by creating a launch script for calibre that rsyncs the library folder before and after running calibre. Then you can run it locally with great performance and no VNC issues.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-08-2015, 09:13 AM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
to rsync.

Regardless of any keymap issues, it would just be my first thought if I wanted to run the Content Server remotely.
Which I'm not, because I set up dynamic DNS and run the server from my laptop, but it's the thought that counts...
eschwartz is offline   Reply With Quote
Old 09-09-2015, 02:39 AM   #7
clupus
Junior Member
clupus began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2015
Device: Nook
Ok, I see (and tried) the trick with rsync. The first copy of the data took quite some time (logically) but from then on it ran quite fast.

The only drawback is that I have to provide a whole copy of the library on all potential machines; I cannot avoid this to just add a book to the library from work without checking out al the other books in the library.

Thanks so far
Christian
clupus is offline   Reply With Quote
Old 09-09-2015, 09:36 AM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If you just want to quickly add a book, you might want to simply use the CLI backend.

`calibredb add /path/to/ebook`

Alternatively, use a staging library that exists only on the current computer, setup metadata/custom column info as needed, then save to disk, move that to the remote server, and use

`calibredb add --one-book-per-directory /path/to/ebook/folder`

It will derive the metadata from the saved OPF. Faster than using calibredb to set metadata in between searching for the ebook ids.
eschwartz is offline   Reply With Quote
Old 03-18-2016, 08:02 AM   #9
whitecoat
Junior Member
whitecoat began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2016
Device: kindle
Seems QT config issues can cause this issue

Quote:
Originally Posted by kovidgoyal View Post
Qt comes with plenty of demo programs, just make sure you are using qt 5.4, which is the version of qt calibre uses.
Been having this same issue of messed up keys running calibre over VNC on a headless docker container when everything else works fine.
And just spotted this thread, exactly the same issue, and in fact had it happen every time I've tried calibre over a vnc.

Just before I found this thread I found this:
https://communities.mentor.com/thread/12344
which indicates that on some platforms users have had and corrected this adjustments to XMODIFIERS environmental variable.
Searching on that for my own platform found this:
http://ubuntuforums.org/showthread.php?t=2112791
Which indicates QT does this in lots of places if XMODIFIERS misconfigured.
Which brings me back to this thread...

I see from the thread that koviggoyal prefers rsync, for multi-machine set-ups. But I tend to use a portable device over a VPN when I'm out and about. And that is not really conducive to regular file syncs.

There seemed to be a theme around the isue, so I just thought I'd share.
In case anyone else is pursuing this, I'll keep digging.
Anyone know how to configure QT5?
whitecoat is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indenting Paragraphs in Calibre Messes up Bullets ErikThePerik Conversion 5 08-17-2012 08:59 PM
Dynamic keymaps Mackx iRex Developer's Corner 42 04-25-2012 08:56 AM
Bulk Convert Messes up Authors TheHeartlessHero Calibre 1 09-11-2008 08:05 PM
Screen messes up in landscape diabloNL Sony Reader 6 05-17-2007 05:32 AM


All times are GMT -4. The time now is 05:22 PM.


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