Batch extracting invoice images from an Agresso system ►

THIS IS THE LATEST ENTRY

2018-09-30Project Zebra: Let me know when you find out...

0 comments

Tags All Linux Tech Personal

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

At the time of writing the news is that Linux User & Developer has been canned by Future Publishing as of September's issue 196 with little or no warning given to staff. As the first Linux mag I picked up (I think; I did go through a phase of amassing paper back issues) with what was probably issue 171 in October 2016 (I distinctly remember the Mint feature anyway) it got me to pick up the other two monthlies (Linux Format and Linux Magazine) almost immediately after and felt as if it managed to have a distinct identity from those – although more in common with Linux Magazine in being aimed at slightly more experienced IT users (LM reminds me of Acorn User), whereas Linux Format is more newbie focused and has some of the irreverence of 80s/90s UK home computer gaming mags.

So it joins Ubuntu User (which didn't really have a distinct identity) and Linux Voice (which talked about community and principles as well as detailed software coverage) – those two folded into Linux Magazine, whereas I really doubt LU&D content will find a place with LXF.

Print magazines being such a struggle to publish and usually on a shoestring staff you can count on a few fingers, hopefully the other two are safe for now. I'm going to keep picking them up.

For instance, Linux Magazine had article on systemd GUIs and timers recently, which reminded me why I still bother to soak up knowledge with print publications.

Timers are essentially the equivalent of Windows scheduled tasks, a standard because of the wide distribution of systemd nowadays, and much more suited to non-server machines than cron (or indeed anacron) jobs – generally you want something to run at a particular time and if the machine isn't on, next time it is.

Not fancying KDE-oriented software bringing in a load of dependencies, I checked out Cockpit for viewing logs, timers, etc – which is all very nice in bringing together some diagnostic info but it doesn't seem to allow all aspects of timers (eg persistence) to be configured. I don't mind creating text config files, but you'd expect systemd to have a plethora of capable GUI applications available by now and not just for certain desktop environments.

I've slightly cut down and tweaked my mirror backup script so that it'll allow a grace period if the machine's just booted and hasn't yet mounted the correct drive;

And then creating the .timer and .service files was a bit finicky because the examples I ran into tended not to be launching GUI applications from scripts. I assume the following may not play nicely in a multi-user environment, but as I'm not using one I haven't really checked;

/etc/systemd/system/admech_backup.service

/etc/systemd/system/admech_backup.timer

Enable the backup script service timer with: sudo systemctl enable admech_backup.timer

Then restart and do a "systemctl list-timers -all" to check things. Don't 'enable' the .service file unless you want it to run every time the system starts from scratch as well.

Oddly LXF has just run an issue focusing on "Hottest Distros" that basically ignores the big ones such as Mint, Fedora, Ubuntu, Debian, Slack, etc and spends eight pages with small sidebars mentioning niche or zeitgeist-y distros (the only one I've been tempted to look at being Manjaro, an Arch-based rolling distro packaged for less expert users) and articles on how to build your own.

For the average user, Mint is still probably the best choice – the stability and flexibility of Ubuntu with plenty of polish for the user experience whichever desktop environment you pick and all very welcoming to Windows users. And I wouldn't switch from Xubuntu because I like Xfce more than desktop environments such as Gnome or KDE and still don't really see Mate, Cinnamon, Budgie etc as differentiating themselves. But frankly there isn't a great deal of difference – people will still be using the same software with them, like Firefox, Chrome/Chromium, VLC, LibreOffice and maybe a few Windows apps with Wine or in a virtual machine.

Mint also now bundles this -- https://itsfoss.com/backup-restore-linux-timeshift/

Timeshift only saves snapshots to Linux file systems, but can save to the existing system partition if you just want something akin to Windows restore points. It takes up about as much space as you currently use for your installation plus space for incremental snapshots, but storage is pretty cheap if you aren't using an SSD and it offers another roll of the dice to undo a borked package install or opportunity to boot from a live CD and restore known good files from eg yesterday or last boot.

Someone put out a call for scans of original comic art recently, and not wanting to take it into work to A3 scan I thought "ooh, a change to try out Hugin on its native platform to stitch the A4 scans together". But despite finding control points perfectly and following http://hugin.sourceforge.net/tutorials/scans/en.shtml and the slightly more recent https://www.davidrevoy.com/article314/autostiching-scan-with-hugin it always failed to position the images or added barrel distortion to at least one of the three. The interface is totally geared towards photos, which is frustrating because as a solution it's obviously already mostly there.

So I went back to tried and tested methods, which in this case involve an old Windows application, actually published by Microsoft's research arm, called Image Composite Editor (ICE) and which I installed with CrossOver. Version 2 onwards apparently includes ads, so I started with the last version for XP (1.44) but even with the prerequisite .Net 2.0 this didn't successfully install. It seems to be the installer itself that isn't supported and I suspect it might be possible to extract files from the .msi file if you're feeling adventurous. For the record, version 2 didn't install either.

However, 1.2 (the version I remember best, which dates to around 2009) does and apparently Wine has supported it for a long time too, I was just using CrossOver for convenience –

https://appdb.winehq.org/objectManager.php?sClass=version&iId=15983

You can probably still find a copy with the filename "SetupICE_x86_1.2.msi" (about 3Mb) – eg https://ulozto.net/!U1m4M9o4/setupice-x86-1-2-msi at the time of writing – but as always with this sort of thing be sure to check the file over with VirusTotal or similar – https://www.virustotal.com/#/file/5dd1fd10bed9bf501f778db16af363722cb0e33c0fb49fc1beb06c62651ddccf/details

(And as a reminder to myself, the .desktop file goes in ~/.local/share/applications)

I couldn't find a copy of "SetupICE_x64_1.2.msi" but I'm not sure it matters – the application is designed for large images and watching memory usage appears to do most of the work from disk.

Having acquired my images with Simple Scan I tidied them up with XnView. Provided you've pre-cropped your images with sufficient overlap you won't need to change any settings in ICE (Planar Motion 1 is fine for scans) apart from choosing an output format. When cropping also try to avoid retaining shading gradients from where the page may not have been in full contact with the scanner glass, as it'll likewise help creating a smooth join.

Whether you're giving Hugin a go or another application I suggest trialing on downsampled images first (the full size images I'd got, even on a venerable CanoScan LiDE 35 were 2400dpi and about a gigabyte of images per page as compressed PNG files). I'm using a modest build PC with 8Gb RAM and an i5, which doesn't lend itself to experimenting with settings, and although brilliant on automatic ICE (certainly the version I'm using) isn't fast either. It works fine and dandy with full size images if you're patient, though, with beautifully seamless results.

(ScanTailor might be an alternative, and is something I've used for text with a handful of illustrations in the past, but needing something reliable the above was second choice after Hugin).

Still on Windows software, because Microsoft can't be bothered to support concurrent installation of different versions of its browsers you can get throwaway (i.e. 90 day trial) Windows images for testing purposes from; https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

And unrelatedly, how to get Windows in VirtualBox to recognise your satnav on a USB connection;

1) Download Vbox extensions to match your virtualbox install eg https://download.virtualbox.org/virtualbox/5.2.10/ 2) sudo usermod -a -G vboxusers then either log out and back in or reboot

New subject… it hadn't happened in a while but VLC froze x.org again the other day, again leaving the pointer moving but requiring Ctrl+Alt+F to get to a terminal and reboot.

Previously I'd tried turning off hardware acceleration off for the entire system, which was a non-starter, and I'd assumed that doing the same for VLC might be likewise, but it seems a recommended troubleshooting step;

https://unix.stackexchange.com/questions/402437/prevent-system-freezes-when-opening-certain-files-in-vlc-on-linux-system https://hobo.house/2018/05/18/fix-for-intel-i915-gpu-freeze-on-recent-linux-kernels/

So, I tested with "vlc --avcodec-hw none" and, according to the terminal output, this prevents "Using Intel i965 driver for Intel(R) Ivybridge Desktop - 2.1.0 for hardware decoding" – we'll see how it goes, having now turned off hardware accelerated decoding in the preferences dialogue. VLC still manages to display 1080p video with only slightly more CPU usage, and handles 2160p on one file I had with that resolution with about 50% CPU usage, then maxes out the processor on 4K. That's rarely going to be an issue – 4K is a waste of storage when the monitor is only 1080p.

Given that I recall occasional hangs on this machine under Windows playing video and I haven't had freezes on other systems, it might simply be a hardware tolerance issue that's only occasionally triggered by whatever the GPU and driver are doing. I like the ThinkCentre in general so I'd be loath to replace it any time soon.

Memo to self – I removed gnome-software, which kept bugging me about a specific driver update.

With Chrome/Chromium looking absolutely shite and harking back to XP now on all platforms (I hate rounded corners on anything not intended for kids) and all of the themes available effectively being broken, I've dropped back to GTK+ defaults.

I spent a little while experimenting with https://github.com/newhoa/victory-gtk-theme which looks pretty good with GTK3 apps. I can see it being a great base for a flat and square theme if I lose my appreciation for retro, but couldn't be bothered working out a scrollbar theme to match just yet.

And now on to various bits and pieces:

Downloading from Twitch –

After skipping past a lot of outdated info about livestreamer, I got it down to:

1) Install python if necessary, then pip install streamlink
2) streamlink -o file1.mp4 VIDEO_URL best
3) You can also use --hls-duration and/or --hls-offset-start for partial streams

