LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2017, 04:05 PM   #1
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Rep: Reputation: Disabled
A message "This text file seems to be an executable script" when opening FB2 files


Hello!
When opening FB2 files, the message "This text file seems to be an executable script. What do you want to do with it?" appears instead of opening by FB2Reader. Screenshot is attached.
How to remove this message and make these files to be opened by FB2Reader at once?
Lubuntu 16.04 x64.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	197
Size:	60.9 KB
ID:	24782  
 
Old 04-15-2017, 04:47 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Check your file association and make sure the file extension is linked to your FB2Reader.
 
Old 04-15-2017, 07:12 PM   #3
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
And how to change it? I've added:
- "application/x-fictionbook+xml=FBReader.desktop" to /etc/gnome/defaults.list;
- "application/x-fictionbook+xml fb2 fb2.zip" to /etc/mime.types;
- "application/x-fictionbook+xml; /usr/bin/FBReader %s; test=test -n "$DISPLAY"" to /etc/mailcap;
and made reboot. There is no result.
 
Old 04-15-2017, 07:15 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 33
Posts: 3,571

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Try turning off execute permission: chmod -x 1.fb2
 
Old 04-15-2017, 07:29 PM   #5
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Yes, it worked, but is it possible to fix it fo all FB2 files? It's not good to do this for all of the books in library.
Text files in another formats are opened correctly.
 
Old 04-16-2017, 04:16 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
right-click the icon in your file manager, go properties => open with...
and set desired app as default.
works on pcmanfm.
 
Old 04-16-2017, 06:58 AM   #7
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
As ondoho said should do the trick.
 
Old 04-16-2017, 08:19 AM   #8
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
right-click the icon in your file manager, go properties => open with...
and set desired app as default.
works on pcmanfm.
It doesn't help, even after rebooting.
PCManFM option "Don't ask option to launch executable file" doesn't help too. Nothing happens because system tries to launch it as executable, not to open it with FBReader.
As smallpond said, block executing work, but it has to be made for all books, and it's not comfortable at all.
Are there any ways to fix it once and forever? As you can see, I tried to do everything.
Attached Thumbnails
Click image for larger version

Name:	2017-04-16-161028_457x408_scrot.png
Views:	143
Size:	33.8 KB
ID:	24788  
 
Old 04-16-2017, 12:18 PM   #9
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,771

Rep: Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133
In your home directory there should be something like
.local/share/applications/mimeapps.list
or
.local/share/applications/defaults.list
which you can edit. Try adding something like
text/fb2=fbreader.desktop
 
Old 04-16-2017, 03:00 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
it is possible that you downloaded a bunch of documents that some 1D10T marked executable.
that is annoying, but the only option is to change them back to NOT executable.

however:
Quote:
Originally Posted by Sam_Rosewood View Post
PCManFM option "Don't ask option to launch executable file" doesn't help too. Nothing happens because system tries to launch it as executable
that's strange, it surely works on my system.

you could show us where you got the files, or one of them, somebody could give it a try.
 
Old 04-16-2017, 06:51 PM   #11
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
DavidMcCann, it doesn't help. System already has the type application/x-fictionbook+xml.
ondoho, I can't put this file here or link because of LQ rules. But I have a library of FB2 books, and this behaviour is for all of them. So I have a doubt that's the problem in files.
I can't understand logic of this extension system: pictures are opening in viewer, music and video - in player, documents - in LibreOffice. And it's correct. But these simple FB2 books show this annoying message.
 
Old 04-17-2017, 11:25 AM   #12
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,771

Rep: Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133
I think the answer is going to be replacing PCManFM. On most file managers, you can set the default application for file types. Xfce is not that much bigger than LXDE, but Thunar has that facility.
 
Old 04-17-2017, 12:09 PM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
i'm using pcmanfm right now & have been for a long time and cannot, in a general way, reproduce the problem.
the preference dialog "Don't ask option to launch executable file" is effective.

now i think about it, pcmanfm runs as a daemon on Lubuntu, maybe it needs to be restarted for certain changes to take effect? Sam_Rosewood, have you tried to log out/in after changing the preferences?
 
Old 04-17-2017, 08:06 PM   #14
Sam_Rosewood
LQ Newbie
 
Registered: May 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
DavidMcCann, this is not the way. I want to solve this problem, but not to go away from it.
ondoho, reboot doesn't help. This option "Don't ask option to launch executable file" works only if I set chmod -x in terminal or manually (screenshot). Yeah, I can set it for all the files in my library, but this is temporary measure. And I'll have to to it with every new FB2 file that I get. This is not comfortable.
Attached Thumbnails
Click image for larger version

Name:	2017-04-18-035319_457x408_scrot.png
Views:	134
Size:	29.4 KB
ID:	24798  
 
Old 04-18-2017, 09:03 AM   #15
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
You need to change the way the files are being saved. Not sure why the executable flag is being set on your downloads but that seems to be the problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sublime text editor: opening a second file causes the "waiting" cursor Red Squirrel Linux - Software 1 02-20-2015 07:58 AM
Moving text files between Windows and Linux: Unicode and "executable" problems AchubaNanoiaBR Linux - Newbie 2 07-04-2009 04:15 PM
Can a "Bourne shell script text executable" installer be modified manually ? Libu Linux - Software 2 03-13-2009 06:09 AM
Lost option to "Open with text editor" executable script in 8.04 taylorkh Ubuntu 2 02-04-2009 10:49 AM
How can I catch some "KEY WORDS" from a text file without opening it? yuzuohong Linux - General 1 06-14-2002 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration