Despite it’s controversial history and, some might argue, ā€œdodgyā€ financial underpinning, I can’t help but admire Greenwich. Ā It’s a part of London relatively untouched by the progress of time; where the city-at-large surrounding it has left it be, as a…

http://stevedowe.me/2015/05/greenwich-time.html

    I’ve decided I need to dance more in my life. Ā Being a techy-programmer-web_developing-CEO-type, there is so little time anyway. Ā With the remainder, I usually indulge in sci-fi, walking the dog, eating… and occasionally sleeping too. Ā Yet, being almost…

http://stevedowe.me/2015/05/time-for-trance.html

[ This is an incomplete note. ]

I regularly use LibreOffice and love the software.Ā  It’s proven reliable over my many years of use.

For my own reference, as much as anyone’s, here’s a few links I have found useful over the years in getting things done!

Calc

 

I recently upgraded my laptop hard drive and decided to move all the virtual disk files of my virtual machines to my home directory.

However, when trying to run the VM, an error notificationĀ appeared:

Error starting domain: internal error process exited while connecting to monitor: Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
kvm: -drive file=/home/sd/libvirt/images/WinXPsp3IE8-d3.qcow2,if=none,id=drive-ide0-0-0,format=raw,cache=writeback: could not open disk image /home/sd/libvirt/images/WinXPsp3IE8-d3.qcow2: Permission denied

The Details section of that dialog showed me where the error was occurring:

Traceback (most recent call last):
 File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
 callback(asyncjob, *args, **kwargs)
 File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb
 callback(*args, **kwargs)
 File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup
 self._backend.create()
 File "/usr/lib/python2.7/dist-packages/libvirt.py", line 620, in create
 if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error process exited while connecting to monitor: Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
kvm: -drive file=/home/sd/libvirt/images/WinXPsp3IE8-d3.qcow2,if=none,id=drive-ide0-0-0,format=raw,cache=writeback: could not open disk image /home/sd/libvirt/images/WinXPsp3IE8-d3.qcow2: Permission denied

 

… or, at least, that’s what I hoped. Ā Except it didn’t.

For a long time, I played around with permissions on the virtual disk image itself, the directory containing it, and further back/up until reaching ~. Ā None of it helped.

Then I stumbled upon this libvirt bug report. Ā Comment #6Ā by Cole Robinson was what I needed:

“What virt-manager typically offers to do is use ACLs to allow the ‘qemu’ user search permissions on your home dir, which is all it should need and is fairly safe and restrictive.”

In order to check and set this, you’ll need to use the File Access Control utilities – getfacl and setfacl:

# cd /home

My home is “sd”

# getfacl sd

# file: sd
# owner: sd
# group: sd
user::rwx
user:root:--x
user:www-data:r-x
group::r-x
group:www-data:r-x
mask::r-x
other::---

The reason I have www-data with read and execute permissions is that I do web development and testing, and I also keep all my web-dev files in ~ too. Ā This just makes my system more “portable”,Ā saferĀ to upgrade and/or easier to migrate to a different Linux.

To set the required permission for libvirt / qemu, you just issue this one liner:

# setfacl -m u:libvirt-qemu:r-x sd

.. substituting sd for your own ~ directory name.

setfacl (set file access control) takes three main arguments:

  • the action – in this case, -m means “modify” the ACL;
  • the data to apply, colon-separated: here we specify it’s aĀ user (u) who is libvirt-qemu, and the permissions we want to allowĀ are read and execute (r-x).
  • finally, we specify which files or folders ACL should be modified – in this case, my home (sd).

After this, my virtual machine runs up perfectly.

This is relevant for Crunchbang and other Debian-related distros. Ā For Fedora/CentOS, I believeĀ the user should be qemu.

[ This is an incomplete post mainly consisting of notes to myself. Ā Ignore at will, commander. ]

When installing slackware, I opted for the excellent XFCE desktop environment. But having become aware of i3, a new tiling window manager, I decided to give it a go.

