Posts

Showing posts with the label linux

The year of the Linux desktop?

Image
Linux is celebrating its 35th birthday , and commentators are once again asking if 2026 will finally be the "year of the Linux desktop". For the broader industry, that phrase has been a running joke for decades. But for me, the answer is much simpler: Linux has been the right environment for my work for years, and I have never really looked back. My own journey with Linux began in 1999, when I set out to build an open source development environment. That was a decision driven by my professional work. In those early days, I was focused on development tools and machine performance. I tuned kernels, adjusted desktop settings, and stripped systems down to maximise the performance of my modest hardware. I moved between RPM- and DEB-based distributions, and I even spent a rewarding period on FreeBSD. It was a good learning experience, and it was fun. That sense of fun is often overlooked, but it matters. As a developer, having access to a broad range of command-line tools and...

Managing my Debian Systems with Ansible

Image
Years ago, as a DevOps engineer, I managed systems using various automation tools. However, for managing my own workstations, I chose Ansible and found a streamlined way to keep my Debian systems consistent without turning the whole exercise into another full-time job. What I like most about Ansible in this context is that it gives me structure without much friction. I can keep a clear separation between work and home machines; I can decide exactly which roles belong on which hosts through the inventory ; and I get useful safeguards such as ansible-lint and dry runs before I touch a live system. I also find the tooling approachable. The command line is simple, the module ecosystem is broad, and the documentation is good enough that I rarely feel like I am fighting the tool. The project itself is organised around small, isolated roles. Each role lives in its own directory under roles/ , with its own tasks, files, and variables, so a change to something like vim does not leak i...

Running a Digital Office

Image
Back in 1999 I decided to go paperless. This was a significant challenge then as many bills were still being sent via post, and few offered digital alternatives. The challenge was doubly hard as I was (and am still) running Linux as my only operating system. These are a few of the things I had to do to make a digital office work and how things have evolved since then. The Early Days The choice of a Linux desktop meant that I had to find tools that were compatible with my operating system. This limited my options, but I was able to find open-source tools that met my needs. I used GIMP for image editing, LibreOffice for document editing, and PDFtk for PDF manipulation. My Canon printer had a built-in scanner, which I used to digitise paper documents. Canon printers and scanners are well supported by Linux. I used XSane for scanning documents. I also used rsync to maintain a continuous backup of my digital files. Saving these scanned documents and bills as PDFs on my computer w...

Replacing CRLF from files

Image
The following is a number of different methods you can use to strip ^M from files. This was more of an exercise than a feature I need regularly. However, there was a recent incident at work where someone had checked-in such an abomination. Some tools just don't like Windows line endings in files, i.e. CRLF, Carriage Return Line Feed . So, as an exercise, here is a collation of the numerous ways to fix these aberrations ... Note: Most editors now have a quick way of doing this. file You can see whether a file has ^M using the file command: Example Consider a file containing ^M, file reports: $ file test.txt test.txt: ASCII text, with CRLF, LF line terminators After stripping ^M, we have: $ file test-fixed.txt test-fixed.txt: ASCII text dos2unix Probably the simplest way is to use the dos2unix command. Example Show file has ^M line endings: $ dos2unix -i test.txt 3 16 0 no_bom text test.txt Now fix: $ dos2unix test.txt Proof that file has been fixed...

Converting MS Documents to PDF using LibreOffice

I've been a long time user of LibreOffice . I first started with StarOffice , before moving to  OpenOffice , and finally the latest incarnation,  LibreOffice . While I use office suites less, preferring Wiki 's and if a versioned document is required, LaTeX , I still on occasion receive MS documents. Rather than reading these documents in MS-Word or MS-PowerPoint formats I prefer to convert to a PDF. Here is how to do that. The following shows how to convert a presentation to a PDF. It is a headless operation that works just as well over a set of documents. loimpress --headless --convert-to pdf presentation.pptx Similarly, lowriter --headless --convert-to pdf document.doc

Bash arrays - what is the difference between array[*] and array[@]?

I've just been updating some Bash scripts and noticed that there are two ways to refer to array elements: one using the "*" the other using "@". So what is the difference? According to the manual The "@" variable allows word splitting within quotes (extracts variables separated by whitespace). This corresponds to the behaviour of "$@" and "$*" in positional parameters. So you get two different outcomes as demonstrated below: $ ARRAY = ( 0 1 2 3 4 5 6 7 8 9 )   # first using "@" inside quotes, # you get the same output with no quotes ... $ for i in " ${ARRAY[@]} " ; do echo " $i " ; done 0 1 2 3 4 5 6 7 8 9   # same as above but using "*" ... $ for i in " ${ARRAY[*]} " ; do echo " $i " ; done 0 1 2 3 4 5 6 7 8 9   # but without quotes ... $ for i in ${ARRAY[*]} ; do echo " $i " ; done 0 1 2 3 4 5 6 7 8 ...

