Nautilus *.txt file behaviour

Bug #425166 reported by 6205
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nautilus
Unknown
Unknown
One Hundred Papercuts
Triaged
Low
Unassigned
obsolete
Invalid
Undecided
Unassigned
devicekit-disks (Ubuntu)
Invalid
Undecided
Unassigned
nautilus (Ubuntu)
Triaged
Low
Unassigned

Bug Description

By default, when user try to do such a simple thing like view a text file by double-clicking, he is confronted by many confusing options like "Run in Terminal", "Display" or "Run"... Most of people will look at screen thinking something like What the hell? What should i do now? I just want to see that text file, nothing more...

Revision history for this message
Vish (vish) wrote :

I have seen new Windows users really get confused over this behavior.

But changing the default behavior is not the way to do it.

I would say adding an exclusion for .txt files would be ideal.
Since .txt is the default text file in Windows. We need make the system aware that txt is *not* an executable

Changed in hundredpapercuts:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Vish (vish) wrote :

David , I'v set this a milestone , this could replace any other bugs which are not progressing or replace it with existing ones.
I believe this is something worth fixing in Karmic cycle itself.

Your thoughts?

Changed in hundredpapercuts:
assignee: nobody → David Siegel (djsiegel)
milestone: none → round-10
Revision history for this message
Vish (vish) wrote :

*or replace an existing one.

Revision history for this message
6205 (6205-reactivated-deactivatedaccount) wrote :
Changed in hundredpapercuts:
assignee: David Siegel (djsiegel) → nobody
Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote :

I think this is an issue with how we mount NTFS partitions rather then nautilus.

Anyway I've included a patch that changes the default behavior to "display" instead of "ask".

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Seb -

Could you (or whoever is the right person) apply this patch, if you agree with the change?

Cheers, Rick

Changed in hundredpapercuts:
assignee: nobody → Sebastien Bacher (seb128)
Changed in hundredpapercuts:
milestone: round-10 → round-3
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug description there is misleading, the dialog is only displayed when the text file is set +x and the reason is that the user might be wanting to see or run a script file when running on it, that will not happen on ubuntu often but is rather an issue on vfat drives due to the limitation of the filesystem there, do we really want to change the default to create confusion on linux filesystem to avoid confusion on vfat drives?

Revision history for this message
Christoph Korn (c-korn) wrote :

I also would like to see the default behavior changed to display the text files.

As most scripts which are set as executable are bash or sh scripts which make their output to a terminal it is useless to run them directly. Also the option "Run in a terminal" is useless because the terminal is closed after the script has been run.
And also many scripts require arguments which would require to open a terminal anyway.

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote : Re: [Bug 425166] Re: Nautilus *.txt file behaviour

Sebastian, who will this change confuse? Users who are confounded by
this dialog when clicking on an erroneously executable text file
vastly outnumber the users who are deliberately running executable
text files by double clicking on them, easily by 10,000:1. The latter
users are sophisticated enough to run the script by alternate means if
displaying the file is not what they intended.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> who will this change confuse?

the somewhat technical user who are used to be able to run code this way, the few times that dialog has been broken in the previous cycle we got complain abou it

> easily by 10,000:1

where did you get this number from, I doubt that's true

> The latter users are sophisticated enough to run the script by alternate means

right but they also enjoy to be able to run scripts from nautilus

To summarize my position I'm against a quick change to workaround the issue by breaking a valid usecase, can't we try to figure what the issue is exactly and solve it in a proper way? do you argue against displaying the dialog for +x script on linux drives too, or do you just want to microsoft filesystem issues to be solved?

Revision history for this message
Vish (vish) wrote :

Sebastien,
You are right! , the description is misleading.
I simply assumed the reporter was commenting about .txt files from windows partitions or external ntfs/vfat volumes which are mounted with exec priv by default !

As i commented earlier , changing the default is not the right way to do this.
Marcus' patch will cause more confusion to new users, who are used to double-click to open programs and if the executables pop-up in gedit this will only confuse the user.
Because that change affects all file types. not only .txt , .sh , ...
So this will render all executables unusable for new users and force them to use the terminal , with is not ideal