Learning a new Linux distro is never completely straightforward, even for a veteren. All distributions do things differently, so the knowledge you gain in one distro is never wholly applicable to another.

This can make for interesting discoveries and baffling, vexing problems which require prolonged periods of diagnosis to remedy. But the joy of learning how things work is always with you in Slackware, which is why the distribution – while harder work – is certainly quite rewarding.

Installing i3

How to install… SBo… xwmconfig, etc

http://docs.slackware.com/howtos:window_managers:i3wm

Good starter docs by sycamorex

Getting the right screen display resolution with laptop and external monitor

Use Arch documentation as reference xrandr https://wiki.archlinux.org/index.php/Xrandr (and clues from http://oyhus.no/Intel_915G_SuSE_10.3.html)

To XDM or not to XDM…

The problems I had with XDM

Getting started with the i3 config file – setting alternative shortcuts, nm-applet, etc

$TERM – WTF!! http://superuser.com/questions/124908/how-do-you-change-the-default-term-value-set-at-console-login-ubuntu/124915#124915

Getting the € Euro sign working: http://www.dawoodfall.net/index.php/utf-8-console … and having to edit the code page slightly (removing the U+20AC character from the 4th position in the table) http://www.fileformat.info/info/unicode/char/20aC/index.htm (“loadkeys unknown keysym: ‘quotedblbase'”)

Other smaller config changes

Running Emacs (server) and testing with emacsclient http://www.emacswiki.org/emacs/EmacsClient#toc1

This post has a new edition.


Part #1 of the Data Liberation series

Although Google Chrome is a very fast browser, it lacks one key feature which seems designed to lock users in – any account migration facilities to support moving to other browsers.Ā  This post is intended to help you move your saved passwords from Chrome to Firefox.

Firstly, you’ll need to have a read of this page: http://blog.catoblepa.org/2012/08/linux-how-to-export-google-chrome_28.htmlĀ  Ā – then come back here for more info!

While following the instructions in that post,Ā take note of these steps below before you close your browser. If you have also set up a separate encryption password for your browser, don’t worry – this method still allows access.

  1. Image of Google Chrome settings
    Disconnect Google account in Settings

    In Chrome settings, as a precation, I disconnected my Google account before closing the browser. Therefore, any changes I could make to this temporary session wouldn’t ever be uploaded back to Google.

  2. Once you have the saved CSV file from Chrome, keep hold of it – we need to edit it. In Firefox, install the Password Exporter add-on: https://addons.mozilla.org/en-US/firefox/addon/password-exporter/?src=search
  3. Image of Password Exporter
    Exporting passwords

    Password Exporter allows you to import passwords too, so you can avoid the need to install any third-party workarounds like LastPass (which again require you to upload all your browser data).Firstly, though, using Password Exporter in Firefox (Tools > Add ons … Extensions > Password Exporter > Preferences), we can export a sample CSV file to see how Password Exporter expects its import data. Simply click “Export Passwords” and save the file to your home directory.

    NOTE: This requires that at least one password is saved in Firefox already.

  4. The headings in the exported file are as follows:

hostname username password formSubmitURL httpRealm usernameField passwordField

This is the format that Password Exporter will expect its import data.

The data’s headings that you have just exported from Chrome are a little different:

origin_url action_url username_element username_value password_element password_value submit_element signon_realm ssl_valid preferred date_created blacklisted_by_user scheme password_type possible_usernames times_used

We need to match up the firefox CSV headings with the corresponding Chrome CSV headings. To do this quickly, use a spreadsheet tool I used LibreOffice Calc.

This is what I arrived at:

(FF = Firefox; GC = Google Chrome)

FF: hostname username password formSubmitURL httpRealm usernameField passwordField
GC: origin_url username_value password_value action_url signon_realm username_element password_element

Once the fields are mapped, there’s a couple more important steps to undertake.

