Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What I found is an unusual bug in gedit. The actual problem is finally nailed to this:-
If I have a text file like notes.txt in my home directory /home/user/notes.txt, then after a new session with graphical login/password, etc, I could access my "notes.txt" by just double clicking on the file.
eg notes.txt (same as I cut and save as follow) :-
"An estimate by the World Gold Council is that all the gold ever mined totaled 158,000 tonnes, which when valued at USD1000/oz is worth USD5.1 trillion.
.....
"
If I edit it to :-
"From wiki:An estimate by the World Gold Council is that all the gold ever mined totaled 158,000 tonnes, which when valued at USD1000/oz is worth USD5.1 trillion.
.....
"
and finally save the file, it becomes a "mailbox file" type!
Then it will fail to open with a simple double click, giving a error message :-
"Couldn't display /home/user/notes.txt".
So the quirky stuff is gedit text files cannot begin with "From wiki:" !
No issues with mine as well. Mine gedit is 2.26.1.
Tried what you say but it saves as text file. You may be changing the file type or it might have got changed somehow without your knowledge.
and finally save the file, it becomes a "mailbox file" type!
Unlike windows (which uses extensions) linux looks inside the file to try to determine what sort of file it is, and then tries to associate it with the appropriate application:
If the first line starts with From: then it is treated as a mail file.
See here:
Code:
tred@vaio:~/Documents$ cat foo
<- Notice the blank line here
From: wiki
rubbish
tred@vaio:~/Documents$ cat foo2
From: wiki
rubbish
tred@vaio:~/Documents$ file foo
foo: ASCII text
tred@vaio:~/Documents$ file foo2
foo2: news or mail text
tred@vaio:~/Documents$
Unlike windows (which uses extensions) linux looks inside the file to try to determine what sort of file it is, and then tries to associate it with the appropriate application:
If the first line starts with From: then it is treated as a mail file.
See here:
Code:
tred@vaio:~/Documents$ cat foo
<- Notice the blank line here
From: wiki
rubbish
tred@vaio:~/Documents$ cat foo2
From: wiki
rubbish
tred@vaio:~/Documents$ file foo
foo: ASCII text
tred@vaio:~/Documents$ file foo2
foo2: news or mail text
tred@vaio:~/Documents$
That solves it from me. Just delete the 'From' at the beginning of the text, and it's no longer an mbox file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.