If it hasn’t been said enough times already, let it be said once more: Emacs and org-mode are quite probably the best way ever to organise your personal life.

Emacs, for starters

Emacs as a text editor is rock solid. If you have a computer where you type in text and which:

  • is web based (e.g. a chromebook)
  • has any kind of touch interface (a tablet, phone)
  • is running a heavy GUI (graphical user interface)

.. then you are certain to observe a certain lag on input. It might be very slight, but it will likely be there. I know this to be the case for many devices out there, even those which purport to be “high-end”.

With Emacs, there seems to be a much more direct connection to the keyboard: you type, text appears. You type faster, text appears faster. In fact, text is capable of appearing much more quickly than you can possibly type. This makes blogging quick and painless.

org-mode, for main course

Life in Emacs simply came to be, through org-mode. Emacs itself is amazing; org-mode made organising data even better. A quick refresher:

  • org-mode creates everything in plain text, for maximum portability between systems
  • it is known as an “outline mode” enhancement for Emacs, meaning it helps to display semi-structured text effectively
  • it allows for the creation of lists – of projects, tasks, notes, links … you name it, anything that can be represented in text
  • it is portable, allowing for synchronisation with mobile devices
  • using Emacs, it is powerful – allowing org-mode notes to interact with other aspects of Emacs
image of org-mode
org-mode in action: showing a list of links

Org-mode also supports all sorts of fancy formatting and customisation, meaning text can look good and be easy to follow.

org2blog, for desert

What would all this power be for, unless blogging! 🙂

Actually, blogging is just one activity which benefits greatly from the power of org-mode, as org’s powerful and easy formatting options are seamlessly translated into HTML and published to a blog.

In my case, I’m using a WordPress site. I create a new post using the commands

M-x org2blog/wp-login
M-x org2blog/wp-new-entry

I then type in my post and save it to a local file, using

C-x C-s

and then post it to WordPress for subsequent tweaking, with

M-x org2blog/wp-post-buffer

I can then add some final polish and check the format in WordPress before final publishing.

As a demo and an indication of speed, this blog post took only 5 minutes to write, post, edit and publish.

I am the first to admit that I am a product of the old guard.  What do I mean by this?  Well, when I started running a business in 2001, when the internet provided unbridled commercial opportunities and there was a scarcity of talent to develop for them, there was a certain modus operandi: keep your cards close to your chest.  Shedding this behavioural axiom feels like the equivalent of standing up naked, in front of a live TV audience, promising them you really are still going to the gym and it’s all a work in progress.  You can expect mixed reactions.

But in the last thirteen years, a lot has changed.  We have seen the meteoric rise of internet-enabled devices and the framework, especially via social networking, for people to express themselves more freely.  In fact, not just “more” freely, but FREELY, period.  With this certain stream-of-consciousness we have also seen how businesses, once the “big blue”s of this world – hidden behind glass and steel, dictating the new world order – have become much more bottom-up, and even grassroots in appearance, if not in total nature.

I would argue that smaller teams in larger businesses will become more fashionable, because they tend to get things done more efficiently.  The challenge has become less about the big wins, and more about how the small, inter-connected wins can be made to work well together.  This, after all, was the original spirit of Web 2.0 (remember that?!).  What Web 2.0 represented was the idea that instead of developing a monolithic web site or business platform which covered all functionality, you could actually interact with other sites and use them too.  And they could use you and your services/data.

This is very much the case today.  How many web sites do you visit where you can log in using credentials from another service/site? This flexibility and openness is not necessarily less secure, though some might argue against global logins – and there are good reasons to be cautious of this.

But, authentication is one of many possible services available on the web, and exploring this loosely-coupled architecture is becomming faster and easier than ever. Through a much greater spirit of discovery, we are bearing witness to an age of more open experimentation, more open discussion, and more open engagement amongst interested parties.  Clients, friends, rivals, competitors.   Finally, we can also celebrate the “failures” too.  The increasingly scientific nature of modern thinking allows egos to be left at the door, and the excitement and joy of new adventures in technology to be more fully appreciated.

Many of us are into technology because of this excitement and enlightenment, myself included.  It’s childlike and, IMHO, a desirable quality in a person.  When you accept you are but one person, you accept a universal truth shared by everyone – and in so doing, acknowledge that while your time is precious, sharing whatever you can from it is a great investment.

On that basis, I am intending to up my blogging rate ten-fold, to try to document the events of my days and weeks and the challenges I face in them.  My experiment will be to see if in doing this – i.e. openly blogging much more of what’s going on in my microbusiness, there is a positive effect on people around, the interest in my business services and, ultimately I suppose, a positive effect on me.

And I will be open about the result.  Stay tuned!

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

You probably got here because you Googled.  I did 😉

As an eclipse user, occasionally you get greeted with error messages which are tricky to resolve.  The error, “Resource ‘X’ is out of sync with file system” made me scratch my head for a little while – as far as I could tell, it wasn’t!

