Browsercraft (how to tame your browser)

Random notes on keeping control over your browser.


Firefox: stop the damn guessing!

This browser can be very annoying, especially to developers, by trying to get smart. It goes to the wrong web sites. Make it stop.

  1. Type "about:config" into the Firefox address field.
  2. Type "fixup" in the filter bar at the top of the page to narrow the list of options.
  3. Toggle the entry browser.fixup.alternate.enabled to "false" by double-clicking it.
  4. Clear the filter bar and type "keyword" in its place.
  5. Toggle the entry keyword.enabled to "false" the same way.
  6. Close the about:config tab or window.

Chrome: Create a bookmark

Just click the star in the address line of the page you're at.


Chrome: Reorder bookmarks

Like all browsers, this one can be very annoying. You can't click, drap and drop any bookmark to where you want it to stay in the bookmark list. You must right-click it, choose Cut, then move to the bookmark near which you want it to stay, right-click and choose Paste.


Chrome cookies

Check your browser for the cookie holding the session id (example of cookie use). Here's how to do this in Chrome:

  1. Click the menu icon.
  2. Choose Settings.
  3. Click Show advanced settings....
  4. In the Privacy section, click Content settings....
  5. In the Content settings dialog, click All cookies and site data....
  6. Scroll to "integration.acme.com" and click.
  7. Click acme-sessionid.
  8. Copy the Content:, something like "USYSA893C01617450A8D2E73E30E64AD77DC_idses-int02.a.fsglobal.net". You'll be pasting this into something soon.
  9.  
    If you want to close up this temporary tab...
  10. Click Done.
  11. Click Done again.
  12. Kill the "chrome://settings" tab.

Pipe stdin to browser
#!/bin/sh
# -----------------------------------------------------------
# Pipe stdin to browser - call it pipefox.sh or pipechrome.sh
# -----------------------------------------------------------
# Create a temporary file.
# Fill it with content from stdin.
# Launch browser with temporary file as input.
# Sleep long enough (5') for browser to seize contents, ...
# then delete the temporary file so that it need not
# be cleaned up by hand.
#
# Example: browse the current working directory as a tree:
# $ tree -H baseHTML | pipe______.sh
# -----------------------------------------------------------
# However!!!!!
# If you have hypertext links in the file and traverse them,
# you will NOT be able to come back to the original page
# after the sleep timer has expired. If this is a problem,
# fix by deleting the sleep and rm calls, then do clean-up by
# hand.
# -----------------------------------------------------------
TEMP=$(mktemp /tmp/delete-me.XXXXXXXXXX)
cat $* > ${TEMP}
google-chrome ${TEMP}
sleep 5
rm ${TEMP}
# vim: set tabstop=2 shiftwidth=2 noexpandtab:

Here's a real example invoking the script (tree not being the only thing you can use this for of course):

master ~/dev/systemsets $ tree  -C -T System\ Sets -H file:///`echo ${PWD}` | pipechrome.sh

...and I see in the browser:


Removing the effects of trovi on Google Chrome

The trovi virus is really malware that infects Chrome (and other browsers?) when you download dirty extensions. I got it looking for and installing an extension named SaveFrom.net helper, which allowed me to download YouTube videos. As this extension is useful, I'm looking to figure out how to get it without infecting my browser again.

Getting rid of the trovi browser virus...

It appears, on Linux Mint at least, that the infection is nothing more than setting your start-up pages to bring one or two trovi search tabs instead of what you'd expect to find when fresh-launching Chrome. Once fixed, the infestation seemed over, but I was incensed that it had happened at all and went on a witch hunt. Anyway, here's what I did:

  • Googled for how to get rid of this and followed advice which was pretty much useless (see first two steps here). My search strings were similar to "trovi removal" and "linux trovi." The first got me a lot of useless Windows-oriented solutions. The second one yielded these pages, the second of which put me on my witch hunt.

    http://ubuntuforums.org/showthread.php?t=2240509
    http://discourse.ubuntu.com/t/can-trovi-com-virus-jump-through-wifi-from-windows-pc-to-ubuntu-laptop/1817/5

  • Look for and remove it in Tools → Extensions. (May not appear there.)

  • Look for and remove it in Settings → Search → Manage search engines.... (May fail to appear there too.)

  • Reinstalling Chrome will not remove it, I tried, there are two more things to try:
    1. Look for an remove it in Settings → On startup → Open a specific page or set of pages → Set pages. This seemed to work, but I was on a hunt...

    2. Look for and remove references to it under ~/.config/google-chrome. I found some by
      .config/google-chrome $ find . -name '*' -exec fgrep -Hn trovi {} \;
      
      I attempted to surgically remove them. Some were JSON in the file Default/Preferences; that was easy. I also found plenty in Default/File System/000/p/00/00000000, which I carefully modified by hand. Be sure to do this without Chrome running or it may just reestablish the preference.

    3. Or just remove the entire google-chrome configuration directory. I wanted to avoid this radical measure.