Posts tagged ·



Ubuntu 16.10 on Asus ZenBook UX330

Comments Off

As mentioned in a previous post, I recently got the Asus ZenBook UX330 (UX330CA-FC020T, to be specific). It’s a very light weight 14″ decent spec’ed laptop which runs Ubuntu flawlessly. Here are some notes on installing, and first impressions.

UEFI boot and install

As far as I’ve seen, there are at least two versions of the BIOS around for these machines: The display model had an “old fashioned” ASCII text based BIOS, while the one which got delivered had a new UEFI based GUI. Both can boot the Ubuntu 16.10 64-bit live image, but the Secure Boot just needs some tweaking.

Before getting to boot, it’s important that the partition of the USB stick which holds the image is marked as bootable. In GParted, this can be done with the option seen below. Once that is taken care of, transferring the ISO is easily done with UNetbootin.

Once ready, plug in the USB stick, restart the machine, and hold F2 to enter the BIOS / UEFI setup. (Holding ESC will show the temporary boot selection menu). The “easy” mode can be seen below.

From here, press F7 to enter “Advanced” mode, and use the arrow keys or mouse to tab over to the Security options. Towards the bottom of that tab, there’s a sub-menu for Secure Boot. Enter that menu, and disable Secure Boot.

Use F10 to save and exit, and got back into the UEFI setup with F2 to verify that the Ubuntu live portion shows up as “1100, Partition 1″. From here you can change the Boot settings to select the USB portion first, or use F8 to boot from that only once, which should be all you need to get the installation going.

Ubuntu compatibility

Here’s a list of features I’ve personally tried and confirmed to be working. In summary, this machine looks very well prepared for Ubuntu, with no major draw-backs. The only additional setup which might be worth-while is configuring the touchpad to temporarily disable while typing, as described here.

USB ports Work
SD card reader Works, mounts.
Wifi Detects all networks; connects.
Fast re-connect after suspend.
Bluetooth Not tried
Web cam Works with “Cheese”
Suspend Works; resumes quickly.
From Ubuntu menu, lid close, or Fn + F1
Flight mode
(Fn + F2)
Work, reconnects quickly.
Keyboard brightness
(Fn + F3/F4)
Screen brightness
(Fn + F5/F6)
External display
(Fn + F7/F8)
Not tried
Volume buttons
(Fn + F10/F11/F12)
CPU throttling Not tried


The UX330CA is a decent spec’ed laptop, and there’s a few variations should you want more power. Here’s the selection as it looks in early 2017, comparing to the slightly more expensive UX330UA line.

Price range €750 €930 – €1300
CPU Core M3-7Y30 1 (2.6) Ghz Core i5 7200U 2.5 (3.5) GHz -
Core i7 7500U 2.9 (3.5) GHz -
Max TDP 4.5 W 15 W
RAM 8 GB 8 / 16 GB
SSD 128 GB 256 / 512 GB
GPU Intel HD Graphics 615 Intel HD Graphics 620
Display 1920 x 1080 pixels; 13.30″
anti-glare; no-touch
1920 x 1080 pixels; 13.30″
anti-glare; no-touch
USB 2x USB 3.0 A
1x USB 3.1 C
2x USB 3.0 A
1x USB 3.1 C
SD card reader SD, SDHC, SDXC SD, SDHC, SDXC
RJ45 / LAN No,
comes with USB adapter.
comes with USB adapter.
3.5mm mini-jack 1x 1x
Web cam 1280 x 720 pixel 1368 x 768 pixel
Bluetooth version 4.1 4.1
Wifi version 802.11 ac 802.11 ac
Weight 1.20 kg 1.20 kg
Dimensions (W x L x H) 32.20 x 22.10 x 1.23 cm 32.20 x 22.10 x 1.35 cm
Comments Off

How to disable the touchpad while typing

Comments Off

Most modern laptops come with a touchpad for cursor control. It is typically located below the space-bar, which means it’s easy to rest your palms on it while typing and send the cursor flying. There are two ways to get around the problem: Disable it altogether and use another pointing device, like the red “TrackPoint” or an external mouse; or temporarily turn it off while typing. Here’s how to do both.