Export dialog
Export in the right format!

Firstly, when you come to exporting from your spreadsheet application, make sure you choose to edit the output filter. In the Export Text File dialog, make sure “Quote all text cells” does not have a check (tick) in the box.

For good measure, I also selected ASCII/US in encoding type,Ā  as that is the format used by Password Exporter when exporting.Ā Ā  I think the importer should handle ISO-8859-1 and/or UTF-8, but your mileage may vary.

Now export it.

Remember seeing the additional header in the exported CSV file? It might have looked something like this:

# Generated by Password Exporter; Export format 1.1; Encrypted: false

In order to tell Password Exporter what format to expect its data in, this heading needs to be added back. However… the best way to do this is via a text editor, not in a spreadsheet program.

Open up GEdit, Emacs, Vi… whatever. Add that line to the top, but remove any trailing commas! It should now look like this:

# Generated by Password Exporter; Export format 1.0.4; Encrypted: false
"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"

One more step before you import!

A side-effect of exporting your CSV in LibreOffice is that empty cells are not quoted. In other words, the comma-separated values may appear like this:

"someusername","somepassword","someUrl",,"someusernameField"

Did you see those two commas with nothing between? The Password Exporter won’t like that when trying to import, so do a quick search-and-replace:

Search for ,, and replace with ,””,

Finally, save the file.Ā  Again, ENSURE the file type is US/ASCII.

The importer dialog
Successfully importing passwords!

Now open up the Password Exporter dialog from Firefox and click Import Passwords – you should see progress in the dialog shortly.

CAVEAT #1: BUG WHEN IMPORTING v1.2-EXPORTED DATA

There is an import bug when the version header is declared as 1.1. However, you can get around this by “fudging” the import header to an older version (I used 1.0.4). If you have trouble importing, adjust your header in the file to look like this:

"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"

After importing, you may see that not all passwords were imported. This is because duplicates are not imported. You can view the details in the link.

CAVEAT #2: SOME LOGINS, PASSWORDS, ETC ARE QUOTED

So far I’ve not had time to find a way around this. It’s to do with the import format.

The adventurous can investigate the source code, here: https://github.com/fligtar/password-exporter/blob/master/passwordexporter/chrome/content/pwdex-loginmanager.js

Hopefully you have now successfully liberated your passwords!

Problems?Ā  Comment below!

I’ve decided to go “old school” with some of my free time this year. Ā For some time, I’ve had (in storage) an Amiga A4000T computer – the top spec with Cyberstorm PPC card, CyberVision graphics card, some SCSI disks, 128MB (remember when you could run an O/S in that??) and so on.

Although the Amiga was always designed to work with analogue video standards (NTSC / PAL), theĀ prevalenceĀ of VGA monitors in the 1990s meant that the old “miggy” had to adapt. Ā One of the great features of the CyberVision card was that it could redirect video from the integral AGA graphics chipset and display Workbench (or anything, it would seem) through the video card instead. Ā This was no small feat of engineering and, in my opinion, is partly what made computing in the 1990s so interesting; ingenuity, innovation, invention.

Above, AmigaForever© screenshot showcasing OS 3.1.

Left: The Amiga’s Kickstart, prompting for a boot disk. Ā 

My 4000T has seen better days, granted. Ā Certainly as far as the operating system install and configuration is concerned – the video above shows that I can look forward to the pleasure of installing OS 3.9. Ā Or perhaps I might investigate OS4 which will harness my PowerPC chip, thanks to the hard work at Hyperion Entertainment.
Whichever, I am still surprised that for a 15 year old machine everything seems so, well, reliable! Ā The fact that the phase5/DCE CyberStorm/Vision hardware is operational, and the system starts up acceptably, is really testimony of the longevity of ancient hardware.
I’m really looking forward to exploring this machine again, and seeing what has recently been uploaded to Aminet.
Old habits die hard. Ā Happy New Year šŸ™‚