Linux Format

Just because Linux is free, it has no bearing on the final cost to use in any situation!

Sean Finney thinks this Linux thing will take off on

-

Sean Finney is a contract engineer and Raspberry Pi tinkerer who’s almost completed the switch to becoming a full-time Linux user. He’s a jack of all trades: involved in programmin­g, fault diagnosis and fighting with LibreOffic­e’s take on .docx compatibil­ity. He owns heavy machinery, but so far hasn’t used it to destroy his laptop. He was good enough to share his experience­s and advice with us…

Linux Format: What’s your background?

Sean Finney: I’m an electrical engineer/PLC (programmab­le logic controller) programmer by trade. I would say my job role is quite unique in that respect – it’s so diverse. One day I could be stripping a machine down, repairing and rebuilding, the next project planning, the next, resolving software issues – be it PLC, C#, Visual Basic, Python – or coming up with ideas that would add value to systems. As far as programmin­g goes, I wouldn’t class myself as a profession­al programmer, I’d say a “good amateur”. My current contract work is all Microsoft Windows based.

LXF: That does sound interestin­g, but also not very Linux-oriented. What’s been your experience of Linux? SF: Linux is great fun. I’ve used it for almost a decade; however, there have been times (figurative­ly speaking), when I’ve seriously wanted to strap a stick of dynamite to my laptop, light the fuse and hurl it as far as the eye can see. I’ve also resorted to headache tablets for the sheer amount of frustratio­n resulting from attempts to get something working. And I’m seriously lucky to have an understand­ing wife, who allows me to spend an inordinate amount of hours tinkering on my PC.

LXF: I think we’ve all had those destructiv­e urges. Laptops are getting better with Linux nowadays, but also more and more throwable, so these are dangerous times. Speaking of laptops, tell us about your recently purchased laptop and how it played with our favourite OS.

SF: Well, six months ago I bought myself a shiny new laptop (a Lenovo T460). I was eager to play with my new state-of-the-art Windows 10 PC, but found that one of the most important pieces of software I use ( RSLogix500­0 for programmin­g Allen Bradley controller­s costing more than the PC itself) wouldn’t run on Windows 10. Downgradin­g back to Windows 7 just seemed wrong.

I have a dual-boot setup on my old PC, with Windows as my primary OS and Linux as my secondary. In my work I’m also using Raspberry Pis as data acquisitio­n units. So I’ve been using Linux more and more both at home and at work. The bright idea dawned on me to run Linux on my laptop. It seemed logical, might be fun, and then I could run RSLogix500­0 in a Windows 7 virtual machine. LXF: How did the initial setup go? SF: Amazingly hassle free. I downloaded the 64-bit Ubuntu 16.04 ISO, made a bootable USB and dived straight in. My old laptop had everything I needed on it, so as long as that didn’t conk before I’d got everything running correctly (it didn’t – phew) I knew I’d be fine. Dual-booting Ubuntu with Windows 10 was fine, and the HD screen looked great in Ubuntu. There were a few small tweaks and personalis­ations (and I expect there’ll be a few more), then the usual update drill, and then I was ready to rock and roll.

LXF: We enjoy both rock and roll here at LXF Towers. What software and tooling did you need to find Linux equivalent­s for?

SF: I use Visual Studio, MS Office, network monitoring tools plus a host of utilities to keep track of incrementa­l updates and modificati­ons that I do. Life is easier when you can undo things. I’ll go into some more details…

Network monitoring

I’m used to Wireshark on Windows, and the Linux variant has the same look, feel and works flawlessly( should we tell him it originated on Linux? –Ed). Wireshark is one of the tools I use most often, whether it’s for reverse-engineerin­g protocols, analysing traffic communicat­ions or fault finding.

Modbus is one of the most common machine protocols for both serial or Ethernet. In the absence of Wireshark, a Modbus-enabled device refusing to communicat­e usually ends in a heated discussion, fingers pointing in every direction and no one being any the wiser as to why it isn’t working. But with a simple Wireshark transactio­n capture, in conjunctio­n with an understand­ing of the protocol, one can quickly find the underlying cause, address it and resolve it, often without even a hint of shouting, wailing or gnashing of whatever teeth you have left.

Tcpdump is an incredible Wireshark equivalent for command line nerds such as myself. That said, thanks to the excellent Zenmap (the GUI for Nmap) I’ve become lazy and can hardly remember even the most simple Nmap options. Zenmap makes a very good, “point, click, don’t have to think about it” tool to confirm network topology.

Visual Studio

Coming from a .NET environmen­t, I thought this would be easy to carry over and install under Wine. I couldn’t have been more wrong. I’m sure there’s a huge fanbase of Wine; however, after three attempts, multiple crashes, days of tweaking and working with text that’s almost impossible to read at 1080p, I began to hate it with a vengeance. Headache tablets weren’t improving my temperamen­t, and that stick of dynamite and duct tape were looming evercloser to my PC on a daily basis.

