Author Archive for Chris

SSH tricks

Waseem Daher of Ksplice posted some interesting SSH trick on his blog recently. Most of them are old-hat, but one in particular was interesting to me – SSH’s escape key (tilde). This lets you send commands to the SSH session itself, like backgrounding the session.

chris@localhost ~ $
chris@localhost ~ $ ~?
Supported escape sequences:
~. - terminate connection (and any multiplexed sessions)
~B - send a BREAK to the remote system
~C - open a command line
~R - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~# - list forwarded connections
~& - background ssh (when waiting for connections to terminate)
~? - this message
~~ - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

Neat.

Browse remote shares in non-GVFS aware apps

GNOME uses a virtual file system to mount remote shares, like Samba and NFS. The shares appear in any GNOME-based GVFS aware application (and those that use Nautilus as the file chooser), but with others like Thunderbird they do not. Someone on the Fedora list recently needed to attach a file from a remote share, but couldn’t.

I then discovered (thanks to a knowledgeable responder) that you can browse to these shares directly (no need to manually mount them) via the hidden .gvfs directory in your home, which means that if you access them no-matter what program you’re using (yes, even KDE apps), i.e.

/home/chris/.gvfs/GVFSShareName/path/to/your/file

Very handy!

OpenSolaris is dead

A few months ago I wrote an article, claiming that Oracle would kill OpenSolaris. Many readers weren’t happy with my take on the issue, claiming Oracle would do nothing but continue to support OpenSolaris and that I should just get over myself. While the latter is probably true, Oracle has finally announced that it has indeed killed OpenSolaris (also confirmed by an Oracle employee).

Oracle had already stopped nightly builds of the operating system and they have now confirmed that there will simply be no future releases:

We will not release any other binary distributions, such as nightly or bi-weekly builds of Solaris binaries, or an OpenSolaris 2010.05 or later distribution.

They are now going to instead focus on a binary distribution, called Solaris 11 Express under a free developer RTU license.

Even if a fork of Solaris like Illumos was to go ahead, I’m not sure how well it would work out given the following:

We will no longer distribute source code for the entirety of the Solaris operating system in real-time while it is developed, on a nightly basis.

Oracle will be holding back on the code, and you can guarantee they won’t like any competing products.

Are we surprised? I’m not. The signs were obviously there and they had done similar things to other products, like the once free ODF plugin for Microsoft Office, which you now have to pay a license for.

Oracle didn’t buy Sun to give away money, but it’s clear they don’t understand free software. Solaris was already dead, but Sun helped to pro-long its life by open sourcing it. Now that Oracle has un-done much of that hard work, they too will die, if they don’t see the errors of their ways.

-c

Google should just BUY Oracle

Stupid Oracle. They’ve just gone and sued Google over their use of Java.

An Oracle spokesperson said in a statement:

In developing Android, Google knowingly, directly, and repeatedly infringed Oracle’s Java-related intellectual property. This lawsuit seeks appropriate remedies for their infringement.

I guess it’s mostly over Dalvik, Google’s Java Virtual Machine, rather than using Java itself. We’ll see.
Update: It’s much more than Dalvik! It even goes to the core of basic computing like initializing variables. There’s a copy of the complaint on scribd.

If you were all wondering how Oracle would treat its new open source acquisitions, now you know. OpenSolaris is all but dead and they’re “suing over Java” (whatever that really means). Perfect fodder for the pro-Microsoft .NET camp, no doubt.

If only Sun had put Java under the freakin’ GPLv3 in the first place, we could avoid mess like this.

In actuality, Google should utilise the Tridge defence and show that they simply do not infringe those patents. Where they might be, work around them. Problem solved, case thrown out.

Nominate for Packt Open Source Awards

Packt Pub (technical publishing company with lots of great books) has been running a competition for five years now, promoting and rewarding the best of open source in a number of categories (with a prize pool of $24,000). I’ve been a judge for them for a few years too (although this year I’m just too busy).

It’s coming up again this year, so if you’re keen, jump on over to the site before September 17th and nominate your favourite free software project!

-c

Linux newbie friend starts blog

A friend of mine who is still relatively new to Linux has started his own blog, to document some of his experiences and discoveries. He’s primarily a technical writer and tester, but I think that he might have some worthwhile things to say from a technical Linux newbie’s perspective. At the very least, it’s a great way for him to document things he wants to recall in the future!

Good luck Allan :-)

-c

Firefox default print DPI fix

Firefox on my Dad’s machine always wants to print to 300 DPI by default. He can manually change it, but it’s annoying. Other browsers pick up the printer default of 600 DPI and are happy, but not Firefox. He posted a bug on Launchpad for it and then afterwards I found a fix for it upstream in Mozilla’s Bugzilla.

It’s as simple as:

As user, open a shell and enter:
lpoptions -o Resolution=600dpi

This will add a default resolution to ~/.cups/lpoptions

My ~/.cups/lpoptions contains:
Default IP4200 Resolution=600dpi

So anyone who has the same issue, here’s the work around.

Samsung R480 laptop LCD brightness

Mendy got a Samsung R480 laptop but screen brightness did not work properly. Using KDE’s brightness slider caused the screen to flicker horribly and once you let go, it’s too dark. GNOME’s just doesn’t work at all.

After a suspend and resume with the Nouveau driver, the slider works properly, but only goes to half brightness at the maximum setting. It was possible to set the brightness manually via:
echo -n 60 > /proc/acpi/video/NVID/LCD/brightness

That was not suitable. So I switched to the NVIDIA driver, but the laptop brightness was immutable until I discovered a post with the solution. Simply adding the following to the Device section in /etc/X11/xorg.conf lets KDE control the brightness correctly, and perfectly. Great!
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
Option "RegistryDwords" "EnableBrightnessControl=1"
Option "UseEdidDpi" "false"
Option "DPI" "96 x 96"
EndSection

I also added the DPI option above to get 96×96 as some text was too large after switching to the NVIDIA driver. Fedora still suspends and resumes and everything is just perfect!

Eclipse eGit push bug – SOLVED

After upgrading to Helios and therefore eGit 0.8.4, I could no-longer push to git repos using pre-configured remotes. Adding the same remote manually at time of push works, but is annoying. This is a known bug and is fixed in the code, but won’t be pushed out for the current 0.8 series (for some reason). The bug report has a simple work-around which fixes the problem. Simply edit your repo’s .git/config file and copy the url line and change it to pushurl – problem solved.

Update: Thanks to J Bruni’s comment, if you have a pushurl but not a url entry, do the reverse of above – copy pushurl and rename to url.

Ubuntu Lucid USB 3G modem issue solved

I fix the problems which arise with every Ubuntu release (and in between) for a friend at work whom I’ve put onto Linux. This upgrade to Lucid has meant a number of issues *yawn* but the most annoying was that plugging in his Huawei E220 USB 3G modem was only sometimes detected (every other time it’s just a USB CD and USB memory stick). It was working perfectly on Karmic and on Jaunty (with some hackery) before that.

The solution was rather simple in the end, just load both usbserial and option kernel modules on boot (add to /etc/modules). The kernel will then switch from CD-ROM and detect ttyUSB modem correctly. If you’re having problems with your device not working, try this.

-c