Converting YouTube playlists to MP3 –

youtube-dl -x --audio-format mp3 PLAYLIST_URL

More general youtube-dl instructions from https://itsfoss.com/download-youtube-linux/

youtube-dl -cit PLAYLIST_URL
youtube-dl -cit VIDEO_URL_1 VIDEO_URL_2 etc

Remux to fix streams downloaded from m3u8/ts sources –

ffmpeg -i input.mp4 -codec copy output.mp4

Cropping MP3 files losslessly –

https://askubuntu.com/questions/27574/how-can-i-split-a-mp3-file

ffmpeg -i input.mp3 -vn -acodec copy -ss 00:00:00.000 -t 00:01:30.000 output.mp3

Updating via deb packages, such as with VirtualBox –

sudo dpkg -i path_to_package.deb
sudo apt-get install -f

Copy a DVD to an ISO –

dd if=/dev/sr0 of=file.iso

If you get a https://codeyarns.com/2014/01/16/truecrypt-is-already-running-error/

Delete ~/.TrueCrypt-lock-

Making Opera work with standard codecs –

https://forums.opera.com/topic/24299/plugin-path-in-the-home-directory-libffmpeg-so/8 https://www.archlinux.org/packages/community/x86_64/opera-ffmpeg-codecs/ Copy to /usr/lib/x86_64-linux-gnu/opera/lib_extra/libffmpeg.so

And to wrap up this entry with a bit on retro computing, a few months back I belatedly watched some Speccy anniversary stuff:

Micro Men: https://www.youtube.com/watch?v=XXBxV6-zamM

Chris Curry talks about Clive Sinclair, Sinclair Radionics and Acorn Computers:
https://www.youtube.com/watch?v=KrTmvqwpZF8

With all of the drama around the Vega+ indiegogo campaign – https://www.theregister.co.uk/2018/08/09/zx_spectrum_vega_plus_hands_on_review/ – I hadn't realised an earlier model without a screen was released circa 2015 and stocked by places like Argos – http://www.argos.co.uk/product/5054288 – and nicely authentic it looks too. Easier to get a cheap gamepad and run an emulator, of course, but it was clearly done with some love.

More recently the Beeb put a load of old programmes online re: the BBC Micro –

https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/

To be honest I don't know how watchable most of it would be; it's almost 40 years ago, the early days of home computing and TV presenting was very much still 1970s style, whereas the pace of technology exploded throughout the 90s with music going digital, graphics running from things barely better than the Spectrum to passable reproduction of photos, mobile phones and laptops, and the web before social media poisoned it.

ADD COMMENT

Tags All Linux Tech Personal