Fraud and audit type analysis techniques using Microsoft Excel ►

◄ Project Zebra 2017: in nomine imperator

2016-12-25Project Zebra or "Finally getting around to migrating away from Windows"

0 comments

Tags All Linux Tech Personal

This entry is part of my Project Zebra series covering migration to Linux for personal computing use.

With Windows 7 due to be killed off in 2020 and Windows 10 having been aggressively pushed and turning out to be a mess of forced update reboots, suspicious collection of user data, using the lock screen to show adverts and other unsavoury practices, I thought it was time to get on with ditching Windows as a main operating system.

The operating system (OS) is of course the software that other software runs on top of, common ones including Windows, Mac OS X and Linux on desktops and laptops, and Android and iOS on mobile. Since Apple closely tie their OS to their hardware, the main choice with non-Windows systems unless you want to buy new systems is what distribution of Linux you prefer. And there are lots of different Linux distributions, Ubuntu being one of the best known, although a distro based on it called Mint has become increasingly popular. Popular is a relative term; as far as Unix-type Windows alternatives go Apple has about 10% of the global desktop market and desktop Linux distributions about 2%. By contrast XP still has about 5% (despite having no security updates now since early 2014) and Win7 about 40%, Win10 about 25%. A single percent is still tens of millions of devices, which helps explain why there's so much spam email around – a lot of those unprotected XP machines have been compromised, and the same will happen to a load more Windows systems when they go out of support. It's the sharp end of companies like Microsoft being allowed to release insecure crap, charge for it, disclaim responsibility for what happens and then cut users loose unless they pay to upgrade.

But I digress. Linux has the majority of the server and supercomputer markets, plus if you include Android (which is Linux-based) the majority of the mobile device market. It's been around since the beginning of the 90s, making it younger than Windows 1.0 by about five years but taking cues from UNIX which is a couple of decades older. Apple got on the bandwagon in the early 00s with OS X and abandoned the Mac OS 9 line in favour of BSD-based development, which they got certified to UNIX standards mid-decade with Mac OS X 10.5 Leopard. Google threw its hat into the ring with Android and Chrome OS over half a decade ago. And now Microsoft has added a Linux subsystem for command-line tools into Windows 10, hoping to win back some of the dev and server markets. All of which amounts to Unix-type operating systems being here to stay, and we're a little bit past the stereotypes of old by now, even if not completely.


http://dilbert.com/strip/1995-06-24

It's possible to test most Linux distros these days without actually installing them, running from a DVD or flash drive, but installing (whether on a dedicated partition, in a virtual machine or on a spare desktop/laptop) allows for more meaningful testing. After not a great deal of looking, I picked Xubuntu rather than Ubuntu or Mint, which is basically Ubuntu using the lightweight traditional XFCE desktop environment. Like Ubuntu, Xubuntu is designed to allow in-place upgrades rather than reinstalls (whereas Mint favours the latter) and it doesn't bundle a great deal of other software, which was a plus point because I'd rather choose things for myself.

At the same time as doing so I grabbed some current magazines (Linux Format, Linux Pro Magazine and Linux User & Developer seem to be the main ones in the UK) then some more back issues from eBay, and skimmed some old guides at http://www.tldp.org/guides.html to (re)acquaint myself with some of the standard command line tools – because underneath whichever shiny interface you might be using, Linux has its roots in server operating systems without graphical interfaces and that's recognisable in its design and the fact you can do most things from a command line. One of those magazines was a recent copy of the Linux Pro Mag Linux Shell Handbook – http://www.linux-magazine.com/Resources/Special-Editions – which is a good balance of readable and useful, and seems to be well regarded.

Whilst rummaging around in the guts of the OS isn't as necessary for practical reasons these days, there is still that undercurrent hacker ethos and moral obligation to try to understand things (read: lack of patience for people who can't be bothered to think for themselves). Having dabbled with coding from the Spectrum through Acorn machines through Windows PCs and web development, I generally prefer working on the command line or writing scripts if it's more efficient than a graphical interface. I'm a bit more lukewarm on editing config files by hand; common options, at least, should be manageable through an application itself in my view.

Again, the vast majority of stuff in this article isn't needed: I just really like having things in a desktop environment as I want them. And in any case, I'm not here to sell you on anything, not that this mish-mash of notes I've made about playing LEGO with software components rather than accept defaults would do anything but send most people screaming for the hills.

