Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is annoying so I just use fresh browser profile every time I encounter such site, i.e. have a short-cut for:

  $ cat ~/bin/chrome-new 
  #!/bin/sh
  TMPDIR=`mktemp -d /dev/shm/chrome-XXXXX`
  google-chrome --user-data-dir=$TMPDIR --no-first-run --no-make-default-browser "$@"
  rm -rf $TMPDIR


In FF, this seems to be solved with the mechanism of containers and extensions like ‘Temporary Containers.’


Temporary Containers is a savior when it comes to paywalled articles.


Firefox Containers¹ are nice for that. Put the website in its own sandbox.

1: https://addons.mozilla.org/firefox/addon/multi-account-conta...

My only gripe is that the containers won't be in sync accross systems, which is already time-consuming to setup..


This is really an awesome command line hack.

For those like me who need a bit more detail:

1) make a text file called chrome-new

2) put the following contents in the file in a POSIX-like OS

  #!/bin/sh
  TMPDIR=`mktemp -d /dev/shm/chrome-XXXXX`
  chromium-browser --user-data-dir=$TMPDIR --no-first-run --no-make-default-browser "$@"
  rm -rf $TMPDIR
3) make the text file executable:

  chmod u+x chrome-new
This also uses the chromium executable for chrome, which I think is the default on debian-based systems. If this isn't applicable to you, change "chromium-browser" on the third line to whatever the executable is for chrome on your system.


Very nice!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: