OSPAT: The Open Source POWER Availability Tool

Here’s handy. If you are using Linux on the IBM Power architecture, the Open Source POWER Availability Tool (OSPAT) allows you to search multiple distributions for available packages.

[T]he specialty of OSPAT is that it only returns POWER package results, it does not return x86 packages in the search results. Thus, the user doesn’t have to drill deep into the search results to find the POWER packages. Also, the search results display the results across multiple distributions, helping POWER users determine whether certain packages have equivalency across multiple distributions.

Click here if you want to take a look.

Flattr this!

Portable Vim in Powershell

Because I have finally been able to replace my work laptop.

Because I’m allowed to install software on a server, but not on the laptop in front of me.

Because corporate security policies are insane.

Because I need a decent text editor.

Because PortableApps is a lifesaver.

I have talked about getting Vim to work in Powershell in the past, but this time around I need to get the portable version of Vim working in Powershell.

The first step, of course, is to download the PortableApps platform and install gVim. Handily, this brings the Vim binary along with it so you just need to point your Vim alias to this.

This is done by editing your $profile so that the following line is included:

set-alias vim "Path\To\PortableApps\gVimPortable\App\vim\vim80\vim.exe"

Everything else appears to be working as expected, so I can actually get some work done now.

Flattr this!

Eight questions to ask before buying that IoT gadget

Because, Of course smart homes are targets for hackers

  • Does the vendor publish a security contact? (If not, they don’t care about security)
  • Does the vendor provide frequent software updates, even for devices that are several years old? (If not, they don’t care about security)
  • Has the vendor ever denied a security issue that turned out to be real? (If so, they care more about PR than security)
  • Is the vendor able to provide the source code to any open source components they use? (If not, they don’t know which software is in their own product and so don’t care about security, and also they’re probably infringing my copyright)
  • Do they mark updates as fixing security bugs? (If not, they care more about hiding security issues than fixing them)
  • Has the vendor ever threatened to prosecute a security researcher? (If so, again, they care more about PR than security)
  • Does the vendor provide a public minimum support period for the device? (If not, they don’t care about security or their users)

Flattr this!

Switching from LightDM to GDM

Yesterday, when I updated my Antergos box, it pulled down lots of shiny new Gnome stuff. Today, when I booted up my laptop, I discovered that the greeter wasn’t working any more and I couldn’t sign in or get at any of that shiny new Gnome stuff.

I have encountered this issue before and it was caused by the Antergos LightDM greeter theme. The easiest solution, therefore, is to switch to GDM so that I am using all Gnome all of the time.

It’s a painless enough process, but I am recording the steps here so I can easily look up the steps when I need them again.

So…

CTRL-ALT-F2 to get into TTY2

Log in and switch to root. Then…

systemctl stop lightdm
systemctl disable lightdm
pacman -S gdm
systemctl enable gdm
systemctl start gdm

And you’re done.

Update

And I notice today (Friday 14th) that I now have an updated lightdm-webkit2-greeter which probably solves yesterday’s issue. That said, I will stick with GDM for now just to see how things go.

Flattr this!

Great UI design from LinkedIn

Although I have a LinkedIn account, I don’t often look at it. But today was one of those rare moments that I not only looked at the site but I even tried to leave a comment. And here’s what LinkedIn said:

There was a problem sharing your update. Please try again.

After a bit of experimenting, it appears that LinkedIn has an undocumented character limit. My original 774 characters was problematic, but once I’d cut it doen to 670 characters the problem went away. So I’m guessing there’s a 700 character limit on LinkedIn comments.

But seriously, if this is the problem, why can’t the site damn well say so. “There was a problem sharing your update,” means nothing and telling people to just try again is a guaranteed method of causing frustration and losing attention. Is it really so difficult to say “Please shorten your comment to 700 characters”.

Or, better still, provide a little decrementing counter of the sort you see on the Quitter UI for GNU social.

Flattr this!

Remounting a read-only filesystem on Android