To digress again, a lot of people don't or hardly use "real" computers these days, because a tablet or phone with a keyboard does everything they need. This is something Microsoft gives every sign of being increasingly terrified more folk will work out, with Android everywhere (and for those watching the laptop/desktop markets, gradually converging by adding more and more traditional OS features).

New or subtly different concepts

Everything in UNIX is a file. Folders are files that contain other files, and even the output from your soundcard is a file – so you can technically copy a video or spreadsheet to it, although it'll sound like random noise. You might have come across this concept in IT culture if people refer to sending something to /dev/null as a metaphor for ignoring something; it's literally output being redirected to nowhere.

Like on most web sites (which, not so coincidentally, are running on Linux servers) names are case sensitive. So as an example, three files called File, file and FILE can all exist in the same folder.

Mount points. Rather than the drive letters long-standing Windows users are familiar with, each hard drive, ISO disc image or flash drive gets assigned a name and referenced via a symbolic path, which could be something like /media/your_username/MyFlashDrive

File system differences. Although it has to be said that even in Windows these days, software tends to be installed to one place whilst user settings are kept elsewhere. Suffice it to say that it's best to keep files and documents you work with (and system customisations, if possible) in your /home folder or on separate mounted drives. Equally it's best not to go "tidying up" or messing around with files in other folders on root such as /etc or /bin as it'll fundamentally break things. Consider them the equivalent of C:\Windows or C:\Program Files.

More info on the file system: http://www.tldp.org/LDP/intro-linux/html/sect_03_01.html

Executable flags. By design, files that are scripts and software can't run unless explicitly given permission to – something that Windows can do with Software Restriction Policies (as well as less successfully with UAC) and which greatly enhances security, but isn't common because it breaks a lot of badly behaved software and requires the user to be able to make informed decisions. Similarly, unless you're very unwisely running as root Linux will prompt you to re-enter a password before running programs that can make key changes to the system.

Hardware support

A lot of things do just work or don't need extra software. I've got a fair bit of stuff chained together through USB, but even things like my UPS and a generic USB sound adapter I use to avoid reaching around the back of the monitor when I want to use headphones were recognised automatically. Scanner support is generally better than under Windows, where older models frequently have tended not to have drivers released for newer versions. The printer software did default to a lower resolution than my printer's capable of, which was easily adjusted.

A few things simply didn't work reliably. I had a small USB powered second monitor from Lilliput, but the drivers provided by DisplayLink for Ubuntu are even flakier than the Windows ones. Whilst the display didn't drop out as much, turning it off or unplugging it crashed the system. All in all the Lilliput hardware is decent, but the software side really lets them down. So I've upgraded to a slightly larger VGA/HDMI device since the ThinkCentre M92p I'm using has both a DisplayPort output and a VGA socket.

Hibernation isn't turned on by default in a lot of distros, and sure enough didn't work with this machine when I tested it. It tended to cause problems a lot in Windows as well, to be honest. Fortunately it's possible to replace the built in handler, and this is one of those things where it's quickest to open a terminal and follow instructions.

https://help.ubuntu.com/community/PowerManagement/Hibernate

sudo apt-get install uswsusp
sudo nano /etc/pm/config.d/00sleep_module

add into the (probably empty) file:

then to test:

sudo pm-hibernate

then to turn on in whisker menu:

sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

and change the following in a couple of hibernate sections:

Over the weeks I've been using it, hibernation has been more reliable than Windows 7, and whilst part of it could be the switch to 64-bit and more RAM I don't think I was asking too much of Windows to run the fairly modest loads I was or to expect USB devices plugged in to hubs to work reliably.

Something you do need to be aware of if you're using uswsusp and want to switch to a different swap partition (such as when moving partitions around and scrubbing Windows) is that the UUID of the partition is stored in /etc/uswsusp.conf and will need to be updated.

It bears repeating that there aren't too many circumstances in which working with the terminal is completely unavoidable, and that if you use Windows even casually you also quickly run into situations where fiddling with things based on arcane instructions found via Google becomes a habit. Of course, it's also important to bear in mind that caution should be observed when cutting and pasting things from sources that aren't official.

The updater software for my Garmin satnav I'm probably going to leave to doing annually with a Windows laptop, but might have a go with Wine and against a Windows VM.

I uninstalled the blueman package to get rid of Bluetooth, which I've never used.

For automatically mounting other internal drives, you may want to use a GUI tool such as gnome-disk-utility which is in the Ubuntu repositories. As a side note, in the event that Linux doesn't get to shut down properly, whether through sudden loss of power or whatever, the command line will give you basic pointers on how to use fsck (roughly equivalent to chkdsk) to clean the file system.

Whilst dual booting I tried Ext2Fsd in Windows to create a persistent mount of my Xubuntu install, but despite shutting down Windows rather than hibernating it, Linux didn't seem to like this. Fixing involved running Xubuntu from a live DVD to use fsck and I also ran disk checks with Gparted and under Windows. Relying on Linux's NTFS support seems like a much better option.

Mousewheel support is a bit of a pain in the arse because applications have a great deal of freedom as to how they treat the input. For Chrome/Chromium/Opera the extension Chromium Wheel Smooth Scroller improves things, although still doesn't do page-at-a-time scrolling. This is something I've basically gotten used to, since whilst I used KatMouse under Windows at home I've never had it at work. I might unpack and modify the extension when I have time.

If you have a webcam and are in the UK, you may want to install and use Video4Linux Control Panel (V4L2UCP) to set 50Hz refresh on webcam sources. This is the PAL standard rather than the 60Hz NTSC American equivalent, and is all down to electricity affecting lighting.

Settling in and decorating

Consistency of look and feel is often ignored by software suppliers, and all preferences aside changes can cause serious issues with training needs and accessibility. Microsoft provided what became known as the "classic" theme from Win95 through to Win7 before discontinuing it, which I liked because flat grey with 3D borders isn't a visually distracting look. My view is that it's understandable to want to try new things, but there have to be particularly good reasons to justify loss of continuity (or worse, functionality) and not provide ways back.

Window managers such as Ubuntu's Unity and Microsoft's interface-formerly-known-as-Metro have particularly rubbed users the wrong way by limiting options or embracing tablet-like interfaces over traditional desktop ones. I wouldn't rule out trying modern Gnome and KDE environments via live CDs at some point, but XFCE is a mature option, light on resources and more than enough as far as I'm concerned. The Xubuntu distribution does only come with a small selection of window styles, so to get more options for what I consider “normal” scrollbars (i.e. with arrows) I refreshed XFCE with its usual packages:

apt-get install xfce4

Having found one I mostly liked, I copied /usr/share/themes/Xfce-saltlake/ to ~/.themes/Xfce-saltlake-edit/ and changed some of the colours to mute the green to grey, following the notes at http://www.orford.org/gtk/

I picked a retro window manager theme (4deb) from xfce-look.org which has square corners and wide grab handles for window resizing. The background colour is of course Windows 2000 blue, which is #3A6EA5 in hex or rgb(58,110,165).

