Friday, December 11, 2009

Screen for X11

Finally!!! I think I found a key application I've been searching for.... some time. Basically it is like GNU screen for X11 :)
Take a look at it: http://code.google.com/p/partiwm/wiki/xpra

It is also available in Ubuntu, just:

apt-get install xpra

From its description:
Xpra gives you "persistent remote applications" for X. That is, unlike normal X applications, applications run with xpra are "persistent" -- you can run them remotely, and they don't die if your connection does. You can detach them, and reattach them later -- even from another computer -- with no loss of state. And unlike VNC or RDP, xpra is for remote applications, not remote desktops -- individual applications show up as individual windows on your screen, managed by your window manager. They're not trapped in a box.

Thursday, December 10, 2009

Gnome Workspace Switcher and managing (moving) windows.

I have a dual-head setup (NVidia TwinView) where the second screen is an overhead projector. I would find it extremely useful if I could just drag windows using the Workspace Switcher between my screens. This would help a lot especially at times when the projector is blanked or switched off and I would like to move some windows to be projected when switched on/unblanked.

Beware... tadaaaaa...Since yesterday windows can be dragged not only to a different workspace (without altering their relative position) but also within the workspace. I made a modification to libwnck (the library which implements the pager and allows to manipulate windows) which implements this feature and submitted it upstream. I wonder if it is going to be committed to the next Gnome release or not... we'll see.

Anyway you you would like o use this functionality in Ubuntu 9.10 Karmic Koala, here is a link to my PPA: https://launchpad.net/~wojnicki/+archive/ppa

And if you want to compile libwnck by yourself you can find the appropriate patch at the feature request: https://bugzilla.gnome.org/show_bug.cgi?id=604207

Wednesday, November 4, 2009

Enabling laptop VGA output

The following commands enable VGA output (works presumably with any XOrg driver, tested with several ATI Radeon cards). It is especially useful if you want to make your laptop work with a projector connected with a damaged or long cable.
xrandr --newmode 1024x768N 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
xrandr --addmode VGA-0 1024x768N
xrandr --output LVDS --mode 1024x768
xrandr --output VGA-0 --mode 1024x768N
The first command adds a new 1024x768 (60Hz) video mode and names it: 1024x768N. The second command assigns the video mode to the VGA port (VGA-0). While the third and fourth commands switch the LCD display (LVDS) to 1024x768 mode and the VGA port to the newly created one respectively.

Monday, November 2, 2009

HP Photosmart C4280 Cartridge Problems

If you have an HP Photosmart C4280 Printer, HP might try to rob you… on ink cartridges. If the printer displays a message:
Print cartridge(s) missing or not detected.

It doesn't mean that! You might think that the cartridge is empty or damaged. You couldn't be more WRONG! It just means that HP wants YOU to BUY a NEW CARTRIDGE - but DON'T DO THAT! You cartridge is presumably fine!

Actually you can try to convince the printer that the cartridge is ok by entering the service mode. To do that press buttons in the following sequence:

  • Power and Cancel simultanously, then
  • Blue, Green, Gray buttons, in turn.

Congrats! You entered the service mode. Now you can read and edit some of the printer settings. Watch the LCD display, it should say sth like:

Support
PlxxFN0724AR

Now, the color buttons mean:

  • Blue: next
  • Gray: previous
  • Green: enter

Which allow you to browse the menu and options.

In order to cure your cartridge press Blue once. You will see Information Menu displayed. Enter the menu by pressing Green. Go to Pen supply, level of Ink (LOI) submenu by pressing 11 times Blue and enter it by pressing Green. Then you can see some ink levels on the display. At this point your job is done. Press Cancel 3 times – it will quit the service mode. And you will notice that the nasty message about the cartridge being missing is gone.

Putting it all together, to reset the message press:

  • Power and Cancel simultaneously,
  • Blue, Green, Gray, in turn,
  • Blue
  • Green
  • 11 times Blue
  • Green
  • 3 times cancel.

I found these service codes on the web and accidently i figured out that viewing the ink level resets the nasty message. The drawback is that you need to reset the printer pretty much every print job.

It's been about 400 pages since I reset the thing and the cartridge is still operational despite its ink levels being reported as nonexistant.

Compiling Ubuntu 9.10 (Karmic Koala) Kernel

If you want to compile an Ubuntu linux kernel don't:
  • use make-kpg
  • use make menuconfig
To get the kernel source issue:
apt-get source linux-source

It will download a TAR archive into your working directory. Untar the archive and cd into the directory with the kernel source.

Re/Configure the kernel by issuing:

debian.master/scripts/misc/kernelconfig editconfig

It will ask you to reconfigure all kernel flavours in turn. Reconfigure the flavour you want to alter, not changing the others.

In order to build your kernel (the generic flavour) issue:

CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 skipabi=true skipmodule=true debian/rules binary-generic

After a while you should see deb packages in the parent directory.

If you want to come up with your flavour take a look at: http://mmlinux.wordpress.com/2009/07/30/how-to-compile-kernel-in-karmic/