First, make sure the these packages are installed:

apt-get install usbutils xinput xserver-xorg-input-synaptics

Permanently disable

Any input device can be configured through the xinput tool. However, as machine configurations will be different, we’ll need to look at what is connected first. This will list internal and connected devices:

xinput list

The first command will list connected USB devices, which might be relevant. The second command will output a list like the following, where each device has an ID, but which will change based on the machine and what is connected. The example below is from a Lenovo Thinkpad with an external mouse, so three hardware pointing devices are listed: The touchpad; the trackpoint; and the external Logitech mouse. Notice the ID for the touchpad, which is 12 here.

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=12	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=13	[slave  pointer  (2)]
⎜   ↳ Logitech M570                           	id=9	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=10	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=11	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=14	[slave  keyboard (3)]

We can query details about a specific device:

xinput list-props 12
xinput list-props 12 | grep Enabled

There are two ways to enable and disable a device: By setting the “Device Enabled” property, or with the xinput command shortcut which does the same:

xinput set-prop 12 "Device Enabled" 0
xinput disable 12
xinput set-prop 12 "Device Enabled" 1
xinput enable 12

Temporarily turn off while typing

You might want to use the touchpad though, and only avoid the “fat fingers” problem while typing. Here the syndaemon tool comes to the rescue. It’s a “a program that monitors keyboard activity and disables the touchpad when the keyboard is being used”. It means, you’ll have to make sure it’s running in the background, typically through the start-scripts of your desktop.

There’s a few settings to play around with and also a CLI client “synclient“. See also the synaptics driver documentation for more options.

Having this in a startup script will cover most common use cases:

/usr/bin/syndaemon -i 1 -t -d

Comments Off

Importing contacts to the Ubuntu Touch phone

Comments Off

I recently bought the bq Aquaris E4.5 Ubuntu Edition. As the name suggests, it comes with the new Ubuntu Touch OS. It’s a refreshing take on a phone OS, and with it’s GNU/Linux base system, apt-get repository backed installation, it is in fact the phone I’ve always wanted. However, at this stage it is still in beta, so if you expect a polished UI and applications, you’ll have to wait. At €169, it is not a bad deal, and I see it as part of my contribution to free open source software this year.

There are a number of features still lacking or half-backed. For example, there is Bluetooth, and I could connect my Android phone, but not transfer a VCARD contact information. Also, there seems to be no way to import a VCARD file. However, as the contacts database is based on the GNOME Evolution application, I could edit its SQLite database. Below is the procedure I used to successfully transfer my phone and contacts list from an Android (Android 4.3, Cyanogenmod 10.2) phone to the Ubuntu Touch (Ubuntu 14.10 (r21)).


On the Android phone, open the “People” app, select its settings pop-up, and click “Import / Export”. In the selection window, choose “Export to storage” and acknowledge. A text file with your contacts information will be saved somewhere on your device. Find it, and transfer it over to your computer by e-mail, SFTP, etc.


Maybe there is a better way to import the file, but I did a raw edit of the SQL DB. It means I had to convert the VCARD file to SQL INSERT commands. The following awk script takes care of that.

cat 00001.vcf | awk -F":" 'BEGIN { FS = ":"; i=0 }; {
if ($0 ~ /BEGIN/) {
  print "INSERT INTO folder_id(uid, vcard) VALUES(\"" i  "\", \"BEGIN:VCARD";
} else if ($0 ~ /END/) {
  print "END:VCARD\");"
} else if ($0 ~ /FN/) {
  print "X-EVOLUTION-FILE-AS:" $2 "\nFN:" $2
} else {
  print $0
} }'


Besides adding the SQL statement, this adds the special field X-EVOLUTION-FILE-AS, and a unique ID counter. All fields in the DB will not be populated, however, it will still work. And, the first time you edit one of the contacts from the phone UI, it will update and populate the rest.

Save the result of the command to update.sql (or any other file name you like).

Finally, transfer the result of the awk command as a file to the Ubuntu phone, and modify the contacts DB. (Please note, I take no responsibility for loss of data or other failures this might cause).