Getting 4deb installed was simply a case of copying to ~/.local/share/themes/ but I did edit the themerc file for a slightly darker inactive title bar text colour (#707070) and coupled this with window shadows under Window Manager Tweaks for some contrast, as well as activating the scrollwheel to roll up option and choosing not hiding the window frame when maximised (the latter was partly as a fix for Opera treating that as a prompt to remove the title bar and not provide a minimise icon, but it goes rather nicely with the snapping in most applications and Chromium has an override option to not use system title bars anyway).

The end result looks like:

The panel has a height of 28 and layout: Whisker apps menu | Chromium, Terminal and File Manager shortcuts | Window Buttons | Network Monitor | Notification Area (things like application tray icons, wifi, etc) | CPU | Display shortcut | PulseAudio | Clock | Show Desktop.

The default font is Noto Sans 8px with Slight hinting and rgb subpixel anti-aliasing at 96dpi, which is very similar to Tahoma. Icons are currently Faenza, which are mostly square-ish and use colour in a fairly balanced way, but mono for most items on menus. I'm not sure that I like the way icon sets usually override application icons as well as system ones, if I'm honest, but the default Elementary ones were a bit too blue (I tend to have several file manager windows open) and also didn't provide enough differentiation for personal taste between file type icons.

XFCE window management is unobtrusive and generally a step up from Windows. As well as left/right snapping windows to take up exactly half of the screen, it can snap to quarters, and windows clip neatly to the sides of the screen. It can stick windows to the top or bottom of the pile, roll them up to a title bar, and move windows between workspaces. I prefer having a second monitor, and multiple monitors plus the multiple workspaces would get confusing. A bit of minimising apps to the tray is as "move stuff out of the way" as I need.

Further down the UI rabbit hole

There are various interface toolkits used to write software – the two main ones being GTK and Qt – so software can often look a bit different depending on which it was written for, and if you're really OCD about look and feel then... well, you're stuffed, really, because developers for all platforms have a tendency to override defaults.

At the time of writing Qt5 apps such as VLC don't inherit font rendering settings from the main system, so I opted to force similar settings.

Per https://launchpad.net/~hda-me/+archive/ubuntu/qt5ct create ~/.config/fontconfig/fonts.conf with the following

For a settings applet for qt5 like the optional qt4 one, see http://www.webupd8.org/2015/11/configure-qt5-application-style-icons.html

sudo add-apt-repository ppa:nilarimogard/webupd8 && sudo apt-get update && sudo apt-get install qt5ct

And to get its config to be used, comment out QT_STYLE_OVERRIDE in /etc/X11/Xsession.d/56xubuntu-session and add the following to ~/.profile

GTK3 apps also don't integrate particularly well (because Gnome 3 tries to be touchscreen friendly at the expense of traditional window borders and titles, basically) but some can be brought back in line by installing the gtk3-nocsd package then adding the following to ~/.bashrc (although note that the LD_PRELOAD path may vary) and logging off and on again;

Annoyingly Catfish (the default file search tool) isn't amongst the apps this seems to work with.

Should any of this toolkit config be necessary? Well, no. It ought to be an article of faith no matter what operating system you're using that applications should follow system styles as configured by the user.

Mail migration

Like most people, email and web browsing are key applications for me and I use an offline client for mail, meaning that although I've got webmail options, once messages are fetched by the client they aren't left on a server. Whilst having browsers on multiple computers is just a case of saving a few shortcuts for convenience, where that client sits is my main environment.

I don't let attachments clutter, so it's actually less than a couple of gigabytes in total despite going back some time, and could conceivably even be imported into some kind of IMAP or webmail setup. What I've gone for until now, though, is a portable installation of Thunderbird. Fortunately profiles can more or less be copied between Windows and Linux, and some people even run the same profile against different operating systems.

Since my NTFS storage partition is already persistently mounted as /mnt/Data/ I created a symbolic link to the relevant folder next to the default Thunderbird profile in ~/.thunderbird then edited profiles.ini

ln -s /mnt/Data/{subfolder} mounted.default

The custom CSS I used to modify the interface under Windows doesn't work, but the actual mail stuff appears to. The calendar plugin Lightning is OS-specific and needed replacing (but did carry over existing entries). I also added the FireTray extension for window management, which provides tray icon notifications of new messages.

For better handling of fonts in incoming messages, I copied certain TTF fonts from Office to ~/.fonts/ and added the following to ~/.config/fontconfig/fonts.conf

Share and enjoy

Under Windows I'm used to having shared network folders to stream media to tablets, which is possible using the same mechanism under Linux. First add the 'samba' package, then set a password to use with shares for your user account:

sudo smbpasswd -a <your_user_name>

Edit /etc/samba/smb.conf and add a section for each share in the format

Then restart the daemon/service with:

sudo service smbd restart

Automation, backups and maintenance

I'm reasonably au fait with the DOS / the Windows Command Prompt, VBScript, PHP, Javascript, classic ASP, T-SQL, MySQL and enough principles to read and modify stuff in other languages even if it takes even more googling than normal. The trouble is that it's easiest and best to learn with real usage cases, so apart from some familiarisation with directory navigation commands and syntax for conditional statements this is usually on an as-required basis. Anyhow, http://www.tldp.org/guides.html looks very useful for its BASH guides and I anticipate looking into Python more for anything that shell scripting can't cover.

My first usage case was backups. I like having at least daily file mirroring to a device that can be browsed. Let's note that synchronisation is a very crude type of backup, because if you destroy files they'll be lost from your backup on next sync... if versioning is important, look at things like Déjà Dup or making additional periodic copies to yet another drive or write-once media. Consider off site copies for anything really important as well. It's also advisable to encrypt anything that could or does move around.

TrueCrypt remains a serviceable option and is still obtainable via Steve Gibson's GRC site, although its spiritual successor VeraCrypt can also handle TC containers. Normally it requires root to mount partitions, but it's possible to waive this restriction for specific users and binaries by adding a file with a name such as 'exceptions' to /etc/sudoers.d/ containing

That done, I wanted to mount the external drive used on boot, which involved running the following to get the “{devicename}{partition}” identifying string for the mounting script.

ls -l /dev/disk/by-id

The advantage over fdisk is that root isn't required. Then in the script you can look for that string and snip the /dev/sda1 portion or similar from the end of the relevant line.

If you need to format a TC drive with NTFS for any reason, you need to “mount” it in TC, then use a terminal to umount it (not the same thing as unmount it in TC, nor is that a typo) and can use the “real” path to do so, substituting the correct number at the end.

sudo mkfs.ntfs -f -L YOUR_LABEL_HERE /dev/mapper/truecrypt1

Then unmount and remount in TC and you should have an NTFS formatted drive. As already noted, NTFS support is a lot more robust and cross-platform than exFAT.

I didn't figure out a way to start the TC GUI minimised to tray, but haven't tried very hard since it serves as confirmation after reboot that the mount has worked. It's worth mentioning that it isn't good practice to embed passwords in scripts either, unless you encrypt the environment it's running in and observe other precautions, but the main purpose is to protect the contents of the removable drive if taken elsewhere. I'm in two minds about whole disk encryption, due to the trade off with recoverability, and eCryptfs offers a reasonable alternative for files and folders.

So far so good, and setting up a batch sync job with FreeFileSync is also straightforward, being graphical and exactly as it is on Windows. You could use rsync if the GUI isn't important to you.

At the time of writing the last version of FFS available via the ppa:freefilesync/ffs repository was an older one for a previous version of Ubuntu, but that's fine.

Scheduling is where things took a turn for the more complicated in terms of DIY automation. The standard options, cron and anacron, are tools that really show their origins as part of a server operating system: they're designed for always-on environments and infrequent periodic tasks, respectively, not really interactive things with GUI requirements. Compared with the Windows Task Scheduler, in which it's very easy to express usage cases such as “run backup software at 9pm or when the system is next running” most people (whose only scheduled tasks are probably backups, if they even think about backups) would be better with a set-and-forget solution.

My cron jobs for this look like:

0,15,30,45 * * * * /home/admech/.myscripts/mirror.sh # JOB_ID_1
55 20 * * * /home/admech/.myscripts/mirror_force_expiry.sh # JOB_ID_2

The second writes a value of 0 into a text file at 8:55pm, effectively resetting a counter.

The first runs at the fifteen minute intervals shown and is the script below.

It's not particularly pretty, but works for my purposes.

On the general topic of maintenance, I'm making a note of the advice given by
http://lifehacker.com/5817282/what-kind-of-maintenance-do-i-need-to-do-on-my-linux-pc

Software selection

And now we get to the bit with picking out other favourite (or at least apparently serviceable) applications. It's a mix of things I see no reason to change, things used previously so they're the first go to choices, and some hastily grabbed alternatives.

In the Linux world, instead of individual applications writing and including their own updaters, it's more common to install the majority of things from trusted repositories – in the case of Xubuntu, the Ubuntu ones. If necessary you can also install .deb (and other) packaged files directly in a similar way to Windows executables, run scripts that simply copy things to the correct folders, or compile software from source code. Using repositories has the advantage of helping to manage any other necessary files, called dependencies. Thus far I haven't run into too many issues with dependencies, but I'm aware of some of the problems this approach to systems can cause.

Like most people, it seems, I found it very useful to install the Synaptics Package Manager, since the Gnome Software catalogue is very much focused on not overwhelming the user. Good functional equivalents for most stuff are available without hunting down too many other repositories, plus running common Windows software is also an option and made fairly straightforward with the PlayOnLinux Wine GUI, although the only things I intend to do this with for now are Notepad++ and Office 2007. It's no effort to set up a Windows virtual machine with VirtualBox for anything unusual work-related.

Software for quite a lot of things such as scanning, printing, hotkeys, network traffic monitoring and UPS monitoring, etc. is already part of Xubuntu, as are options for some of the things I've chosen alternatives for.

ApplicationCurrent pickNote
Archive managerPeaZip
Audio editorAudacityWas already using
Audio playerDeaDBeef + File BrowserSimilar to Foobar
Audio playerQuod LibetSimilar to 1by1
Backup toolDéjà DupFor the /home folder at least
Bitmap editorPintaSimilar to Paint.net
Bittorrent clientqbittorrent
Boot managerGrub Customizer
CD rippingfre:acHave used previously
Comic readerComix
DTPScribus
DVD copydvd95
DVD rippingHandbrakeHave used previously
DVD video creationDeVeDeNGWas already using
Drive managementGnome Disks
eBook managerCalibreWas already using
Email clientThunderbirdWas already using
EncryptionTruecryptWas already using
File managerThunarXFCE default
File synchronisationFreeFileSyncWas already using
File system compatibilityexfat-utils
Firewall configgufw
Hex editorBless
ISO managerFurius ISO Mount
Image browserXnViewMPSimilar to XnView
Kindle downloaderKindleForPCRunning under Wine
Local serverXAMMP
Media playerVLCWas already using
Media transcodingHandbrakeWas already using
Minimise to trayKDocker
OCRNuance PDF ConverterVirtual machine
Office suiteLibreOffice
Office suiteMicrosoft Office 2007Running under Wine
Optical media writingXfBurn
Optical media writingk3b
PDF creationVirtual printer built in
PDF manipulationPDFTK + GUIPDFTKWas already using
PDF viewerFoxit ReaderWas already using
Panoramas / image stitchingHuginHave used previously
Partition managerGPartedHave used previously
Remote filesDropbox
S3 bucket managerDragonDisk
SFTP clientFilezillaHave used previously
Secure deletionBleachBit
Task schedulerGnome ScheduleGUI on cron
Text editorGeanyHave made this the default
Text editorMousepadXFCE default
Text editorNotepad++Running under Wine
Video recorderget_iplayerWas already using
Video repairAvidemuxWas already using
Virtual machinesVirtualBoxWas already using
Web browserChromiumSimilar to Chrome
Web browserFirefoxHave used previously
WebcamCheese
Windows virus scannerClamAV

Some of that lot involved workarounds, ad hoc fixes or some personalisation. Most if not available in the main Ubuntu repositories either provided a .deb installer package or it was easy to add a Launchpad repository. It's also worth knowing that if repositories don't have packages for the current version of Ubuntu yet, you can specify a previous version – eg Wily (15.10) rather than Yaketty (16.10) for the FreeFileSync ppa. Ubuntu works on a 5 year long-term support cycle, so this is generally a stable option.

As another general tip, where a lot of install or config instructions mention things like 'sudo nano <file>' you can equally well run Thunar, Mousepad or other applications from a terminal using sudo for purpose of running admin level scripts or editing config files.

I prefer the Software & Updates tool to prompt me with available updates daily, which can be set in its GUI options.

Comix: It's advisable to install the unrar package, as the unrar-free default alternative is buggy – Comix didn't manage to read the images in my CBR files without the normal one.

Chromium isn't really intended as a general use browser, being the development branch of Chrome. So whilst there are binaries compiled by others, including stable builds for Ubuntu, if you want new versions sooner you can add a repository:

sudo add-apt-repository ppa:canonical-chromium-builds/stage

Or for a simpler life you can install Chrome instead. Another alternative is Opera, with the caveat that the company behind it have licensing issues with MP4 (H.264) video and can't distribute a version of the browser with support, so they hook into system libraries on other platforms. A workaround for this is to copy or symlink a static library such as /usr/lib/chromium-browser/libffmpeg.so to /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so

Dropbox has a bug with its tray icon in some setups. Add the following shell script to boot via Settings > Session and Startup > Application Autostart rather than letting Dropbox auto start itself:

FoxIt PDF Reader: This was just a case of installing with its .run script then creating a shortcut on the desktop and copying it to /usr/share/applications/

fre:ac (generally written as freac) runs portably, so just extract to your home folder and create a .desktop file for it, before adding the shortcut to /usr/share/applications/:

It's a versatile tool, but the tagging utility that comes with Quod Libet, Ex Falso, is probably better for bulk edits.

Geany seems like a decent swiss army knife style notepad and supports multiline regex. It has a variety of plugins that are worth adding as a package and you can also route the contents of a file through command line tools if that isn't enough. The “line operations” (sort, remove duplicates, etc) and spellcheck plugins are all I was after initially.

Handbrake: DVD ripping requires libdvdcss, which is still technically illegal in the US due to the DMCA. That's available via libdvd-pkg and I grabbed the xubuntu-restricted-extras package at the same time for LAME.

VLC: Uninstalling the standard Parole media player after having first installed VLC gave the latter the associations. It appears that bulk changes to file associations can also be made by editing /usr/share/applications/defaults.list

XnViewMP: at the time of writing requires the shiv of a legacy package until the author updates;

deb http://ftp.de.debian.org/debian wheezy main
sudo apt-get install gstreamer0.10-ffmpeg

As an app it's a bit unfinished. Tabs aside there doesn't seem to be a Windows menu, Close item on the file menu when an image is open or the ability to add a Close button to the toolbar. But you can install xdotool and use it in a script to simulate sending the shortcut to close a file, via the general Command toolbar option:

Similar to Windows it's possible to add a “send to” shortcut for XnViewMP. Create a desktop shortcut file (by right-clicking over the Whisker menu item and choosing “Add to Desktop”) then move this to ~/.local/share/Thunar/sendto and edit it to remove the MimeType line, meaning it gets applied to all items – i.e. you can right-click over a folder and send it to XnView.

Wherever you see ~/ paths, by the way, it simply means the user's home directory, so for me that's equivalent to /home/admech/

As already mentioned, a few native Windows applications came along for the ride. Wine, which it's difficult to mention without also regurgitating the fact it stands for Wine Is Not an Emulator, implements enough Windows type functions to allow some software to run directly under Linux. That “not an emulator” is an important point – by default Wine maps your root Linux filesystem as a Z: drive under Windows, so change that if Windows viruses (eg, Office macros) are of concern. And it's worth having a scanner such as ClamAV available to check files originated in Windows environments that might have a negative impact on Windows software.

Office 2007: It's important to make sure you install on a 32-bit wineprefix, which PlayOnLinux will do by default. However, Word still didn't like the 1.62 version of Wine that POL was using, giving MSXML errors, so I overrode it to system after first making sure the system wineprefix was 32-bit by deleting the existing ~/.wine and running in a terminal:

WINEPREFIX="$HOME/prefix32" WINEARCH=win32 wine wineboot

Wrapping everything up neatly was simply a case of getting POL to create desktop shortcuts, then running Thunar with sudo and moving the shortcuts into /usr/share/applications/ to be available to whisker menu.

Notepad++ I left as the version installed by POL (6.8.8) apart from installing the TextFX plugin. Have to say it's installed more for sentimental reasons than practical ones, though, since Geany seems to cover everything.

KindleForPC does work with PlayOnLinux, but is a horribly bloated .NET application and a reminder to only purchase from Amazon if unavoidable. It's basically just a quick way to download books prior to removing the DRM using plugins for Calibre.

VirtualBox: As well as those few Wine apps, I'd already got some Windows virtual machines. VB offers an export and import option for portability between systems, which I used without much incident. It did involve updating the add-ons within Windows, and some other settings and paths, but the machines themselves were fine.

Hotkey mapping, minimising to tray and miscellaneous tweaks

In line with the broad scope to configure look and feel, being able to create keyboard shortcuts is built in and a matter of deciding what programs or commands to bind them to and looking around for tips from others.

ActionShortcutTarget
Applications menuL Super / R Super (Win)xfce4-popup-whiskermenu
Volume upWin+PgUpamixer -D pulse sset Master 5%+
Volume downWin+PgDnamixer -D pulse sset Master 5%-
MuteWin+Homeamixer -q -D pulse sset Master toggle
PauseWin+Insertxdotool key XF86AudioPlay
PreviousWin+Deletexdotool key XF86AudioPrev
NextWin+Endxdotool key XF86AudioNext
LockWin+Lxflock4

There's a bit of software called xcape that allows modifier keys to fire as keypresses, which the keyboard handler doesn't normally do... so to use the Windows keys individually to open the Whisker menu (by sending its default shortcut of Ctrl+Escape) add this to a start up script:

KDocker is a tool that enables windows from specified applications to minimise to the notification area, which is handy for any that don't already provide a tray icon, but didn't recognise application icons. It's possible to run it specifying an icon manually, though.

Version 0.7.1 of AllTray (a similar tool) was buggy so after some hunting I compiled the last 0.7.5.1 dev version (required packages: xorg-dev libgtk2.0-dev libgtop2-dev libwnck-dev) and that seems to pick up icons, but doesn't do minimise or close to tray from the window icons.

Since most applications that benefit from a tray icon sort themselves out with one, it's not really a big deal, although I might see if it's possible to mix and match code from the two projects at some point.

The desktop manager which handles logins (LightDM) needed a little persuading to handle my multi-monitor setup gracefully, because its Settings tool lacks an option to prefer a specific monitor. As per the commented lightdm-gtk-greeter.conf on github it's just a case of adding

to /etc/lightdm/lightdm-gtk-greeter.conf or similar depending on which graphics port on your machine comes first (0 is VGA and 1 is DisplayPort with an HDMI adapter on mine). If this monitor becomes unavailable the one that is available will be used.

As a small tweak, modifying ~/.config/user-dirs.dirs will let you move or merge the standard home folders.

Because I have a UPS, I wanted a panel indicator for this non-standard type of battery... but the 1.4.x version of xfce4-power-manager doesn't always update its icon automatically, so I ended up compiling the latest 1.6 from source by removing the existing version, installing packages for libgtk-3-dev, libxfconf-0-dev, libxfce4ui-2, libnotify-dev, libupower-glib-dev and doing a time-honoured build sequence:

./configure --prefix=/usr --sysconfdir=/etc
make
make install

You can prevent icons in taskbar buttons from dimming when minimised by adding this to your ~/.gtkrc-2.0 file:

Followed by a quick 'xfce4-panel -r' in a terminal to restart the panel.

Trash management

As a file manager, Thunar takes some getting used to. A particular niggle for me (and others, reading around on the subject) is that moving items to trash with the Delete key has no confirmation prompt, and unfortunately it's the sort of little user-hostile thing that can torpedo migration attempts for the average person. I've seen various workarounds, which I'll run through in reverse order of preference.

The sledgehammer approach is to change the trash folder permissions from 700 (which in octal equals that the user can read, write and execute) to none:

chmod 0 /home/admech/.local/share/Trash

But that would prevent you moving files to trash from the menu option as well. Instead you can prevent the behaviour by modifying Thunar's keyboard shortcuts in ~/.config/Thunar/accels.scm so that the Delete key does something harmless – assigning it to the Help menu, for example, or you could trigger the about box as a reminder you're in a different file manager now.

What I opted for personally is re-implementing a prompt with Custom Actions... to do this you'll want to be able to send stuff to trash via a command line utility, and I found and installed the trash-cli package from the Ubuntu repositories rather than use the built-in gvfs tools because gvfs-trash seemed to dislike using an absolute path that equalled the current working directory when creating its trashinfo files (which is relevant when selecting folders in the sidebar tree).

That custom option doesn't have to be very complicated, just enough to give a prompt:

if zenity --question; then trash %F; fi

Find the unique ID of your custom action in ~/.config/Thunar/uca.xml then edit its line in ~/.config/Thunar/accels.scm – for example,

But be aware there's a gotcha to avoid – if the custom action is modified and/or re-saved in Thunar (i.e. opened in the GUI and OK chosen) it generates a fresh unique ID for the “new” action and the relational link to the shortcut key is broken.

Another trash-related issue was that because my data partition is NTFS (which obviously has a different permissions system) and auto mounted at start up, user accounts didn't have permission to create a trash folder, so it was necessary to amend the relevant line in /etc/fstab to add permissions for uid=1000 (by default the first user of the system, and this wouldn't be ideal for a multi-user system so it's better to use Ext4 in the first place).

Endnote, disclaimers, etc

These are just some notes I've made whilst migrating operating system, and almost certainly contain various inaccuracies, over-simplification or leaps that hopefully still make sense to me when I come back to them. I'm probably not going to be much use advising on your system, and am not as quick responding to comments as I'd like most of the time. But do feel free to get in touch.

If you've made it this far (for whatever reason) and haven't already read them, I'd like to recommend a couple of classic essays by Paul Lutus and Neale Stephenson. The first is bordering on anachronistic, as by my generation it was becoming increasingly uncommon for early experiences of computing to involve coding. The second is particularly interesting because a lot of it could have been written yesterday.

The Constancy of its Affections: http://arachnoid.com/lutusp/omniart.html

In the Beginning was the Command Line: http://cristal.inria.fr/~weis/info/commandline.html

I did raise a glass the last time I booted into Win7 before backing up the install prior to wiping it – the classic style environment has been a companion for over two decades, and even though it still will be to some extent until Win10 comes in across the board it's like any other old tool with sentimental attachments. For work purposes, I still like stuff such as SQL Server and even Office, as well as older technology such as VB type languages.

In the end it comes down to Microsoft losing their way. There are limits on how you can treat customers when it comes to forcing them onto different software, especially when alternatives continue to get better. And if change is inevitable anyway, you might as well make an active choice and find something you like.


ADD COMMENT

Tags All Linux Tech Personal