[SOLVED (Thx)] "text.txt" opens after a choice only

Questions about applications and software
Forum rules
Before you post please read how to get help
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

[SOLVED (Thx)] "text.txt" opens after a choice only

Post by mintuxEn »

Hi

I'm a new comer on your forum. I've been using Ubuntu for years but as I do not like the new Gnome-shell, I turned to Mint which has a very good reputation and I agree, very simple and easy to use, then I dropped Ubuntu.

Nevertheless, unlike Ubuntu, I cannot open a ".txt" directly, I must first choose one out of two options.
I found a workaround on the net by adding ",locale=,noexec" in fstab.
Here is my fstab regarding this point
UUID=6742347D3E5C93C2 /media/Data-perso ntfs defaults,uid=gerard,gid=gerard,utf8,windows_names,locale=,noexec 0 0

It works fine, except on mobile volumes as USB key
any idea to solve the problem?
I just wonder why this issue does not exist on Ubuntu!!

Thx for yours answers, ideas ...
Have a nice day

following your recommendations, here are some infos about my PC and S/W

Code: Select all

  $ inxi -Fxxxrz
System:
  Kernel: 5.4.0-45-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.6.7 wm: muffin 4.6.3 dm: LightDM 1.30.0 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: ASUSTeK product: K73SV v: 1.0 serial: <filter> 
  Mobo: ASUSTeK model: K73SV v: 1.0 serial: <filter> 
  BIOS: American Megatrends v: K73SV.205 date: 04/01/2011 
Battery:
  ID-1: BAT0 charge: 55.7 Wh condition: 56.5/57.2 Wh (99%) volts: 12.4/11.1 
  model: ASUSTek K72--52 type: Li-ion serial: <filter> status: Unknown 
CPU:
  Topology: Dual Core model: Intel Core i5-2410M bits: 64 type: MT MCP 
  arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18358 
  Speed: 798 MHz min/max: 800/2900 MHz Core speeds (MHz): 1: 798 2: 798 
  3: 798 4: 798 
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics 
  vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0116 
  Device-2: NVIDIA GF108M [GeForce GT 540M] vendor: ASUSTeK driver: nvidia 
  v: 390.138 bus ID: 01:00.0 chip ID: 10de:0df4 
  Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1600x900~60Hz 
  OpenGL: renderer: GeForce GT 540M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.138 
  direct render: Yes 
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio 
  vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  chip ID: 8086:1c20 
  Sound Server: ALSA v: k5.4.0-45-generic 
Network:
  Device-1: Ralink RT5390 Wireless 802.11n 1T/1R PCIe vendor: AzureWave 
  driver: rt2800pci v: 2.3.0 port: d000 bus ID: 03:00.0 chip ID: 1814:5390 
  IF: wlp3s0 state: up mac: <filter> 
  Device-2: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet vendor: ASUSTeK 
  driver: atl1c v: 1.0.1.1-NAPI port: a000 bus ID: 04:00.0 
  chip ID: 1969:1083 
  IF: enp4s0 state: down mac: <filter> 
Drives:
  Local Storage: total: 819.74 GiB used: 61.60 GiB (7.5%) 
  ID-1: /dev/sda vendor: Crucial model: CT240BX500SSD1 size: 223.57 GiB 
  speed: 6.0 Gb/s serial: <filter> rev: R013 scheme: MBR 
  ID-2: /dev/sdb vendor: Hitachi model: HTS547564A9E384 size: 596.17 GiB 
  speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> rev: A60A scheme: MBR 
Partition:
  ID-1: / size: 28.71 GiB used: 11.92 GiB (41.5%) fs: ext4 dev: /dev/sda6 
Sensors:
  System Temperatures: cpu: 49.0
Last edited by mintuxEn on Wed Sep 02, 2020 8:28 am, edited 2 times in total.
User avatar
AZgl1500
Level 14
Level 14
Posts: 5306
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: ".txt" opens after a choice only

Post by AZgl1500 »

mouse over your text.TXT file

right click
choose Properties, select an app you want to open for it, then click make Default.
txt.png
Linux Mint 19.3 Cinnamon
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

