View Single Post
Sohil876's Avatar
Posts: 130 | Thanked: 132 times | Joined on Jan 2013 @ India
#189
Originally Posted by saponga View Post
Thank you. But acttually, what i want to know is how to "tell" telegram-cli to do that.
If you will only open pics (since im sure view audio or other views will use xdg too) then just create a script in /usr/bin named xdg-open with contents:
Code:
#!/bin/sh
dbus-send --print-reply --dest=com.nokia.image_viewer /com/nokia/image_viewer com.nokia.image_viewer.mime_open string:file://"$1"
, this should open images in default image-viewer and fail for other (audio/video/txt) "views" of telegram-cli. Well since there is no xdg-utils for maemo it should be fine or maybe someone will point out a better approach, one such i see is copying xdg-open (of diablo maybe?) to /usr/bin and manually adding rules of opening mimetype with a app to /etc/mailcap, that should work for all "views" of telegram audio/video/image/txt,etc.
EDIT: the second method i tried and it works fine for all views, though i dont know if its fine to use that method so only try that at your own risk.

Last edited by Sohil876; 2016-04-05 at 13:02.
 

The Following 5 Users Say Thank You to Sohil876 For This Useful Post: