Open HTML attachments with chromium

26 views
Skip to first unread message

Alfredo Palhares

unread,
Jun 29, 2015, 12:32:49 PM6/29/15
to supmua
Hello everyone,

Can I set sup to open HTML only emails with chromium ?
It a pain in arse to always save the attachment and then open the file with
chromium.

Regards,

--
Alfredo Palhares
GPG/PGP Key Fingerprint
68FC B06A 6C22 8B9B F110
38D6 E8F7 4D1F 0763 CAAD
signature.asc

Alice Riot

unread,
Jun 29, 2015, 1:21:13 PM6/29/15
to sup...@googlegroups.com, maste...@masterkorp.net
Hey Alfredo,

If you're using linux you can add the following to .sup/hooks/mime-view.rb:

pid = Process.spawn("xdg-open", filename,                                                                                        
                     :out => '/dev/null',                                                                                         
                     :err => '/dev/null')                                                                                         
                                                                                                                                 
Process.detach pid                                                                                                               
                                                                                                                                 
true     

This will open any filetype in the application associated with it (libreoffice documents, pdfs, etc). Just scroll to the file and hit 'enter'.

Matthieu Rakotojaona

unread,
Jun 29, 2015, 2:30:04 PM6/29/15
to supmua
Hey guys,

I personnally use this one-liner which is basically the same thing:

$ cat /path/to/hooks/mime-view.rb
system("xdg-open #{filename} > /dev/null 2>&1 &")

Note the final "&": you need it if you don't want to wait for the right
program to be chosen and opened before being able to use sup again
(because the hook is blocking)

Excerpts from Alice Riot's message of 2015-06-29 10:21:13 -0700:
signature.asc

Gaute Hope

unread,
Jun 29, 2015, 4:02:51 PM6/29/15
to Alice Riot, sup...@googlegroups.com, maste...@masterkorp.net
Also, check out: https://github.com/sup-heliotrope/sup/wiki/Viewing-Attachments


- gaute

Alice Riot writes on June 29, 2015 19:21:
> Hey Alfredo,
>
> If you're using linux you can add the following to .sup/hooks/mime-view.rb:
> [...]

Reply all
Reply to author
Forward
0 new messages