Hi AZgl1500
Thx for your reply

actually this is not possible as you can see down below.
If you don't understand French

"Editeur de texte" = "Text Editor"
"Définir par défaut" = "Set as default", but it is grey --> not accessible

Image

your proposal = 2 clicks
right click on "text.txt" > open with
left click > text editor

my way of doing also 2 clicks
left click on "text.txt" the following window opens
left click on "Afficher" = "Display"

Image
User avatar
AZgl1500
Level 14
Level 14
Posts: 5306
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: ".txt" opens after a choice only

Post by AZgl1500 »

I think you need to a Chown, and it should be accessible


Repair the ownership issues in your home with the command

Code: Select all

sudo chown -Rc $USER:$USER $HOME

as for French, I apologize for not being literate in languages other than my native English, which has been mutilated with local slang.
Linux Mint 19.3 Cinnamon
User avatar
all41
Level 16
Level 16
Posts: 6570
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: ".txt" opens after a choice only

Post by all41 »

Just a thought-
I was having problems with some .txt files not opening with normal left-click--no response, but could right-click and choose
open with text editor and could read them fine--only happened with .txt extensions, everything else was fine.
It turned out the .txt files were marked as executable, and i have no clue as to how this happened.
After removing the executable flag the files opened normally.
Right-click and look in permissions to see if the executable box is checked, if so uncheck the box and try again.
Cheers
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
User avatar
MrEen
Level 22
Level 22
Posts: 15147
Joined: Mon Jun 12, 2017 8:39 pm

Re: ".txt" opens after a choice only

Post by MrEen »

all41 wrote:
Tue Sep 01, 2020 9:25 pm
It turned out the .txt files were marked as executable, and i have no clue as to how this happened.
I think I've read that this often happens when copying files from an NTFS partition. Might that be where your .txt files originated?
User avatar
Pierre
Level 20
Level 20
Posts: 10945
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: ".txt" opens after a choice only

Post by Pierre »

after clicking on that *.txt file, and then selecting to 'open with text editor'.
and then on 'Open with other application',
- there may also be an option, to "Remember this application for 'plain text document' files".
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
all41
Level 16
Level 16
Posts: 6570
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: ".txt" opens after a choice only

Post by all41 »

MrEen wrote:
Tue Sep 01, 2020 9:42 pm
all41 wrote:
Tue Sep 01, 2020 9:25 pm
It turned out the .txt files were marked as executable, and i have no clue as to how this happened.
I think I've read that this often happens when copying files from an NTFS partition. Might that be where your .txt files originated?
Now you have me curious. As I recall they were old files on an ext usb hdd. I probably still have them and will scan thru
some to see if I can remember which files exactly. Perhaps there are others that will lend a clue.
I remember wondering if possibly due to applying permissions to enclosed files such as:
Permissions.png
Edit: Yes that 3TB ext hdd is formatted to ntfs and there is a good possibility the files are stored there somewhere, or perhaps
originated there. It's been a few months
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
User avatar
MrEen
Level 22
Level 22
Posts: 15147
Joined: Mon Jun 12, 2017 8:39 pm

Re: ".txt" opens after a choice only

Post by MrEen »

I don't remember the details, but someone had all the text files they had copied over from such a drive marked as executable. I'll see if I can find the thread.
User avatar
all41
Level 16
Level 16
Posts: 6570
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: ".txt" opens after a choice only

Post by all41 »

The plot thickens.
mintuxEn said
I cannot open a ".txt" directly, I must first choose one out of two options
This sure sounds like trying to run an executable, especially in MATE when Caja Preferences/Behaviour/Executable Text Files default setting is 'Ask each time'
Last edited by all41 on Tue Sep 01, 2020 11:55 pm, edited 1 time in total.
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
User avatar
MrEen
Level 22
Level 22
Posts: 15147
Joined: Mon Jun 12, 2017 8:39 pm

Re: ".txt" opens after a choice only

Post by MrEen »

Couldn't find the specific thread I was thinking of, but did find this: https://superuser.com/questions/512393/ ... -partition

