Project Zebra: Project Zebra: And this is your brain on Cake ►

THIS IS THE LATEST ENTRY

2019-02-16Project Zebra: What we see there is nothing but savagery, injustice

0 comments

Tags All Linux Tech Personal

This entry is part of my Project Zebra series covering migration to Linux for personal computing use.

Back again... moving, urgent server upgrades for someone else plus work ate the last few months. In the near future it'll be trying to do things outside now that the weather's improving.

I'm not 100% sure now why I didn't class my last reference to CrossOver (a way of running Windows software on Linux) as a Project Zebra entry and will probably do that retrospectively.

The reason I mention it is I tried installing the Power Query addin with Excel 2013, but despite installing the .NET 3.5 SP1 dependency it insisted Net Programmability wasn't installed so I decided to update CrossOver to version 18 and try 2016 (which integrates the functionality into the main application). Rather than mess around with the HUP copy I've purchased, as CO development generally seems to focus on retail versions, I grabbed a key on eBay (which I'm sure is totally legit *cough*) and the 32-bit installer rather than the 64-bit one the seller recommended.

Apart from very slight niggles with Compton window border shadows, which is probably not Wine or CO's fault, and that under 18.0 an apparent bug with scrolling via a scrollwheel not redrawing the vertical scrollbar (fixed in 18.1) Word creates and opens files okay – which it didn't a year ago with CO17. Excel likewise seems okay. Performance and memory usage are decent.

If any version of SSMS Express from the last ten years works with CO, when I have time to try, that would be most interesting. But it's not exactly an issue to use a VM or Windows machine for it, whereas Office apps are useful on occasion for dealing with files originated by others and I'm so much a native user of Excel that it's unlikely I'll ever transition to another option for GUI data manipulation; anything that can't be done there is SQL and/or procedural code territory.

As of a bit over two years in to using desktop Linux as my daily driver for personal use and having selected Xubuntu as a base, notwithstanding that I've tweaked a lot of things in this time, 18.10 has been simultaneously slick and (the way I've set it up) retro and cosy. And alive, whereas everything else (tablets, Windows) feels like having to scratch away a thick layer of shiny limitations and crap to reach productivity.

With a smattering of applications like Foobar running via compatibility layers, and one or two replacements for key things (Geany instead of Notepad++ for instance, although the latter would run perfectly well if I wanted) it's having an OS that stays out of the way back, plus one that's highly modular and lets you change or replace things to suit preferences.

I feel I should mention again, because these diary-style entries are primarily about tweaking/changing/breaking my main computing environment, that I've consciously chosen a distro with a six-month upgrade cycle which I apply both security and non-security updates to when available, rather than one with rolling releases (everything gets updated when available) or long term support release (software receives security fixes but otherwise stays frozen as at a certain point, unless you use snaps/flatpack/etc). "Older but more stable" is certainly available, in fact it's generally recommended that new users consider long term support releases. Late last year Ubuntu announced LTS releases will also have the paid option of ten years of support (extending the basic five) to better appeal to financial industry players and IoT suppliers.

For comparison: I switched on my remaining Windows laptop recently, which led to its usual leech-like behaviour on bandwidth and leaving the machine slowly parsing through updates for hours whilst I resisted the urge to to spend a few minutes replacing the OS.

It's not just that Windows updates are large. By default Windows Update opens dozens of concurrent connections, DDOSing the rest of the devices on your local network using a service euphemistically named "delivery optimization". (By default Microsoft also helps itself to your bandwidth to upload to other users on the internet, similar to the way bittorrent works, which I assume you already know and have turned off because that's in Settings – you have, right?) It's a little less obvious how to turn off this garbage.

https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/delivery-optimization-service-saturating-network/3bc10545-b1ec-4ec4-bbd9-ae30c55b0091

sc stop "DoSvc"
sc config "DoSvc" start= disabled
sc delete "DoSvc"

TL;DR, if you've been blocked at the router because your Windows machine is pissing people off, it's possible to stop and/or disable and/or delete the DO service. I suspect it'll get re-added by future updates, but I can verify that this equivalent of hitting it with a wrench works.

I didn't resist the urge to wipe the Yoga 300, though, it's now running Mint 19.1 Xfce with rather more success. It isn't a high-spec machine by any stretch (Celeron N2840 and 2GB RAM) and Windows wastes most of that.

Deciding to forgo using PlayOnLinux as a shortcut, I got installing Wine 3.0 and Office 2007 on Mint 19.1 Xfce down to;

sudo apt-get install wine32 winetricks
sudo dpkg --add-architecture i386
WINEARCH=win32 WINEPREFIX=$HOME/office2007 wineboot
WINEPREFIX=$HOME/office2007 wine start /unix '/path/to/setup.exe'
WINEPREFIX=$HOME/office2007 winecfg
Libraries > riched20 > Add > Apply
WINEPREFIX=$HOME/office2007 winetricks fontsmooth=rgb
WINEPREFIX=$HOME/office2007 winetricks -q corefonts
WINEPREFIX=$HOME/office2007 wine "C:\Program Files\Microsoft Office\Office12\WINWORD.EXE"

The last bit isn't really necessary as Wine automatically created shortcuts for me that were picked up by Whisker Menu. Given that Wine 4.0 is now out, when time is available I want to see how Office 2016 fares under it rather than relying on CrossOver.