The contacts SQLite3 file is located at

sqlite3 -init /tmp/update.sql contacts.db

This will execute the specified sql file, and then open sqlite3 in interactive mode. You can list the contacts table to verify:

SELECT * FROM folder_id;

Finally, you want to stop any processes using the address book. After exiting the SQL shell (CTRL+D), use something like:

kill `ps aux |grep -i address.*book | grep -v grep | tr -s ' ' | cut -d ' ' -f 2`

Now open the Contacts app on the phone, and confirm that all information is there.

Comments Off

PC build: Silent yet powerful

Comments Off

It’s been a long time since I’ve had the chance to put together a machine. The one I’m typing on right now has a more than five years old AMD Athlon 64 X2 5050e, and one of its HDDs report 47220 Power_On_Hours, or 5.4 years. It was fun to look at some new hardware.

This build is not for me, though. My father’s current machine is from 2005, and the AMD Sempron 2600 1.6GHz has kept up well, however would not be a good fit for the new requirements: A silent build which can handle a modern Ubuntu distribution plus Windows 7 in a VM. After good advice from Redditors on r/buildapc, I got the following components.



The rest


Requirements and reasoning

At € 1055 (in June 2014), it’s not a cheap build, and I could definitely have saved a bit here and there. However, that was not my main concern – my father deserved something top-notch. I wanted something powerful enough so that it would last many years to come without upgrading, yet silent for the living room. That’s why some of the components are somewhat over-provisioned: the fanless 460W PSU, while I expect the peak draw to be less than 150W; 16 GB RAM, 256 SDD, 4 TB HDD.

For the CPU, I went for the four core Intel Core i5 4570 (LGA 1150, 3.20GHz), based on redMarllboro’s advice. It is indeed more powerful than the AMD A10-6700 I had originally planned for, and furthermore, the virtual cores would not benefit the VM much.

With the CPU fixed, I narrowed down my search for an Asus motherboard to the ASUS Maximus VII Ranger (Z97). That was based on the following criteria: more than 4 SATA ports, Intel Ethernet controller (I try to keep away from Realtek based on this issue, even if that was WiFi related), 4 DIMM slots, an onboard DVI and/or VGA port. Turns out, that really narrows it down, and about the only contender was the ASUS Sabertooth Z97 Mark 2, however that only has HDMI and Displayport embedded.

Now, one could argue that both of those MBs are overkill for what I’m building. However, most of the boards I’d be looking at would be in the €100-150 range anyway, and as price was really not a main issue here, why not go for the latest chipset? Furthermore, the “Republic of Gamers (ROG)” marketing from Asus I find somewhat misleading. The Maximus board looks aggressive in black and red, but surely it is the hardware specifications which matter. For example, the 10K Black Metallic Capacitors are welcome when cooling is an issue. Also, some of the ROG “features” in the form of software are dubious at best: How is a RAM disk a feature of the MB? On most GNU/Linux distributions, it’s there by default under /dev/shm.

For storage, an SSD is a no-brainer these days, and the only questions are: How large? And is additional storage required? 128 GB might have been just enough, but with ~50 GB for the Ubuntu host OS, ~40 GB for the VM, and ~30 GB for swap it would have been very tight. (In fact, post install, only 70 GB is left on a 256 GB disk). Doubling to 256 GB is less than double the price. I will require more storage space, so added the 4 TB spinning disk. When it comes to WD Red over Green, it’s only about €10 difference, so another no-brainer.

As the VM will be running Windows, my plan is to back it up frequently, in the hope of recovering from certain problems of that OS. Now, several people on r/buildapc thread advised against this. I suppose they are mostly right; it might be possible to lock down a Windows installation to the point where malware and adware is not a problem. The first and second issues with that are I’d have to spend a lot of time learning about it, and I would not be very interested. And why should I? A restricted install with no direct user access to system binaries and most applications delivered from a trusted cryptographically signed source has been the norm on most GNU/Linux distributions for more than a decade. It takes no effort at all, so why go with something inferior? If this machine and setup can avoid my father spending hundreds of bucks at PC Repair shops every year, it will pay itself back quickly and be a success.


