Howto fix: black screen / adjust brightness after resume (Linux)

In some computers with Intel graphics (maybe others as well), I’ve often come across this problem: when resuming from sleep (standby) mode, I can’t adjust the screen brightness. There is a very well known fix for this: to pass the “acpi_backlight=vendor” option to the kernel at boot. However, in my two last KDE installs, this workaround broke the wake up from standby, bringing up a stubborn black screen (no backlight).
I don’t know if this is KDE related, but I’ve experienced this issue with both Kubuntu 12.04 and Aptosid-KDE, whereas I didn’t with a parallel Ubuntu 12.04, all three of them in the same computer and same kernel versions. I was astonished to find out that both *buntu distributions behaved so differently in this matter, as I have always taken for granted that Ubuntu and Kubuntu were “synchronized”; but, apparently, developers in both *buntu branches don’t talk to each other. 🙂
So, after a lot of checking around files and packages, I finally came across the difference: the standard Ubuntu install includes a file which is not present in the Kubuntu version, and which doesn’t belong to any particular package; it’s just there: /etc/pm/sleep.d/20_wakeup. Ahd this is the file that has fixed (for me) the black screen after resume problem. Maybe it will also work for you, whatever your hardware and distribution is. The content of this file is as follows:
case “$1” in
#do nothing
echo 2 > /sys/class/backlight/toshiba/brightness
exit 1
exit 0
Hope this will help somebody out there. If you have any constructive contribution to this post, please feel free to add your comment.

Howto fix: Linux (Mint, Ubuntu) install from USB failure, drops to busybox.

More often than not, when trying to install several Linux distributions (or releases) via a USB stick created from the downloaded iso live or install image, I’ve experienced the frustration of being dropped to a busybox (which is the Linux way of not ending up in a Windows-like blue screen, but exactly as useless. Who on earth knows what to do in such cases with a busybox?)
After lots of googling and reading dozens of posts where people report the same problem and nobody offers any useful solution, I finally found a very easy workaround that, at least for me, fixes the problem: when booting off your created USB, at the first splash screen with the typical boot options, hit the Tab key for inserting kernel boot parametres and write the following one: LIVEMEDIA=/dev/sdb1. Then hit Enter. That’s it: many chances are that now your install USB will boot correctly.
Note: The Merry Ubuntu Crew say that this problem is because of a “buggy BIOS”, but I think that this is crap. My BIOS may or may not be buggy, I don’t know; but the fact is: other distributions’ USB sticks (Debian, Aptosid, Arch) boot perfectly in my machine; therefore, what other distros implement for being able to boot in “buggy BIOSes”, Ubuntu and Mint could also do. Why they don’t? It’s not that difficult.
I hope this post can help someone out there. If any constructive ideas, please feel free to comment below.

No icons in QT apps on Xfce

If you ever experience this problem: QT apps showing no icons in their menus when running in Xfce desktop, you can fix it issuing these commands on a console:
gconftool-2 –type boolean –set /desktop/gnome/interface/buttons_have_icons true
gconftool-2 –type boolean –set /desktop/gnome/interface/menus_have_icons true

How to login as root in Xfce

Log in as root in the Xfce environment is disabled by default. When I tried to google how to change this behaviour, I got lots of results, but useless, because though dozens of people had posted that same question in dozens of forums, they all got the same kind of reply: “Log in as root in graphics mode is dangerous. You shouldn’t do it, and certainly I won’t tell you how to.” Bullshit. That’s a hypocritical reply, as coming from someone who refuse to help others under the weak grounds that “it’s dangerous”. I can’t help thinking that those “gurus” are simply enjoying their power at knowing something they don’t want to share.
Fortunately, I was lucky to find out the answer by myself. Here’s how you can do it (I’m talking about the Linux Mint Xfce and the gdm3 session manager):
Open a terminal and, as root, edit the file /etc/pam.d/gdm3. Comment out the line that says: “auth required user != root quiet success”.
There you are! That simple. Now you can log in as root in an Xfce session.