Page 1 of 1

File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 9:12 pm
by bluesman99
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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 9:33 pm
by MrEen
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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 9:53 pm
by Flemur
bluesman99 wrote: Sat Sep 08, 2018 9:12 pmI 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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 9:56 pm
by bluesman99
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

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 10:21 pm
by MrEen
Try the Properties / Open with again now that permissions are fixed.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 10:41 pm
by bluesman99
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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 10:52 pm
by MrEen
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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 11:03 pm
by bluesman99
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!

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 11:05 pm
by MrEen
Does find $HOME ! -user $USER still return anything?

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 11:21 pm
by bluesman99
No, it doesn't.
I still get an error when trying to open the Documents or even user folder as Administrator - "Cannot open Folder"

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 11:24 pm
by MrEen
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.

Re: File associations cannot be changed- need professional help

Posted: Sat Sep 08, 2018 11:27 pm
by MrEen
In case it offers anything useful, post the output of ls -l | grep Documents

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

Posted: Sat Sep 08, 2018 11:37 pm
by bluesman99
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

Re: File associations cannot be changed- need professional help

Posted: Mon Sep 10, 2018 8:54 am
by MrEen
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.

Re: File associations cannot be changed- need professional help

Posted: Mon Sep 10, 2018 9:11 am
by gm10
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.

Re: File associations cannot be changed- need professional help

Posted: Mon Sep 10, 2018 9:19 am
by MrEen
Thanks for jumping in, gm10. I knew I was in over my head after the first few posts here.