Silent and cool

The most important requirement for this build was to make it silent. The fanless Seasonic P-460 achieves that without breaking a sweat. At normal load, which is 35 to 50 W at the power socket (220 V; in EU), I’ve measured its temperature of the PSU at 31 C. Also, the modular cable system is very nice, as it means no lose cables hanging around. In fact, there are no cables crossing the motherboard at all, as seen in this picture.

For the CPU, I had wished for passive water cooling, however most solutions on the market today are downright ugly. If the Zalman Reserator tower was still around, I would have gotten that. The compromise was therefore the over-sized Noctua NH-U14S. Again it is probably a bit of an overkill, however the benefit is that it’s not pushing the limit of the cooling, so it remains silent and cold. CPU temperatures at load is around 30 C, and at peak 45 C when the case fans kick in. The part which gets warmest is the Z97 chipset heat-sink, at around 36 C.

One of the features I appreciated most with the ASUS Maximus VII Ranger motherboard was the fan-control. Five fans can be controlled individually based on temperature. Both PWM (Pulse Width Modulation) and DC (voltage) regulation is possible, based on fan type. As seen in the pictures below, the two case fans are off when they are not needed, and kick in slowly when it gets hot. On low to normal load the CPU fan spins at 350 RPM, and can barely be heard if you put your ear right next to the case.

Finally, the only other moving part in the machine is the Western Digital 4 TB Red HDD. At a maximum rotation speed of 5400 RPM it is not dead silent, but quiet enough.



Building this machine came with a lot of fun! The Fractal Design case was pure joy to work with. All aspects were well thought out: Easy access to left and right side (back of MB), excellent cable management, easy disk mounting slots, two large (and quiet) fans. Gone are the days of scratched and bleeding hands because of sharp edges around the case. And the fact that there are no cables criss-crossing the motherboard not only looks good, but also makes for good airflow. If I were to say anything against the case, it would have to be that it is big heavy beast.

The other components were also top notch, and caused no problems. In particular the modular Seasonic PSU and cable system is very welcome. You only have to plug in the cables you actually need, so no lose ends hanging around. The fact that the PSU comes in a pouch which competes with expensive cologne is also a nice touch.

The Noctua NH-U14S is a massive cooler. And it was another reason why I ended up with the Define R4 case; it was one of the few cases which had enough clearing for the cooling block. With a 14 cm fan it keeps the CPU nice and cool. The initial boot was without the fan, and temperatures went up to about 45 C in the BIOS. With the fan at lowest speed (about 350 RPM), it sits at around 35 C (still without having applied thermal paste; will wait till it’s shipped). The only concern I had was with fan direction. Its default orientation was to blow air from the RAM side backwards over the cooler. Currently, I’ve put it on the other side, so it sucks air over the block, and blows it right out at the rear fan. I might experiment with the difference of direction and position.

Here are a few pictures while building, followed by a couple of BIOS screen shots.

(Click for larger images.)

(Click for larger images.)



As mentioned above, the goal was to have an Ubuntu installation, with Windows 7 in a VM. I chose Ubuntu 14.04 (aka “Trusty Tahr”), since it is a Long Term Support (LTS) release, and figured this would be the right balance between stability, supported hardware and packages. Other distributions I am currently using include Fedora and Debian, but for this build I figured hitting the middle-ground would be OK, thus Ubuntu. Since my father is used to Windows, I went for the simple Xfce 4 desktop, with a familiar taskbar, window icons and SHIFT+TAB application switching. As seen in the screen-shots below, it blends nicely with the seamless VirtualBox integration.

I tried and installed both the alternative Xubuntu ISO and the main Ubuntu ISO. The main difference is the default desktop, which is Xfce in the former. However, that had boot problems with Secure Boot, even after I enabled “Other OS” in the BIOS. It would install fine, but not find the boot image afterwards. It was possible to repair that by refreshing Grub, however it gave me a bad feeling at the start. The main Ubuntu ISO had now boot issues, and changing the desktop is just a matter of installing a package and selecting a different option at log-in. (The Ubuntu variations are really a bit redundant in that regard. Especially when other basic functionality, like boot, fails).

