Dec 102017

Back in 2011 I finally got fed up with Firefox. It was slow, crashing every few moments, and often it would hang. Suffice to say, I was not a happy camper. I tried Chrome, fell in love, and haven’t looked back.

Fast forward to 2017. Up to a few days ago I had a déjà vu feeling. Chrome was getting slow, it crashed daily, and it would hang often – especially on YouTube. The only difference being was difficulty of killing Chrome as it consists of multiple processes and some of them cannot be easily killed.

I did entertain idea of Edge for a day just to find it is still a piece of crap, less capable than even Internet Explorer, and incapable of properly handling shortcut toolbar editing. I also though of Safari for a moment but decided against it purely based on dislike of version I installed three years ago.

At the end I gave Firefox a try and now, month later, I am still using it.

Move itself was uneventful and definitively not a big jump. Interface is similar enough to Chrome to a point I mostly don’t even notice I switched – the only minor annoyance is having all downloaded files under menu. It is a bit lower on memory but not much. Not sure it is faster. Bookmark sync works flawlessly.

But the biggest benefit is that it is rock solid. It is essentially what Chrome was for me a year ago. Shows web pages and doesn’t get in the way. Knowing history, I won’t stay with Firefox forever. But I’ll enjoy it for now in hope Chrome will fix their code before Firefox spoils theirs.

Dec 052017

Most of the time I access my home NAS via samba shares. For increased security and performance I force it to use SMB v3 protocol. And therein lies the issue.

Whenever I tried to access my NAS from Linux Mint machine using Caja browser, I would get the same error: “Failed to mount Windows share: Connection timed out.” And it wasn’t connectivity issues as everything would work if I dropped my NAS to SMB v2. And it wasn’t unsupported feature either as Linux supports SMB3 for a while now.

It was just a case of a bit unfortunate default configuration. Albeit man pages tell client max protocol is SMB3, something simply doesn’t click. However, if one manually specifies only SMB3 is to be used, everything starts magically working.

Configuring it is easy; in /etc/samba/smb.conf, within [global], one needs to add

client min protocol = SMB3
client max protocol = SMB3

Alternatively, this can also be done with the following one-liner:

$ sudo sed -i "/\\[global\\]/a client min protocol = SMB3\nclient max protocol = SMB3" /etc/samba/smb.conf

Once these settings are in, share is accessible.

Nov 302017

Upon getting Linux Mint installed, I went ahead with installing Private Internet Access VPN client. All the same motions as usually albeit now with slightly different result – it wouldn’t connect.

Looking at logs ($HOME/.pia_manager/log/openvpn.log) just gave cryptic operation not permitted and no such device errors:

SIOCSIFADDR: Operation not permitted
: ERROR while getting interface flags: No such device
SIOCSIFDSTADDR: Operation not permitted

Quick search on internet brought me to Linux Mint forum where exactly the same problem was described. And familiarity didn’t stop there; author had one other similarity – encrypted home folder – the root cause of the whole problem. Sounded like a perfect fit so I killed PIA client and went with his procedure:

# sudo mkdir /home/pia
# sudo chown -R $USER:$USER /home/pia
# mv ~/.pia_manager /home/pia/.pia_manager
# ln -s /home/pia/.pia_manager ~/.pia_manager

However, this didn’t help. Still the same issue in my log files.

So I decided to go with nuclear option. First I killed PIA client (again) and removed PIA completely together with all my modifications:

# rm ~/.pia_manager
# rm -R /home/pia
# sudo rm ~/.local/share/applications/pia_manager.desktop

With all perfectly clean, I decided to start with fresh directory structure, essentially the same as in the original solution:

# sudo mkdir -p /home/pia/.pia_manager
# sudo chown -R $USER:$USER /home/pia
# ln -s /home/pia/.pia_manager ~/.pia_manager

Than I repeated installation of PIA client:

# cd ~/Downloads
# tar -xzf pia-v72-installer-linux.tar.gz
# ./

And it worked! :)

Nov 252017

When you install Linux Mint, you cannot simply have only root user. Nope – you cannot even login as root. Annoying as it is, there are valid security reasons for this restriction. However, sometime you just need temporary installation with root user, and all security be damned. For those times, here is the guide how to enable root user on Mint 18.2 (Sonya).

Assuming you went through the standard installation and are logged in as standard user, the first step is to assign password to the root:

# sudo passwd root
[sudo] password for test: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

Next you need profile file. The easiest approach is to steal it from the current user:

# sudo cp $HOME/.profile /root/.profile

Lastly, enable user name prompt and reboot:

# echo "[SeatDefaults]" | sudo tee /etc/lightdm/lightdm.conf

# echo "greeter-show-manual-login=true" | sudo tee -a /etc/lightdm/lightdm.conf

# sudo reboot

After the system starts again, there will be login entry and we can use our root credentials to get in.

Of course, we can bring this madness even further. Now that we are using root, we can delete our non-priviledged user:

# userdel user

# rm -R /home/user

Further more, for real crazies :), we can automatically boot into root:

# echo "autologin-user=root" >> /etc/lightdm/lightdm.conf

Unfortunately, this all doesn’t come without the cost – and not only in security. At this time there is a bug in Caja preventing desktop icon to be shown. As far as I can tell, these are the only usability consequences of the trip to the wild side.