◄ Dipping into some popular Linux desktop environments
This entry is part of my Project Zebra series covering migration to Linux for personal computing use.
The day-to-day usage of a computer that doesn't involve setting up software -- and is generally about a browser or bits of email, and putting music on or watching "TV" -- is the same on more or less any platform, so it's getting to the point that my Xfce desktop, chosen text editor, etc. and even Thunar feel like home, apart from moments such as when I come to do something with tabular data and realise I've hardly used LibreOffice Calc. Writer, yes, but Calc not so much.
A lot of other software (VLC, FileZilla, Foobar, Calibre, Chrome, Thunderbird, Avidemux, etc) I was already using, and whilst some things such as the multi-platform variant of XnView are a bit different, or close substitutes like Pinta and qpdfview, I've already started to tidy up other things I don't use. Things such as Mines, qcomicbook, GIMP, MyPaint, DeaDBeeF, Clementine, grsync, PCManFM, Quod Libet, Ex Falso, Audacious, Ardour, XCFA, Phatch, Transmission, etc it makes little sense to keep updating, or querying repositories for, having tried them and moved on. A new entry is that I've added Mplayer as an alternative for the rare occasions VLC has issues with files.
As another specific one, I tried Entangle, which is able to control certain tethered digital cameras -- except that Canon stopped supporting remote capture with models from the start of 2009 onwards. I'd been hoping to use a Powershot A495, and whilst I do have some older 'prosumer' cameras of theirs to try, it sucks that Canon now fail to provide basic and commonly requested functionality. I'm unlikely now to consider buying more of their stuff in future.
Moving on to tweaks, I'd already set the default zoom in VLC to 1:2, so I wanted a keyboard shortcut to force a convenient size on my 1680x1050 display, making windows take up most of the screen but not so much that they're overpowering. One tool that can do this is wmctrl, and bearing in mind that I use a theme with quite wide window borders this gives a perfect size:
wmctrl -r :ACTIVE: -e 0,132,0,1400,860
I've bound it to F1 as I don't think I've ever knowingly used it as a 'help' shortcut.
Of course, this wasn't the only "setting up" I ended up doing, carrying out a little research to smooth over niggles and inconsistencies I'd noted in my patchwork desktop environment.
Since applications are increasingly making a move from GTK2 to GTK3 I thought I should try tinkering with the latter's love-it-or-hate-it scrollbar config with a view to doing two things, making clicking above or below the scrollbar scroll a page rather than to an exact location and styling the scrollbars so that they have arrow buttons and square sliders.
http://askubuntu.com/questions/295988/how-to-fix-gtk3-scrollbar-behavior
http://askubuntu.com/questions/200938/question-about-gtkscrollbar-class-in-custom-themes/201063
The relative rather than absolute scroll is simply adding to ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-primary-button-warps-slider = false
For some appropriate styling I poached my base CSS from the gtk.css file included with the Numix theme after extracting it from the gresource file using the instructions at http://askubuntu.com/questions/572511/how-do-i-open-a-gresource-file/654819
Adding the following in ~/.config/gtk-3.0/gtk.css fits with my theme, but you could easily adapt:
* { -GtkScrollbar-has-backward-stepper: 1; -GtkScrollbar-has-forward-stepper: 1; -GtkRange-slider-width: 15; -GtkRange-stepper-size: 25; } scrollbar { background-color: #F0F0ED; border: 1px solid #CDCDC9; } scrollbar slider { border: 3px solid transparent; border-radius: 0; padding: 2px; background-color: #B4B4B0; } scrollbar slider:hover, scrollbar slider:hover:active, scrollbar.fine-tune slider:active { background-color: #909090; } scrollbar slider:disabled { background-color: transparent; } scrollbar.horizontal slider { min-width: 40px; } scrollbar.vertical slider { min-height: 40px; } scrollbar button { border-radius: 0; background-color: #F0F0ED; color: #707070; } scrollbar button:hover, scrollbar button:active, scrollbar button:checked { color: #000000; background-color: #B4B4B0; } scrollbar.vertical button.down { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); } scrollbar.vertical button.up { -gtk-icon-source: -gtk-icontheme("pan-up-symbolic"); } scrollbar.horizontal button.down { -gtk-icon-source: -gtk-icontheme("pan-right-symbolic"); } scrollbar.horizontal button.up { -gtk-icon-source: -gtk-icontheme("pan-left-symbolic"); }
Xfce 4.14 is likely to move to GTK3 as a standard rather than GTK2 so tweaking will become more necessary for traditionalists, but there might be a decent GUI for it by then, whereas at the moment most of the desktop environment is focused towards the older standard.
Jumping to another niggle, now that I've got Foobar2000 running I'd noticed that locking halts music playback. This is basically because LightDM provides a user session switcher rather than just locking the session of the currently logged in user, and for the fairly sensible reason that if one user could monopolise the audio output device it'd prevent other user accounts from accessing it. There's a bit more background here:
http://xubuntu.org/news/screen-locking-in-xubuntu-14-04/
https://wiki.ubuntu.com/Audio/TheAudioGroup?highlight=%28audio%29
On a single user system the workaround is simple, just ignore best practice and monopolise away by adding yourself to the 'audio' group with:
sudo adduser putyournamehere audio
Whilst looking into LightDM stuff I also went searching for a way to screenshot my setup, which is most easily achieved by elevating to root and running a few commands in a shell script:
http://monksblog-malspa.blogspot.co.uk/2015/09/screenshot-of-lightdm-login-screen.html
#!/bin/bash
chvt 7; sleep 5s; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 xwd -root -out ~/screenshot.xwd; convert ~/screenshot.xwd ~/screenshot.png; rm ~/screenshot.xwd
Then log out, Ctrl+Alt+F1 to switch to console, su, ./screenshot.sh
That's not quite http://warhammer40k.wikia.com/wiki/Imperial_Dating_System but 0 0%y 0%W.M3 is similar.
Whilst you're at the command prompt you may need to set a password for su (since Xubuntu doesn't activate the account by default) and that's just a "sudo passwd" command. And you'll probably want "gksudo thunar" or similar elevation afterwards to retrieve the image from /root.
Incidentally, my Grub screen is based on this -- http://light-tricks.deviantart.com/art/Adeptus-Mechanicus-Cogitator-Interface-Animation-296510737 -- and as a minor side comment, if you've jumped to the console using Ctrl-Alt-F1 (something guides quite often have you do) you can usually switch back using Ctrl-Alt-F7.
For completeness, in Xfce screen locking timeout is quick-configured via xfce-power-manager in Settings (I think it was part of the Xubuntu default install, but early on in setting up the system I compiled a more recent version to get a different taskbar icon for my UPS). You've also got a default keyboard shortcut of Ctrl+Alt+Del, and I've got an extra one set up to xflock4 for Win+L.
And as a last tweak this month, preventing GTK from helpfully keeping track of "recent files":
https://alexcabal.com/disabling-gnomes-recently-used-file-list-the-better-way/
~/.config/gtk-3.0/settings.ini
[Settings]
gtk-recent-files-max-age=0
gtk-recent-files-limit=0
~/.gtkrc-2.0
gtk-recent-files-max-age=0
Don't forget to get rid of an existing ~/.local/share/recently-used.xbel if present.