Do you use FireFox as your webbrowser and use it on different computers ?
Then probably you also have the problem that the history, booksmarks and saved passwords are not the same on all systems.
Since a few month there is a reliable solutions to this problem:
Mozilla Weave (Also available directly via Add-On page)
It's a firefox add on which keeps your settings in sync between as many systems as you want.
Just install the add on and then create a Weave account and all your settings are synched to the mozilla weave server. (Don't worry, privacy is granted and data is encrypted, or, if you are paranoid, you can even install your own weave server)
On the second system, just install the add on and enter your credentials and then select if you wish to merge or replace the settings from teh server.
That's it. I have been using it since version 0.5 and since version 0.9 it's realy stable and very usefull.
Actully I sync 4 Installations with weave:
1. The computer at work
2. The laptop at home running ubuntu
3. The same laptop at home running (once a month) Windows 7
4. The Desktop at home (most of the time used by my children)
And weave just works as it should.
Saturday, March 13, 2010
Tuesday, March 9, 2010
Linux and epson DM-D110 Display
In a project we had to switch over from a Windows XP based environment to a Linux based Pos system.
All components did work just fine (almost out of the box).
The main problem was the LineDisplay used to display the information to the clients.
It is a Epson DM-D110 with USB interface.
There is no linux driver available for that device from epson :(
So the lsusb command did show this:
Bus 003 Device 003: ID 1208:0780
Ok, no driver loaded for that usb device. I did google arround, but did only find a reference in the openbravo project, about using the usbserial module for that device.
We did some tests, but where not able to get it working.
After some more googling and looking at the windows drivers we did find out, that the chipset was in fact a ftdi with customized vendor and device id.
So after some trial and error we got it working by loading the ftdi kernel module for that device.
modprobe ftdi_sio vendor=0x1208 product=0x0780
This did create a /dev/ttyUSB0 which we then could use to communicate with the device.
To automate the module loading on plug events, just create a new file in /etc/udev/rules.d
File: 50-udev-default.rules
SYSFS{idProduct}=="0780", SYSFS{idVendor}=="1208", RUN+="/sbin/modprobe -q ftdi_sio product=0x0780 vendor=0x1208"
This website has some more info on this:
http://www-user.tu-chemnitz.de/~sontag/sprog.html
For a solutions also working with 3.12 and newer kernels, please read on here.
All components did work just fine (almost out of the box).
The main problem was the LineDisplay used to display the information to the clients.
It is a Epson DM-D110 with USB interface.
There is no linux driver available for that device from epson :(
So the lsusb command did show this:
Bus 003 Device 003: ID 1208:0780
Ok, no driver loaded for that usb device. I did google arround, but did only find a reference in the openbravo project, about using the usbserial module for that device.
We did some tests, but where not able to get it working.
After some more googling and looking at the windows drivers we did find out, that the chipset was in fact a ftdi with customized vendor and device id.
So after some trial and error we got it working by loading the ftdi kernel module for that device.
modprobe ftdi_sio vendor=0x1208 product=0x0780
This did create a /dev/ttyUSB0 which we then could use to communicate with the device.
To automate the module loading on plug events, just create a new file in /etc/udev/rules.d
File: 50-udev-default.rules
SYSFS{idProduct}=="0780", SYSFS{idVendor}=="1208", RUN+="/sbin/modprobe -q ftdi_sio product=0x0780 vendor=0x1208"
This website has some more info on this:
http://www-user.tu-chemnitz.de/~sontag/sprog.html
For a solutions also working with 3.12 and newer kernels, please read on here.
Tuesday, March 2, 2010
Storing binary stuff in database with tomcat
When storing binary data in a database, usually you do the following:
PreparedStatement pStmt= conn.prepareStatement("insert into FileData (FileData, BinData) values (?,?)");
pStmt.setString(1, fileDataID);
pStmt.setBinaryStream(2, fInfo.getInputStream(), fInfo.getSize());
pStmt.executeUpdate();
That works fine, but sometimes you can get this error when using it
with tomcat connection pooling:
java.lang.AbstractMethodError: org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setBinaryStream(ILjava/io/InputStream;J)V
The reason for this is, that you passed the last parameter as a long, instead of a int.
This is the fix for it:
PreparedStatement pStmt= conn.prepareStatement("insert into FileData (FileData, BinData) values (?,?)");
pStmt.setString(1, fileDataID);
pStmt.setBinaryStream(2, fInfo.getInputStream(), (int)fInfo.getSize());
pStmt.executeUpdate();
Took half a day to figure out the problem.
PreparedStatement pStmt= conn.prepareStatement("insert into FileData (FileData, BinData) values (?,?)");
pStmt.setString(1, fileDataID);
pStmt.setBinaryStream(2, fInfo.getInputStream(), fInfo.getSize());
pStmt.executeUpdate();
That works fine, but sometimes you can get this error when using it
with tomcat connection pooling:
java.lang.AbstractMethodError: org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setBinaryStream(ILjava/io/InputStream;J)V
The reason for this is, that you passed the last parameter as a long, instead of a int.
This is the fix for it:
PreparedStatement pStmt= conn.prepareStatement("insert into FileData (FileData, BinData) values (?,?)");
pStmt.setString(1, fileDataID);
pStmt.setBinaryStream(2, fInfo.getInputStream(), (int)fInfo.getSize());
pStmt.executeUpdate();
Took half a day to figure out the problem.
Wednesday, February 24, 2010
Amazone MS Licencing deal
Strange news have been published recently:
News entry on information week
In short:
A company, using Linux systems/technologies pays some unknown license fees for "perhaps" patent violations, even MS not being able to prove anything...
So they probably just wish to prevent some treats from the big player in this business.
In other environments such stuff would be called "Protection racket", paying to prevent being harmed by the "stronger" player on the market.
With no proofs, no clear win for the one how pays....
News entry on information week
In short:
A company, using Linux systems/technologies pays some unknown license fees for "perhaps" patent violations, even MS not being able to prove anything...
So they probably just wish to prevent some treats from the big player in this business.
In other environments such stuff would be called "Protection racket", paying to prevent being harmed by the "stronger" player on the market.
With no proofs, no clear win for the one how pays....
Thursday, February 18, 2010
Windows 7 and Samba
Yet another post on the Windows 7 & SAMBA subject:
To be able to join Windows 7 stations into a Samba controlled domain you must do the following steps:
- Make sure you have samba version 3.3.4
We also did try with 3.3.9 and 3.4.3 but have not been able to get it working in our environment....
- In the registry of the windows 7 system change these settings
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
"requiresignorseal"=dword:00000000
"requirestrongkey"=dword:00000000
You should now be able to join the domain and login as well.
To be able to join Windows 7 stations into a Samba controlled domain you must do the following steps:
- Make sure you have samba version 3.3.4
We also did try with 3.3.9 and 3.4.3 but have not been able to get it working in our environment....
- In the registry of the windows 7 system change these settings
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters]
"DomainCompatibilityMode"=dword:00000001
"DNSNameResolutionRequired"=dword:00000000
"requiresignorseal"=dword:00000000
"requirestrongkey"=dword:00000000
You should now be able to join the domain and login as well.
Open Word, Excel und PDF documents with wine
Normally you don't install (ms|open)-office under wine.
You rather have the full openoffice directly installed under linux.
To allow windows apps to open the files with the native openoffice applications you can do the following:
- Create a registry file containing your associations per application
For example
REGEDIT4
[HKEY_CLASSES_ROOT\.doc]
@="docfile"
[HKEY_CLASSES_ROOT\docfile\shell\open\command]
@="c:\\ooffice.exe %1"
[HKEY_CLASSES_ROOT\.xls]
@="xlsfile"
[HKEY_CLASSES_ROOT\xlsfile\shell\open\command]
@="c:\\ooffice.exe %1"
[HKEY_CLASSES_ROOT\.pdf]
@="pdffile"
[HKEY_CLASSES_ROOT\pdffile\shell\open\command]
@="c:\\pdfreader.exe %1"
Then import this with regedit.exe
Now create the helper applications under C:\ of your wine installation.
For example: ooffice.exe (Make sure it is executable chmod a+x ooffice.exe)
!/bin/sh
ooffice "`winepath -u "$*"`"
or for pdf:
#!/bin/sh
acroread "`winepath -u "$*"`"
What happens:
1. In the registry you tell windows what app to start for the corresponding file type
2. In the helper file ooffice.exe you start the native linux application
The helper application winpath converts a windows path into the corresponding linux path
You rather have the full openoffice directly installed under linux.
To allow windows apps to open the files with the native openoffice applications you can do the following:
- Create a registry file containing your associations per application
For example
REGEDIT4
[HKEY_CLASSES_ROOT\.doc]
@="docfile"
[HKEY_CLASSES_ROOT\docfile\shell\open\command]
@="c:\\ooffice.exe %1"
[HKEY_CLASSES_ROOT\.xls]
@="xlsfile"
[HKEY_CLASSES_ROOT\xlsfile\shell\open\command]
@="c:\\ooffice.exe %1"
[HKEY_CLASSES_ROOT\.pdf]
@="pdffile"
[HKEY_CLASSES_ROOT\pdffile\shell\open\command]
@="c:\\pdfreader.exe %1"
Then import this with regedit.exe
Now create the helper applications under C:\ of your wine installation.
For example: ooffice.exe (Make sure it is executable chmod a+x ooffice.exe)
!/bin/sh
ooffice "`winepath -u "$*"`"
or for pdf:
#!/bin/sh
acroread "`winepath -u "$*"`"
What happens:
1. In the registry you tell windows what app to start for the corresponding file type
2. In the helper file ooffice.exe you start the native linux application
The helper application winpath converts a windows path into the corresponding linux path
Tuesday, February 16, 2010
More printing with freenx
Ok, so now we got remote printing working with freenx
What had to be done:
- Disable (or remove) apparmor from the server
- In the /usr/lib/nx/nxnode script, we did force cups=1 (Arround line 1096)
No idea why cups is not set, but once it's set we can print from gnome applications.
What had to be done:
- Disable (or remove) apparmor from the server
- In the /usr/lib/nx/nxnode script, we did force cups=1 (Arround line 1096)
No idea why cups is not set, but once it's set we can print from gnome applications.
Subscribe to:
Posts (Atom)