Active Topics

 



Notices


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#231
OK, qwerty12's gnomevfs suggestion prints the correct mimetype for both a local PDF with no extension and Dr. Hawking's paper on the web.

So now to fundamentally rewrite dbus-switchboard to use mime types instead of extensions

EDIT: I installed python-gnome2 and just did "import gnomevfs"
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2010-06-13 at 05:00.
 

The Following User Says Thank You to qole For This Useful Post:
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#232
Originally Posted by qole View Post
I find it interesting that Maemo pretends to use the /etc/gnome/defaults.list file but it doesn't really, it still uses the /usr/share/applications/defaults.list ...

I find it interesting, too, that I copy the original file to a safe location, and then copy it back in my postrm file. But how is it that the file that my postrm script copies back upon removal of dbus-switchboard is different than the file it was supposedly linked to?
In Maemo /usr/share/applications/defaults.list is just a symbolic link to /etc/gnome/defaults.list, but not after dbus-switchboard is installed. It seems that dbus-switchboard should simply keep this symbolic link, which apparently it doesn't - otherwise the copying back would have restored things.

EDIT: After having studied the postinst, postrm, and dswitch-ini.sh scripts, I also don't understand how the symlink could have been broken by installing and deinstalling dbus-switchboard.
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log

Last edited by rebhana; 2010-06-14 at 20:41.
 
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#233
Originally Posted by qole View Post
OK, qwerty12's gnomevfs suggestion prints the correct mimetype for both a local PDF with no extension and Dr. Hawking's paper on the web.

So now to fundamentally rewrite dbus-switchboard to use mime types instead of extensions

EDIT: I installed python-gnome2 and just did "import gnomevfs"
I admire you for being able to put a smiley after the conclusion that it requires a fundamental rewrite! I really feel bad that I cannot offer any help out of fundamental ignorance. I even had to look up "dbus" on wikipedia - and unsurprisingly still no precise idea what's involved
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log

Last edited by rebhana; 2010-06-13 at 18:09.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#234
New version in Extras-devel (1.2.13) has rudimentary, hackish support for mimetypes. If your file doesn't have a recognised file extension, it will try to match the file to a recognised mimetype.

I have added a new file,

/home/user/.mimetypes/user-mimetypes.list

which you must edit by hand. Find the mimetype in the incredibly long list (taken from my desktop Ubuntu defaults.list) and change the "none" to the name of the handler (from the Handlers list in the GUI).

I have defined one mimetype as an example, application/pdf=Evince to show you how to do it (and to keep the invaluable rebhana as my betatester ).

If people express any interest in this approach, I could rewrite the app to use the mimetypes as the primary method, and then it could try file extensions as the backup.

It's been good programming experience, anyway.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2010-06-15 at 21:25. Reason: Wrong version number! Oops.
 

The Following 6 Users Say Thank You to qole For This Useful Post:
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#235
I cannot install it because of a conflict with "gnome-python" dependency.
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#236
New update conflicts with gnome/python and is unnstallable.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#237
I'm uploading a new version due to a postinst error...

Should I switch to gnome-python as my dependency? python-gnome2 seemed so much cleaner to use... Can anyone tell me what package uses gnome-python?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#238
Originally Posted by qole View Post
I'm uploading a new version due to a postinst error...

Should I switch to gnome-python as my dependency? python-gnome2 seemed so much cleaner to use... Can anyone tell me what package uses gnome-python?
~ $ apt-cache rdepends gnome-python
gnome-python
Reverse Depends:
digghomewidget
python-gnome2
rapier
python-gnome2
python-runtime
hermes
python-gnome2
fmms
fmms
fmms
fmms
fmms
fmms
fmms
fmms
fmms
fapn
python-gnome2
gnome-python-dev
python-gnome2
gnome-python-dev
python-gnome2
gnome-python-dev
python-gnome2
maegios
python-gnome2
|mevemon
python-gnome2
mclock
python-gnome2
lybniz
python-gnome2
mastory
python-gnome2
I think it's possible to use either one, actually.

Sth. like:
Originally Posted by debian/control
Depends: python-gnome | python-gnome2
Originally Posted by dbus-switchboard.py
try:
from gnome import gnomevfs
except ImportError:
import gnomevfs
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#239
fmms uses gnome-python.
 

The Following 2 Users Say Thank You to DaSilva For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#240
I'll try qwerty12's suggestion to use either of the two packages.

And DaSilva is right, who cares about what other apps use gnome-python!? No man dare interfere with the mighty fmms!
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:46.