Following on from my last post, I figured that copying the hosts file from my laptop to my phone would be a very good idea. In principle, this is just a case of getting the file onto my phone and then copying it to /etc/hosts.

Obviously, I need root access to do this but, with a Fairphone 1 this is not a problem.

What did catch me out, though, is that /system is mounted as a read only file system. It’s not difficult to get around, but I am noting it here so I can easily look up the steps when I next do this.

# mount -o rw,remount /system
# cp /storage/sdcard0/Download/hosts /etc
# mount -o ro,remount /system

For other phones, some pathnames may vary.

Flattr this!

Unified hosts file with base extensions

Using the /etc/hosts file to block malicious sites at the operating system level is an effective way of ensuring that none of your applications will access any of these sites, ever, and has the advantage of removing the need for a separate browser plugin for every browser you might possibly use. But maintaining the /etc/hosts file involves doing work and this is where Steven Black‘s hosts comes in handy.

This repository consolidates several reputable hosts files, and merges them into a unified hosts file with duplicates removed. This repo provides several hosts files tailored to you need to block.

Using it is simple. Clone the repository, update the myhosts file with any custom host records you may have, and add any domains you don’t want to block to the whitelist. Then build your hosts file:

python updateHostsFile.py

There are a number of switches you can use (all of which are documented in the readme file) which allow you to control which types of sites to block and whether you want to automatically replace your existing /etc/hosts file.

This all works very nicely indeed, but I’m lazy. So I knocked together a short script to grab any updates from the repository and rebuild my hosts file:

#! /bin/bash
# Automatically update hosts file

# Change to the correct folder and do a git pull
cd /home/paul/Stuff/hosts
git pull origin master

# And update the hosts file
python updateHostsFile.py -a -r

And put it in /usr/local/bin.

This means I can use a systemd service and timer to execute this every Saturday afternoon.

[Unit]
Description=Auto-update hosts file

[Service]
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/hosts
StandardOutput=journal

[Install]
WantedBy=basic.target
[Unit]
Description=Auto Update Hosts File

[Timer]
OnCalendar=Sat 14:00:00
Persistent=true
Unit=hosts.service

[Install]
WantedBy=basic.target

And, so far, it all appears to be working very nicely indeed.

Flattr this!

Free subdomains with FreeDNS

Because remembering an IP address is hard.

I’ve mentioned before that I have a private Voxelands server running so that the boys can build and explore in the same world. This works pretty well but it does mean that, as can happen, one of them connects to the wrong server I have to go and look up the IP address so that I can reconnect them.

And then I discovered FreeDNS which, as the name suggests, allows you to set up a subdomain for free. You sign up, select a public domain from the extensive list available, add a subdomain, and point it at your IP address.

It really is as simple and as quick as that.

I’m impressed at how simple and painless they have managed to make the whole process. So much so that, if I do find myself needing a premium service, I will be very happy to go back to them.

Flattr this!

Happy Blogiversary, Inscius

The Weblog of Inscius turned five years old yesterday. This means that it is now old enough to help with the weeding, but not old enough to know the difference between weeds and vegetables.

My blogging has gone down markedly, especially this year, but I am not giving up. I never had a goal, I did not have a glorious five-year plan. I write for my own enjoyment, and others’ enjoyment. Or pity :p

I find my own blogging can be all over the place. There are times when I am posting updates daily and other times when I don’t even look at the blog for a month or more. Ideally, I would like to manage a post per week, but time and motivation often get in the way. That said, though, it is nice to have a small space on the web that is unambiguously mine.

Happy blogiversary, Mikael, and here’s to another five years of text-based dufferdom.

Flattr this!

Prettify XML with Vim

File under quick and dirty, but works for me.

The issue is that I have an utterly unreadable XML file in front of me. Not only is there no indentation, I don’t even have any line breaks.

To format it for readability, first insert line breaks

:%s/></>\r</g

Then load and apply the XML indent file

:set filetype=xml
:filetype indent on

And apply it

gg=G

There are probably better ways of achieving the same end, but as a quick fix, this works for me.

Flattr this!