Browsercraft (how to tame your browser)

Random notes on keeping control over your browser.

Chrome browser windows open off-screen in Linux workspaces

...and, if that weren't enough, the window is pretty much inactive—you can't move it, close tabs or perform any useful action. This is a very old bug that Chromium engineers seem not to care about (because they're Windows guys?).

I found some steps that help...

  1. Hold Alt and press Tab to reach the offending Chrome window. This can sometimes be tricky to do, but persistence pays off.
  2. Press Alt + Space to open the pop-up windows menu.
  3. Choose to Move. This will give you control back to relocate the window (and its open tabs) elsewhere on the screen...
  4. ...whereupon, it is hoped, it will begin functioning correctly again.

It might be useful soon after to close the browser window in order to ensure that the new position of this Chrome window will be where it works. However, I'm not confident this is a real help. First, you lose the open tabs you had and half to go set them up again. Second, it's unclear that this really solves anything because, in my case, I never position windows slightly off the screen (at least never for longer than a few seconds), so I don't think this really ensures them opening correctly next time.

This said, the steps above should help recover non-working Chrome windows.

How to launch a new instance of Chrome in a Linux workspace

This can only be done from the command line. Frustratingly, if you launch Chrome from the Menu or Panel, your workspace will be switched to some other than the current one that happens already to be running Chrome. This will get you a new running instance of Chrome.

But, what identity in Chrome? I have not yet been able to ascertain this, but it looks like it gives you the identity in effect upon the last time you started.

$ google-chrome --new-window any site URL

Incidentally, this works identically for Opera too. Again, I can't tell what identity is in force nor why it assumes that identity. However, it's easily established by other actions in the new browser page.

Another option, besides this one and the command-line one given above, is to use the Linux workspace control mechanism via Ctrl+Alt+↑, then drag Opera's or Chrome's window (or the window of any other piece of software) from one workspace to another.

Opera browser and Linux workspaces

As the Opera browser has its own notion of workspace, it's very difficult to google for how to get around that right-clicking the title bar of one of its windows will not, as happens by standard for every other piece of GUI application software, reveal a control to relocate that window to a different (Linux) workspace. This is a full-time expectation among my personal productivity habits.

Yet, this is possible. The option to relocate presents itself only from the instance of Opera on the Cinnamon (or other graphic desktop environment) panel. Right-click the icon representing Opera to get Move to another workspace. Here's an illustration:

Googled for "linux chrome reboots to partial artifact"

Or, "Chrome artifacts only upon reboot and relaunch of Chrome."

Try this from Chrome (in the address field):


Some clean-up or reconfiguration will be required, but it awakens the dead windows that came up partly off-screen. This bug has existed since 2014.

In particular, it is often the case that this funny business occurs in the face of having Chrome windows from more than one identity up (in different Linux workspaces).

Video Downloader PLUS

I tried using this extension from Chrome, but it grabs only video (of an .mp4) and no audio. I didn't investigate too deeply.

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 "" and click.
  7. Click acme-sessionid.
  8. Copy the Content:, something like "". You'll be pasting this into something soon.
    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
# -----------------------------------------------------------
# Pipe stdin to browser - call it or
# -----------------------------------------------------------
# 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 |
# -----------------------------------------------------------
# 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}` |

...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 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.

  • 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.

Reversing a deleted link/thumbnail on the Chrome homepage

You mindlessly clicked in the X or close/delete control of the Facebook thumbnail and now are faced with never being able to click so easily in a new tab to reach this application again. There seems to be no way to get it back, just going to Facebook frequently will never restore it.

How to add buttons/links to homepage?

These thumbnails disappear permanently when you close them. They were populated in the first place by going to places freshly upon opening a new tab and going somewhere. Here are the steps to restore one you've deleted:

  1. Open a new tab.
  2. Delete (any) thumbnail by clicking the X on it. (Yes, this is what got you angry in the first place.)
  3. However, look underneath the thumbnails: you'll see a link to click named Restore all. Click this.

(In this illustration, which I got from someone else, it's not Facebook that's missing as in my example, but it could have been.)

How a browser renders a page
  1. Parses the HTML that is the page's content into a DOM.
  2. Fetches any external resources such as CSS, images and JavaScript files.
  3. Parse the CSS, builds the CSSOM.
  4. Executes the JavaScript in the page.
  5. Merges the DOM and CSSOM to construct a "render tree."
  6. Calculates layout and paint.


  • DOM, document object model, basically a parse-tree data structure
  • CSS, cascading-style sheet
  • CSSOM, cascading-style sheet object model

How to relocate Chrome tabs and windows to another workspace

It can't be done without going into Chrome settings and choosing

  1. Launch Chrome.
  2. From the triple-dot/hamburger/general menu, choose Settings. This brings up the Settings page.
  3. Click Appearance.
  4. Click to turn on Use system title bar and borders.

How to "google" for "not this string"

You want to google to find where to put your Logback configuration, to with logback.xml, when you deploy to Tomcat, but you aren't using Spring Boot and don't want to wade through irrelevant answers about Spring (which are vastly more numerous). How to express that? Here's the search string:

logback.xml where to place -spring