Looks like the way the drive is mounted is what caused it.
User avatar
all41
Level 16
Level 16
Posts: 6570
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: ".txt" opens after a choice only

Post by all41 »

Yes--found the files. They are in my poetry collection and are still executable there as well as every file I have looked at,
photos, videos, music, even pdf's which open normally.

So that explains it. Thanks for removing that lingering question mark. That drive contains backup files of old archives that are also present on ext4 partitions that I access regularly. I had even forgotten that it was ntfs.
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
User avatar
MrEen
Level 22
Level 22
Posts: 15147
Joined: Mon Jun 12, 2017 8:39 pm

Re: ".txt" opens after a choice only

Post by MrEen »

So I think we've somewhat solved what's going on here.

Just need someone more knowledgeable on mount options to suggest what mintuxEn should change, if anything. I don't blindly trust an 8 year old thread myself.
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: ".txt" opens after a choice only

Post by smurphos »

mintuxEn wrote:
Tue Sep 01, 2020 8:44 am
Nevertheless, unlike Ubuntu, I cannot open a ".txt" directly, I must first choose one out of two options.
Nemo > Edit > Preferences > Behaviour > Check View Executable text Files when they are opened.

Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

AZgl1500 wrote:
Tue Sep 01, 2020 5:20 pm
I think you need to a Chown, and it should be accessible
Repair the ownership issues in your home with the command

Code: Select all

sudo chown -Rc $USER:$USER $HOME
HI AZgl1500
Thx for your reply

1st trial : something missing after ":"

Code: Select all

 gerard@Asus-GG-ray:~$ sudo chown -Rc $gerard:$gerard $home
[sudo] Mot de passe de gerard :          
chown: opérande manquant après «:» 
I went to chown --help

Code: Select all

 chown [OPTION]... [OWNER][:GROUP] FILE... 
I've tried the following : home swithes from root to owner (gerard)

Code: Select all

  gerard@Asus-GG-ray:~$ sudo chown -Rc gerard:gerard /home
appartenance de '/home' modifiée de root:root en gerard:gerard
Not sure it's exactly what you expected, but actually no change, sorry
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

all41 wrote:
Tue Sep 01, 2020 9:25 pm
... It turned out the .txt files were marked as executable ...
Right-click and look in permissions to see if the executable box is checked, if so uncheck the box and try again.
HI and Thx for your reply all41
Got the same thing, but executable cannot be unchecked!!!!
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

MrEen wrote:
Tue Sep 01, 2020 9:42 pm
I think I've read that this often happens when copying files from an NTFS partition. Might that be where your .txt files originated?
Yes exactly my personal files are on a separate NTFS partition in order to allow W10 reading them
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

Pierre wrote:
Tue Sep 01, 2020 10:05 pm
after clicking on that *.txt file, and then selecting to 'open with text editor'.
and then on 'Open with other application',
- there may also be an option, to "Remember this application for 'plain text document' files".
Hello, Thx
Yes I thought of that, but the button "select as default option" is in grey, not clickable
User avatar
lsemmens
Level 11
Level 11
Posts: 3547
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: ".txt" opens after a choice only

Post by lsemmens »

Could you possibly try setting the default to writer and then try setting it back to text editor again?
Fully mint Household
Out of my mind - please leave a message
User avatar
mintuxEn
Level 1
Level 1
Posts: 10
Joined: Tue Sep 01, 2020 6:32 am
Location: Paris, France

Re: ".txt" opens after a choice only

Post by mintuxEn »

smurphos wrote:
Wed Sep 02, 2020 1:40 am
Nemo > Edit > Preferences > Behaviour > Check View Executable text Files when they are opened.
YESSSSSSSSSSSSSSSSSSSSSSS smurphos you got it, it works as expected now. :D
Thank you so much !

I'd like also to thank all the other participants who did their best to help me, I'm very grateful for that.
this forum, on which I come for the 1st time, is very effective, that's Linux, a great supporting family !!
I'll put solved ASAP
Have a nice day 8)
Post Reply

Return to “Software & Applications”