Remapping keys in Linux

linux-category-inverted

My ZenBook 3 has one minor issue I really take to heart, the menu key (on the right hand side of the space bar) is a secondary action to the right control key.

That means to get the menu up from the keyboard requires a Fn-Right-Control sequence which is annoying to say the least.

In windows I had remapped it with a third party app as I don’t really use the right control while typing and so in Linux I had to find a way to do it as well.

Fortunately, Linux comes with xmodmap which can do this.  You can go to this article to get more details about how to do it, but the short answer is:

xmodmap -e "keycode 105 = Menu"

Then save it to your local xmodmap file:

xmodmap -pke > ~/.Xmodmap

Then add it to your .xinitrc startup script:

if [ -f $HOME/.Xmodmap ]; then
 /usr/bin/xmodmap $HOME/.Xmodmap
fi

And your done.

Linux Desktop Apps

linux-category-inverted

So switching from Windows to Linux involves more than just the OS, not all of those familiar apps are going to have versions that run on Linux and so you have to find new ones to replace them.

Of course in a pinch you can run Wine, but that’s no guaranteed solution.

Here are some of the most common apps I use and what I’ve moved to for Linux versions.

Web Browsers

My primary browser on Windows has be Edge since it came out, with Firefox being my secondary browser.  Recently though, with an eye to moving to Linux, I’d started to switch from Edge to Vivaldi.

The good news is that there are lots of browsers for Linux, Vivaldi and Firefox are both supported and so I’m using them, in that order.

Mail/Calendar

In an upcoming post I’ll go in to more detail about my switch from Exchange, but here I’ll simply say that my main mail program is now Thunderbird, with Lightening as my calendar app.

There are several other mail/calendar apps on Linux, but after playing with them I found Thunderbird to be a better solution.

News Reader

Something I hadn’t used on Windows, as I’d been feeding my new feeds directly in to Exchange, was a news reader.

After looking at the options, I found FeedReader, which supported NextCloud and looked far better than any other desktop news reader I found.

Password Safe

I’ve used Keepass for years and it has great cross platform support, including running as a Mono app on Linux.

A simple:

apt-get install keepass2

did the job.

Text Editor

On Windows I’ve been using NotePad++ for years and this has been the hardest app to replace, at the moment it looks like Sublime Text is going to win out over the other options.

Office Suite

Of course MS Office is king on Windows, but not available for Linux.  The next best thing is LibreOffice.

I’ve used LibreOffice a little bit over the years and never been really all that impressed with it, but recent versions have really started to come along and it’s been working well so far.

Comparison Tool

When I’m programming it’s often useful to be able to compare files against each other and I’ve used BeyondCompare for this, fortunately they have a Linux version as well so it was a no brainier.

GIT Client

GIT has become an important part of development these days and a good GUI really simplifies the task of using it.   On Windows I had been using SourceTree, but there is no Linux version so I’ve been using GitKraken.

It’s has a lot of nice features but is missing a few things that SourceTree did, but it’s not a huge difference and the GIT CLI is always available.

Twitter

The one desktop app I’m still missing is Twitter, there are a couple of Linux clients around, but I haven’t found one I really like, so at the moment I’m still using the web interface.

OpenVPN GUI on Linux

linux-category-inverted

So having made the leap to Linux, one of the key items I need to get up and going was my OpenVPN connection.

I hadn’t expected it to be much of an issue really, after all, OpenVPN is Linux based!

But that didn’t turn out to be the case.  At first I figured I’d just use the CLI to run OpenVPN, but two things turned me off of that plan:

  1. OpenVPN’s CLI needs to run as root, so it’s a pain having to sudo it all the time.
  2. If your on an unstable connection and the tunnel drops, the CLI exists without trying to reconnect (there may be an option for this, but I didn’t spend much time looking honestly).

So I started to look for a GUI like there is for Windows and came up empty, but then I found that there is a built in VPN GUI in Gnome (which Zorin uses) and so I tried that.

Which failed as the required packages were not installed, to resolve that you have:

apt-get install network-manager-openvpn-gnome

Once that is done you can go to Settings->Network and add a new VPN connection, then select import (I don’t suggest trying to configure it manually, there are way to may settings).

After you’ve downloaded your OpenVPN profile of course.

Well, not quite…

There is another small issue, it seems that the network manager has a bug in it and when you import your OpenVPN profile it will display an error message:

Error: configuration error: invalid 1th argument to 'reneg-sec' where number expected (line 86).

Editing the your profile and commenting out line 86 resolves the issue and you can then go ahead and import it again.

There is one additional setting you have to make before you connect to your VPN though.  After the import is complete, click on the “Advanced” button and enable “Use LZO data compression”, otherwise when you try and connect it will fail.

After that, everything should be good to go.

Zorin Linux

linux-category-inverted

Recently, I’ve been thinking more and more about the data collection that OS’s do on behalf of the companies that create them.

Companies like Google live off of data and so their implementation of Android tracks and reports on a host of things you do.

But Microsoft isn’t much better these days, as is clear from a blog post from a little while ago, they collect piles of information in the name of improving the “user experience”.

To that end, I started to look around and see what desktop Linux looked like these days, which is where Zorin Linux come in.

I’ve used Liinux on servers for years, everything from Slackware to Ubuntu, but the GUI always left me wanting to rip my hair out (and I don’t have that much left so I need all of it 😉 ).

Ubuntu’s folly in to the Unity desktop was clear from the first time I tried it.  Other looked like they were stuck in the 1990’s.