Moving on to troubleshooting, I had a minor issue with xfce4-power-manager which I'd compiled myself back in December 2016, and which was both inoperable and preventing the version installed by the 18.10 upgrade from running – fortunately this was a simple matter of deleting the files from /usr/local/bin and reinstalling the repository version.

Somewhere along the line I did an "apt-get update" and was reminded that these days it's just "apt update" -- apt is interactive, so if you need to confirm a repository that's changed its label it'll allow you do do so; https://askubuntu.com/questions/989906/explicitly-accept-change-for-ppa-label

https://www.reddit.com/r/archlinux/comments/5xnynk/a_stop_job_is_running_for_session_c1_of_user_what/ suggested that sessions not closing gracefully during shutdown may be because Chrome/Chromium have a setting ticked referred to as "Continue running background apps when is closed". So I'm trying unticking those.

Reading https://askubuntu.com/questions/6769/hibernate-and-resume-from-a-swap-file it mentioned that systemd doesn't use uswsusp if it's installed, which was confirmed by undoing some previous config -- uninstalling uswsusp, deleting /etc/pm/config.d/00sleep_module and /etc/uswsusp.conf, rebuilding config with "sudo update-initramfs -u" and a successful hibernation after restarting. So I've gone back to previous blog entries and corrected them and added links to info on how to make systemd use s2disk if you do want to, although since swsusp does more-or-less work for me I've been focusing on improving its reliability -- I don't particularly need the progress indicator swap file compatibility uswsusp can offer (never having used them, or I'd have noticed swsusp was being used) on this machine.

My issue is that the ThinkCentre M92p Tiny sometimes reboots rather than shutting down after saving the disk image when asked to hibernate, but isn't consistent; a hibernation request with lots of applications open or after the session's been open for hours may reboot. And it seems to come and go with kernel releases, which is why I view them with caution. It behaved unreliably with hibernation under Windows in a very similar way, plus of course over the last few years we've had Spectre and Meltdown, where low-level fixes got rushed in and developers couldn't afford to focus on niceties as much.

The behaviour matches this -- https://bugs.freedesktop.org/show_bug.cgi?id=58679

In 2012 Poettering was coming out with the kind of dickishness he's infamous for, refusing to acknowledge that systemd shouldn't be preventing the user from choosing what to send to /sys/power/disk (that's why it provides options) and that kernel hardware feature detection isn't a universal panacea. At the time there was apparently no way to not use 'platform' mode with it, which relies on a PC's power management features to provide more functionality than the basic 'shutdown' mode.

Since then, fortunately, systemd has indeed gained config for /sys/power/disk options; https://manpages.debian.org/stretch/systemd/systemd-sleep.conf.5.en.html

/etc/systemd/sleep.conf.d/hiber.conf

[Sleep]
HibernateMode=shutdown
HybridSleepMode=shutdown

systemctl daemon-reload

I'm not going to hold my breath that this will fix things once and for all, as there just seems to be something about this hardware -- and I don't particularly want to take the risk of updating the BIOS if it isn't the last release Lenovo issued for the M92p -- but it's behaved the last few hibernations whereas before (after a recent kernel upgrade) it'd again reached the point of only successfully not rebooting and immediately thawing soon after boot.

And now a grab bag of useful bits and snippets...

A nice feature of kdocker under Xfce is that you can take a window off the Window Buttons panel plugin, eg keeping a browser or media player open on a second monitor (I'm trying MPV) and avoiding accidentally minimising it. If you do choose MPV you probably want to add the keep-open parameter when launching it;

mpv --keep-open=yes --player-operation-mode=pseudo-gui -- %U

To mux video and audio (eg a YouTube 1080p video-only stream and separate audio):

ffmpeg -i video.mp4 -i audio.m4a -vcodec copy -acodec copy output.mp4

To mount an ISO manually:

sudo mkdir /mnt/image
sudo mount -o loop image.iso /mnt/image
sudo umount /mnt/image

To remove EXIF information from a folder of JPEG images:

for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done

To mount shared folders in VirtualBox you need to add your account to the 'vboxsf' group:
https://askubuntu.com/questions/30396/error-mounting-virtualbox-shared-folders-in-an-ubuntu-guest

sudo usermod -a -G vboxsf [account]

To create NTFS TrueCrypt volumes:
http://techiebraindump.blogspot.com/2009/05/creating-truecrypt-ntfs-disk-that-works.html

truecrypt -t -c /dev/[dev ID or partition] (create the encrypted volume taking default options and choose "None" for the file system)
truecrypt -t --filesystem=none /dev/[dev ID or partition] (mount the volume)
sudo mkfs.ntfs -f -L NewLabel /dev/mapper/[truecrypt mount name] (format the volume as ntfs)

I'll leave you with a bit of news you may have missed...

Microsoft is choosing Chromium as a browser base for Edge; https://github.com/MicrosoftEdge/MSEdge/blob/master/README.md

Google is testing the waters for adblock-blocking in Chrome, although it'll likely get smacked down by uproar; https://tech.slashdot.org/story/19/01/23/0048202/google-proposes-changes-to-chromium-browser-that-will-break-content-blocking-extensions-including-various-ad-blockers

And apparently Windows 10 is getting a "light" theme (i.e. alternative to the crap and visually uncomfortable light-on-dark taskbars/etc that have been forced on users so far);
https://www.techradar.com/uk/news/windows-10-april-2019-update-release-date-news-and-features

ADD COMMENT

Tags All Linux Tech Personal