Active Topics

 



Notices


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#241
New version (1.2.13-3fremantle1) fixes the gnome dependency problem (thanks qwerty12 ! ) and repairs the softlink to /etc/gnome/defaults.list upon removal (thanks rebhana ! )
__________________
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 6 Users Say Thank You to qole For This Useful Post:
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#242
Originally Posted by qole View Post
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 ).
Great! I can now read my physics papers directly from the browser also with dbus-switchboard installed, so I'm back in as a betatester! And I can now use the Easy Debian version of evince for those formats not supported by native evince, namely postscript files! So I've gained something already! For this I had to extend the "incredibly long" user-mimetypes.list file even more, so in time I'll feed back my version of it!

Now to a new problem I've encountered:
I believe in the previous version of dbus-switchboard, I could use microB to view my directories and when I clicked on an .odt file, it would open OO Writer immediately. For some reason that doesn't work any longer. Now it obviously tries to run something, because the screen goes black for a while with the little clock ticking away, but then it comes back with nothing. From file manager I can open OO Writer by selecting dbus-switchboard, but as I said, from microB it had done that by itself before. On the other hand, when I open files on the internet with a file extension recognized by dbus-switchboard, I get the option of opening them with it or saving it on the device, so that works.
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log
 

The Following 3 Users Say Thank You to rebhana For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#243
Originally Posted by rebhana View Post
....so I'm back in as a betatester!
Hoorah!

Originally Posted by rebhana View Post
For this I had to extend the "incredibly long" user-mimetypes.list file even more, so in time I'll feed back my version of it!
Great. Let's make this list as comprehensive as possible.

Originally Posted by rebhana View Post
Now to a new problem I've encountered:
I believe in the previous version of dbus-switchboard, I could use microB to view my directories and when I clicked on an .odt file, it would open OO Writer immediately. For some reason that doesn't work any longer.
I bet it is a parameter format problem. Could you open a terminal and enter:
Code:
dbus-switchboard.py
Then try to open a local file via the browser (the way that doesn't work currently). Paste the output of dbus-switchboard.py here so I can see more details.
__________________
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
#244
Are you escaping the URI? Filenames recieved from the browser must be unescaped (the File Manager sends them "properly"). I was using a GLib function, but I bet Python offers such a function (you'll probably find it being used elsewhere in dbus switchboard).
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#245
UPDATE:

I think I see the problem: When a local file is clicked via the browser, I am feeding a bad filename to GnomeVFS. There are two // at the beginning of the file path... I think that is a straightforward fix... Thanks again, rebhana.
__________________
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 2 Users Say Thank You to qole For This Useful Post:
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#246
I've opened the local file Anmeldung.doc with microB, which mimetype (from the libfile-mimeinfo-perl package that I installed in Easy Debian) recognizes correctly:
Code:
[user@deb-m5v3d: ~]mimetype Anmeldung.doc 
Anmeldung.doc: application/msword
dbus-switchboard.py says:
Code:
dbus-switchboard started
--
-- dbus-switchboard: Received an RPC to mime_open.
-- dbus-switchboard: RPC had arguments ['//home/user/Anmeldung.doc'].
-- dbus-switchboard: Interface is org.dbus.switchsvc 
-- dbus-switchboard: user_data is <osso.context.Context object at 0x1e5ff0> 
_rpc_callback_handler: Exception occurred during callback execution.
Traceback (most recent call last):
  File "rpc.pyx", line 16, in osso.rpc._rpc_callback_handler (osso/rpc.c:1473)
  File "/usr/bin/dbus-switchboard.py", line 76, in callback_func
    docmimetype = gnomevfs.get_mime_type(params2)
RuntimeError: there was an error reading the file
EDIT: I should also say that I've chosen OO Writer as the handler for doc files, not the default antiword->pdf. Is there actually antiword for fremantle?

EDIT2: Wow, you two are fast! Can you tell me where to fix the script?
__________________
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-16 at 17:48.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#247
I'll package up another version ASAP.

Why do they send such a strange parameter?

['//home/user/docname.doc']

The two slashes aren't part of any convention that I'm aware of...

EDIT: Rebhana, do you want to give me your mimetype list extensions?
__________________
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:
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#248
Originally Posted by qole View Post
I'll package up another version ASAP.

Why do they send such a strange parameter?

['//home/user/docname.doc']

The two slashes aren't part of any convention that I'm aware of...

EDIT: Rebhana, do you want to give me your mimetype list extensions?
Here is my user-mimetype list file, where I have introduced two handlers not (yet) in dbus-switchboard, but which I'd suggest to include:
dbus-switch-apps.cfg:
Code:
OpenOffice,cli,"debbie-sue ooffice ""%params%"""
DEvince,cli,"debbie-sue evince ""%params%"""
Regarding OO, I think you don't have to distinguish between the different OO components, ooffice anyway opens with the one applicable. And in addition to Evince, I've introduced DEvince as the Easy Debian version, which can handle a lot more file formats. But I kept native evince for pdf and djvu.

In dbus-switch-xref.cfg, you could actually map a lot more extensions to OpenOffice, but I haven't made a comprehensive list yet.
Attached Files
File Type: gz user-mimetypes.list.gz (1.3 KB, 93 views)
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log
 
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#249
I have extended my dbus-switch-xref.cfg such that it covers more completely the files that evince (native and E.D.) and ooffice can display, in case you are interested.
Attached Files
File Type: gz dbus-switch-xref.cfg.gz (511 Bytes, 91 views)
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#250
New version (1.2.14) uploaded to Extras-devel:
  • Worked around the local-files-in-browser-have-extra-leading-slash problem; now you can click on local files in the browser and they will be properly handled by dbus-switchboard.
  • rebhana's extra mime types added to user-mimetypes.list (but not his extra associations to OpenOffice, yet).
  • "Evince Debian", "OpenOffice" and "VLC" added to handler list
  • Antiword removed as default XRef for .doc, replaced with OpenOffice
  • rtsp: protocol added to XRefs
  • GUI icon improved: added a white border around the ... whatever it is. (side note: I did this in Debian GIMP on-device )
  • "unknown/unknown" added to Maemo defaults.list because that seems to be the catch-all for Maemo 5. Now unknown types (like rebhana's .gz file attachments for example!) can be opened by dbus switchboard instead of just downloaded. This is good, even if you don't have a dbus-switchboard handler, because dbus-switchboard now tells you the real mimetype and file extension so you can associate it.

I am aware that the "old" config files are all reset to package defaults at each update. This is a fairly systemic problem, however, so I am going to address this in a later update. My "new" mimetype list doesn't get updated at all, so if you want the new list, you have two choices: either delete your current list before updating:

Code:
rm -r /home/user/.mimetypes
...or, after updating, you have to do the following:

Code:
cp /usr/lib/dbus-switchboard/user-mimetypes.list /home/user/.mimetypes
And rebhana: Now that I have "real" mimetype support, I'm hoping to make the old-style xref file a secondary resource, only used in the cases where files of the same mimetype can be opened by different handlers depending on extension.
__________________
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-16 at 23:17. Reason: rtsp not rdsp! heheheh
 

The Following 3 Users Say Thank You to qole For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 17:38.