So I poked around a bit and found Zorin.  Zorin has several flavours of GUI that each are inspired by an existing OS; Windows, Mac, Gnome or Unity.

Versions

Of course Zorin is in business to make money and so there are several versions of the OS, each with varying features included.

The “Core” version, which is free/pay what you like, basically comes with the Windows inspired look and then from there you upgrade to the “Ultimate” edition which includes everything for 19€, including e-mail support.

I started with Core, but after a week or two or playing around I upgraded, more to support the project than anything else.

Installation

Initially I installed Zorin in a VM, which worked fine but video performance was a little laggy so once I was sure it was something worth doing, I shrunk my Windows partition and installed it as a dual boot system.o

Installation was easy and the boot loaded picked up both Zorin and Windows so there was no problem from there.

In fact one nice thing about GRUB (the boot loader on most Linux installs) is that it detects the UEFI bios and creates an entry to allow you to get in to the settings ithout having to actually boot an OS like Windows does.

There was one gotcha with the install, most modern PC’s have SecureBoot enabled and that blocks some Linux drivers from loading properly.  For my initial run at Zorin, I lived with the compromise, but when I did my final install I did disable SecureBoot.

The GUI

Zorin’s “Windows” GUI is pretty familiar to anyone who runs Windows, but there are some differences.

The first thing that you notice is that is uses a very dark colour scheme, which is not too bad, doesn’t have an easy way to change it (you can, if your adventurous, alter the theme files, but that is well beyond the average user).

Otherwise you have a pretty standard start menu, task bar and notification tray.

Stability

The current version of Zorin (12) is pretty stable, but there are some strange crashes once in a while when your doing some uncommon tasks.

For example, installing applications sometimes hangs the start menu and it needs a reboot get to it running again (probably a logout/in would work too).

But these’s aren’t deal breakers, just things to keep in mind and be ready for.

Updates

As for updates, Zorin seems to be on top of things and be actively supporting the OS, providing updates every few days.  Some of these are of course from the upstream Ubuntu project that Zorin uses as it’s base.

HiDPI Displays

My ZenBook 3 has a full HD display, but at 12″, it almost acts like a HiDPI display and as such in Windows I’d set the scale factor to 1.2.

Linux, unfortunately, isn’t nearly as good as Windows on HiDPI support.  There is a scale factor setting in Zorin, but it only goes in integer units, so you can do 1 or 2, but not 1.2.

You can set a scaling factor for fonts, which allows for non-integer values, but it breaks the Start menu pretty well.

The best is to change the font sizes, which seems to work well, but some applications need to be configured individually (I’m looking at you web browsers).

Bluetooth

I’ve used a Logitech Bluetooth mouse for many users and connecting it to Linux wasn’t an issue, however power management options seem to be a little lacking (or at least I haven’t found the right place yet).

Specifically, whenever I lock Zorin, it puts Bluetooth in to sleep mode, which in turns means it takes a few seconds to reconnect when unlocked.

Not a big deal, just an annoyance if you tend to lock/unlock your PC quite a bit.

Applications

I’m going to go in to software in another post, but there is one item I want to point out here, I recently migrated my Exchange E-Mail server (a post for another time) over to Unix and in doing so also installed NextCloud (yet another post, I seem to be falling behind) for Calendar and Contacts.

Zorin includes support for connecting to NextCloud right out of the box which is kind of nice.

Final Thoughts

Overall the migration to Linux on my notebook was pretty smooth, with a single implosion when I did something as root that reset the permissions of one of the system directories.  To say the least it wasn’t very happy after that, but it was completely my own fault 🙂

Desktop Linux has come a long way and Zorin is a pretty good distro that I’d recommend to try out if your thinking of switching.

Of course there are a few bumps along the way but in my view those are minor in comparison to the significant amount of freedom gained.

Windows 10 in Tablet Mode

windows-category-inverted

I’ve been using a Microsoft Surface 3 for a couple of years now as my main “at home consumption device”.  Basically it’s for browsing the net while watching TV, or reading a book, or watching some “TV” in bed.

It’s a great piece of hardware and with Windows 10, Microsoft replaced the old Windows 8.1 tablet code with the new “Tablet Mode”.

Tablet mode works well in general but there are two things that really bother me about it:

  1. Edge Background Downloads
  2. Close Window Behaviour

Edit Background Downloads

Microsoft Edge is really the only browser that supports a proper touch mode and so it gets used as my primary browser on the Surface.  This in general is fine and Microsoft has done a good job with it, however there is one thing they’ve really messed up in tablet mode.

If you start a download and then switch away from Edge, most of the time the download will stop.  This does not happen in “regular” mode, only tablet mode.

I assume this is a battery saving feature, stopping tabs from consuming power, but it’s very annoying if you have started a big download and want to go check your e-mail or something else.

There are two ways around it, either disable tablet mode temporarily while the download runs, or start the download in another browser.

Neither are particularly good and I haven’t found any way to tell Edge to keep “alive” when it’s not in the foreground in tablet mode.

Close Window Behaviour

The other annoyance is the behaviour of Windows when you close a task.  Say you download a zip file in Edge, when it’s done you select “Run” and Windows dutifully opens up your desired zip file manager.

You extract your files somewhere and then close the zip manager.  Where would you expect Windows to take you back to?  Edge?

That would seem reasonable as it was the last app that was open and used.

Nope, right back to the start screen.

The same is true for any time you close an app like this.  Maybe your browsing files in Explorer and then decide to open a picture in Photos.  Close Photo’s and instead of going back to Explorere, your back at the start menu again.

I’m not sure what Microsoft’s logic here is, but it seems strange to say the least.