Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

  1. #1
    Join Date
    Jun 2005
    Location
    the belly of a snake
    Beans
    Hidden!

    Lightbulb search-for-files: Graphical search for any Desktop Environment and File Manager (GTK)

    The preferred tool for searching is now Catfish. Many thanks go to Kalikiana for coding it.

    v0.1 stable is now in the Feisty Universe repository., so it's as simple as `sudo apt-get install catfish`. Newer versions are here.

    Quote Originally Posted by LKRaider View Post
    It searches using several backends like find, (s)locate, doodle, tracker and beagle (whichever are available).

    Good thing it is light and fits perfectly on Xfce (see screenshots).

    It is best integrated with thunar as a custom action, so I nicked a script from JasonValdron that will do this automatically - download that here

    to install it, go to the folder you saved it in and paste the following commands.

    Code:
    chmod +x integrate-catfish.sh ; ./integrate-catfish.sh
    dont forget to restart thunar to have it show up


    -----------------------------


    [SMALL]edit: deleted old solution in case of confusion[/small]
    Last edited by lapsey; December 16th, 2007 at 07:47 PM. Reason: catfish

  2. #2
    Join Date
    Jul 2006
    Location
    Sweden
    Beans
    34
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Cool howto! although I'm too lazy for that. :/

    If you like me have switched from ubuntu to xubuntu and just want a search gui fast without any tweaking or scripting:
    Install the package "gnome-utils" which includes the mentioned "gnome-search-tool". Then search from Applications -> Accessories -> Search for Files.

    The package also includes the dictionary and screenshot utils from ubuntu among others.

  3. #3
    Join Date
    Mar 2006
    Location
    Jönköping (Sweden)
    Beans
    197
    Distro
    Hardy Heron (Ubuntu Development)

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Tried it works perfectly..or almost perfectly.
    I didn't have the uca.xml file by some reason..but I created it...and then added the last line..the one with the </actions>.
    Didn't show up anything in the context menu...however when adding the search-script it self to Thunar > Edit > Configure Custom actions everything works great.

    THNX.

  4. #4
    Join Date
    Jun 2005
    Location
    Clarksville, TN
    Beans
    304
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Quote Originally Posted by mrazster View Post
    I didn't have the uca.xml file by some reason..but I created it...and then added the last line..the one with the </actions>.
    Ditto.

    I followed the instructions exactly and it didn't work.

    I had to manually add it to Thunar > Edit > Configure Custom actions. Then I tried to use the search script, but the screenshot below shows that I get a Thunar window at /home/brandon instead of the search dialog as you show.



    Any ideas?

    Greenstar
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot.png 
Views:	666 
Size:	61.3 KB 
ID:	13685  
    Last edited by greenstar; August 2nd, 2006 at 10:30 PM. Reason: I wanted to edit... I'm edit crazed...

  5. #5
    Join Date
    Jun 2005
    Location
    the belly of a snake
    Beans
    Hidden!

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Quote Originally Posted by greenstar View Post
    Any ideas?
    Sorry about that. I think this is because of missing settings in the Configure Custom Action dialog.

    I have bolded the important parts.


    --- Thunar ------------------------------
    Edit > Configure Custom Actions

    Edit or Add a custom action..

    In tab 'Basic'..
    Name: Search for Files
    Description: Search this folder for files
    Command: bash ~/.bash-scripts/search-for-files %f
    Icon: /usr/share/icons/Tango/scalable/actions/search.svg

    In tab 'Appearance Conditions'..
    File Pattern: *
    Appears if selection contains: Directories
    --------------------------------------------------------


    This means the custom action only appears if you have selected and right-clicked a directory. When multiple folders are selected, only the first one is searched.


    The "Search for Files: Look in Folder" is actually a function:
    If no (existing) folder path is passed to the script, it will open a dialogue with which to select the folder to search.
    This is so you can launch it independantly of a file manager (but it will still need a file manager to open the location of a found file).

  6. #6
    Join Date
    Jan 2005
    Location
    Portland, Oregon U.S.A.
    Beans
    1,046
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    EDIT: If you don't feel like the rigamarol, you can use this quick-n-easy method, but lapsey's script works much better. See two posts down from this if you can't find the uca.xml file mentioned in the HowTo.

    I installed the gnome-utils packages with synaptic (about 8MB for me).

    Next I opened Thunar (Applications>>FileManager), then opened the command editor (Edit>>Configure Custom Actions) and added a new custom action.

    I put the follwing info in the Basic Tab:
    Code:
    Name: Search for Files
    Description: Start file search here
    Command: gnome-search-tool --path %f
    icon: /usr/share/icons/Tango/scalable/actions/search.svg
    Then in the appearance Tab I left "File Pattern:" as "*" and left only the "Directories" box checked.

    Close Thunar then start it back up. Right click on a folder to search.
    Last edited by DirtDawg; August 17th, 2006 at 10:59 PM.

  7. #7
    Join Date
    Jan 2005
    Location
    Portland, Oregon U.S.A.
    Beans
    1,046
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Nevermind. There's a better way to do this. See next post.
    Last edited by DirtDawg; August 17th, 2006 at 10:55 PM.

  8. #8
    Join Date
    Jan 2005
    Location
    Portland, Oregon U.S.A.
    Beans
    1,046
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    When I followed the HowTo, I got an error that ~/.config/Thunar/uca.xml did not exist. The missing uca.xml file was located at /etc/xdg/Thunar/uca.xml instead.

    If this is the case on your computer as well, use these commands:
    Code:
     sudo cp /etc/xdg/Thunar/uca.xml /etc/xdg/Thunar/uca.xml.old
    then:
    Code:
     sudo mousepad /etc/xdg/Thunar/uca.xml
    and follow the rest of the instructions accordingly.

    This trick is totally sweet. Thanks again lapsey!
    Last edited by DirtDawg; August 17th, 2006 at 11:04 PM.

  9. #9
    Join Date
    Feb 2006
    Location
    Brasil
    Beans
    244
    Distro
    Xubuntu 7.04 Feisty Fawn

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Really great (small) script!

    I am currently fiddling with it (I already translated it to my language, pt-BR) and was thinking about adding an option for using slocate instead of find (specially useful if searching on large folders).

    I will post here if I can make a patch for that


    EDIT: okay, I figured the bash scripting part... I'm just missing a way to include an option checkbox in the zenity dialog :\
    (Is that even possible?)
    Last edited by LKRaider; August 18th, 2006 at 09:21 AM.

  10. #10
    Join Date
    Jun 2005
    Location
    the belly of a snake
    Beans
    Hidden!

    Re: How to search for files in Xubuntu / XFCE with just Thunar and a Bash script

    Quote Originally Posted by LKRaider View Post
    Really great (small) script!

    I am currently fiddling with it (I already translated it to my language, pt-BR) and was thinking about adding an option for using slocate instead of find (specially useful if searching on large folders).

    I will post here if I can make a patch for that


    EDIT: okay, I figured the bash scripting part... I'm just missing a way to include an option checkbox in the zenity dialog :\
    (Is that even possible?)
    it would require another dialog, which i think would be one too many.

    however.. if: slocate is faster than find and can return the same information as find -printf allows... then slocate should replace find

    also, if you want to post the translation I will try to incorporate it using localisation: http://www.tldp.org/LDP/abs/html/localization.html
    Last edited by lapsey; August 18th, 2006 at 06:24 PM.

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •