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 02-26-2017, 03:15 AM   #16
Flaim
Junior Member
Flaim began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
I haven't a clue. All a calibre instalaltion does is install a few icons, a few completion files and a few .desktop files. And even that it does using the xdg tools, not by itself. I dont see how it is possible for that to "hose" a desktop environment.
I have run into this same problem. What I have discovered is that during the installation, or initial execution of Calibre, all files in /usr/share/mime are set to rw-------. I was able to restore my desktop after running
Code:
sudo find /usr/share/mime -type f -exec chmod 644 {} \;
So, there is a problem in the installation that is either resetting file permissions in /usr/share/mime, or replacing the existing files with files that are 600 not 644.
Flaim is offline   Reply With Quote
Advert
Old 02-26-2017, 03:39 AM   #17
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: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There's the installer, https://github.com/kovidgoyal/calibr...libre/linux.py

The only call to chmod is on line 738, which is for the calibre un-installer and is used to mark it executable. There is nowhere in the installer that permissions on files in /usr/share/mime are changed. If the permissions on those files in your system are being changed, it is by something other than the installer.

As I said before, the installer does not itself install any mime type files. It calls the xdg-mime system utility to do that. So if mime files are having their permissions changed, it is because xdg-mime (or something it in turn depends on) is doing it.
kovidgoyal is offline   Reply With Quote
Old 02-26-2017, 04:11 AM   #18
Flaim
Junior Member
Flaim began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
As I said before, the installer does not itself install any mime type files. It calls the xdg-mime system utility to do that. So if mime files are having their permissions changed, it is because xdg-mime (or something it in turn depends on) is doing it.
Regardless if it's your code or xdg-mime doing it, the fact is it's being done. My primary interest in posting this was to help others resolve the issue. I was hoping you as a developer would see this and desire to fix it, instead of pointing fingers at other programs, throwing your hands up and going 'Not my problem!' But that's ok, it's your project. if I knew Python, i might have a crack at fixing it but alas..
Flaim is offline   Reply With Quote
Old 02-26-2017, 04:14 AM   #19
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: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And how do you propose I fix a problem in a program I have no control over? Wave a magic wand?

Is it your opinion that if sofware A uses software B and software B has a bug in it, it is now the responsibility of software A to fix it. If so, please tell me the name of a software program you maintain, I have a few thousand bug reports I want to open against it.
kovidgoyal is offline   Reply With Quote
Old 02-26-2017, 09:33 AM   #20
compurandom
Zealot
compurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshescompurandom can read faster than his screen refreshes
 
Posts: 136
Karma: 14126
Join Date: Jun 2015
Device: kobo aura h2o
I wonder if users having problems with this have a umask that is resetting the permissions, and calibre's installer doesn't check it (and shouldn't) and xgd-mime doesn't check it (and it should).
compurandom is offline   Reply With Quote
Advert
Old 02-26-2017, 01:10 PM   #21
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: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Should be fairly easy to track down on a system where it can be reproduced. Just run the installer with strace -f and see what exactly is either calling chmod on the files in /etc/mime or touching them in any way. Once you have that information, it should be relatively easy to figure out why it is happening from the source code of whatever utility is causing it to happen.
kovidgoyal is offline   Reply With Quote
Old 02-26-2017, 01:14 PM   #22
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,489
Karma: 772404
Join Date: Nov 2009
Device: many
This might be of interest. The xdg-mime script does generally save, set, and restore the umask but near exit runs gnome's update-mime-database script which does not properly handle a poor choice of user umask. So either xdg-mime needs to run the gnome script with a proper umask not the users or that system script itself should properly handle saving setting, amd restoring the umask.

This is a bug in xdg-mime or more likely a bug in gnome's update-mime-database and has nothing to do with Calibre at all. It will happen with any use of xdg-mime on a broken system.

See https://bugs.launchpad.net/ubuntu/+s...s/+bug/1082945
KevinH is offline   Reply With Quote
Old 02-26-2017, 01:59 PM   #23
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: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If the problem is indeed a bad umask (which can be checked by running the umask command). It can be fixed by instructing sudo to override the umask, as described here: http://unix.stackexchange.com/questi...ser-calling-it

Maybe I should add a check to the installer to detect a umask other than 022 and ask the user if they are sure they want to continue anyway.
kovidgoyal is offline   Reply With Quote
Old 02-26-2017, 02:25 PM   #24
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,489
Karma: 772404
Join Date: Nov 2009
Device: many
Since that bug was filed in 2012 and nothing has been done to fix it in 5 years and it is still unassigned, I think your workaround for poor user umask settings during sudo operations is probably a good idea.

FWIW, a robust "fix" in xdg-mime (a shell script) could be made by just moving the launch of "update-mime-database" to be before the user umask restore is done.
KevinH is offline   Reply With Quote
Old 02-26-2017, 03:01 PM   #25
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: 31,290
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...103591ff14c859
kovidgoyal is offline   Reply With Quote
Old 04-14-2017, 09:58 PM   #26
graydw57
Member
graydw57 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2009
Location: Tampa, FL
Device: Sony PRS-505
Sorry I found this thread so late. Calibre is, and has been, broken on Ubuntu Mate for years. There's something about the desktop environment that causes Calibre to completely misunderstand the desktop size. I have seen this in Ubuntu 14.04, and now in Ubuntu 16.04, on two different laptops.
It is specific to Mate - if I use Unity it runs fine. In Mate, the window tries to size itself way too big for the screen - the ebook viewer is especially bad. I get this on the consolecalibre:10781): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion 'GTK_IS_WIDGET (widget)' failed

(calibre:10781): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion 'GTK_IS_WIDGET (widget)' failed

(calibre:10781): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion 'GTK_IS_WIDGET (widget)' failed

(calibre:10781): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion 'GTK_IS_WIDGET (widget)' failed
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)
QWidget::setMinimumSize: (MainWindow/Main) The largest allowed size is (16777215,16777215)

with hundreds of reps of the GTK warning.
graydw57 is offline   Reply With Quote
Old 04-15-2017, 02:45 AM   #27
PandathePanda
a toy panda
PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.PandathePanda ought to be getting tired of karma fortunes by now.
 
PandathePanda's Avatar
 
Posts: 2,104
Karma: 17333728
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
Quote:
Originally Posted by graydw57 View Post
Sorry I found this thread so late. Calibre is, and has been, broken on Ubuntu Mate for years ...
with hundreds of reps of the GTK warning.
Well I've yet to run into any problems, and uses Calibre almost daily for almost a year on 16.04 (and upgraded Mate from 1.12.1 to 1.14.1 and now 1.16.1) and never had any weird GTK problem or Calibre messing up anything
PandathePanda is offline   Reply With Quote
Reply

Tags
calibre ubuntu desktop

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beware of who you're talking to... Tinah enTourage eDGe 6 05-28-2011 10:36 PM
Beware Fictionwise PlainBobMax General Discussions 71 09-30-2010 07:15 AM
Classic Beware of the Nook! compusolver Barnes & Noble NOOK 32 08-14-2010 08:11 AM
Unutterably Silly Beware of Llamaworm!! Moejoe Lounge 12 08-23-2009 06:05 PM
Beware of Fictionwise doctorow Deals, Freebies, and Resources (No Self-Promotion) 8 06-24-2006 08:45 AM


All times are GMT -4. The time now is 06:10 AM.


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