Update on Samsung Series 9

Image
I have been using a Samsung Series 9 with Linux Mint Debian Edition for nearly two years. It is a wonderful machine to use. Crisp screen. Fast. Silent. Lovely keyboard. But it was a real pain to get working reliably under Linux. And with the reported BIOS bug you feel like on tender hooks doing a reinstall or upgrade. I'm, however, relatively happy to report that apart from the occasional kernel panic when using USB ports it has been reliable. Now that I know it is USB sensitive, I take extra precautions when yanking out USB devices. Ensure it is properly unmounted, eject if able. Put machine into suspend mode, then yank out. A pain, but I'm more confident going the extra effort to avoid uncontrolled panics while in the middle of an edit. I am disappointed with recent change of direction of Linux Mint Debian Edition. I like the rolling release. Having successfully implement two updates now, the process is relatively smooth. However they have abandoned the Xfce desktop as ...

Samsung Series 9

Image
Since June 2012 my primary machine has been the Samsung Series 9 . It is a lovely machine to use. Great keyboard. Fabulous screen. Possibly, a too sensitive a track pad. I love the keyboard backlight, particularly if I want to do late night internet surfing! That being said, it was not the easiest of machines to build. My distribution of choice is Linux Mint Debian Edition . It is a rolling edition so at least I will not ever need to do a re-installation! In theory at least. So far so good. There is way to much to cover in this blog about what I did to configure this machine. Instead please read my Google Drive  page about this, here .

How To Upgrade Linux Mint Debian Edition

Upgrade I recently had to perform upgrades for multiple machines from Update Pack 4 to Update Pack 5 . It was really rather easy to do as the following instructions show. Thanks to this blog for correcting some of my mistakes. Update the Update Manager The update manager will indicate when updates are available. For a distribution upgrade like Update Pack 5 , I revert to command line. Use CTL-ALT-F1 to switch to a native console session. Then update the update manager with the commands sudo apt-get install mint-debian-mirrors sudo apt-get install mintupdate-debian sudo apt-get --fix-missing --list-cleanup update sudo apt-get install mintupdate-debian Run Distribution Upgrade So, now we are ready to perform the upgrade with sudo apt-get --fix-missing --list-cleanup update sudo apt-get dist-upgrade Questions Asked During Upgrade Questions will be asked during the upgrade. If you have a default installation you can normally use the package...

Using True Type Fonts in XTerm

Image
I’ve not had to use TrueType fonts before as my desktop display resolution never warranted it. Now with eyesight failing and much better monitors, I decided to give them a go. Fonts are globally managed by settings in /etc/X11/app-defaults . However, TrueType fonts can be locally set in  ~/.Xresources . To browse the list of fonts use: fc-list :fontformat=TrueType -f "%{family}\n" | sort -u | less Test a font by specifying in the xterm command using the -fa option: xterm -fa 'Luxi Mono' -fs 10 Where fa refers to the fonts face name, and fs , the font size. Once happy with your font, apply to your application in ~/.Xresources. For example to apply for XTerm : ! my customisations XTerm*faceName: DejaVu Sans Mono XTerm*faceSize: 11 The final step is to set these resource changes using xrdb : xrdb -merge .Xresources So, next time you invoke a plain xterm command you will be greeted with your new font.

How To Generate SSH Keys for automatic login to target host

To Generate Key On source host run ssh-keygen(1) ssh-keygen -t rsa -b 2048Take defaults on prompts. This will generate two files in .ssh .ssh/id_rsa.pub .ssh/id_rsa Copy these from source to target host with cat .ssh/id_rsa.pub | ssh user@target "cat >> .ssh/authorized_keys; chmod 600 \ .ssh/authorized_keys" Now you can login without password from source to target using ssh target References http://www.openssh.org/manual.html http://www.wikihow.com/Use-SSH http://en.wikipedia.org/wiki/RSA_(algorithm)

Linux Mint on HP Mini 110

Image
I have a little experimental machine for playing with different distributions.   Lately, the  HP Mini 110-1081TU  has been running MeeGo . Now it has been commissioned to run Linux Mint . This comes in a variety of flavours. The one reviewed here is Linx Mint Debian 201109 . While the download was a monstrous 1.1G, the installation is the fastest I've ever seen. It literally took 10 minutes!  Post Installation - Wireless This is where the fun begins. First off, I had trouble getting wireless to work.  Reading dmesg gave very helpful instructions.  Read the recommendations carefully! Doing so can save you much time and effort. The HP Mini 110 uses a Broadcom 4312 WLAN . Install the packages b43-fwcutter and firmware-b43-lpphy-installer . I recommend the  Linux Wireless page as it has exceptionally good documentation. Post Installation - Sound Sound quality is actually better than under previous Linux distributions I've tried. So I wa...