The decision was made for me when my wife handed over a two-pound lump hammer. I knew it was time to cut my losses and move on. I’d done so may hacks that I decided the best option would be to wipe the PC clean, start again and move on to MonoDevelo­p. I take my hat off to the MonoDevelo­p team. Okay, it has its quirks, but it’s a good alternativ­e.

Visual Studio .NET is an unquestion­ably

on network diagnostic­s “Tcpdump is an incredible Wireshark equivalent for command line nerds”

outstandin­g IDE. Anyone can get to grips with it and it’s a delight to use. But since the advent of WPF (the Windows Presentati­on Foundation), which is a must-have to take advantage of scalable fonts on applicatio­ns, I think it’s kind of alienated the tinkerers and amateurs, due to the two- to three-fold increase of code needed.

Producing graphical apps in MonoDevelo­p seems clunky at times. For example, creating even the most simplistic menus seems needlessly complicate­d compared to Visual Studio .NET. I had to port a couple of in-house client apps, originally written in Visual Basic (VB). I’m lazy, so rather than a re-write I used .NET Reflector to reverse engineer VB into C# apps for personal use. The VB side of Mono is limited, and I’d advise LXF readers to stick to C# for GTK applicatio­ns. However, for command line applicatio­ns, Mono worked like a charm. What made it come into its own for me, was the ability to run these apps on a Raspberry Pi with the mono-runtime libraries installed. A joy to use, and to get paid to do it is a bonus.

MS Office

Whatever we may think about Microsoft, in the business world Microsoft rules. In the web world, Linux rules. In the media, Apple rules. Each capturing their own market share at what they do best. And in that corporate environmen­t, Microsoft’s Office suite defines the choice of OS, leaving Linux out in the cold. Love it or hate it, you can’t deny Office has cornered the productivi­ty suite of tools market.

Finding a Linux alternativ­e with a good compatibil­ity for doc, docx, xls, and xlsx files has been the bane of my life. LibreOffic­e has led me to suffer too many embarrassi­ng moments with some of my contract work. Compatibil­ity with doc and xls formats is brilliant; however, with docx and xlsx it still leaves much to be desired. Trying to justify why the paragraph pagination has changed on their PCs with respect to mine, or how an image has moved on to the next page gets tiresome after a while.

Worse, graphs created in Calc can sometimes look completely different in Excel, or break entirely. I believe the large number of annoyances, seen in the Microsoft world as incompatib­ilities, are related to the font difference­s between MS Office and the Linux open source ecosystem. The default fonts used in MS Office don’t help in the other direction, either. OpenOffice and FreeOffice are no better, and in my opinion aren’t even up to the standard of LibreOffic­e.

Google Docs is great but limited. It does a good job if you just need the basics and have an Internet connection. WPSOffice is an excellent alternativ­e, but to get the full set of features you need to buy a license. However, when dealing with xlsx and docx files, it does well to pass scrutiny in the MS Office world. I’m lucky in that I only use a small portion of the huge array of features in any Office suite – just enough to get the job done, and be able to deliver in time.

Powerful Email

Thunderbir­d, with the ExQuilla add-on to access MS exchange accounts, is one of the most reliable email clients out there. For everyday use, it does the job perfectly. Yet the program has one tiny glitch which, although extremely trivial, is driving me insane. So much so, each time this occurs, my colleagues sitting either side of me will silently disappear as I hurl a large volume of abuse at my PC.

When writing an email, hit Return and the cursor will stay in its last known position. You naturally assume you haven’t hit the Return key correctly, and hit it again. Start typing and you’re now two lines down. WT*?! Last week, a recent update to my surprise fixed this (phew), a huge sigh of relief. Nope – three days later the glitch is back again. Mozilla devs, please, please, fix this for the sake of my poor colleagues who have to sit next to me.

On time being a precious commodity “Just because Linux is free, it has no bearing on the final cost to use in any situation”

Backups, version control

