Saturday, November 28, 2009

Synology network backup - how is it implemented?

There's a "Backup to remote rsync-compatible server" option in the Synology Disk Station 2.2 firmware. Question is - how to really use it and how is it implemented? How about security and accounts? Can anyone use the rsyncd? Those are some questions for start...

Once you enable the "Network backup service", one more share is created in the "Shared folders" --- there's a NetBackup share now. You can also use the GUI to modify access to the folder based on uid/gid. As there is the option to "use rsync compatible remote server" let's look around for the rsyncd cfg files on the DiskStation (via terminal access).

There's an /etc/rsyncd.conf and /etc/rsyncd.secrets. The rsyncd.secrets lists root with a password hash, the configuration file lists NetBackup rsync module with root user allowed to login. There's a rsync process running as a daemon on the station.

The default setup of the station therefore only allows root user to connect via the normal rsync remote method (no ssh) to the NetBackup module. No data encryption, MD4 based challange-response authentication and the GUI settings aren't reflected in the configuration files --- they only alter the filesystem permissions.

This is ok for a closed network setup --- but questionable on an open network.

Monday, September 7, 2009

JabRef settings

To get JabRef generate keys as ijrb80_251, that is "lower case abbreviation of the journal name, volume and first page of the publication", set Key pattern to [journal:abbr:lower][volume]_[firstpage].

Friday, August 21, 2009

DVD authoring under Linux

The goal was to make a DVD from short videos captured on two digital cameras and some pictures. Although it's rather easy to do today, the tools available still do have some rough edges.

System used: Ubuntu 9.04 with the Ubuntu Studio extensions on x86_64 platform.

General steps to do were:
  1. Get videos from camera to computer
  2. Cut out the right parts, working losslessly
  3. Convert the parts into a MPEG2 DVD compatible files
  4. Create parts with titles, texts, image slideshows
  5. Create DVD menu and burn the whole thing.
Getting the source videos
One camera directly generated MPEG2 files on its internal SD card.
The second one had a Firewire DV output. This can be handled using Kino easily, it was only necessary to load raw1394 module and adapt permissions of /dev/raw1394. The output, saved as AVI was then already viewable in Totem.

Cutting out the right parts
I used Kino, otherwise Cinellera or kdenlive are very helpful.

Getting DVD-style MPEG2 files
Video DVD content is split into files - "Titles" and those can have bookmarks, called "chapters". To get one file per title it was necessary to deinterlace and convert the DV AVI files into MPEG2-PS, deinterlace the MPEG2 files from the other camera and join them. In this case I didn't care about transitions between the joined files.
I used tovid for deinterlacing and doing the conversion. Only problem is that the conversion is painfully slow (several hours on my hardware).

tovid -force -deinterlace -dvd -pal -wide -parallel -in $INFILE -noask -out $OUTFILE

The -force was to make tovid deinterlace the MPEG2 files from the SD-card camera.
Resulting .mpg files can be joined using mencoder easily:

mencoder -of mpeg -ovc copy -oac copy -mpegopts format=dvd:tsaf -o $OUTFILE $SOURCEDIR/*.mpg

Titles
There was need to get just some still slides with text. The most convenient way for me was to generate the stills in inkscape - 720x576 bitmaps with text,, graphics, whatever you need, and then convert them to the MPEG2 using dvd-slideshow.

DVD Menus
There are several programs available, DVDStyler seemed most versatile. Only bad thing for me was that the buttons it renders have aliased fonts and look very ugly. As a workaround I described the menu items as normal text and used a simple arrow image as cursor/selector.

Of course, once you compile the whole thing, you find that you are some 100 MB over limit :-) But that can be expected...

Monday, August 10, 2009

Travelling in Poland with a dog

This is a short summary of what I think might be useful if you plan to travel with a dog to Poland - we just got back after walking some days along the north coast.

All following bans have to be interpreted in context - it depends on the situation and the dog whether they will be enforced or just silently ignored.

General notes
The dog has to be kept on leash (na smyczi) everywhere unless specially permitted. Mostly respected, especially in cities. But if the dog is friendly, people usually don't say anything. Some breeds are considere aggressive (officially), those have stricter rules.

On the coast we've me mostly german shephard dogs, yorkshires and golden retrievers. From time to time there was a pit bull terrier - with a muzzle and on a short leash.

Transport
There are two main transport companies - PKP trains and PKS busses, then there are multiple local bus companies. We had no experience of dog not being accepted. Unless you travel in a crowded busses it is usually even ok without the muzzle/kaganiec. Often the dog is silently ignored by the driver (no need of ticket) in busses.

We've been told by Polish people that we can just travel without the dog ticket even in trains, but we haven't tried that. In trains the dog pay either 4 zloty or 15 zloty (EC/IC), in busses they travel free or pay like children.

If you plan to travel in a couchette or sleeping wagon, you have to (in theory) buy the whole coupe, that is six places for a couchette or three for a sleeping car.

Beaches/Coast
On guarded beaches the dogs are allowed only to pass through not to stay there and they should have a muzzle and be on a leash. On wild beaches it's ok just to keep them on the leash. In reality there are dogs everywhere, even on guarded beaches and it's just on a common sense to keep or not to keep them on the leash when outside the guarded beaches. As long as you keep it under control and it does not endanger somebodys children it's usually ok. People and children mostly interact well with the dogs, fairly often the children run to the dog to hug it.

In Slowinski National Park the dogs are strictly forbidden on the beaches. In reality you can argue that there a trail on the beach - so you can walk there. We discussed this with the guards and they just asked us to leave the beach on the first exit. Possible reason for this ban are foki/seals that sometimes come here - the dogs will disturb them.

Food
There are shops with things for animals in every small city and it's sometimes possible to buy raw meat. Fish is available everywhere along the coast. People generally do ask you before feeding your dog with something.

Shops/restaurants
Mostly no dogs allowed.

Wednesday, June 17, 2009

cp866 in dosemu

Before I forget this - to get a cp866 xdos terminal (dosemu) in Ubuntu, setting following in /etc/dosemu.conf helps:

$_external_char_set = "cp866"
$_internal_char_set = "cp866"
$_layout = "us"
$_X_font="-dosemu-vga-medium-r-normal--17-160-75-75-c-80-ibm-cp866"

The first two are non-important probably, layout solves (?) some issues with TRIOL and keyboard and the last one is the important one.

Friday, April 17, 2009

Glut on OpenSolaris

One possible solution seems to be to use freeglut and the GCC development cluster. One has to install X client headers as well.

Tuesday, February 24, 2009

Sansa Fuze surprises (both bad and good)

After some time reading reviews and comments I decided to try a Sansa Fuze player. I was looking for a player capable of MP3, OGG and WMA, with display large enough to browse and select tracks comfortably, stable firmware and acceptable sound. Given price constraints, this let to Fuze + microSDHC card. Although most cons and pros were clear from the reviews and comments, some were not. So a subjective summary follows. The experience is based on a Sansa Fuze player firmware 1.01.22, 2 GB version + card.

The bright side:
  • The click-wheel is easy to use and precise, UI is simple and logical.
  • The on-card and in-memory albums are integrated seamlessly in one library (good).
  • MicroSDHC expandability
  • OGG and FLAC support.
The dark side:
  • The cover attracts dust a lot, microSD slot and the docking connector are non-covered.
  • Proprietary docking connector (no miniUSB like in Creative Zen).
  • The front/display cover is very prone to scratches (no competion to glass)
  • Only one playlist created on the device (?), more via connected computer
  • Charging while playing is possible, but requires disconnecting USB data pins (see below)
  • Radio stations are only labeled by frequency (can live with that :-))
  • Equalizer only works for MP3, not for radio.
  • Video and photo support are there, but due to the screen size the usability is pretty limited.
To charge while playing, USB data connection must not be established. So you can either use an external USB charger or disconnect USB data pins. Latter option means for example to put a piece of paper there to block the two pins in the center. Using a powered hub with no computer connected made the player either freeze or poweroff upon disconnection.

If no further surprises emerge, it's better then I expected.

Wednesday, January 7, 2009

Considering on-line backup

Considering S3 for on-line storage/backup, I'm looking around for tools to do that (or competitive non-S3 solutions).

Interesting blogs/places related to the topic:
John Eberly - using s3fs and rsync. Should lead to UNIX-portable solution.

Encrypted offsite backup with EncFS, Amazon S3, and s3cmd - AES encrypted data (via encfs) are synced to S3 using s3cmd.

Non-S3 solutions that seem interesting so far:
Jungledisk - maps S3 bucket as disc, 30 day eval, $20 per license (any computer sharing the same S3 bucket). Crossplatform.
Mozy
2.2 GB free, no transfer cost, Windows only, 5$/month unlimited backup.
Block-level upload/diff. No versioning, no web access in the basic version.
Carbonite - 15-day trial. $50/year (e.g. $4.2/month). Windows only client, Mac Beta. No versioning.
DropBox - versioned cached network folder, 2 GB free, 50 GB $10/month or $100/year. Crossplatform clients + web interface. Data are stored both locally and on the server, multiple machines are synchronized.

More general S3-based tools (crossplatform/UNIX):
s3fs - S3 plugin for FUSE, there is a commercial version on subcloud
s3cmd - command line scriptable application for copy/get/make bucket against s3 (GPL)
Js3stream - Java app usable as filter to store/retrieve a stream to/from s3.
s3browser - Windows NET 2.0 freeware GUI for S3 bucket management
Jets3t - Java toolkit for S3. Did not test.
Sync2S3 - Windows based sort-of-rsync (?) tool. 30 USD per license.
S3 Firefox Organizer extension- Firefox extension in a commander-like style. What about encryption?

Tools to get S3 as Windows drive:
s3drive - freeware, proprietary, NET 2.0