The zypper Package Manager

Zypper is the package manager used by MeeGo. And now had some time to work with the zypper package manager I can say this is a nice tool. It has good functionality, a consistent interface and is easy to use and well documented. In comparison to apt-get I'd say it is superior. That is a big admission for a long time Debian user! What won me over was when I tried unsuccessfully to upgrade from MeeGo 1.2.0 to 1.2.8, by adding the repositories. Xorg was broken. I tried to fix. But gave up so decided to revert back. I thought this would take a re-installation. But, no! I just removed the offending 1.2.8 repositories and refreshed. Zypper correctly indicated the downgrade. After some network issues, resiliently managed by zypper, I was back and running. Marvellous! So, while I only be using MeeGo on my netbook, I am now comfortable enough in its use and management to use it as an alternative to Ubuntu. The other advantage I see is professionally it is good to understand how alternate sys...

MeeGo

Out with the Slow I've been running Ubuntu Netbook Remix on my HP Mini 110, from 10.04 then onto Unity with 10.10, 11.04. I really like Unity. It is clean and simple and pretty for a small netbook. However, upgrading from 10.10 to 11.04 saw a distinct performance hit. Start-up was so slow. Once started it was acceptably responsive. You really needed to be patient with the slow start-up, and worse, the even slower login. Those using MS-Windows may not have noticed anything, but seasoned Linux users would. What to do? I shut-down unnecessary services. Still no noticeable improvement. This is using SSD ! How can it be so slow? Once logged in the network was available. But that was the only benefit. Time to try something new. A new chapter Good device support There are Linux choices for netbooks. You could even run a standard desktop and configure for the small form factor. That is small screen and small keyboard. After some thought, these are my requirements: Minimal setu...

podracer - a podcast aggregator

Do you listen to podcasts? Do you want to manage these outside of normal web-surfing time? Do you want easy configuration? Then podracer is the software you need. Podracer was written by Lorenzo Taylor. It is a simple command line tool that has only two plain text configuration files: $HOME/.podracer/podracer.conf – configure podracer behaviour $HOME/.podracer/subscriptions – the list of subscriptions configuration This file is used to customise podracers download behaviour. With sane defaults, the only settings that I changed were, poddir – the default root location to save podcasts into And two other entries indicating where the log files are to be recorded. subscriptions Like the name suggests this a plain text file listing the podcasts you subscribe to. The format is simple: RSS feed <tab> target directory relative to poddir As this is a plain text file, where comments can be added by appending “#” to a line, it becomes a useful historical record of podcasts I ...

Ubuntu 11.04 - an opinion

Family and friends depend on me to provide support for their Linux PC's. What is great is that does not require that  much support. But it does mean keeping at least one step ahead. A variety of issues are at stake: Do all applications still work?  Are the devices still supported?  Will the user interface changes be problematic?  Are there new must have features? So, while most stayed back on stable UNR 10.04 systems, I charged ahead to see if the upgrade path was safe ... Upgrading from UNR 10.04 to 10.10 introduced the Unity desktop. For the netbook form factor, this desktop is excellent. It uses limited screen space well. It can be run with minimal use of the trackpad. It looks good. It is very responsive. All the applications that are required to work, do. Devices are recognised and work. So all looks good!  But, as 10.10 was not a LTS release I recommended holding back until 11.04 came out. So I was very eager to see wh...

[Update] Ubuntu Netbook Remix - Tethering to iPhone

Ubuntu 11.04 My  previous instructions successfully worked for natty!

Installing MCE Remote for XBMC

The remote I purchased was a Media Center Remote Control / Receiver, RC118 / IR6065A / QIR606A / Q. This being a MCE certified device I thought it would be easy to set-up. However, it took a little more effort than expected. Fortunately the steps are easy, and it was a useful problem solving exercise.  System I am running Ubuntu 10.04 LTS with kernel 2.6.32-31-generic for use as a server for XBMC version 10.1.  I received advice from Jarod Wilson of lirc that, lirc_mceusb is obsolete. This device is already supported by the in-kernel mceusb driver. So hopefully you are much luckier than I was in setting this up! Getting the remote to work Even though dmesg reported that I had a infrared receiver, lirc failed to recognise it when testing with irw. dmesg reports: [ 23.721796] generic-usb 0003: 147A : E03E .0003: timeout initializing reports [ 23.722033] generic-usb 0003: 147A : E03E .0003: hiddev97,hidraw2: USB HID v1.00 Device [ Formosa21 eHome Infrared Transce...