Apart from the default ISO packages, I added the following. There you can see xfce4, the VirtualBox packages, various utilities, and a few benchmarking tools. Nothing much came out of the later. Instead, see the CPU graphs below, which shows calm and moderate load while running Windows in the VM.

apt-get install autossh bonnie++ conky cpuburn dbus dos2unix elementary-icon-theme emacs evince fancontrol feh geeqie gimp git gitk gnome-icon-theme-extras gnome-icon-theme-full gnome-icon-theme-symbolic gnome-terminal gnupg gparted gthumb htop iftop imagemagick iotop k3b kdiff3 libnss-myhostname lmbench mencoder mplayer mtr nmap openssh-server parcellite policykit-1 policykit-1-gnome policykit-desktop-privileges screen smart-notifier sysbench sysstat tango-icon-theme tor tree usbutils virtualbox virtualbox-guest-additions-iso vlc wireshark xfce4 xsensors xubuntu-icon-theme

The installation of Windows in the VM is very simple. One important option to notice, is the Intel Virtualization Technology (VT-x) setting in the BIOS, as seen here. Once that is enabled, the rest is a breeze. VirtualBox comes with a brief but useful “wizard” which guides you through creating the image. I opted for a 40 GB, 2 CPU cores, 8 GB setup. After that, add the install medium (physical CD or ISO), and boot. Windows 7 will reboot about ten times, just as in the old days, but eventually will leave you with a full fledged install. Right after installation, it’s useful to add the VirtualBox Guest Additions, which amongst other things enables the seamless mode. Also, a shared mount-point is useful, and can be easily enabled through the VirtualBox settings. It automatically appears in Windows.

The CD/DVD drives are passed through, and the physical drives were mapped to similar drives in the VM. For shared directories / drives, I wanted to makes sure the they were mounted to the same Windows drive all the time, regardless of other mount points. Thus, the VirtualBox setting does not use auto-mount, and instead the directory was manually mounted as seen in the Dropbox example below.

Installing Dropbox was a matter of downloading and installing this package, and start it as an unprivileged user. Then, in order to make that available in the Windows image as well, the top Dropbox directory was shared as a drive. (Note: The Windows VM is intentionally not connected to the network). Finally, a requirement was to have that fixed on C:\Dropbox, which was achieved with a symbolic link in Windows. The following lines has to be executed in a shell run “as Administrator”:

net use x: \\vboxsvr\Dropbox
mklink /d x:\ c:\Dropbox

One of the few special applications which requires Windows, was Corel Paint Shop Pro (PSP). The usage pattern for this is typically to download something from the web, and the process it. To make this easy and seamless, I added a Firefox plug-in so every image gets an extra right-click menu item which opens the image in PSP inside the VM. Details for this is explained here.

Finally, another special Windows only application was the genealogy program Aldfaer. The requirement here was that it could be updated, over the web. To make this work, the main install is on Ubuntu, with an option to run and update from Wine. However, it runs better inside the VM, so the application folder is mapped to Windows through another shared folder in VirtualBox. I will go into detail regarding this setup in a later post.

Writing this a few months after the machine was delivered, I’ll declare it a success. Raw performance is at a very different level from what my father was used to. The machine is silent, and in fact is turned on most of the time (as opposed to the old which he never used because of fan-noise). The split Ubuntu / VM setup is slightly complicated, but seems to work out well. As expected, the Windows install has already regressed, but it is easy to go back to a previous Snapshot, instead of re-installing everything again. This machine will definitely last a long time.

(Click for larger images.)

Comments Off

Ubuntu on the Nexus7

1 comment

I recently got my hands on an Asus Nexus 7 tablet. In it self, maybe not a groundbreaking device, if it wasn’t for the fact that Canonical will use it as their reference device for running Ubuntu on tablets and dual (or more) core mobile phones. Just to be clear, this is no dual boot, emulator, nor “chroot”-trick. The OS boots natively, and brings up the standard Ubuntu Unity desktop. The kernel is copied from (or based on) Google’s Android 4.1 kernel for the Nexus 7, which includes several non-committed changes, as well as binary drivers and firmware. See here fore more information.

