2011-10-29

Desktop environments (Unity, GNOME 3 and no classic GNOME 2) in Ubuntu >= 11.10

In Ubuntu 11.04, it was possible by default to use Unity (which itself run on top of GNOME 2 core) or classic GNOME 2.32.1.

Unfortunately, Ubuntu 11.10 (and 12.04 LTS) comes with Unity shell as default desktop environment and doesn't have a classic GNOME option; instead of it, there's a Unity 2D option (in Ubuntu 11.10, Unity runs on top of GNOME 3.2 core components).

GNOME 3 itself is completely redesigned and doesn't look like "classic" GNOME 2; IMHO, it's not any better than Unity in functionality.

Linus Torvalds switched himself to Xfce because of GNOME 3 "improvements".
Eric Raymond (who had used Red Hat and Fedora in the past and switched to Ubuntu in 2007) strongly criticizes both GNOME 3 and Unity and plans to switch to Xfce too.

If you wish, you can try GNOME 3 Shell environment by installing it:
$ sudo apt-get install gnome-shell
At last, there is a "classic" fallback mode in GNOME 3; it also can be installed manually:
$ sudo apt-get install gnome-session-fallback
After that, you can log in selecting "GNOME Classic (no effects)" (or "GNOME Shell", or "Unity") at the login screen (I don't recommend you to choose "GNOME Classic" as it uses Compiz, in the buggy way).

One note about GNOME 3 "classic" fallback mode: to call a panel context menu, you should right-click on it holding the <Alt> key. This way you can add some "classic" applets (e. g., "Show Desktop" and "Workspace Switcher") and application launchers to top and bottom panels.
Indicator Applet is missing in Ubuntu 11.10; fortunately, it was ported to GNOME 3 and comes back in Precise (12.04 LTS); if you want it in Oneiric (11.10), you can follow that article: Indicator Applet Ported To GNOME 3

If you don't like Unity, you can (almost) painlessly uninstall it. Don't forget about removing some useless components (they are installed with Unity and continue to run even in your plain GNOME session) like:
  • overlay scrollbar (scrollbar overlayed widget);
  • BAMF (some "application matching service" used in Unity?);
  • Zeitgeist (background user actions logger and indexer).
If you don't like the default Ubuntu 11.10 login screen, just install another greeter:
$ sudo apt-get install lightdm-gtk-greeter
You can even remove LightDM and install the updated GDM 3 display manager (used in GNOME 3 by default).

If you don't have a Synaptic GUI package manager which is useful for package searching, installing and removing (IMHO, Ubuntu Software Center is too weak), you can install it manually:
$ sudo apt-get install synaptic
---
Updated (07.04.2012) to reflect Ubuntu 12.04 changes etc.

2011-09-23

Solaris 11 Express 2010.11 on Ultra 10 etc. -- not supported

Well, I've tried to test Oracle Solaris 11 Express 2010.11 (it's the resulting product of "closing" the OpenSolaris, not to mention an open source fork called OpenIndiana) on old Sun Ultra 10 workstation with 440 MHz UltraSPARC IIi CPU (64-bit), 512 MB of RAM, 20 GB IDE HDD (Seagate) and integrated PGX24 (ATI Rage, 4 MB RAM) video adapter.
  • CD-RW with burnt "text install" ISO was used as installation media (luckily, the built-in IDE CD-ROM made by LG can read CD-RW disks).
  • Text install procedure didn't show any serious problems, except the setup routine couldn't output the text correctly if non-standard screen resolution was selected and the install process was rather slow (nothing strange, the IDE subsystem of this computer is really slow).
  • The OS boots! Slowly. ZFS is definitely funny. And so the text mode is (kernel can't find a driver for the video buffer, but it's not really related to the lack of desktop environment). Console text editor called nano said it "doesn't know how to deal with your dumb terminal", but the mighty vi works.
  • It was a text install, so the graphical desktop environment is not installed by default. To get the GNOME, additional packages are needed to be installed from the repository.
  • For greater repository availablity, it was transferred into the local filesystem: it was copied through SSH in the form of DVD image, which was mounted and its contents copied (yeah, it's an ugly way, don't try this at home: http://www.oracle.com/technetwork/articles/servers-storage-admin/s11exrepositoriesalta-187967.pdf )))
  • The next step was to install (and then remove) the slim_install package, which depends on Xorg, GNOME and so on: http://blogs.oracle.com/stw/entry/getting_gdm_to_work_on
  • Really, it not helps, because X Server needs some drivers to work with the peripherals. OpenSolaris drivers for SPARC graphic cards can be downloaded here: http://hub.opensolaris.org/bin/view/downloads/sparc_graphics
  • Yes, they install, but complain there's no Xsun installed, and it's the main problem. After installation of the graphic card drivers and restarting the GNOME GDM login screen shows up, but the colors are distorted and keyboard with mouse are functioning non-adequately (some people confirm that: https://forums.oracle.com/forums/thread.jspa?threadID=2136250). Xsun was removed with no further support planned in Solaris 11 and Xorg provided in the repository has no SPARC graphics support. But you can try to hack it yourself and/or use remote X server.
  • Don't waste your time installing it on your Ultra 5, it's basically the same computer with some parameters reduced to fit in a pizzabox case.
  • At last, Oracle has simply stated that "legacy SPARC hardware" (UltraSPARC I, II, IIe, III, IIIi, III+, IV and IV+ processor architectures, as reported by the Solaris psrinfo -pv command) support has been removed from Solaris 11, only SPARC Enterprise M-series and T-series Servers will be supported; "legacy SPARC hardware" still will be supported by Solaris 10: http://www.oracle.com/technetwork/systems/end-of-notices/eonsolaris11-392732.html

Conclusion: the last version of Solaris that really supports 64-bit SPARC workstations is Solaris 10.

OpenWindows in Solaris 9 and Solaris 10

OpenWindows desktop environment was removed from Solaris 9 in favor of CDE (Common Desktop Environment). Some OpenWindows compatibility libraries are still present in the system, however.

IMHO, OpenWindows looks much more better than CDE :-)

Fortunately, there is a project that allows to have almost full OpenWindows environment in Solaris 9 and 10 (SPARC and x86). It's called OWAcomp (OpenWindows Augmented Compatibility Environment):
http://freshmeat.net/projects/OWacomp
http://step.polymtl.ca/~coyote/XView/index.php?path=OWacomp/

OpenWindows needs Display PostScript to work correctly, so if you want to use it in Solaris on x86 platform, you need to switch X server from Xorg to Xsun (use kdmconfig utility, /usr/openwin/bin/kdmconfig).

2011-09-21

Few notes about using Canon LBP CAPT laser printers in Linux / *nix

LBP means "laser beam printer" and CAPT does "Canon advanced printing technology".

CAPT devices are some kind of "Windows GDI [Graphics Device Interface] printers". All the RIP [Raster Image Processing] for these printers is done by the driver installed on the host computer, which allows the printer itself to stay relatively "dumb" and inexpensive. They use some proprietary / undocumented protocols called SCoA ("smart compression architecture") and HiSCoA ("high" version, probably) for data compression and communication.

The official Linux CAPT drivers are closed-source with some open-source parts. They support mainly RPM-based (like RHEL, Fedora and openSUSE) and DEB-based (like Debian and Ubuntu) Linux distributions.
CUPS carries out the standard PostScript print processing work, the rest is done by the CAPT driver part itself (and it has some bugs and limitations).
Some instructions about configuring the CAPT printers in Ubuntu can be found here:
Note. It's quite interesting that LBP-810 is unofficially supported by the LBP-1120 driver.

AFAIK, currently the most up-to-date version of official Linux CAPT driver is 2.71 (May 2017).
  1. Canon South & Southeast Asia ("Issue Number : 0100459601");
  2. Canon Australia support website ("Issue Number : 0100459602");
  3. Canon Europe support website (it's called "Download: 0100459604", but unfortunately I can't find a more specific generic direct link; please try to search using your printer model).
(Sometimes, some regional sites can have some delays in version release, so it's better to check multiple download links above).

Also, some projects do exist in attempt to develop alternative, free & open source Linux / *NIX drivers with some help of reverse engineering.
  1. Canon LBP-810 / LBP-1120 CAPT Linux driver (inactive; there's also a Canon LBP-660 / LBP-460 Linux driver there).
  2. Unofficial LBP-3010 CAPT3 Solaris driver at SourceForge (another inactive project).
  3. captdriver is a project somewhat inspired by the preceding ones; initially was aimed at LBP-2900, support planned for LBP-810 / LBP-1120 and newer printers like LBP-3000 etc.
    1. GitHub - agalakhov/captdriver: Driver for Canon CAPT printers
    2. GitHub - agalakhov/anticapt: CAPT reverse engineer scratch repo
    3. foo2capt [old versions at SourceForge]
    4. Canon LBP-2900 и другие CAPT-принтеры - ПИШУ ДРАЙВЕР [a discussion in Russian on the LINUX.ORG.RU forum]
---
Last updated: 2017-07-15

2011-08-29

Sun Ultra 5 / Ultra 10 RAM (memory upgrade notes)

The memory supported by Sun Ultra 5 / Ultra 10 is EDO DRAM, but there are some limitations...

Specifications:
  1. Voltage is 3.3 V.
  2. Form factor is 168-pin DIMM.
  3. RAM is ECC-enabled.
  4. RAM is buffered.
  5. Access latency is 50 ns or 60 ns (lesser means quicker, therefore better peformance).
  6. Refresh addressing size is 8K rows.
Quirks:
  • RAM must be installed in pairs of identical size, so there can be only 2 or 4 DIMMs in the system; 4 identical modules result in best performance.
  • When different speed (50 ns and 60 ns) DIMMs are mixed, the resulting memory speed is the worst one (60 ns), therefore it's not preferable to mix them.
  • OBP version >=3.25v3 and CPU speed >=360 MHz is needed to use 50 ns memory (particularly, made by Micron Technology). It's better to update your OBP firmware to the latest version (OpenBoot 3.31, Sun/Oracle patch-ID# 106121-18) before memory upgrade.
  • Do not use 16 MiB modules (they use 10-bit column addressing), as they cannot be mixed with any others (which use 11-bit column addressing). Therefore, you can safely use only 32, 64, 128 and 256 MiB DIMMs.
  • Ordinary 256 MiB memory modules are not supported in Ultra 5 because of their size (you can try to use some "low-profile" 256 MiB DIMMs which have reduced height; alternatively, you can try to fit the box casing of Ultra 5 for your needs).
  • Maximum memory module size for Ultra 10 is 256 MiB (the height of the DIMM doesn't matter there).
    Thus, the possible maximum of total RAM size in Sun Ultra 5 / 10 is 1 GiB (1024 MiB).
Be careful when buying memory modules; it's not necessary to choose only Sun-branded ones, but you should make sure it is a 8K refresh addressing EDO DRAM. Please read memory module & chip datasheets and check part numbers in advance, if you can. If you install "4K refresh" memory, it will seem to work, but the system will be able to use only a half of it (e. g., if you installed 4 x 256 MiB DIMMs, the system would show there's only 512 MiB of RAM available instead of 1 GiB).
For example, if you buy Micron Technology memory, you should probably choose MT*LD*72FG-* models ("F" is for 8K refresh). E. g.: MT36LD3272FG-5 X is a proper memory (256 MiB, EDO, 50 ns, 8K refresh) and MT36LD3272G-5 X is not (256 MiB, EDO, 50 ns, but 4K refresh).

Tested Sun-branded modules (to be updated)
Sun P/NModule specsModule manufacturerModule modelChip manufacturerChip model
370-3799-01256 MiB, 50 nsSamsungKMM372F3280CS1-5SamsungKM44V16004CS-5
370-3799-02M256 MiB, 50 nsMicronMT36LD3272FG-5 XMicronMT4LC16M4G3DJ-5 F

References:
  1. Ultra 10 memory issue - Nekochan Net
  2. Sun Ultra 10 RAM question(s) - Ars Technica OpenForum
  3. Memory - Ultra 5 / Ultra 10 (A21 / A22) - Sun System Handbook
  4. Micron datasheets ("MT9LD(T)872(F)X, MT18LD(T)1672(F)(D)X, MT36LD(T)3272(C)(F)X - 8, 16, 32 Meg x 72 Buffered DRAM DIMMs - Micron DRAM module datasheet" etc.)
  5. Samsung datasheets (misc.)
---
Last updated: 2017-01-17

HOWTO: change ext3 / ext4 file system reserved block count in Linux

By default, 5% of blocks in ext3 / ext4 filesystems (not sure about others) are reserved for emergency cases and can be used only by root user and privileged processes.
On big volumes the reserved space size can be enormous (e. g. 1000 GiB * 0.05 = 50 GiB).
Fortunately, this can be easily fixed.

First of all, issue one of the following commands (where /dev/sdb2 is your ext3/ext4 partition):
$ sudo dumpe2fs -h /dev/sdb2
or
$ sudo tune2fs -l /dev/sdb2
and check the "Reserved block count" and "Block size" parameters.
By default, "Block size" is 4096 bytes (or 4 KiB).

This can set reserved blocks to 1% (e. g. 10 GiB * 0.01 = 100 MiB):
$ sudo tune2fs -m 1 /dev/sdb2
Or you can set the total number of blocks (e. g. 100000 * 4096 = 409600000 or approx. less than 400 MiB):
$ sudo tune2fs -r 100000 /dev/sdb2
I think, reserve of 500 MiB is usually enough; you can even set the number of reserved blocks to 0 (zero), but it's not recommended.

References:
  1. http://www.lisnichenko.com/articles/ext3-file-system-overhead-disclosed-part-1.html

HOWTO: recovering Linux hibernate functionality after modification of the swap partition

If you change the swap partition and forget about adjusting some settings, your GNU/Linux system can lose its hibernate functionality (it will hibernate, but not resume correctly — you'll lose your hibernated session if you boot with your default system settings).
Here follows a quick solution (tested in Debian & Ubuntu).

Assume you've created a new swap partition and listed it in /etc/fstab:
user@machine:~$ cat /etc/fstab | grep swap
UUID=12345678-12ab-cd34-5678-445566778800    none    swap    sw    0    0
You can also get the swap partition UUID with blkid command:
user@machine:~$ sudo blkid | grep swap
[sudo] password for user:
/dev/sda8: UUID="12345678-12ab-cd34-5678-445566778800" TYPE="swap"
Then you need to check and modify resume file to match the UUID of swap partition.
user@machine:~$ cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=12345678-0000-0000-0000-123456789012
As you can see, the UUID of resume partition is not correct. You can edit that file with any text editor you like (gedit, nano, vi etc.), e. g.:
$ sudo nano /etc/initramfs-tools/conf.d/resume
or
$ sudoedit /etc/initramfs-tools/conf.d/resume
or
$ gksu gedit /etc/initramfs-tools/conf.d/resume
After all these manipulations, it's needed to update the initramfs image (it's usually stored in a file named like 'initrd.img'):
$ sudo update-initramfs -u
Folks say there is an alternative temporary solution based on applying a kernel option like resume=/dev/sda8 (where /dev/sda8 is a hibernate / swap partition), but usually there's no reason to do that (except the urgent manual restoring of the badly hibernated session, at the boot time).

References:
  1. https://help.ubuntu.com/community/UsingUUID