Also, Rick Spencer pointed out on the irc , this maybe a bigger task than a papercut. :(

Marcus,
How is Nautilus not prompting when video and picture formats have exec priv? Aren't those having exclusions?
Is it possible to add similar exclusions to .txt files mounted on vfat drives? or copied from vfat drives?
Would that be simple to fix?

Anyone has any idea why vfat/ntfs drives are not mounted as noexec ?
Wouldnt it be simpler if we change this behavior?

Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote :

mac_v, only files with mime type of text/plain are handled.

Revision history for this message
Vish (vish) wrote :

> How is Nautilus not prompting when video and picture formats have exec priv? Aren't those having exclusions?

Seb just answered this , "nautilus knows the file formats, it needs to display icons ."
So it is aware that these can never be executables.

Either, we make similar exception when nautilus detects .txt files on windows file systems.
Or change the mount behavior.

I think that changing the mount behavior would be better.
This would prevent the files copied from windows filesystems from having the exec priv too...

Revision history for this message
6205 (6205-reactivated-deactivatedaccount) wrote :

Hi all

> I don't believe that this is an issue with mounting partitions. Even if screenshot was made from LiveCD session, this behavior is same also after installation(no dual boot, Jaunty only). I personally have a few simple text files stored on external HDD with NTFS and after installation of Ubuntu they've been copied to Documents folder on ext3 and behave the same way like on picture.

> 10 000:1 - agree, majority user are confused and that small group of advanced users can easily change it back in nautilus preferences...

IMO i don't like anyway how linux handes creation of new file through rightclick. They don't even get extension like *.txt or whatever should be default..

Maybe it could be set-up that way, that text file original from Windows (with *.txt extension) will be always displayed instead of ask dialog and openning text files created in linux(no extenstion) would behave the current way. Could handling of mime types solve this? And nautilus preferences could stay unchanged...

Revision history for this message
6205 (6205-reactivated-deactivatedaccount) wrote :

my question is >

what can possibly go wrong if double-clicking on *.txt file (and *.txt file only, from any location - forget mounting) will simply display it in gedit

Revision history for this message
Vish (vish) wrote :

@Laco Horváth:
You seem to have misunderstood the item "Empty File" , it creates a file which can be set with *any* extension and can be used ,
and Bug #372132 tires to address the issues you mention

Revision history for this message
6205 (6205-reactivated-deactivatedaccount) wrote :

@mac_v:
Aahh...bad Windows habit...mmm..... and that bug has some valid points.
Nautilus right-click menu should be little more user friendly oriented.

But my question regarding *.txt files remains

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

I am convinced by Sebastian -- as much as showing this dialog on
double-click concerns be for usability and safety reasons, this
proposed solution of changing the Nautilus preference is a hasty
change that breaks valid use cases.

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

Solution is non-trivial, not a paper cut.

Changed in hundredpapercuts:
milestone: round-3 → none
status: Triaged → Invalid
Changed in hundredpapercuts:
assignee: Sebastien Bacher (seb128) → nobody
Changed in nautilus (Ubuntu):
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote :

devicekit-disks isn't responsible for handling individual files.

Changed in devicekit:
status: New → Invalid
Changed in devicekit-disks (Ubuntu):
status: New → Invalid
Revision history for this message
WeatherGod (ben-v-root) wrote :

Linking to a submitted report upstream

Changed in nautilus:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for sent it upstream, marking this as triaged.

Changed in nautilus (Ubuntu):
status: New → Triaged
Revision history for this message
Vish (vish) wrote :

Re-opening this bug for Lucid. This should be a good bug to fix for a LTS

@Sebastien Bacher: You had an idea to fix this bug. Hopefully we can get this fixed for Lucid.
Or if your Lucid workload is full , kindly mention your idea on this bug , so that someone might work on implementing it.
Thanks. :)

Changed in hundredpapercuts:
assignee: nobody → Sebastien Bacher (seb128)
milestone: none → lucid-round-10
status: Invalid → Triaged
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

I didn't have good ideas for this one no, unassigning the bug again I don't intend to work on this one

Changed in hundredpapercuts:
assignee: Sebastien Bacher (seb128) → nobody
Revision history for this message
Vish (vish) wrote :

Removing milestone as, Sebastien is backed up for Lucid.
If anyone is willing to work on this submit patches , they can look into the discussion > http://paste.ubuntu.com/331681/

Changed in hundredpapercuts:
milestone: lucid-round-10 → none
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Other text-only files like .theme files are also affected by this. Plus: the button text 'Display' isn't very clear on what it actually does. Can you only open the file in read-only mode? Or will you be able to edit it? But what application will be launched?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.