How to set up a system for UK medical practise

id flag

I am a full-time UK doctor and I am not a computer expert but I do like to be in control – and so I have spent some time researching how to do this, keeping notes as I did so I can do it again if needed – it is therefore necessarily a bit basic but hopefully it will inspire people who are not very experienced with Ubuntu to take the leap and start using it.

My general requirements were / are

  • Easy to use on a day to day level, even for a non-IT professional I don’t want to have to use the terminal for daily tweaks of the system, nor frequent investigative IT – I enjoy tinkering and trying to understand the computer, but it just has to work when I have a patient in front of me as well as at plenty of other times.

  • The system must be robust (ie not lose data) and reliable (ie boot up and function properly at least as reliably as Windows).

  • I have to be able to back data up easily.

  • It has to be – overall – at least as good as Windows.

  • I would like the security of knowing I can boot into a windows system if I struggle with achieving an essential task in Ubuntu.

Specific requirements:

  • Ability to store patient data in a secure encrypted format.
  • Ability to keep a backup of everything on an encrypted external portable drive.
  • Ability to sync data from my home computer (the master data set) and my laptop (either directly or via external drive but preferably not using a cloud based solution).
  • Access to NHSmail – the NHS’s secure email system for email and calendar. As a last resort, I could use web access for this, but I would much prefer a good email client.

Specific software requirements (necessary due to other work colleagues using them)

  • Dropbox
  • Microsoft Teams
  • Zoom
  • Drivers for a Brother printer / scanner I already own and don’t want to replace

Other software functionality needed:

  • Medical imaging (DICOMM) file viewer
  • PDF editing software (for simple editing – predominantly need to add some text boxes)
  • Word processor that can open / edit MS Word files
  • Powerpoint equivalent which can open / edit / present my previous presentations
  • Excel equivalent that can open / edit MS Excel files
  • Internet browser

Desirable but not essential:

  • Ability to open Microsoft shared calendars sent by colleagues
  • Image editor (equivalent to Photoshop)
  • iTunes or equivalent to sync music on iPhone
  • Accessing an email account that is shared between several of us (to provide advice and guidance to primary care physicians we use a shared inbox)

Preferred hardware setup

  • Main data set on desktop computer at home (the ‘master data set’) where I do most of my admin
  • Encrypted external drive to back up the master data set frequently and easily
  • Laptop to take to clinic rooms which syncs with the external drive frequently and easily
  • Brother Printer / scanner drivers on desktop and laptop

So the question I’m asking (and hope to answer) is: How can I set up this system to use Ubuntu for patient management as described above, with the backup of a Windows system 'just in case'?