A decent proof-of-concept build of Ubuntu 13.04 is already available, and it runs fine on the Nexus 7. If you’re running Ubuntu on your desktop, a pre-packaged installer is available from the a repository. Alternatively, download the boot and userdata images, and install using fastboot yourself. (All commands below need sudo).

fastboot devices
fastboot erase boot
fastboot erase userdata
fastboot flash boot raring-preinstalled-desktop-armhf+nexus7.bootimg
fastboot flash userdata raring-preinstalled-desktop-armhf+nexus7.img
fastboot reboot

Now, I said proof-of-concept, and what you get with this image is not really that handy on a tablet. So far, it just starts up a desktop Window Manager, which is not too comfortable with a touch screen. However, with a USB On-the-Go (OTG) adapter, you can plug in a USB hub, keyboard and mouse. Now it becomes usable like any other desktop. I got one of these compact ones from Deal Extreme, However, due to the rounded shape of the Asus Nexus 7, I had to chisel off a few millimetres to make it fit. The version with a wire would probably had worked better. Maybe also interesting to try would be a HDMI adapter (I’m not sure if that particular one works). Finally, the missing bit to have a fully functional docking setup would be charging while the OTG cable is connected. The Ubuntu FAQ mentions that this will be enabled, but you’ll probably need yet another special adapter cable to piece it all together.

What’s impressive about the current offering is that most, if not all, packages have already been compiled for the ARM architecture and are available in the Ubuntu repositories. This is very welcome, as it frees the tablet from the Android markets, and brings in an enormous selection of free and open source software. Not all of it is immediately suited for a small touch screen on a slow CPU, but that will change over time.

On a whim, I tried apt-get install emacs and eclipse. Both downloaded and worked fine, however, even with a four core CPU, ARM is not up to Eclipse quite yet. It should also be noted that the desktop UI has some unnecessary features which notably slows down the experience. For example, eye-candy like fading transitions when ALT-TABing between windows is enabled.

In conclusion, this is a very interesting first move from Canonical, and more GNU/Linux distributions will surely follow. With more alternatives and variety in this space, it will hopefully open people’s eyes up to the fact that the mobile phones and tablets they carry around are full-fledged computers in themselves, with no reason to remain restricted to a single OS from a single vendor. Maybe it will eventually turn stupid laws which makes it illegal to hack and experiment on these devices.

UNetbootin – Create bootable Live USB sticks

Comments Off

UNetbootin is one of those small, not well known, yet extremely useful tools which can save you a lot of time. In a few clicks, it let’s you create a boot image from a long list of distros, and format that right out to a USB stick. With many of the distros, you can choose between Live or Net Install images, and from versions a few years back in time. If you’ve already downloaded the ISO image for you distro, that’s OK, but it will even do that job for you if you like.

The list of supported distros is impressive, from the most popular ones, to more obscure (here in random order): Ubuntu, Debian, Linux Mint, openSUSE, Arch Linux, Damn Small Linux, SliTaz, Puppy Linux, gNewSense, FreeBSD, NetBSD, Fedora, PCLinuxOS, Sabayon Linux, Gentoo, MEPIS, Zenwalk, Slax, Dreamlinux, Elive, CentOS, Mandriva, LinuxConsole, Frugalware Linux, xPUD, Foresight Linux, VectorLinux, Slackware, Smart Boot Manager (SBM), xPUD.

To get going in Fedora:

yum install unetbootin syslinux-extlinux

If you don’t run as root, you will be prompted for the root password:


Comments Off

Firefox, Fedora & Ubuntu: Disabling notifictaions

1 comment

Notifications (a.k.a. OSD) is one of those UI features which seems fancy at first, but quickly gets in your face. Possibly originated on the Mac, the annoyance has now spread to Firefox, Fedora and Ubuntu as well. Here’s how to quickly switch them off:


Enter about:config in the location bar. Search for this preference, and double click.

Fedora and Ubuntu

sudo mv /usr/share/dbus-1/services/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service.disabled