Restoring Tabs from Sync

September 15th, 2014

I keep forgetting how to do this and searching for the answer on the web just leads you down a horrible twisty maze of passages all looking the same.

Problem

Your Google-Chrome session has become discombobulated and when you close the browser all your open tabs get lost. Lots of reasons why this can happen and most of them are not Chrome's fault; last time for me, my disk was full.

When you resolve the issue that caused the lossage, you might be lucky and your open tabs come back automatically. More often than not they disappear and it is necessary to restore the open tabs from your sync account. That should be easy but where on earth is the magic button that does it?

Solution

I suspect Google are hiding this option deeper and deeper in the browser config because it is not used very often; fine, but how are you supposed to find it when you DO need it?

Simples!

  1. Open the settings dropdown
  2. Hover the mouse over "Recent Tabs" till the dialogue pops-up
  3. Choose the "more..." option at the bottom

This should open a page in your browser listing the computers that sync to your account. Beside the name of each computer is a dropdown with an option to Open All; choose that and all your previously saved tabs come back.

 

Running an X-app without an X-server

March 15th, 2011

Hmm, I suppose this sounds like a really daft thing to do - why would you want to run a graphics application on a system without a GUI? Here are a few use cases:

  1. you manage a remote Unix server hosted abroad and of course it is headless and has no use for a Graphics environment
  2. you do have a full-blown Desktop system which has a working Xserver but for some sessions - possibly spawned by a root process - there is no access to the Xserver; you can emulate this with the following sequence entered into an xterm:
    su -
    su - username
    
    i.e. su to root and then to another user - this final session will have lost access to the Xserver
  3. you need to run a graphic tool designed to be called from the command-line; it still needs a GUI environment because it requires access to GUI elements perhaps to generate a graphics file. Lazy programming? Maybe, but that does not fix your problem

In my particular case I needed to run a command that need a GTK environment to generate a graphic image; the command was launched from a Zope application which in turn had been launched as a root service and ultimately it was designed to be run as a facility on a webserver. So I was hit by all these issues.

Ordinarily it should be possible to address issue 2 with some trickery with xhost and Xauthority but even this seems to be non-trivial. I had already identified Xvfb-server as a long-term solution to the first problem and fortunately those good folks on the Interweb were able to point me at a complete solution which does not even require an X server to be running all the time. Instead a virtual server can be created on the fly and brought down when it is finished with. All achieved by the script

xvfb-run

Kudos to darvasan for getting this together and making it easily available. On my SuSE 11.3 system, the script failed to run complaining with

mktemp: too few X's in template `Xauthority'

which was resolved by editing the script as follows:

- AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority) 
+ AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXXXX)

Kudos for that one goes to olesen, an almost anonymous dude on Red Hat Bugzilla.

So having installed the Xvfb server you can now execute the following:

xvfb-run some-daft-gui-script

and provided your script finishes cleanly and doesn't get stuck in a GUI dialogue, you are back at a prompt.

 

Web Page Performance

September 3rd, 2010

It can be really difficult trying to quantify what a “slow website” really means. Its easy to spot a slow site but arriving at some metric that helps you monitor attempts at improving performance or better still, a tool which actually makes some sensible suggestions…

Firebug and Page Speed

Using Firebug and Page Speed to test page loading

Well, now there is one by using a combination of Firefox addons:

FireBug - a general web developer type of tool

PageSpeed - an addon addon that not only measures page loading performance but gives you several suggestions on what could be improved and also what is working well

I am told that Google are now using performance metrics in their page scoring so these tools can even help your SEO efforts. If you are also trying to monitor the effects of a caching tool such as Squid or Varnish or even Apache in front of your website then also add

livehttpheaders - gives detailed info on objects downloaded and can help monitor cache hits

to your list of Firefox addons.

 
 
© 2013 Andy Ferguson