0

Until recently, I was using Ubuntu Mate 14.04. Last week, I did a fresh install of Mate 20.04. I have a dual boot with Windows, and I use a shared partition between both OS's. The shared partition is NTFS. I'm experiencing a couple of dumb, yet extremely annoying issues that I didn't have with 14.

  1. Whenever I try to open a txt file from the shared drive, I get the prompt asking me if I want to execute it, because it's being recognized as an executable. From looking online, it seems to be related to the fact that it's NTFS. Apparently, if you can mount it without execution permissions, this stops happening. However, the only solution I've been able to find is to have it mounted during bootup and to set permissions with fstab. I don't want the partition mounted by default. However, this issue would be tolerable if it weren't because...

  2. The file manager keeps forgetting that I want to open txt files with Pluma. I've tried repeatedly using "Open With Other Application" and checking "Remember this application for plain text document files". It doesn't work. It works perfectly everywhere in my Ubuntu Filesystem, but not in my shared drive. I need help with this bc I use txt files A LOT. My top priority is to just be able to open text files after a right-click if necessary, just not having to go through the whole list of programs. I'll happily do that and ignore the executable prompt if I have to.

I believe in 14.04 instead of having that "Open With Other Application" button, there was an "Open With" menu that made it quicker and easier to just find Pluma there. If I can get that back, that'll be enough.

0

To fix the "executable text files" part of the problem, you can follow answer to this question. Basically you can set masks so that each file is not mounted as executable.

0

So, I managed to solve both issues in one shot, but it did take a bit of research. I'm answering in case any other noob (like myself) is interested in getting this behavior.

Lacek's answer wasn't quite correct, but it did point me in the right direction. I used this tutorial and this documentation

I added the following lines to /etc/fstab:

# <Little comment to indicate that I added this line myself>
UUID=<the-uuid-of-your-shared-partition> /media/<username>/<partition-label>               ntfs    user,noexec,noauto 0       2

As per the linked documentation, I got the UUID from sudo blkid . You won't find it if you skip sudo. The /media directory is just the directory where the partition normally mounts.

With this, noexec guarantees that no files in the drive will be executable (which is desirable with NTFS drives, especially shared drives between Linux and Windows). I already knew that part, but I was missing noauto, which ensures that it won't be mounted during bootup.

For some reason, with this configuration, the first option in the context menu is now Pluma, and I don't have to check anything else.

I recommend to anyone having these issues to save a copy of fstab somewhere in /home, so you can easily recover it after a reinstall, upgrade, etc. I might have actually done this way back in 2014 and completely forgot about it because I didn't backup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.