Changing the Search Location to Google - possible solution

Discussion in 'Modding and Customization' started by daldred, Aug 29, 2008.

  1. daldred

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    I've seen options for this elsewhere, but am starting a new topic as I'm trying out a different way. This is probably not for the faint hearted at this stage, but a modified file could be distributed when it's all sorted.

    So far I've only hacked this for the default 'en' locale, I think. Any volunteers to experiment further?

    I'd appreciate it if someone with confidence in this sort of thing would try this and report back before anyone else does. I made the changes, tested and then wrote these instructions; I think they are OK but it's probably best carried out by someone with the hacker nature first to check!

    The method: edit strings within the file /usr/bin/acer-search-desktop directly using a hex editor.

    In a terminal:
    1. Change to root:
    su

    2. Install hexedit
    yum install hexedit

    3. Go to the /usr/bin directory
    cd /usr/bin

    4. Make a copy of the file concerned, just in case!
    cp acer-search-desktop acer-search-desktop.bak

    5. Find any running search processes
    ps ax | grep search

    6. Kill these processes
    kill <nnnnn> (for all the numbers of processes relating to desktop search - probably two)

    7. Edit the file using the hex editor
    hexedit acer-search-desktop

    Now, use the Page Down key until you get to line 4110. In the text view on the right you will see the URL for Yahoo searches. CTRL-T takes you into this pane to edit the URL. Note that the / key is a command in hexedit, so when you need to enter a / into the URL switch back to the ther pane (CTRL-T again) and enter it in hex (2F). Change the URL to http://www.google.com/search, then in the hex pane enter zeroes up to the next URL start.

    Page down again until line 43D0. Here, change the "&p=" to "?q=".

    CTRL-W saves the changes; CTRL-C quits the hex editor.

    Now, to test it: run the search bar starter:
    /usr/share/search-bar/start-search_bar.sh

    The search bar will reappear on your basic desktop. Enter a search term and see if you get a Google search.

    If you close the terminal the search bar will close too. Reboot to get it back permanently. (There should be a more elegant way than rebooting - reboot linux??? we don't do that; it's not Windows!! - anyone know it?)

    There are several other URLs in the hex data; they appear to be related to locales. Anyone with a relevant locale feel like investigating? I reckon the URL after each locale is the one to call in that language.

    Downside of this solution is that it would not survive updates. Upside is that one file could be distributed for download - just replace your existing acer-search-desktop file with a hacked one and you're there.....
     
    daldred, Aug 29, 2008
    #1
  2. daldred

    TomD22

    Joined:
    Sep 3, 2008
    Messages:
    1
    Likes Received:
    0
    This worked perfectly - and was surprisingly easy to do since your instructions are so clear.

    Thanks!
     
    TomD22, Sep 3, 2008
    #2
  3. daldred

    DHowett

    Joined:
    Sep 8, 2008
    Messages:
    25
    Likes Received:
    0
    To avoid having to reboot, in the terminal, use this command instead:
    /usr/share/search-bar/start-search_bar.sh & disown

    & to background it, disown to detach it from the terminal.
    Or, if it's already running, control-z, bg, disown.
     
    DHowett, Sep 12, 2008
    #3
  4. daldred

    taplant

    Joined:
    Sep 30, 2008
    Messages:
    6
    Likes Received:
    0
    Thanks for this brilliant step by step - it worked fine for me.

    Cheers
     
    taplant, Sep 30, 2008
    #4
  5. daldred

    onlineaddy

    Joined:
    Sep 9, 2008
    Messages:
    103
    Likes Received:
    0
    Appears to have worked for me too, except instead of line 43D0 for the 2nd part, it's about line 4588 for me. Also, restarting the search bar spit out these lines in the terminal:

    /usr/share/search-bar/gtkrc:23: Unable to locate image file in pixmap_path: "button11alpha.png"
    /usr/share/search-bar/gtkrc:26: Background image options specified without filename
    /usr/share/search-bar/gtkrc:32: Unable to locate image file in pixmap_path: "button12alpha.png"
    /usr/share/search-bar/gtkrc:35: Background image options specified without filename

    (acer-search-desktop:12913): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GtkComboBox' has no property named `shadow-type'

    I didn't reboot the machine after. I'll give that a go later.
     
    onlineaddy, Oct 15, 2008
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.