Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

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

  1. #21
    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 kalikiana View Post
    As the new version is out, I translated it to German and Spanish. I hope that somebody will like them.

    Sadly the script is not ideal, in fact you might need to remove the '@euro' from the end of the filename.
    Ok, I have modified the script to look for the closest equivalent language file.

    If the exact locale file is not there, it will look for:
    aa_AA.BBB*
    aa_AA*
    aa*

    in that order. So if you don't have that particular variation on the language, you can use something similar that might work

    an example:
    if your locale is zh_TW.euctw
    it will look for 'search-for-files_locale.zh_TW.euctw'
    if that doesnt exist it will look for anything beginning with 'search-for-files_locale.zh_TW'
    if that doesnt exist it will look for anything beginning with 'search-for-files_locale.zh' (and will match zh_CN.gbk, which may be similar enough to use)
    (and of course if that doesnt exist it falls back to english)

    this is because some languages, like chinese, have many different locales
    zh_CN
    zh_CN.gb18030
    zh_CN.gbk
    zh_CN.utf8
    zh_HK
    zh_HK.utf8
    zh_TW
    zh_TW.euctw
    zh_TW.utf8
    ja_JP.eucjp
    ja_JP.utf8
    ko_KR.euckr
    ko_KR.utf8

    I have also made other (significant) changes, which will hopefully be the last to this horrible script for some time. see first post
    Last edited by lapsey; November 26th, 2006 at 04:58 AM.

  2. #22
    Join Date
    Aug 2006
    Location
    Germany, Bonn
    Beans
    59
    Distro
    Xubuntu 7.04 Feisty Fawn

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

    I have slightly changed the translations and shortened the filenames now that languages are better handled.

    So it's German and Spanish.
    Attached Files Attached Files

  3. #23
    Join Date
    Sep 2006
    Location
    Canada
    Beans
    Hidden!
    Distro
    Xubuntu 6.06

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

    Hi !

    Thank you very much for your search script !
    it work very well with Thunar on Debian Etch and Xfce4.

    I join a French translation, fr_CA for French-Canada
    Attached Files Attached Files
    Last edited by Wapush; November 27th, 2006 at 09:17 PM. Reason: Update French translation attached files

  4. #24
    Join Date
    Nov 2006
    Beans
    2
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: search-for-files: Graphical search for any Desktop Environment and File Manager (

    so easy and so beautiful... i am running zenwalk 4.0 and it works great on it.

    thank you very much...

  5. #25
    Join Date
    Aug 2005
    Beans
    1

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

    This saved me much time and annoyance in my quest to locate and transcode/re-rip the few remaining .wma files in my library. thunar was great before, and even better with this addition. Many thanks!

  6. #26
    Join Date
    Aug 2006
    Beans
    11

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

    I am having permission problems, I write perl scripts for web sites, some are executable.

    When I click on them in the search the pane they execute rather than allow editing, how can I change this?

    Thanks for a great script.

  7. #27
    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 SimonJones View Post
    I am having permission problems, I write perl scripts for web sites, some are executable.

    When I click on them in the search the pane they execute rather than allow editing, how can I change this?
    The command filemanager filename is being executed, so you can either change how your filemanager deals with these files; or you can use search-for-files -p to cause the script to open the parent folder instead of the file itself.

  8. #28
    Join Date
    Aug 2006
    Location
    New Brunswick, Canada
    Beans
    25
    Distro
    Kubuntu 7.04 Feisty Fawn

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

    Wow! This is really neat! Absolutely what I needed!! I use it often Thanks But for the installation, if you want something easier, you can check my Thunar script: http://ubuntuforums.org/showthread.php?t=380602 I've done a little install.sh that allows us to add entry to the User Custom Actions, it isn't really hard.

  9. #29
    Join Date
    Nov 2006
    Beans
    2

    Re: search-for-files: Graphical search for any Desktop Environment and File Manager (

    Quote Originally Posted by lapsey View Post
    Title should read: 'search-for-files: Graphical search for any Desktop Environment and File Manager (GTK required)'

    This script can be run from the command line, a custom application launcher, or whatever you like.
    Later I will show how to run it from Thunar, as a custom action (so you can easily right-click and search multiple directories). Personally, I have Gnome, but I prefer to use this & thunar instead of the gnome search tool & nautilus.


    new version! 0.25



    Features added:
    options as script arguments
    native language support (when translation file is in same directory)
    more compatible: can limit the number of results displayed
    more usable: can redraw search results (-r). note: this could be slow depending on your hardware and the number of results
    more flexible: can open parent folder instead of file (-p)
    more searchable: can search multiple paths
    more sortable: now can sort by date
    more legible: human-readable filesize

    also! supports regular expressions! (except for /$ and ^/ ..)
    and also allows searching of root-owned directories (well, at least on my system)


    Usage: search-for-files -pr -g WxH -l N -f filemanager [path1] [...] [pathN]



    A note on translation:
    A brazilian portugese locale file ( UTF-8 ) is included with the script (thanks, LKRaider!!).
    If you are using this as your language then it will translate automatically. Otherwise, if you want to make your own one, it should follow the same naming convention and be in the same directory as the script. `echo $LANG` to find your locale language and encoding.



    How to set it up


    click here and save the file to your home directory (~). (the file is also attached at the end of this post)

    Now copy and paste the following code into the Terminal to uncompress it, store it and make it executable.
    Code:
    if ! [ -e ~/.bash-scripts ] ; then mkdir ~/.bash-scripts ; fi
    tar xvjf ~/search-for-files-v0.25.tar.bz2 -C ~/.bash-scripts/
    chmod a+x ~/.bash-scripts/search-for-files*
    then we need to install zenity, which draws the dialogs:
    Code:
    sudo apt-get install zenity


    Now it is ready to be used. A quick test would be to open a terminal or Alt-F2, then enter `bash ~/.bash-scripts/search-for-files -r -l 100 -f thunar` or `bash ~/.bash-scripts/search-for-files -pr -l 500 -f nautilus ~/`





    Thunar integration

    Thunar > Edit > Configure Custom actions

    Click the appropriate button at the right of the window to add a custom action

    In tab 'Basic'..
    Name: Search for Files
    Description: Search this folder for files
    Command: bash ~/.bash-scripts/search-for-files -r -l 250 -f thunar %F
    Icon: /usr/share/icons/Tango/scalable/actions/search.svg
    You may want to change the command yourself. Here, the window is set to redraw and displayed results are limited to (a memory-friendly) 250.



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


    You'll need to open a new Thunar window for the custom action to show up.

    Now all you need to do is (1) select the directory(ies) you want to search, (2) enter the search string and let it run. (3) Double-clicking an item or selecting one and hitting 'OK' will (4) open up that item or its parent directory.

    another shot of how it is supposed to work:
    thanks very much! a very detailed howto!

  10. #30
    Join Date
    Mar 2007
    Location
    Bangalore
    Beans
    92
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: search-for-files: Graphical search for any Desktop Environment and File Manager (

    one problem....after i run a search and get multiple results, can i select multiple files from that list and drag them to another window? in my case i've stored all the fonts i collected in windows in multiple directories based on its name. so i did a search for *.ttf with this search script. works BEAUTIFULLY but i cant select all the fonts and drag them to my ~/.fonts folder. got any ideas? thanks!

Page 3 of 5 FirstFirst 12345 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
  •