Ed Randall avatar
cn flag
This is interesting and begs the question, why are the NHS so tightly wedded to Microsoft with their spiralling licence fees, security vulnerabilities and relentless upgrade costs. Rollout would be straightforward, support and remote assistance would be simpler, more secure and less expensive. Perhaps one of the large so-called "consultancies" would care to comment... (patronising dismissal not required).
Ed Randall avatar
cn flag
Did you manage to make the NHS ID card sign-on work?
muru avatar
us flag
"but a lot of it is probably relevant to non-medical applications that require confidentiality (data security)" these parts should ideally be posted as separate, focused questions
Will avatar
id flag
@Ed Randall - thanks. Yes, I agree it's very frustrating the NHS is so tied to MS; there have been attempts to offer alternatives (eg NHSBuntu which folded due to litigation); I don't think it's likely to change from the centre. I've never used an NHS ID sign-on from outside the hospital anyway so haven't tried to do that.
Will avatar
id flag
@muru - thanks. To be honest, most of the individual bits that could answer focused questions are on AU already - many of them were my sources of information so I'm not convinced I'd be adding anything original if I did that. What I hoped to do here was pull a lot of things together that otherwise require extensive research, as well as perhaps reframe some of it in non-IT-expert terms.
us flag
This would be a useful question for medical practitioners and people without much technical skills in general. I don't see why it is getting close votes.
id flag
slightly related, but could be of interest, checkout
muru avatar
us flag
@ArchismanPanigrahi because, like OP themselves says, this is a bunch of questions rolled into one. Useful? Maybe. Textbook example of a too-broad post? Definitely.
C.S.Cameron avatar
cn flag
@muru Let the users speak for them selves, **everyone loves this post**.
muru avatar
us flag
@C.S.Cameron yes, hot network questions tend to get a lot of upvotes. Doesn't mean that they are on-topic, not broad or anything else. Just that they got on the HNQ.
C.S.Cameron avatar
cn flag
Lots of upvotes show that people want them and people wanting them is what sells AU. Give the people what they want. Not what you want to give them.
guiverc avatar
cn flag
I initially close-voted as too broad; but there was no answer and it was later an answer appeared and I realized the post was to be self-answered (*I then removed my close-vote for too-broad though I for one still believe it is; I felt keeping it outweighs the rules of too-broadd; but my 2c & i'm no moderator here*). I up-voted as I want to reward the effort & sharing of the results; even though to me the question is far too broad.
C.S.Cameron avatar
cn flag
At least we do not have to worry about duplicate posts here. Everything goes toward answering the title question. I think this question/answer will be of huge importance to many people. It is not too-broad, it is just as broad as it needs to be.
in flag
On smartcards: back when NHS Digital were feigning cooperation with the NHSbuntu project (in what later proved to be a gambit to get a better deal with Microsoft), they had a hack week when they got smartcard auth working on Linux. I polished that code up to the point where it would log into some NHS Digital systems: It's only been tested on Ubuntu 18.04, and only by tech-savvy developers, it doesn't support some newer smartcards, or certificate renewal (which is only possible on IE 11), but it's as close to a working solution as anyone's gotten.
muru avatar
us flag
@C.S.Cameron no, lots of upvotes for an HNQ just means that completely random users from across the SE network with association bonus who otherwise might never have interacted with AU before and may not ever again felt the post was amusing/interesting/whatever. That debate is pretty old, it's why [some SE sites like to post "clickbait" titles](, for example. Of course, if you want to "sell" AU, by all means try to, but that doesn't mean I have to stand by and watch while that happens.
C.S.Cameron avatar
cn flag
@muru Completely random users from across the SE network with association bonus who otherwise might never have interacted with AU before and may not ever again felt the post was amusing/interesting/whatever **are not the ones who upvoted this question and answer** You should know it take at least a reputation of 15 to vote up a question or answer. SE is a business, it and it's helpers must treat clients with respect.
muru avatar
us flag
@C.S.Cameron the association bonus is 100. 100 > 15.
C.S.Cameron avatar
cn flag
A User needs a rep of at least 200 to get an association bonus. These are not fly by night users. They are still valued clients who have found this question and answer useful. They are people whose votes count.
muru avatar
us flag
@C.S.Cameron your clients maybe, not mine. And for all that their votes count, the association bonus does not grant downvoting privileges, so AFAIAC their upvotes don't matter either.
C.S.Cameron avatar
cn flag
@muru If their upvotes don't matter the ones you have received don't matter either. If they are of no value to you, why don't you make them count and donate them as bounty on deserving questions? Do some good with them.
muru avatar
us flag
@C.S.Cameron no, I dont really care for any of my posts that went "hot". If they got deleted tomorrow, I doubt it would make any difference. If you want me to post a bounty on some post, sure, I have no problems with that.
C.S.Cameron avatar
cn flag
@muru That is very generous of you, I will keep it in mind if I see a deserving question. (I seem to recall collecting such a bounty you once posted).
Nick.McDermaid avatar
my flag
Keep in mind that you can cloud solutions to remove a lot of complexity and cover a lot of your requirements. For example a cloud web application doesn’t care what OS you use, and usually stores encrypted data in the cloud which is automatically backed up. It pains me to think a health professional should ever have to concern themselves with backups or installing an OS.
id flag

Note that I do not recommend this for an entire premises: that would need dedicated IT support. What I propose here replaces the setup most doctors have in part-time private practise, ie setting up the entire system themselves.

The next point to make – for anyone contemplating this - is that I have done this and it works much better than I anticipated, with several advantages over my previous Windows-only setup. If you are in a similar position to me and are prepared to put in a bit of effort, in my opinion it is definitely worth it. It’s not about saving money or snubbing Microsoft / Apple for the sake of it, you will end up with a system that works better, gives you more control, and you will probably end up understanding what your computer is doing much better. I like the fact that I can boot into Windows if I need to, but in fact I haven’t done so for about 6 months now from my home computer or laptop.

I have only failed to achieve one of my work objectives and still need to use Windows for that (accessing a shared Microsoft calendar) – which I do at work; I posted a question on that previously – if anyone can help with that please do, but I suspect the issue is with Microsoft rather than anywhere else. I also can’t get iTunes to work and so can’t sync my iPhone music, but that is not an issue with a dual boot setup, so I can update my music at some point if I need to.

Summary of what I did:

Step 1 – preparation (consider upgrading hard disks (and do this before installation); decide on your Ubuntu version; obtain hardware; create bootable USB drives; back up data; list software requirements; get together wifi access codes; list bookmarks / favourites for internet; decide on your partition sizes)

Step 2 – Back everything up carefully

Step 3 – Partitioning

Step 4 – Install Windows; install Windows apps if wanted at this stage

Step 5 – Install Ubuntu on next partition, leaving a portion of the drive unallocated for a later encrypted volume.

Step 6 – Install other software

Step 7 – Set up Thunderbird for NHSmail

Step 8 – Set up Veracrypt and create encrypted volume

Step 9 – Transfer patient data to encrypted volume

Step 10 – Install printer / scanner driver

Step 11 – set up synchronisation system

Step 12 – Tweaks to the system to improve the experience

Step 13 – Play!

1. Preparation and planning

Maybe I’m a dinosaur, but this is a very rare occasion when a paper notebook is very useful – you can write down exactly what to do and when, knowing that you still have your records if your installation goes wrong, and it leaves the whole screen available for the actual installation.

Pre-preparation trial (‘dry run‘)

I started out by installing Ubuntu on an old laptop to check that it would perform the most basic functions and that I was able to use it – not strictly necessary, but I didn’t want to waste time if I was unable to get it to do the most basic things. It was actually very difficult to get NHSmail to work on an email client in Ubuntu, but that was my only difficulty and so once that was sorted (see below) there were no barriers. I checked that LibreOffice could open and edit my Word documents, and Impress could open and edit my PowerPoint presentations. All were fine.

Dual boot

When I planned my system: I wasn’t 100% confident that I would be able to do everything on Ubuntu, so I planned from the outset on having dual boot systems so that I could revert to Windows if and when necessary.


I decided to upgrade my old HDD to SSDs before installation – well worth doing this before installing a new OS, and by a long way the best upgrade I have ever done on a computer – it transformed it from a sluggish dinosaur into (by my standards) a good machine.

I bought a 500GB M.2 SSD for my laptop to replace a 128GB M.2 drive, and a 1TB SATA SSD for the desktop. It’s worth upgrading any hard drives at this stage to avoid having to reinstall the OS. Incidentally, I bought extra RAM for the desktop and laptop – not essential at this stage, but easy to do whilst the computers were already open for the SSD upgrade, and not very expensive.

I already had large enough USB drives to hold the installation media and a keypad encrypted external drive. I also had a non-encrypted hard drive to back everything up pre installation (2TB – I knew that was big enough as it was larger than the HDD I was replacing). If you’re replacing your HDD with a SSD as I was, you could make the case for not backing up as your old HDD will be the backup, but I wanted to ensure I could transfer all the data to the new installation even if I had difficulty mounting the old HDD, so having a separate USB drive seemed sensible.

Generate a list of required software

See the list of requirements in the question. I researched what people said worked and tried out the essential ones in my ‘dry run’.

I wrote the list down so I could install them in a logical sequence.


I read (most of) Linux Command Line by William Shotts. Not necessary for what I needed, but I liked the idea of understanding my system better.

I checked that my printer / scanner had Linux drivers

I looked up how to install Ubuntu as a dual boot system on this site as well as various others so I was reasonably well versed on the method before I started.

Selection of operating system

In order to maximise stability / reliability, it was an easy decision to opt for the latest LTS version (Ubuntu Desktop

Prepare installation media

I knew I would have a functioning computer whatever happened as I have a laptop and desktop and planned to install each separately, but I didn’t want to be left without a functioning desktop computer so I downloaded all the installation media (Windows 10 and Ubuntu) and created a bootable USB for each. I used Rufus on Windows to create the Ubuntu USB.

Instructions and link to download for Windows 10 are here:

If you currently have Windows on your computer and are planning on a clean install of Windows with Ubuntu as a dual boot, check that you will be able to reinstall Windows, ie that you have the required license.

Instructions and download link for Ubuntu Desktop are here:

Step-by-step guide for Ubuntu installation including link to Rufus are here:

Note down other data to migrate

I created a list of all the favourites in Internet Explorer / Edge

I saved a list of my iTunes playlists (you can export as .xml / .txt file, or print it off)

Think about all the apps you use in Windows and how you have modified them – you will have to do the same for all Linux equivalents (eg page setup for printing envelopes, custom dictionaries for Word).

Note down your wifi access keys if necessary (especially settings for hospital / workplaces)

You may need the IP address of any networked printers you need to add

Check you have installation media (and any license keys needed) for all the programs you use in Windows so it’s easy to reinstall.

2. Backup

It was inevitable that I was going to be starting with a fresh installation of both Windows and Ubuntu as I was migrating from a HD to an SSD, so backup was essential. Even if I was planning to leave the Windows installation and install Ubuntu alongside, backing everything up is essential in case of mishaps – creating new partitions on a drive by shrinking the OS partition does carry some risk so backup is very important.

The obvious files are straightforward: everything in Documents and anything stored on the Desktop are not difficult to find. It’s worth checking in the places programs might be storing files that you want to keep – I checked all the folders in my C drive on Windows (especially the Program files) – iTunes for example may store music here, and you may have program installation files that you can avoid having to download again by keeping them.

3. Partitioning

I needed to install everything on both computers (desktop and laptop); they had different disk sizes but the principles were the same: plan in advance how much space to allocate to each of the required partitions - Windows partition, main Ubuntu partition, and the encrypted patient data partition.

Partition planning

I planned my hard drive space allocation: for the laptop, it’s a 500GB SSD; I decided 100GB was plenty for Windows, and of the remainder I wanted about 175GB as an encrypted partition (for patient data – see below) and the remaining 225GB or so for the rest of the Linux installation.

For the desktop, I had initially planned to leave Windows on the HD and have only Ubuntu on the SSD, but in the end I created a 100GB partition on the SSD so both OS’s were on the same drive. I’m sure it’s possible to have them on different drives, but there didn’t seem much point in doing so especially as if I did want to use Windows it made sense for it to be on the faster drive.

For the laptop, I estimated about 175GB would be more than enough for my patient data (based on generating about 10GB per year plus I have about 5 years of data already, and I am sure I’ll be changing the operating system within about 5 years so it gave me the 100GB needed plus 75GB contingency in case I store more than anticipated). For the desktop, I allocated 250GB to the encrypted partition, as I had no shortage of space and it would give me the flexibility to store more if needed in future – I don’t necessarily need everything on my laptop, but I do have to have a way to store everything somewhere so it made sense to me to have more than I anticipate needing from the outset.

As advised in multiple other posts, I planned my Windows installation before Ubuntu.

4. Installation of Windows

I shut down the computer completely, opened up the side, connected the SSD and disconnected the HDD. This prevented problems with it trying to boot into the currently installed version of Windows. Insert the Windows USB.

Turn on computer and enter boot menu (UEFI) (you will need to press a key, typically f2 / f10 / f12 / Del / Esc just after switching on ... if you're lucky you'll see on the screen what to press, otherwise trial and error or just press all of them!) and select USB as first boot priority

Enter Windows installer from USB

Create partition for Windows of 100GB, leaving the remaining space unallocated

Install Windows onto newly created partition. Note it created 2 other smaller partitions.

Install any essential programs at this stage, or later if you can’t wait to start in Ubuntu!

5. Installation of Ubuntu

There are plenty of posts on this site about how to do this.

First, you need to disable ‘fast start-up’ in Windows:

Boot into Windows.

Click on Start – Settings – System (top left on my PC) – Power and sleep settings (on the left hand menu) – Additional power settings (on the right hand side) – Choose what the power buttons do (in the menu on the left) – Change settings that are currently unavailable (you’ll need to enter your password / PIN if set) – then uncheck the box Allow fast start-up

Insert the Ubuntu USB.

In order to get the system to boot via the Ubuntu USB, I had to do the following from Windows:

Click on Start – Settings – Update and Security (at the bottom left on my system) – Recovery (on the left hand menu) – Advanced startup – Restart now – Troubleshoot – Advanced options – UEFI firmware settings – Restart.

It should boot directly via the USB; if not, you may need to enter the BIOS / UEFI menu by pressing one of Del / f2 / f10 / f12 / Esc (depending on your system) during the boot process.

When the bootable USB opens, click on Install Ubuntu.

You should get an option to Install Ubuntu alongside Windows. If that option doesn’t appear, you’ll have to choose Something else and do it manually. Search for dual boot on this site for details of the method.

Choose an appropriate volume size for the Ubuntu partition, ensuring you leave enough unallocated space for the encrypted partition you will create later. I

I installed Ubuntu into unallocated space (388GB). I formatted this as Ext4. It left me with the 175GB unallocated space for my encrypted partition.

6. Installation of other software

(Note the software I chose worked for me: there are other options that doubtless work as well, but these ones worked very well for my setup. I’m not endorsing any of them particularly, but they did work for me. All are free with the exception of Owl for Exchange plug-in.)

I downloaded and installed all the necessary software and configured it later.

Encryption software (Veracrypt)
Download directly from their site: Check the version you download matches your Ubuntu version.

Email client (Thunderbird) with EWS support (Owl)
Thunderbird was pre-installed with Ubuntu I had to install Owl for Exchange add-on (see later) to get it to work

Download from Dropbox website:

MS Teams
Download from Microsoft website:

Download from Zoom website:

DICOMM viewer (Aeskulap)
(Dicomm files are a format for viewing medical images, eg X-rays, ultrasound scans.) Aeskulap is the only viewer that worked for me – it’s in the software centre

PDF editor (Scribus)
Scribus is available from the software centre I tried various PDF editors – my requirement was simply to add some text (for the conclusions of investigations, and then my name / signature); Scribus allows you to do this by inserting text boxes. Other applications frequently corrupted the rest of the document, or I found them difficult to learn to use.

Image manipulation (GIMP)
GIMP is available in the software centre. It’s very complicated, but there are lots of tutorials online, and manipulating simple images is relatively straightforward with a bit of practise. I use it for pictures in talks I give – it’s not essential but it is nice to have a decent image manipulator.

Brother printer / scanner drivers
Brother had downloads for linux drivers for the machine I have; I found their website helpful for locating the relevant download: it’s here:

You do have to use the command line to install the drivers, but it’s all pretty straightforward – you can copy and paste the required instructions into the terminal.

I did have to find the IP address for the printer at one point (it’s ethernet wired rather than wifi) – there are lots of guides to doing this in Windows so I booted into Windows to find this out. I found this guide useful:

7. Setting up Thunderbird for NHSmail

This was probably the most difficult thing I had to do – mainly because the information coming from the NHSmail email service providers was often wrong and sometimes misleading.

NHSmail uses Microsoft Exchange Online / Outlook Web Access. The email settings I was sent by the administrators didn’t work directly in Thunderbird, but with a plugin it is possible. It’s the only thing I’ve had to pay for: Owl for Exchange does it for Eur10 per year.

It didn’t work at first – Owl gave me a message saying my local IT administrators needed to change a permission to let Owl / Thunderbird access the inbox – the IT people denied all knowledge of that, I kept nagging, they said there was nothing on my account to prevent any apps accessing it, but it suddenly started working. I’m still unsure if they did find something to change or if it was an idiosyncrasy of the system.

To set it up, this is the way it worked out (as mentioned above, it is possible that your local IT team will also have to change a permission):

Download and install Owl from Beeonex website

Open Thunderbird.

Cancel as soon as you’re offered to set up a mailbox

Click on 3 horizontal bars to the right (the hamburger)

Select Add-ons

Search for Owl and select to add

Click on add-ons manager tab, go to Extensions and then Preferences in Owl

Click add new account manually

Enter in the web page box

That then opens a Firefox log in page and once you enter your details, it all works. You don’t need to re-enter them for subsequent logins, unless you change your password.

Somewhat to my surprise, the shared email inbox appeared straightaway in my inbox so I didn’t have to do anything to get that to appear.

Whilst in principle I dislike having to pay an annual subscription for something, it’s a fairly small amount, and it does do something I couldn’t work out how to do otherwise.

You can try it for a month without paying.

I’ve been using it for the past 4 months or so without difficulty, once I’d got it all set up.

8. Setting up Veracrypt and creating encrypted volume

There are two ways to store encrypted data in Veracrypt; the ‘recommended’ way for inexperienced users is to store the data in a container – basically a single encrypted file – but that limits the maximum folder size to 4GB. You could in theory store several of these, eg have one container for every 3 month period, or for surnames from A-E, F-J etc., but I liked the simplicity of a single encrypted partition which in practise has no data size restrictions other than the size of the partition you create. There is also an advantage that in the event of a complete system failure, ie booting into Ubuntu fails, you will still be able to access the encrypted partition from a live USB session (or by reinstalling Ubuntu) – unless the HD / SSD has suffered a complete hardware failure. I therefore opted for the entire encrypted partition.

If you have left enough unallocated space for the encrypted partition then it’s straightforward. If not, you’ll have to shrink your Ubuntu partition to create the space for the encrypted partition. To to this you need to boot into a live Ubuntu USB (Try Ubuntu), then use GParted to shrink the Linux partition; you can’t shrink the partition whilst mounted, hence the need to use the live USB to do it. There are detailed guides on this site on how to do this (eg search for ‘shrink Ubuntu partition’).

To create the encrypted partition from unallocated space:

Open Veracrypt

Click on Create Volume then choose Create a volume within a partition / drive.

The wizard takes you through the process of creating / formatting the partition. There are lots of options for encryption algorithm etc – I used the default (AES). For the password, obviously it should be secure, and different from your admin password for Ubuntu. I chose Ext 4 as the filesystem.

You then have to generate the random data required for the encryption from mouse movements – it’s very self-explanatory.

Finally, click format – obviously double-check you have selected the correct partition, especially if you have other data that you don’t want to lose.

Note that when you are running the synchronisation process (see step 11 below), to have an alias run the command, you need to use the same slot in Veracrypt each time (for example I always mount my private work partition in slot 1); the easiest way to do this is to set up a favourite in Veracrypt: mount the encrypted volume in the normal way in the slot you plan to use every time, then click on Favorites at the top and choose ‘Add selected volume to favorites’ or ‘Add all Mounted Volumes to Favorites’ if you’ve only mounted one encrypted volume.

9. Transferring patient data to encrypted volume

This is a simple copy and paste from where you backed it up into the new location.

Open Veracrypt and unlock the encrypted partition. The drive should then pop up on the favourites side bar as a drive, but if not it should be in ‘other locations’ in Files.

You can then drag and drop all the files / folders in.

You could of course do this from the terminal if you’re happy doing that, but I don’t think there are advantages to using the terminal as it’s a simple drag and drop from the GUI.

Once you’ve transferred everything over, do make sure you delete any confidential information from the external drive if it’s not an encrypted device.

10. Setting up printer and scanner

This was all much easier than anticipated. Broadly speaking, it all worked better than in Windows using default settings. I did have to enter the IP address of the printer when setting up my networked printer.

For my letters, I had to work out how to print envelopes in LibreOffice (which is straightforward – from the Insert menu, choose Envelope and paste in the text in the dialogue box). There’s a bit of trial and error required to get the address in the right place on the envelope (make sure you’ve got some envelope-sized scrap paper or some used envelopes of the right size to avoid lots of waste!) – tweak the settings in the format and printer tabs to get the position and orientation right.

The scanner was fine without changing anything. In Utilities, the default Document Scanner worked perfectly. The program found my scanner automatically and it’s very intuitive: the menu at the top lets you choose flatbed / feeder for input and text (B&W) or image (colour). The default settings for these worked well for me, but you can customise if needed in the Preferences tab. I really like that you can add pages to something you’ve scanned, and you can reorder the scanned pages before saving – very simple things that I can’t get the Windows version of the driver to do. The reordering feature is especially useful when I have large documents to scan with a few double-sided pages: I can scan the whole lot using the feeder, then scan the backs of the relevant pages afterwards, and then slot them in the correct order afterwards.

11. Setting up the synchronisation system

To recap on the requirement: I need my main home desktop computer to be the main dataset – I don’t want anything to mess with this unless I do it manually. I need to be able to back that up to an encrypted external drive, and that then syncs to my laptop. When I amend something using my laptop – ie when I go to a clinic, I save the file in a specific folder (called ‘transfer’) which is then copied to the main home computer via memory stick. Every time I run a clinic, afterwards I transfer all the new data to my home computer, do any other work I need to on those records, then sync the desktop to my portable drive and then sync the laptop to the portable drive. In other words, apart from occasional transfer of small amounts of specific data, the desktop updates the external drive and the external drive updates the laptop. I very specifically didn’t want the laptop to update the main desktop computer as an automated process, to minimise the risk of that dataset becoming corrupted – I figured that if the backup was bilateral, there was risk of any corrupted data immediately flooding all the computers. This way, unless I damage something on my home computer – something I’m very careful to avoid – the records should stay intact. I accept it’s a bit cumbersome, but I feel in control of how the data is flowing.

The external drive is a keypad encrypted device: it has the advantage of being completely cross platform as it doesn’t rely on any software to run on the computer to unlock it. That has the potential advantage of being able to use it on work (Windows) computers if ever I wanted to.

I use Rsync (preinstalled with Ubuntu 20.04) to synchronise between the computers; I have set up aliases on the computers called PPsync – on the desktop it synchronises all my private patient files between the desktop and the external drive, and the same command on the laptop updates the laptop files from the external drive. This means that ‘PPsync’ aliases to different commands on the two systems – on the desktop it copies files to to the external drive, on the laptop it copies files from the external drive.

Rsync options I use are -auv to run it in archive mode (essentially keeping file attributes), update mode (only copies files that are newer than the destination location) and verbose (so I get feedback so I can verify it’s doing what I think it is).

You do have to know which container the encrypted volume is using in Veracrypt, hence the advantage of using a favourite so it always mounts in the same place (slot 1 in my case, which is /media/veracrypt1).

So my encrypted partition is mounted at /media/veracrypt1 and the external drive is /media/will/Will F PP with the folder PP_Backup as the place I wanted to use to store the data. I’d previously chosen an annoying name for the drive with spaces in it so had to escape them when running Rsync:

For the desktop the command is;

rsync -auv /media/veracrypt1/ /media/will/Will\ F\ PP/PP_Backup/

For the laptop the command is:

rsync -auv /media/will/Will\ F\ PP/PP_Backup/ /media/veracrypt1/

I set up aliases for both: you need to be comfortable editing text configuration files.

I’m not comfortable using Vi / Vim – but nano is pretty straightforward.

It involves editing .bashrc which is in your home directory.

This is, I think, pretty safe, even for a relative novice:

Open a terminal (ctrl-alt-T)

Go to your home directory with cd ~

Confirm .bashrc is there with ls -a

Assuming it is, first create a backup copy of it so you can undo it if you mess it up completely:

cp .bashrc .bashrc-bak

(if you cause a problem you can reinstate the original .bashrc file by typing cp .bashrc-bak .bashrc)

Now you can edit .bashrc knowing there is a safe copy:

Type nano .bashrc (or you can use an alternative text editor if you prefer)

This opens .bashrc in the text editor.

Whilst you can add the lines anywhere, it makes sense for future editing to find a space where there are some aliases and add yours below the ones there:

On the desktop, add a line with (obviously substituting in the names of your folders):

alias PPsync='rsync -auv /media/veracrypt1/ /media/will/Will\ F\ PP/PP_Backup/'

on the laptop, the line should be (again, substitute the relevant names):

alias PPsync='rsync -auv /media/will/Will\ F\ PP/PP_Backup/ /media/veracrypt1/'

If you’re not familiar with editing using text editors, you can type those into a LibreOffice Writer document, check them thoroughly and copy and paste it into nano. Note that you can copy and paste using the mouse (right-click), but don’t be tempted to use ctrl-C / ctrl-X or ctrl-V as it definitely won’t do what you expect, and may do horrible things to the file!

If you make a mistake, it’s probably safest to quit without saving (ctrl-X) and start again.

Once you’re happy with the changes, ctrl-O saves the data and then quit nano with ctrl-X.

If you want to try it out immediately, you'll need to get the system to re-read .bashrc by typing . ~/.bashrc (note the . at the start of the command is necessary).

Alternatively as soon as you open a new terminal it should work. The open your Veracrypt encrypted volume, attach your backup drive and unlock it, and type your alias.

12. Other tweaks to improve the experience

These are some minor adjustments I made to improve Thunderbird and Firefox - not essential but especially for Thunderbird I think the default settings aren't ideal for emails, especially your signature appearing below the quoted text when replying.


To add your signature:

Click on the three horizontal bars, select account settings, then click on the account and there’s a box for your signature text

In the account settings, choose Composition and addressing to add your signature to replies and forwards. You can also change the signature to appear below your reply rather than below the quoted text.


Add favourites ('bookmarks').

I don't think there’s any simple way to import from other browsers so you just have to do this manually.

13. Play!

I've found the whole experience immensely rewarding. There’s very little that I can’t do in Ubuntu that I could do in Windows (the only things I've found impossible are (1) to open calendars shared by colleagues using Microsoft Outlook shared calendars, and (2) getting anything to sync music to an iphone, ie an equivalent of iTunes). Pretty much everything else works better on Ubuntu than it did on Windows. Little things make a difference – for example being able to turn my computer off without waiting for Microsoft to install an update when it's a really inconvenient time ... having a great community to ask simple questions of ... many things work faster (eg Rsync which is incredible for updating my data) ... etc. etc.

Thanks in advance to those of you who can edit this to make it more readable - and a big thank you to all the contributors to Ask Ubuntu who have made it so much easier for me to do this.

Raffa avatar
jp flag
Nicely done ... [DavMail]( is a free alternative to OWL ( not a plugin though )
cn flag

Speaking as a former low-level NHS IT guy - do not do this.

I completely understand why you want to. Everything about official NHS IT is absolutely terrible, which is why I left. You want something which actually works reliably, otherwise known as five nines. Typical NHS IT, based on Windows and Windows compatible applications, will not give you this.

You might be lucky (or just very good) and actually manage to achieve this through your Ubuntu-based solution. I can see you have a talent for it based on your answer. However -

  1. If it goes wrong you're on your own, son. There is no way your IT support will navigate your custom setup to fix it, even if you document it properly. They have 99 problems affecting just as many people as whatever issue exists in your practice. They will look for the easy wins and fix the simple problems which affect a large number of people. This is only partly because they're utterly demoralised and disillusioned - they also have to rationalise their work. I used to work in a large general hospital and many occasions I tried to help doctors who were using some kind of specialist equipment & software which didn't work because of our IT setup. If I couldn't fix it within an hour or two, the IT powers that be would tell me to drop it and get on with fixing something else that affects more people. If I told them I was fixing not some specialist software but a completely different operating system that only this one bloke was using - they would have laughed me out of the building.

  2. Related to 1, even if it works with everything you use now, what about the future? If there's an update to some software that you use, or new software comes in, it will not be guaranteed to work, that is supported, on your system. I know what you're thinking - it probably will keep cocking up if I use whatever incompetent rubbish the NHS pushes out. That's true, but at least you will have someone to complain to. If you set up your own googly system, you'll be totally on your own. That brings me to 3...

  3. You mentioned that you're using Veracrypt, which I know will not be what the Trust told you to use. It's probably better and more secure than BeCrypt or whatever bollocks they mandate for you, but that's irrelevant. It's easy to make mistakes in implementing encryption which could mean data can be compromised, by someone stealing your computer, or even remotely. If your IT department messed up the encryption, they will be GDPR'd to death. If you messed it up, you will be.

I realise the above is the counsel of despair. And I can see you have the capability to make this work well and a desire to do it. Instead of applying all that to your own practice, you should become an IT consultant and try to show the Trust that your way of doing it is better. They probably won't listen... but knowing the NHS and IT consultants, they'll cover you in gold.

Will avatar
id flag
Thanks for that, and I understand why you feel that way. I should clarify though (and sorry if it’s not clear from the Q&A) - yes, I am an nhs consultant, but I’m using this for my private work, not my main nhs work in the hospital. There’s obviously overlap, as I do some nhs work from home, but I don’t intend to imply that I’m trying to replace the hospital systems. What I’ve set up replaces my (also unsupported) windows based systems at home and on my laptop. The nhs IT support services won’t help with problems on your home computer / laptop whatever you use.
cn flag
The cover in gold part was directed at IT consultants, clarified that now. When you said your practice I assumed you were a GP trying to do this in your surgery, sorry if I got the wrong end of the stick there. Good luck.
Will avatar
id flag
thank you. I completely agree it would be unwise in that setting. What I’m advocating is replacing the kind of set up most doctors use for their private practice, and the nhs work they do on their own device rather than an organisation’s entire IT setup or anything they might do on a dedicated work computer (ie in the hospital / surgery). The fact you didn’t understand that means my Q&A could be clearer - I’ll add something to that effect because I agree it could end badly otherwise!

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.