#499 .txt and .html files are executed, not displayed

patches
closed-fixed
PCMan
libfm (279)
4
2012-09-01
2011-11-10
Pumpino
No

I'm running 0.9.10 in Arch and Fedora. I experience this problem in both distros.

If I click on a .txt file or .html file, a dialog box appears stating "This file document.txt is executable. Do you want to execute it?" The options are Execute, Cancel and Execute in Terminal. The filesystem is NTFS, so it's impossible for me to remove the executable permissions.

I would like PCManFM to launch Leafpad for .txt files and Firefox for .html files, as I have set it to do by right-clicking and choosing "Open with...". This works correctly in Thunar.

Is it possible to resolve this? I notice that Nautilus now has an option in its preferences to specify whether executable files are executed or simply opened. This would remove the need to me to right-click on relevant files and choosing the program to open the file with. Or if there's a change I could make to a config file, I'd be more than happy to do that. Thanks.

Discussion

  • PCMan
    PCMan
    2011-11-18

    Version 1.0 is in feature freeze and string freeze now.
    Let's fix this later in 1.5.

     
  • PCMan
    PCMan
    2011-11-18

    • labels: --> libfm
    • assigned_to: nobody --> pcmanx
    • milestone: --> 2297538
     
  • PCMan
    PCMan
    2012-05-21

    • priority: 5 --> 6
    • milestone: 2297538 --> 557433
     
  • PCMan
    PCMan
    2012-05-21

    Maybe we should not execute files on NTFS or FAT filesystems by default.
    This is the most reliable and safe way to handle this I can figure out.

     
  • PCMan
    PCMan
    2012-05-21

    It's hard to fix since GLib/gio fails to detect NTFS filesystems.
    It cannot recognize NTFS-3G mounted volumes and returns NULL for filesystem type.
    So sad.
    Maybe we need to bug report to glib/gio developers.

     
  • Midnight Comander does not rely on executable permissions, it uses the same facility command 'file' uses and does actions based on that. I think we should do it the same way but it sure will come later (not in 1.0) as it needs some major reworking.

     
    • priority: 6 --> 4
     
  • PCMan
    PCMan
    2012-06-10

    • milestone: 557433 --> patches
     
  • We hope this issue is completely fixed in the Git repository recently.
    Check it out when it's possible for you and if the bug still exists then reopen the report, please.
    Thank you very much.

     
    • status: open --> pending-fixed
     
  • Pumpino
    Pumpino
    2012-06-11

    Thanks for addressing the issue. Excuse my ignorance, but how do I download it from git? I've never used a git repo before. Also, will it be added to the next stable release and is a new release likely to be pushed soon?

     
  • Pumpino
    Pumpino
    2012-06-11

    • status: pending-fixed --> open-fixed
     
    • status: open-fixed --> pending-fixed
     
  • You can download library by executing a command
    git clone git://pcmanfm.git.sourceforge.net/gitroot/pcmanfm/libfm
    then compile it by executing
    cd libfm && ./autogen.sh && ./configure --sysconfdir=/etc && make
    then install it by executing
    sudo make install
    but that assumes you should have existing libfm uninstalled first because either your new library will overwrite files of old one or new pcmanfm will be in conflict preferring old library over new one but old one will be incompatible with pcmanfm new code.

    Then you can download+compile+install new pcmanfm
    git clone git://pcmanfm.git.sourceforge.net/gitroot/pcmanfm/pcmanfm
    cd pcmanfm && ./autogen.sh && ./configure && make
    sudo make install
    Suggest, again, to uninstall old pcmanfm.

    That change will come into stable release, yes. We will try to give out new release soon but we cannot promise you any timeline.
    Thank you.

     
    • status: pending-fixed --> closed-fixed