1

When I'm using PCManFM, I sometimes do the following. I right-click in an empty place in ~/, and choose Make new... --> Empty File. I type some text in it, like 'blabalballabl', and then I save it, e.g., as test.

Now, I double-click this file. Leafpad won't open the file, but instead PCManFM will say that the file is executable. It then asks if I want to execute the file or not. I don't want this to happen, I just want Leafpad to open the file. Right-clicking the file, then changing the default application to open this type of files doesn't help.

Is there any way to force PCManFM to open files like these with Leafpad by default?

I'm using Lubuntu 11.10 32 bit.

PCManFM asks to execute the file

PCManFM asks to execute the file

Changing the default program to open the file doesn't help.

Changing the default program to open the file doesn't help.

The Leafpad file associations look OK.

mimeapps.list looks OK; text/plain should be opened by Leafpad.

3 Answers3

3

Its perhaps worth checking that if you have a mimetype list that its defined correctly:

enter image description here

In the same folder - try removing/renaming any custom leafpad.desktop file just in-case it is due to an error in that definition.

Logout and login for changes to take effect.

fossfreedom
  • 174,526
2

This is a common problem when the file is executable. As far as I know, there is no fix other than removing its executable flag:

  1. chmod -x [yourfile], or
  2. Right-click > Properties > Permissions > Uncheck "Make the file executable".

However, this fix will probably not work if the file is on a filesystem that does not support POSIX-like file permissions (e.g. NTFS, vfat, network shares, etc...).

Yi Jiang
  • 1,206
1

I have the solution!: Just add

,noexec

to the options of the ntfs line of /etc/fstab

Sesiela
  • 11
  • 1