Avant Browser don’t show the session restore window

December 28th, 2011

One way to disable the Session restore question (after the browser has crashed/been turned off hard) for Avant Browser is to delete the files that hold the session data.

DEL /Q "%appdata%\Avant Browser\*.opg"
DEL /Q "%appdata%\Avant Browser\reopen.dat"
DEL /Q "%appdata%\Avant Browser\pages.dat"

This can be scripted together with the launch of the browser so that batch(.bat) file could look like:

DEL /Q "%appdata%\Avant Browser\*.opg"
DEL /Q "%appdata%\Avant Browser\reopen.dat"
DEL /Q "%appdata%\Avant Browser\pages.dat"
"C:\Program Files\Avant Browser\IExplore.exe" %1

note: the %1 means to insert the first argument given to the batch file here. So if this is called “avant.bat” and you would call it with “avant.bat www.f15ijp.com” it would open this url.

VirtualBox clone a virtual drive image

November 7th, 2011

Cloning a drive to a new drive is simple:

VBoxManage clonehd existing_current_version.vdi new_target.vdi

Or if you wish to clone to a existing drive use “–existing”

VBoxManage clonehd existing_current_version.vdi existing_target.vdi --existing

Note on using “–existing”: If the existing_target is smaller than the existing_current_version then only the part that will “fit” is copied … so this usually [for windows at least] means that the resulting virtual drive is corrupted; so make sure the target is as large or larger than the existing_version. To modify the size of a virtual drive image check out how to resize a drive.

Note: Older versions of VirtualBox used the command clonevdi instead. At the moment the manual says the following about this “For compatibility with earlier versions of VirtualBox, the “clonevdi” command is also supported and mapped internally to the “clonehd” command.”

VirtualBox resize an existing vdi file

November 7th, 2011

It is possible to change the size of a existing vdi file.

VBoxManage modifyhd --resize newsizeinmb my_vm_drive.vdi

Then use the guest OS to take advantage of this extra space repartition the drives (or simply clone a from a larger drive if that is suitable).

Opera 8.54 don’t show the session restore window

October 8th, 2011

One way to disable the Session restore question (after the browser has crashed/been turned off hard) on Opera 8.54 is to delete the files that hold the session data.

DEL /Q "C:\Program Files\Opera\profile\sessions\autosave.win"
DEL /Q "C:\Program Files\Opera\profile\sessions\autosave.win.bak"

This can be scripted together with the launch of the browser so that batch(.bat) file could look like:

DEL /Q "C:\Program Files\Opera\profile\sessions\autosave.win"
DEL /Q "C:\Program Files\Opera\profile\sessions\autosave.win.bak"
"c:\Program Files\opera\opera.exe" %1

note: the %1 means to insert the first argument given to the batch file here. So if this is called “opera.bat” and you would call it with “opera.bat www.f15ijp.com” it would open this url.

Netscape Navigator 9.0: Don’t show the session restore popup

October 8th, 2011

Netscape Navigator 9.0 will promt the user to restore the previous session (pages that were open) if the browser crashed (or was shut down hard/incorrectly).

This can be turned off by going into “about:config” finding the key “browser.sessionstore.resume_from_crash” and setting this to false.

Update: This also applies for the SeaMonkey Browser

Windows: Don’t update Google Chrome (i.e. disable auto update)

October 7th, 2011

By default Google Chrome will update to the latest version automatically. It is however possible to disable this and instead update manually (when needed/wanted).

Note: This means you will not get security updates as threats are found and these get fixed – so this might be a bad idea to do if you don’t plan to update manually.

Open up a registry editor and check if the key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update” exists, otherwise create it (the key is the tree structure in regedit).
Now enter a Key name “DisableAutoUpdateChecksCheckboxValue ” as a DWORD and give it the value “1″.
This will keep Google Chrome from auto updating.

Setting up JAVA_HOME on Window

September 20th, 2011

The JAVA_HOME variable should point to the JDK’s bin folder in order for Java applications (jar, war, etc) to know where Java lives.

To setup a JAVA_HOME environment variable on Windows.

  • Right click on the My Computer icon in the start menu or on the desktop and select properties
  • Click the Advanced Tab
  • Click the Environment Variables button
  • Under System Variable, click New
  • Enter the variable name as JAVA_HOME
  • Enter the variable value as the install path for the Development Kit
  • Click OK
  • Click Apply Changes

Word of caution, Java is not fond of spaces, so I use pathnames without spaces.

Note: You will need to click OK, apply changes AND reload cmd to see the changes there.

lynx make a request to a port

September 19th, 2011

With lynx it is not hard to reqest a port other than 80.
Simply add :port after the port and before the “/”.

lynx domain:port
lynx http://domain:port/dir

VBoxManage controlvm reset & poweroff

September 17th, 2011

When you are running for instance a headless host machine it is sometimes needed to turn it off or to restart it from outside the host (for instance as part of a script or if the host is not accessible, no rdp etc).

Word of caution: These operations stops the machine dead in its tracks, any unsaved data is lost!

To turn it off (equivalent of pulling the power cable):

VBoxManage controlvm <vm> poweroff

Note: can be either the registred machine name or the UID of the host

To restart it (equivalent of pushing the reset button):

VBoxManage controlvm <vm> restart

Note: can be either the registred machine name or the UID of the host

For more details, here is what the manual (4.1.2) says:

  • VBoxManage controlvm reset has the same effect on a virtual machine as pressing the “Reset” button on a real computer: a cold reboot of the virtual machine, which will restart and boot the guest operating system again immediately. The state of the VM is not saved beforehand, and data may be lost. (This is equivalent to selecting the “Reset” item in the “Machine” menu of the GUI.)
  • VBoxManage controlvm poweroff has the same effect on a virtual machine as pulling the power cable on a real computer. Again, the state of the VM is not saved beforehand, and data may be lost. (This is equivalent to selecting the “Close” item in the “Machine” menu of the GUI or pressing the window’s close button, and then selecting “Power off the machine” in the dialog.)
    After this, the VM’s state will be “Powered off”. From there, it can be started again; see chapter 8.11, VBoxManage startvm
  • Dell Inspiron 1545 keys during boot-up

    August 3rd, 2011

    Use F2 to enter the bios.
    Use F12 to select the boot device order.

    To cycle through the monitor modes during bootup fn+F1 works.
    Also if you have an external keyboard scrollock+F1 might work (that was the default setting in my BIOS).