Tuesday, June 18, 2013

You wish to know which files/folders on your linux server are using up most space?

Sometimes when operating a server you recieve a warning that your disk space is almost used up. (Of course you need a monitoring system for this)
As usual, you don't know what your users are storing where and how much.

To identify the largest folders or files you can use this small command line:

du -a /var | sort -n -r | head -n 20

This shows you the 20 top files/folders under /var.

Of course you can also run it agains your root folder, it will then take somewhat longer to complete.
For more details look at this post.

Wednesday, March 20, 2013

Using old help files with windows 8 (and 7, vista)

When you need to use older software in windows 8 (or windows 7 and vista) then you probably have seen the message that the help file can not be opened.

This is because the old .hlp file format is no longer supported by microsoft.
The new help files are in html format which does not macht the old windows help system.

If you still need to open the old help files (otherwise you would probably not be here), then you can download and install the old winhelp application.

You can download it from the microsoft download center

Monday, March 4, 2013

Video encoding with Java

After some reasearch for a good performing java library to do different video conversions, we stumbled over many projects.

On closer inspection we found that most of them are old projects, with no one maintainig them any longer.

We finaly got to the jave project which did what we needed.
Unfortunally it is based on a old version of ffmpeg, which has some problems depending on the input/output formats used.

So we did upgrade the binaries, adapted the parsing code and added a few new features to the library.
After some time trying to contact the original author to push back the changes upstream, we descided to create a new project which is maintained by us.

We named this Jave2, to show the difference to the original jave probject.
The project is hosted on github, you can find it here.

Wednesday, February 20, 2013

Video encoding for Web

When you wish to publish your videos on your own homepage instead of hosting them on youtube, then there are several things to consider.

There exist a lot of tutorials, howtos and faq about this subject, but most are outdated or incomplete.

One of the best we have found is this Webpage: http://diveintohtml5.info/video.html#what-works
It explains what which browser expects and what is needed to get it working.

In short:

- Make a H.264+AAC+MP4 video for iOS and Safari
- Make a WebM video for almost all others, it's considered the future for web videos

Now you can put both files in a html5 video tag and it works almost on all devices.

One major problem is (of course, once more) IE 8 and older.
For these you have to use a flash player, which then plays the MP4 video
http://diveintohtml5.info/video.html#ie

When you convert your videos to MP4, then make sure to use baseline encoding, otherwise many (most?) players will only play the sound, but not the video (or not even the audio part of your video)

If you wish to convert the videos automatically from the commandline, then look for the ffmpeg package.
It might be worth to take one of the 1.x releases, instead of the onse bundled with your distribution, since many things got fixed, especially when it comes to H.264 videos

Thursday, December 20, 2012

Excel file open problem when iCloud 2.x is installed

Sometimes users get a error message when they try to open a .xlsx file with Excel 2007 oder 2010.
The error message is like
"Excel found unreadable content in 'xxxxxx.xlsx'. Do you want to restore the content of this file? ...."

or in german:

"Von Excel wurde unlesbarer Inhalt in 'xxx.xlsx' gefunden. Möchten Sie den Inhalt dieser Arbeitsmappe wiederherstellen?

The funny thing is:

- When you have excel closed and double click the .xlsx file in Explorer it opens without a problem
- Also when you open it via the recently used files

- But when you open it via the file menu of Excel then it shows that error
- And then all other open requests show the same problem, until you restart excel


The cause of this problem is Apple iCloud in Versions 2.x and up.
So you have to remove the iCloud 2.x stuff and the problem is solved.
You can use iCloud 1.x, this gives no problems, just make sure you disable autoupdate for that thing...

Just wondering what the hell apple is doing there at them moment I try to open a excel file....


Some references:

https://discussions.apple.com/thread/4508650?start=0&tstart=0
http://www.office-loesung.de/ftopic550332_0_0_asc.php


Wednesday, December 12, 2012

Starting SQL Anywhere 10.x on Ubuntu 12.04

Yes i know,

SQL Anyhwere 10 is out of the normal support cycle, so we won't get any new EBF for it.

Neverless we still have customers running SQL Anywhere on linux systems.
When you upgrade your Ubuntu 10.04 LTS to the 12.04 LTS version, then the database will no longer run.
On startup you will see a message telling you that there is not enough free memory available.

The cause is the switch from kernel 2.6.x to 3.x, which has some other memory handling.

You can find the original thread here in the sql aynwhere forum.

The simplest solution (beside upgrading to a new license of sql anywhere) is to start the database server with the architecture specified as kernel version 2.6.

Fortunally there is a tool which allows us to do this: setarch

So the command to start dbsrv10 looks like this:

setarch $(arch) --uname-2.6 /opt/sqlanywhere10/bin32/dbsrv10 @/opt/sqlanywhere10/databases.list

Tuesday, December 11, 2012

Linux and Bixolon BCD-1100

 A few years ago I posted a howto to enable a epson client display to be used with linux.


Now we wished to use bixolon client displays with out pos solution.
And as usually, they also don't know what anything beside windows is, so they don't offer drivers for linux.

The corresponding lsusb did show up this:

Bus 002 Device 004: ID 1504:0011

So the simple way to go is just use the same command as a few years back and enable the ftdi_sio module for the Bixolon displays too.
modprobe ftdi_sio vendor=0x1504 product=0x0011

Enables the bixolon display as the tty device in linux.

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
ATTR{idVendor}=="1504", ATTR{idProduct}=="0011", RUN+="/sbin/modprobe -q ftdi_sio vendor=0x1504 product=0x0011"

For a solutions also working with 3.12 and newer kernels, please read on here.