mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

Search on Desktop fails #1694

Open dsghub opened 1 year ago

dsghub commented 1 year ago

Expected behaviour

Pressing CTRL+F on Desktop should open a search window

Actual behaviour

Error message pops up Could not diplsay "x-caja-search://1/" Caja has no installed viewer capable of displaying the folder.

Steps to reproduce the behaviour

  1. Go to Desktop
  2. Press CTRL+F

MATE general version

1.26.0

Package version

1.26.0-linuxmint1 Caja 1.26.1

Linux Distribution

Linux Mint 20.3 Una 64-bit Linux Mint 21.2 Victoria 64-bit Debian 12

Link to bugreport of your Distribution (requirement)

https://github.com/linuxmint/mintdesktop/issues/57

lukefromdc commented 1 year ago

Confirmed your results, but this may be intentional: in a navigation window (which can have the desktop as a directory) the pathbar (below the main toolbar) replaces the normal path buttons with the search entry box when this is activated. The desktop however is a caja window with no toolbars (or menubars, sidepane etc) so has no place to display this.

Implementing this on the desktop would require new additional code to either open a caja navigation window set to the desktop as its working directory, or else a dedicated search dialog

dsghub commented 1 year ago

It used to work flawlessly in all Linux Mint LTS versions for the last ~10 years until 20.3. Something was broken with 20.3.

There was a tiny little window that opened up when I pressed CRT+F on Desktop. I entered a search term, and all matching icons would be highlighted. Very simple, very effective.

lukefromdc commented 1 year ago

Was that in Nemo by any chance? Mint's primary desktop is Cinnamon, which uses Nemo as its file manager. If this is in Nemo, the commit that added it could probably be ported to caja

dsghub commented 1 year ago

Was that in Nemo by any chance? Mint's primary desktop is Cinnamon, which uses Nemo as its file manager. If this is in Nemo, the commit that added it could probably be ported to caja

No, I have been using MATE and caja for years (LTS versions). Desktop search was a feature that was always present.

lukefromdc commented 1 year ago

There are two different search functions in Caja. I was thinking of the magnifying glass search icon that changes the pathbar to a search bar. Type to search pops up that little box in navigation windows. CTRL+F in a navigation window works the same as the magnifying glass search icon, that method would not work on the desktop. I never intentionlly invoked a search on the desktop window (I do that from navigation windows) so I had no idea this ever worked.

What was the LAST version of MATE and caja where you had this working?

dsghub commented 1 year ago

Probably Linux Mint 18.x. I tried t see what caja version 18.3 has, but the release notes on linuxmint.com read 404.

According to a post on forums.linuxmint.com, 18.3 had caja 1.18.5. According to another post, 18 hat caja 1.14.1-1+sarah.

Is there an easy way to see what the last major upgrade on a system was?

dsghub commented 1 year ago

However, is that really the important question? It may be, but I'm not sure. Apprently, pressing CTRL+F while on Desktop is supposed to yield some search entity. Otherwise I would not get the error message "Could not diplsay "x-caja-search://1/"", would I?

I tried the same on an ancient Ubuntu 11 system (using Nautilus). It opens a huge window of the filemanager, where I can then search the desktop. On earlier Linux Mint Mate systems, I received a very modest, tiny blob where I could enter a search term. Nothing else, nothing to click, etc. It was really small and sweet, reduced to the max.

lukefromdc commented 1 year ago

I am going to let other team members weigh in on this for the moment

mycophobia commented 10 months ago

Bumping this because this definitely shouldn't happen. Ctrl+F or selecting Places>Search for Files... has this behavior in open folders in spatial mode as well. It's quite unhelpful! It should probably start "MATE Search Tool" starting from your current directory instead. (Debian 12, MATE 1.26.0, Caja 1.26.1)

dsghub commented 10 months ago

Thank you, @mycophobia . I have edited my original post to add that Debian 12 and Caja 1.26.1 are affected, also I have added Linux Mint 21.1. The problem persists there, because the MATE version is the same.

@lukefromdc Can we have the "confirmed" label back, please?

lukefromdc commented 10 months ago

Must have been removed by accidenty given that I was ever able to confirm it

lukefromdc commented 10 months ago

Just RECONFIRMED this on Caja from git master as of 9-6-2023, released as version 1.27.2

mycophobia commented 9 months ago

I've thrown together a pretty hacky workaround (I'm not a very good programmer) for this if anyone's interested: https://mycophobia.org/spatial_search_workaround.PATCH Apply to caja-spatial-window.c It doesn't exhibit the behavior described above, but with this at least Ctrl+F on desktop and in spatial windows, along with selecting Places>Search for Files... in spatial windows will do, y'know, something, which in this case is pull up mate-search-tool for the current directory if done in a spatial window and for your home folder if done on the desktop or some spatial window that doesn't gracefully translate to an absolute file path.

I will also point out that even without this patch Ctrl+S on the desktop as well as in spatial windows will do something similar to the expected functionality described above. You can enter a pattern and it will highlight all matching icons.

lukefromdc commented 9 months ago

Link to patch is incomplete, goes to https://github.com/mate-desktop/caja/issues/url which goes nowhere

mycophobia commented 9 months ago

oh thanks github. edited

lukefromdc commented 9 months ago

just typing on the desktop does open the tiny seach window if you first click on the desktop. Search entry will be on bottom right

EDIT: if running under wayland it will be in the center of the screen instead, and decorated as of 1-16-2024

lukefromdc commented 9 months ago

I can confirm that your patch works, and that if mate-search-tool is not installed, caja doesn't crash, rather there is no response fromm Ctrl-F. Type to seach after click on desktop works same as before.

Not sure what the others on the team want to do with this

Ben-Fenner commented 5 months ago

I'm also experiencing this. I can't search within directory windows either. I can provide more details if needed. Hoping this gets fixed. :+1:

lukefromdc commented 5 months ago

Interestingly, when running from current git master under wayland, -F with a navigation window focussed will turn the location bar into the searchbox, same as clicking on the magnifying glass icon. I will check to see if that is working on x11 as well.