Screenshot of error dialog
As an eclipse user, sooner or later you’ll see this.

There can be a few causes of this:

  • If you edit any workspace file from outside of eclipse, which is part of your project, this can throw the error.
  • The same is true of directories – have you renamed/moved/deleted anything?
  • The cause which threw my error was symbolic links.  Because I had changed the name of a target directory, this was enough to trigger this error dialog, even though the file name of the symlink itself was unchanged!

To prevent this dialog appearing, as far as possible, visit Window > Preferences > General > Workspace and select:

  • Refresh using native hooks or polling
  • Refresh on access
Image of eclipse preferences window
Selecting appropriate preferences can keep your workspace up to date and reduce the chance of errors appearing.

The combination of ensuring tight controls on renaming files and directories, together with automating detection of this as much as possible, will lead to a smoother experience with this great integrated development environment.

When installing Debian, or a derivative OS such as crunchbang, you may have opted to separate out your partitions/logical volumes to manage your disk space more finely.

I opted to do this.  My partitions were set up thus:

$ sudo lvs 

 LV     VG   Attr     LSize   
 home   t420 -wi-ao-- 438.10g 
 root   t420 -wi-ao-- 332.00m 
 swap_1 t420 -wi-ao-- 15.50g     <-- way too big!
 tmp    t420 -wi-ao-- 369.00m    <-- way too small!
 usr    t420 -wi-ao-- 8.38g 
 var    t420 -wi-ao-- 2.79g

This was not working for me.  Doing backups using the easy backintime was proving difficult, as backintime relied on more /tmp space than I had.

As I rarely touched swap space, I figured that 15.5G was probably a bit large for my needs.  Thankfully, nabbing swap space and reusing it for the filesystem is easy as pie – and all achieved with no downtime.

Here’s the sequence I typed into a terminal.  First, turn off swap:

$ sudo swapoff -a

Then resize the swap volume:

$ sudo lvresize -L 8GB /dev/t420/swap_1

Now re-format the swap partition before using it again:

$ sudo mkswap /dev/t420/swap_1

Then turn swap availability back on:

$ sudo swapon -a

And finally, resize the /tmp partition on-the-fly:

$ sudo lvextend -L +1G -r -v /dev/t420/tmp

Because the LVM tools have semi-awareness with respect to filesystems, the resizing of /tmp (using the -r switch) was achieved on-line – no need to log out, reboot or anything else.  The verbose (-v) switch allowed me to see everything that was happening.

The new partition sizing is:

 LV     VG   Attr     LSize 
 home   t420 -wi-ao-- 438.10g 
 root   t420 -wi-ao-- 332.00m 
 swap_1 t420 -wi-ao-- 8.00g 
 tmp    t420 -wi-ao-- 1.37g 
 usr    t420 -wi-ao-- 8.38g 
 var    t420 -wi-ao-- 2.79g

I also have 6.5G spare on the hard drive now, in case it’s needed by another logical volume.

LVM rocks for easy filesystem management!  Try it out!

 

Regain security
Regain email privacy & security

Part #3 of the Data Liberation series

Is there ever time in the day to reconsider your online security? I mean, really consider it?

Take the most common access point for communication in the 21st century – email. Yes, you read that right. It’s still email. Email is the root of online authentication for people worldwide, not only allowing them a “safe place” to recover lost account credentials, but also facilitating properly secured communications with the use of PGP signed and encrypted email. But is your email storage secure?

The woes of web mail

The “problem” with email is that its ubiquity spawned, some years ago, the explosion of “free” web mail services. All the big players provide it. These services are advertising-supported. In other words, the cost of providing such services are met by revenue generated from scanning your email and providing “relevant” adverts within your browser to click on. Each click is tracked and the advertiser billed accordingly.

An issue here, then, is that your email is scanned. All your emails are read by an indexing process which scours every single nugget of information. What information could that include? How could it be used? How about this little list for starters:

  • the date & time
  • the sender’s name and email address
  • their computer’s name
  • their network (i.e. their email provider, their ISP, any intervening mail routers)
  • their probable native language
  • their approximate location when sending the message (obtained from their original IP address)
  • your approximate location when reading the email (based on your IP address)
  • yours and their exact locations if using any location service

That’s not all

If the sender is using the same “free” web-mail service as you:

  • if they use a calendar in that service, what they were doing when they emailed you (giving an insight into the sender’s thought processes…)
  • if they maintain a contact list / address book in that web-mail service, that service may “know” you are a friend or family member of the sender
  • in this case, it will also know their friends – and your friends – and any shared friends too.  It can start to build up a map of contacts – who knows who and possibly why.
  • Knowing “who knows who” means those related contacts’ web-mail services can be interrogated for commonalities, such as shared events (in a calendar), shared interests via a social network, and so on.

Web cam

