File associations cannot be changed- need professional help

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

File associations cannot be changed- need professional help

Post by bluesman99 » Sat Sep 08, 2018 9:12 pm

I have been running Linux Mint since version 9 and all versions in between. I now have a computer that is running Mate 18 (my cousin's).
I have never had an issue like this one before.
I installed WPS Office on the original install & have used it without issue on several machines. I really don't think that's the problem.

All of a sudden, on double clicking a doc file in Caja, the file opens with Firefox, firefox begins to open multiple tabs that only stop opening if Firefox is shut down.

When I right click the file, and go to Properties / Open With, I have the appropriate radio buttons to change the association back to WPS Office or Libre Office.

But Clicking any unmarked radio button does nothing - will not change. Highlighting Firefox to remove it from the list does not work either.

I also notice that I cannot open the documents folder as administrator by right clicking/ Open as Administrator. After entering the password, I get an Error.

I CAN, however open Caja thru a terminal as superuser using the sudo caja command. The same password mentioned before works fine there, and I can navigate to the file I want to open, however, I STILL cannot change the Open With program.

Has anyone else seen this, and can you help?

I would love to fix this without a complete reinstall if possible.
BTW, I absolutely LUV Linux mint, and have installed it for years on friends' computers.

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 9:33 pm

Hi bluesman99.

My guess is a permissions issue. If find $HOME ! -user $USER returns a bunch of stuff, use sudo chown -R $USER:$USER /home/$USER to restore them back to the appropriate user.

That might fix everything, or nothing. Let us know.

User avatar
Flemur
Level 16
Level 16
Posts: 6098
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: File associations cannot be changed- need professional help

Post by Flemur » Sat Sep 08, 2018 9:53 pm

bluesman99 wrote:
Sat Sep 08, 2018 9:12 pm
I CAN, however open Caja thru a terminal as superuser using the sudo caja command.
That could easily cause your problem. If so, MrEen's advice should fix it.

DON'T do

Code: Select all

sudo caja
do

Code: Select all

gksudo caja
and the same goes for other programs with config files (generally GUI programs).
FWIW, I consider it kind of a bug/bad design because it affects so many people this way.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

Re: File associations cannot be changed- need professional help

Post by bluesman99 » Sat Sep 08, 2018 9:56 pm

I get permission denied ( that bothers me) from

find $HOME ! -user $USER
/home/user/.cache/dconf
find: ‘/home/user/.cache/dconf’: Permission denied
/home/user/.config/mimeapps.list

from sudo, I get

sudo find $HOME ! -user $USER
/home/user/.cache/dconf
/home/user/.cache/dconf/user
/home/user/.config/mimeapps.list

I ran sudo chown -R $USER:$USER /home/$USER

But that didn't fix it.

Other ideas???

Using gksudo caja shows the correct file associations, and works correctly - thanks for that, but it is still messed up under the user account

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 10:21 pm

Try the Properties / Open with again now that permissions are fixed.

bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

Re: File associations cannot be changed- need professional help

Post by bluesman99 » Sat Sep 08, 2018 10:41 pm

Not yet.

In searching thru the computer, I noticed firefox was not opening with the proper bookmarks & such, so I resored a backup copy of the .mozilla folder, and that allowed it to revert to the correct setup.

Though I can open a doc file with WPS office correctly when using gksudo, the doc file opens with firefox in the user account.

In the user account, when double clicking on a doc file, firefox opens, and then asks what program to use to open the doc file - wierd!

I am still unable to change the permissions under the user account - only when getting into caja with gksudo.

I CAN change the Open With on other files ie text files.

The Documents folder will not open as "Administrator" under the right click.

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 10:52 pm

I'm a tad confused (easy to accomplish.)

In the terminal, type caja then navigate to a doc file and right-click > Open With > Open With Other Application, select WPS Office and check the box for use as default.

You may need to restart caja after this for it to start working properly.

bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

Re: File associations cannot be changed- need professional help

Post by bluesman99 » Sat Sep 08, 2018 11:03 pm

Still NO JOY, MrEen



Its like its hard coded into caja under the user to use firefox.

I even went to .config/mimeapps.lst & edited the file to ONLY have the default apps listing.

Then I rebooted. not happening.

Found a listing in mimeapps.list for msword to open with firefox.desktop.

Deleted that, and rebooted.

I still cannot change the default with Open With, but at least the default is now WPS office as it should be.

I guess I will mark this solved, but it is not ideal.

Thanks for your help MrEen!
Last edited by bluesman99 on Sat Sep 08, 2018 11:12 pm, edited 1 time in total.

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 11:05 pm

Does find $HOME ! -user $USER still return anything?

bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

Re: File associations cannot be changed- need professional help

Post by bluesman99 » Sat Sep 08, 2018 11:21 pm

No, it doesn't.
I still get an error when trying to open the Documents or even user folder as Administrator - "Cannot open Folder"

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 11:24 pm

Well, I'm betting the problems are related, but I don't use caja and it's now beyond me. We'll have to wait for someone else to offer assistance.

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Sat Sep 08, 2018 11:27 pm

In case it offers anything useful, post the output of ls -l | grep Documents

bluesman99
Level 1
Level 1
Posts: 13
Joined: Mon Aug 03, 2009 9:11 pm

Re: File associations cannot be changed- need professional help - somewhat solved

Post by bluesman99 » Sat Sep 08, 2018 11:37 pm

Here it is, and thanks again. Gonna quit for the night.

ls -l | grep Documents
drwxr-xr-x 6 user user 4096 Sep 8 19:25 Documents

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Mon Sep 10, 2018 8:54 am

This is not an area I'm very skilled in, but my result:

Code: Select all

scott@scott-HP ~ $ ls -l | grep Documents
lrwxrwxrwx 1 scott scott    19 Aug 20  2017 Documents -> /mnt/DATA/Documents
That might be the problem. If so, we'll have to wait for someone else to offer the fix as I can't remember what's what with 777 755 644 and so on and, more importantly, which should be applied where.

gm10
Level 10
Level 10
Posts: 3340
Joined: Thu Jun 21, 2018 5:11 pm

Re: File associations cannot be changed- need professional help

Post by gm10 » Mon Sep 10, 2018 9:11 am

MrEen wrote:
Mon Sep 10, 2018 8:54 am
That might be the problem. If so, we'll have to wait for someone else to offer the fix as I can't remember what's what with 777 755 644 and so on and, more importantly, which should be applied where.
There's nothing wrong with his permissions.

My guess glancing at what you guys have been discussing would be that he's working as administrator/superuser/root a lot and expecting the root environment to be the same as his regular user's environment. That's not how it works, user environments are kept separate. If you change the default application for your regular user then that won't affect the default application that's configure for the root user, and vice versa.

Also note that when you work with a rooted file browser then files you open all get opened with applications launched by the root account. That's a dangerous thing to do and has a good potential to mess up your stuff, security risks aside. Just don't do it and your problems will go away.

As to his caja admin extension failing to open the folder, I don't know, maybe just try to reinstall it:

Code: Select all

apt purge caja-admin
apt install caja-admin
Restart caja afterwards, might even have to re-log. But as I said, stay away from that extension if you can help it.

User avatar
MrEen
Level 6
Level 6
Posts: 1464
Joined: Mon Jun 12, 2017 8:39 pm

Re: File associations cannot be changed- need professional help

Post by MrEen » Mon Sep 10, 2018 9:19 am

Thanks for jumping in, gm10. I knew I was in over my head after the first few posts here.

Post Reply

Return to “Other topics”