We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Are .txt attachments in Mail broken for everyone, or just me? [duplicate]

asked 2014-11-04 18:23:41 +0300

expr gravatar image

When I open a .txt attachment in Mail, the Documents application is started, but it doesn't quite show the contents of the file. Instead, what I get is something not resembling a Sailfish application, but rather a screen that shows the path of the file and a small widget I'd guess is a text box. The application doesn't respond to touch. The .txt file doesn't show up in the list of documents afterwards.

Is it just me? I'm running v1.0.8.21 Tahkalampi.

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by expr
close date 2014-11-05 17:51:42.980754

Comments

3

It's not just you. I see the same behaviour on 1.1.0.39.

The problem is that Documents doesn't support .txt. https://together.jolla.com/question/913/add-support-for-handling-text-files-in-eg-notesdocuments/

ssahla ( 2014-11-04 21:12:38 +0300 )edit

I'm closing this as a kind-a sort-a duplicate. The real issue is pointed out in the comment above, although I do think the default xdg-open behaviour is wrong, because Documents does not support text files.

expr ( 2014-11-05 17:53:19 +0300 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2014-11-04 21:16:15 +0300

drcouzelis gravatar image

updated 2014-11-04 21:18:12 +0300

I think Mail uses XDG to open files. By default, "xdg-open" will open a plain text file with "Documents" (which is wrong, in my opinion). If you have "TinyEdit" installed (from OpenRepos) then you can change this setting. From the command line (as user "nemo"):

xdg-mime default tinyedit.desktop "text/plain"

Plain text files should now open in TinyEdit.

(If you want to learn more about how this works, see "~/.local/share/applications/defaults.list".)

edit flag offensive delete publish link more

Comments

Thanks for the work-around.

expr ( 2014-11-05 18:00:00 +0300 )edit
1

Should now be xdg-mime default harbour-tinyedit.desktop "text/plain"

Holger ( 2015-01-01 17:06:10 +0300 )edit

Using SFOS 1.1.4.29, the default app file is named "mimeapps.list" instead of "defaults.list".

TinyEdit opens actually instead of useless "Documents". However, this is only working for mail attachments. Otherwise TinyEdit opens with blank content. Not the selected file.

objectifnul ( 2015-06-12 10:46:16 +0300 )edit

Unfortunately, in current OS version (1.1.7.28) "/root/.local/share/applications/mimeapps.list" doesn't exist, so "xdg-mime default" does not work.

objectifnul ( 2015-09-16 01:27:44 +0300 )edit

@objectifnul - Are you running that command as root? The XDG commands are to be run as a regular user, not as root.

drcouzelis ( 2015-09-17 13:39:48 +0300 )edit

Question tools

Follow
5 followers

Stats

Asked: 2014-11-04 18:23:41 +0300

Seen: 457 times

Last updated: Nov 04 '14