There are yet more ways your data can be exposed. If they are not using the same “free” web-mail service, but are using another service which they log into using their web mail service’s credentials:

  • that web-mail service provider could poll the other services to see what data you are sending (e.g. what you are posting) to those services
  • it can map any correspondence to or from your contact via its services even when not in relation to your email – e.g. It can expose a contact’s movements, their communications and interests in a given time-frame.
  • they can even be exposed by their use of related services from that provider. For example, new photos into a flickr or instagram account which is public, can be mapped back from their date, time and location to the IP address that was used to query location services.

Finally, a crucial problem with all online services is that there is no guarantee your data is actually deleted when you choose to delete it.  After hitting “delete” through a web site, this could simply flag the email to be removed from your visible account and stored in MegaWebCorp’s vault of “deleted” email, remaining there forever.  Or until needed…

This is the risk of putting data into another provider’s hands – what gets uploaded or stored in your name, stays there in your name, forever.  What goes up, sometimes stays up.

Resolving the privacy crisis

Coming back to email, then, the first priority for someone who wants to maintain some privacy with respect to their life activity needs first to remove the source of indexing from MegaWebCorp’s database – the link between all things you do, your email address.

When the email address is removed from the purview of MegaWebCorp’s systems, your online activity can start to become your business – not the advertiser’s.

Getting your own address is simple.  You can register a domain name with any of numerous providers around the world and sign up for a low-cost hosting plan.  For any person who values their privacy and the sanctity of anonymity, this is a small hurdle to overcome.

For the gain in privacy you can achieve by hosting your own web site, the price attached to a “free” web-mail account may seem rather high.

Bootnote

ArsTechnica has an interesting article published yesterday (30 March 2014) on “metadata as surveillance” .

 

Naughtyware. No, not that sort.

It looks like some app development may be taking a dark turn. Since ebay has released a new version of its app, the old version no longer works on my phone.

I start it, it crashes and then it kindly notifies me that a new version of the app is available.

The new version requires the location privilege, where the old location did not, and now to use ebay on my phone I have little choice but to install it and switch off location services while I use it.

Sigh.

“Fun” with Windows 7

So.. been having lots of fun with Windows 7 this morning.  Got hold of a refurb PC for doing some client system testing.

Win7 install completes and there are 3 updates to do.  Start the update process and two modal windows open up behind the update window, waiting for me to do something.  Have to click on task bar’s flashing icon to bring windows to the front.  On Windows.  Windows.

Anyway, I give the “OK” for Microsoft Security Essentials to install and it does, then starts to run an update within itself (!).  Due (perhaps) to the length of time of this process on this ageing P4, the main MS software updater kicks out another window saying “The application Microsoft Essentials may not have installed correctly.”

I’m sorry.  “May“??

Choices are “That’s ok, it installed correctly” or “Reinstall this application”.  Except the application is installed and already running an update.  Err…?  So.. how do I know it has installed correctly?  Because it’s running…(?!)  (Does the computer not know??!)

With 20 minutes of Windows use this morning, I can’t believe just how bad things are on the other side of the fence.  Someone fresh to Windows will see all this flashing icons, hidden windows, alerts, worries…  and not have the first clue what to do.

Someone close to me was one of those unfortunate souls.  She’d persisted for about a year with her Win7 machine and was constantly anxious with its scaremongering.  Hardly a productive environment.

Luckily, she’s now running #debian   #wheezy  with the #gnomeshell  and immediately found it intuitive and straightforward.  Go #freesoftware !!

If there is one thing I become acutely aware of, as time rolls by, it’s that the effort to write a page on my blog never diminishes. As the length of time since my last post increases, so does the psychological pressure to produce the next post. But one has to question, why is there this innate need to compose something, share it to the world and possibly see no return for the effort?

As strange as it sounds, I am intrugued by blogs that appear to have “stopped” at some point in time. When you come across a really useful post from a blog that was last updated three years ago, you can’t help feeling a bit sadenned by it. What happened to the poster? Did he/she get busy doing more even interesting stuff – so much more interesting and so much more busy, that they have neither the time nor the inclination to share?

This is a problem I have and I suspect I’m not alone. Sharing what goes on in my daily life is sometimes not possible. People count on me to provide web hosting support the moment they need it, not after I write a blog post. Working with a number of UK graphic design agencies, my days are kept busy and varied. Staying on top of the latest technical developments – often blogged by others in the industry, means I have little time to share this newly-acquired knowledge myself.

To address this issue, I am going to start worrying a little less about the content of my blog posts and more about their timeliness. Sound strange? Perhaps. Having read others’ blogs, though, it seems that social, political and technical comment is still a sought-after item of value in cyberspace. It all comes down to trust. Do you trust the opinion of the writer of this blog?

In our increasingly exposed digital world, establishing trust is something that comes from interactions and being able to judge a person’s character through what they share. As time rolls on, I will attempt to share more of my thoughts and observations through this blog and other social media sites, and worry a little less that I’m not providing a how-to on “everything you ever needed to know”.

If you have any comments, please feel free to add them below. Thanks.