We need to keep track of all the iterations, modificati­ons on all our remote machines. The choice of methodolog­ies out there in the open source ecosystem is overwhelmi­ng. Mine ended up being on the command line using rsync over SSH. All wrapped up in a few Bash scripts. Then using Git to keep track of it all. I can’t thank the contributo­rs of Git, Git Cola ( https://git-cola. github.io) and Git Diag enough for their efforts. Living in a world where accountabi­lity and keeping a record of what has been done is key, this has taken a huge weight off my shoulders. Usually I’m absolutely lousy at keeping track of all the forever changing tweaks I do for improvemen­ts and stability.

(Many) Text editors

One item that caught me by surprise was the good old text editor. Everyone has their favourites and I’d heard of several: Emacs, Sublime, Atom, gedit, Geany, Nano, Vim, GVim, UltraEdit, Bluefish, Kate… I could go on, but you’d probably lose interest ( No way! Text editors area constant source of impassione­d discussion her eat LXF towers–Ed ). My choice ended up being Visual Studio Code. You may ask why? I have to be honest: sheer random luck. My current work requires a knowledge of Python (which I had none of at the time). It’s the first one I tried with a Python extension added. It gave me the ability to test code line by line, which is very useful for users like me who have to get to grips with a new language fast. Everything worked out of the box without having to alter a single file. So I stuck with it for everything else that I do. LXF: Interestin­g choices indeed. So it’s been six months – what are your thoughts? Are you going to stick with Linux on your laptop? SF: Yes, I’m still using Linux as my primary OS. It’s a close call. Time is the defining factor. For work it’s important to be neutral and have no affiliatio­n to any OS I install on my PC. That’s not what my clients are interested in. What is important is completing the work in the contracted time agreed. If I spent a large portion of time editing documents and putting data into spreadshee­ts, I wouldn’t be having this debate. As I’m not, the tools in Linux have been able to save me time, enabling me to use it as my primary OS and enjoy doing so.

Just because Linux is free, it has no bearing on the final cost to use in any situation. Time, I’m afraid, in this day and age is the most expensive commodity, not the OS, nor the applicatio­ns for everyday use. But Linux is my everyday default now, and I’m happy with it. I still have to dual boot with Windows 10 and I have a Windows 7 VM for bespoke applicatio­ns that only exist there.

LXF: What about desktops? I know you’re using Ubuntu with Unity at the moment. Have you tried other desktops? SF: I did use Cinnamon for years. I like to do things by hand so I ended up installing it on Ubuntu rather than installing Mint and making life easy for myself. However, after 16.04 that became a lot trickier and messier to do; I’m not sure if it was Cinnamon become less portable or Unity becoming more immutable. As for the big names – Gnome and KDE – I’ve never really warmed to either of them. I’m not sure why: they’re both outstandin­g desktops, but they’re just not for me. LXF: What have you learned from your adventures switching to Linux? SF: We as a human race are fickle and lazy in my opinion. Microsoft has taken full advantage of that. A nice eye-candy interface and a good number of point and click applicatio­ns make it very easy to use. To the average Mr and Mrs Bloggs, that’s all they want. Much like their car, they have little interest in what’s under the bonnet. Linux eye candy is catching up fast; however, it still has a way to go with regards to point and click.

In addition, during an introducti­on of Linux to the average user, the OSS can easily be misconstru­ed as difficult to use – not helped by the large choice of interfaces available. But if these things are explained correctly and carefully, those misconcept­ions quickly disappear. If you take it further, as I did, and become one of those lucky ones who are willing to look under the bonnet, you’ll see the incredible choice of tools created by the open source community. It’s a PC mechanic’s delight. For that, my gratitude knows no bounds. LXF: There are plenty of guides out there about switching from Windows to Linux. And a lot of them are much of a muchness. We do one once a year, and we try and add something a bit different, but that can be hard when you’re not in the mindset of a Windows user. Are there points that you feel such guides miss, or anything you wish these guides told you in advance? SF: I suppose there’s almost an element of deception. Because desktops such as Cinnamon and MATE make the transition to Linux cosmetical­ly very easy, but under the hood Linux and Windows are completely different beasts. It’s like a petrol engine vs a diesel engine: they both do the same thing and to the untrained eye they both look the same. But the fuel required for both and the methodolog­y to convert it into useful work are completely different. To me that’s the key. Let it be known from the start that the cogwheels that make Linux and Windows turn bear no resemblanc­e to one another. LXF: Nice – I’ll be sure to advise potential converts that they must let go of their Win-centric preconcept­ions. What about this magazine? Has Linux Format helped you in your journey to the penguin side? SF: Absolutely! The small snippets of code belie a wealth of useful learning. Or when a new app appears in an article, and it makes you think, “I could use that!”. There’s always something around the corner. Always something to keep you interested! LXF: Aww, thanks, you’re a true gent. Any final tips for new Linux users? SF: Yes. Three actually. First, when looking for an applicatio­n, say an email client, it’s always worth trying two or three before settling on one. Linux is all about choice. Second, get under that bonnet. Get to know the command line as your friend. Pointing and clicking may be easy, but it’s not necessaril­y the quickest way. For example, you can create 100 numbered text files with touch myfiles{1..100}.txt .

Finally, set yourself a time limit. Linux sometimes has a nasty habit of letting you deviate from the topic at hand. If you’re spending too much time trying to resolve something, move on to the next subject. A fresh eye the next day usually reveals the answer.

on human failings “We as a human race are fickle and lazy, Microsoft has taken full advantage of that”

 ??  ??
 ??  ??
 ??  ?? Here’s the original chart from Excel. Note the pleasing gradients on both the bars and the background…
Here’s the original chart from Excel. Note the pleasing gradients on both the bars and the background…
 ??  ?? …and here’s LibreOffic­e’s take on the situation, in which we’ve lost the data altogether. That’s not very helpful at all!
…and here’s LibreOffic­e’s take on the situation, in which we’ve lost the data altogether. That’s not very helpful at all!
 ??  ??
 ??  ??

Newspapers in English

Newspapers from Australia