Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, December 25, 2012

Lexmark S305 on Ubuntu 11.04 and 12.04 - fixing the packages

My parent's S305 Lexmark printer was sitting unused in the 1.5 years since it had been purchased.

Yes it was compatible with Linux claimed the box, but the installation scripts we had were not working with our Ubuntu 11.04 computer.

Thanks to an update in Lexmark packages, I finally might have something that works.

A year ago, the printer was malfunctionning. Oh yes, you could download the packages from Lexmark's site (lexmark-inkjet-legacy-wJRE-1.0-1.i386.deb.sh), but first you had to edit the installer, and even then the printer was not working on our Ubuntu 1104 computer. The lexmark programs were either crashing, being unresponsive, or going 100%CPU. In the best case, half of the page was printed.

I gave it a last try today, before returning it to the shop (we re patient here).

I found out that Lexmark had new packages, downloaded them (lexmark-inkjet-legacy-1.0-1.i386.deb  lexmark-printer-utility-1.0-2.i386.deb  lexmark-scan-legacy-1.1-1.i386.deb), and installed them (dpkg -i lexmark*.deb)

Alas, the printer utility installer is broken:
Installing %%JARVIS_VENDOR_PREFIX%%hcp backend ...
cp: impossible d'évaluer «/usr/local/lexmark/printer_utility/bin/%%JARVIS_VENDOR_PREFIX%%hcp»: Aucun fichier ou dossier de ce type

You can fix the installer using this script. To install it, run this from the directory where you have downloaded the debs.

wget https://gist.github.com/raw/4374626/e946d2a3ad2e24657ddd32a84f31927970773745/fix_lexmark.sh
chmod +x fix_lexmark.sh
./fix_lexmark.sh
dpkg -i build/lexmark-printer-utility_1.0-1_i386.deb

You will notice that the new package is one revision below the original, that's because the DEBIAN/control in lexmark-printer-utility_1.0-2_i386.deb was invalid I guess...

Now from the first time the printers installs and prints without crashing. Unfortunately my black ink dried, and I get garbage out, but it does exactly the same from my Mac, so I guess it works now. Update as soon as we change the ink...

Lexmark, you still have work to do to claim you support Linux. The quality of those Ubuntu packages is crap.

Sunday, December 12, 2010

Intellij issues on Ubuntu 64 bits with encrypted /home

Kept running into strange index issues with my Intellij 9 and 10 installations. The system/log/idea.log file was filled with:


java.lang.RuntimeException: java.lang.IllegalArgumentException: can't position buffer to offset 43716
at com.intellij.util.io.PersistentEnumerator.valueOf(PersistentEnumerator.java:499)
at com.intellij.util.io.StringRef.getString(StringRef.java:48)
at com.intellij.util.io.StringRef.toString(StringRef.java:92)
[..]
Caused by: java.lang.IllegalArgumentException: can't position buffer to offset 43716
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:181)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:127)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
[..]


or

java.lang.IndexOutOfBoundsException: off=1006632960 key.owner.length()=17582
at com.intellij.util.io.PagedFileStorage$StorageLock$BuffersCache.createValue(PagedFileStorage.java:66)
at com.intellij.util.io.PagedFileStorage$MyCache.get(PagedFileStorage.java:329)
at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:280)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:176)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:127)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
at com.intellij.util.io.PersistentEnumerator.hashCodeOf(PersistentEnumerator.java:479)
at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:328)
at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:222)


I seem to have fixed the issue by moving the IDEA config and caches into a non encrypted partition.

$ diff -u /usr/local/lib/idea/bin/idea.properties.orig /usr/local/lib/idea/bin/idea.properties
--- /usr/local/lib/idea/bin/idea.properties.orig 2010-12-10 15:50:01.916136005 +0100
+++ /usr/local/lib/idea/bin/idea.properties 2010-12-10 15:50:44.096136000 +0100
@@ -10,13 +10,13 @@
# Note for Windows users: please make sure you're using forward slashes. I.e. c:/idea/system

