02-26-2017, 03:15 AM | #16 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: kindle
|
Quote:
Code:
sudo find /usr/share/mime -type f -exec chmod 644 {} \; |
|
02-26-2017, 03:39 AM | #17 |
creator of calibre
Posts: 43,864
Karma: 22666666
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. |
Advert | |
|
02-26-2017, 04:11 AM | #18 |
Junior Member
Posts: 2
Karma: 10
Join Date: Feb 2017
Device: kindle
|
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..
|
02-26-2017, 04:14 AM | #19 |
creator of calibre
Posts: 43,864
Karma: 22666666
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. |
02-26-2017, 09:33 AM | #20 |
Guru
Posts: 919
Karma: 417282
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
|
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).
|
Advert | |
|
02-26-2017, 01:10 PM | #21 |
creator of calibre
Posts: 43,864
Karma: 22666666
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.
|
02-26-2017, 01:14 PM | #22 |
Sigil Developer
Posts: 7,651
Karma: 5433388
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 |
02-26-2017, 01:59 PM | #23 |
creator of calibre
Posts: 43,864
Karma: 22666666
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. |
02-26-2017, 02:25 PM | #24 |
Sigil Developer
Posts: 7,651
Karma: 5433388
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. |
02-26-2017, 03:01 PM | #25 |
creator of calibre
Posts: 43,864
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
04-14-2017, 09:58 PM | #26 |
Member
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. |
04-15-2017, 02:45 AM | #27 |
a toy panda
Posts: 2,567
Karma: 26020474
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
|
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
|
Tags |
calibre ubuntu desktop |
|
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 and Resources (No Self-Promotion or Affiliate Links) | 8 | 06-24-2006 08:45 AM |