Setting default user session in GDM (default != latest)

Throughout most of my linux life I have had two desktops installed: Gnome and Openbox. The first for most everyday uses, the second specifically to create a no-nonsense environment for games. Openbox just works better for a lot of wine as well as native inux games – less screen-, keyboard and ressources-hogging etc.

So when I log out of Openbox it’s in order toget back to business. GDM sees it differently: You’re always set to log into the last desktop you logged out of. This is just plain wrong. To set it right I found this Fedora forum post pretty helpful. Here’s how I put it to use to set a default desktop for my user, regardless of what I was last logged in to.

(more…)

Stackexchange Answers: Systemd and PIDs

Systemd tracks PIDs. This is kind of obvious but I never thought to investigate before today. These two commands have been and I suspect, will be, very useful:

journalctl _PID = 1234

Get info on anything logged by the process in question. Technically, I suppose (?) it shouldn’t tell you anything that systemctl -u whatever.service doesn’t but it helped me get the exact error that caused the service not to work. Thanks, Rahul Khimasia.

systemctl status 1234

How exactly does pulseaudio get started on your desktop? Simply use htop to find the PID and ask systemctl for a status on the it and you will get told what systemd unit is associated with it. session-27.scope, it seems. Didn’t even know there was such a thing as ‘scopes’. Thanks, larsks.

 

A Systemd service unit for Redshift

Redshift is a small utility that gradually – as day turns into night – shifts the colour composition of the light from your monitor. The later it gets, the ‘warmer’ (i.e. redder) the colour becomes. This may sound odd but the effect is really pleasant and (literally) easy on the eyes. Once you’ve grown used to it, looking at a screen late at night you’ll really notice how harsh and cold the light will appear without it. I owe this discovery to Graham Morrison from Linux Voice. You can read more about it in Graham’s piece on page 78 in the now free issue 14 of Linux Voice (you should also subscribe to LV as it’s a really good magazine).

Redshift is the sort of thing you want to have running as soon as you log into your desktop but occasionally, you want it to turn it off. I occasionally play Spelunky into the wee hours of the night and running redshift while playing the game makes dark levels, well dark. Pitch black, more like. So a classic Gnome autostart file is not ideal as we can’t interact with it (apart from killing the resulting process). Redshift does come with a small tray utility that should allow for turning on and off but I really dislike tray litter and anyway Gnome’s trying to do away with this sort of thing. So systemd to the rescue.

Sadly the redshift package in Ubuntu 16.04 comes without a systemd .service file so I put together one myself.

(more…)

Link

“How To Satisfy Debian Dependencies Without Installing The Stupid Package”

I paid for a mindmapping program a couple of years back as I found the open source options somewhat lacking. The program uses java and the provided .deb has a flexible dependency on java 5 or 6, oracle-or-open-take-your-pick but later version of java – like the openjdk-8-jre package I have on my system – fail to satisfy. Installing the .deb was easy – just tell dpkg to –ignore-depends, brush your hands and think ‘job well done’. And then the next apt-get upgrade fails because there’s a missing dependency. I don’t get the logic here: I can’t upgrade packages A and B because completely unrelated package C has unresolved dependencies? However, the issue was resolved with the help of the satisfyingly titled post “How To Satisfy Debian Dependencies Without Installing The Stupid Package”.  Go check it out.

How to get domain-specific user stylesheets in Epiphany

Epiphany isn’t really at the top of my browser list. I guess I should say ‘Web’ as it’s now called but a) nobody can google that and b) if you open the Gnome acitivities overview and type web you still get Firefox first (quick tip: type ‘epi’ and you’ll get it). Still, it has a nice interface that fits right into GNOME and it does come with basics amenities, like adblocking and a somewhat rudimentary user style sheet support.

Sadly, this is no Stylish replacement. You simply type rules in one after the other with no specification of where to apply them and where not to. So if you want to get rid of the #rightcolumn on site A but not the similarly named #rightcolumn on site B you’re out of luck. Well, you can of course jump through hoops, specifying site specific hierarchies and nesting.  Not exactly an nice solution. Here’s one I like better.

(more…)

These go to 11

The PulseAudio daemon has the ability to set it’s niceness level after launch. This can be helpful if the process isn’t prioritised properly and sound cuts out now and again. The man page states:

nice-level= The nice level to acquire for the daemon, if  high-priority is  enabled.  Note:  on  some  distributions  X11  uses -10 by default. Defaults to -11.

Which makes sense, right? It’s one more, right. It’s not ten, it’s eleven. If you need that extra push, put it up to eleven. So that it gets a little more priority than the default process.

Oh come on, Lennart, that has to be a Spinal Tap joke, right?