# path to IDEA config folder. Make sure you're using forward slashes
-idea.config.path=${user.home}/.IntelliJIdea10/config
+idea.config.path=/usr/local/${user.home}/.IntelliJIdea10/config

# path to IDEA system folder. Make sure you're using forward slashes
-idea.system.path=${user.home}/.IntelliJIdea10/system
+idea.system.path=/usr/local/${user.home}/.IntelliJIdea10/system

# path to user installed plugins folder. Make sure you're using forward slashes
-idea.plugins.path=${user.home}/.IntelliJIdea10/config/plugins
+idea.plugins.path=/usr/local/${user.home}/.IntelliJIdea10/config/plugins

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDEA should provide code assistance for.


See also http://devnet.jetbrains.net/docs/DOC-181 and http://devnet.jetbrains.net/message/5259840.

Wednesday, February 3, 2010

A glimpse of the workflow around the Linux stable tree

Found this small fun to watch. Notice how using scripts and aliases can make things quite fast.

Reminds me when I was using quilt to manage extra patches on top of cruisecontrol (about 6 years ago...).

Saturday, December 5, 2009

Skandiabanken with chromium

Now that basic SSL certificate support has been committed, it is possible to get Skandiabanken to work on Chromium Linux. It lacks a UI. Here are the steps I followed to get it to work.

Tuesday, October 27, 2009

Tips: extra contextual shell information for multiple environments

On my desktop, I often work on multiple projects at the same time and I am a fan of command line and terminals.

These projects have different environments (e.g. java 1.5 and maven 2.2.1 on one, java 1.6 and maven 2.0.9 on the other one).

In order to have information about the projects quickly available, I display some version information in the terminal title.



Monday, October 12, 2009

Synchronize firefox and chrome profiles passwords

I have been using chromium more and more on Linux. But all my passwords are saved in Firefox profile. So I wrote 2 tools to help me deal with my use of both chromium and firefox. One to dump firefox passwords, one to merge the dump into chromium's profile. Seems to work in my very limited test...

Thursday, May 7, 2009

Temporarily using a different python version on Debian/Ubuntu

On my Ubuntu 9.04 box, python 2.4, 2.5 and 2.6 are installed. 2.6 is used by default. repo, the android git wrapper script requires python 2.5. If you use 2.6, you get the following nasty error:

/home/jerome/Code/OSS/android/.repo/repo/codereview/proto_client.py:19: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Traceback (most recent call last):
File "/home/jerome/Code/OSS/android/.repo/repo/main.py", line 34, in
from manifest import Manifest
File "/home/jerome/Code/OSS/android/.repo/repo/manifest.py", line 21, in
from project import Project, MetaProject, R_HEADS
File "/home/jerome/Code/OSS/android/.repo/repo/project.py", line 27, in
from gerrit_upload import UploadBundle
File "/home/jerome/Code/OSS/android/.repo/repo/gerrit_upload.py", line 21, in
from codereview.proto_client import HttpRpc, Proxy
File "/home/jerome/Code/OSS/android/.repo/repo/codereview/proto_client.py", line 31, in
from need_retry_pb2 import RetryRequestLaterResponse;
File "/home/jerome/Code/OSS/android/.repo/repo/codereview/need_retry_pb2.py", line 9, in
from froofle.protobuf import descriptor_pb2
File "/home/jerome/Code/OSS/android/.repo/repo/froofle/protobuf/descriptor_pb2.py", line 879, in
class FileDescriptorSet(message.Message):
File "/home/jerome/Code/OSS/android/.repo/repo/froofle/protobuf/reflection.py", line 155, in __init__
superclass.__init__(cls, name, bases, dictionary)
TypeError: Error when calling the metaclass bases
type.__init__() takes 1 or 3 arguments

As I don't want to change the default python version, and until Google comes with a proper repo script, I used the following ugly trick:


ln -s /usr/bin/python2.5 python
export PATH=`pwd`:$PATH


If someone has a better idea, let me know.