And there's a Linux version with GUI add well, check it out: f.lux for Linux. This is great especially for people working on a computer and suffering from insomnia or e.g. if you have a work room without windows (glass filled frames that is).
Showing posts with label software. Show all posts
Showing posts with label software. Show all posts
F.lux adjusts your display to the sun's color and brightness
Cropping (Scanned) PDF Pages, e.g. double pages into single pages
If you have a PDF document and want to crop it, e.g. because you have too large borders and/or it is skewed or there are actually two pages in each page, this software may help.
Briss comes in Java and is good for cropping and deskewing pages: http://briss.sourceforge.net/. This works fully automatically for single pages and is very nice. As it's written in Java, it works on Mac, Windows and Linux just the same. I will keep this for all my image pdf cropping needs. To split double pages I would first deskew and crop automatically in the first run and then save. That file I recommend to use for a second run and there crop the pages into two parts manually.
Unpaper (http://unpaper.berlios.de/) is a CLI tool for the job, which supports double pages, which briss doesn't yet seem to support. But it requires the PDFs to be split into .pbm , .pgm or .ppm first.
e.g. convert ./unpaper -l double -s a5 00000001.pgm 00000001a.pgm. But in my experience it didn't work at all...
And this helps for OCR: http://blog.konradvoelkel.de/2010/01/linux-ocr-and-pdf-problem-solved/
Enjoy!
Briss comes in Java and is good for cropping and deskewing pages: http://briss.sourceforge.net/. This works fully automatically for single pages and is very nice. As it's written in Java, it works on Mac, Windows and Linux just the same. I will keep this for all my image pdf cropping needs. To split double pages I would first deskew and crop automatically in the first run and then save. That file I recommend to use for a second run and there crop the pages into two parts manually.
Unpaper (http://unpaper.berlios.de/) is a CLI tool for the job, which supports double pages, which briss doesn't yet seem to support. But it requires the PDFs to be split into .pbm , .pgm or .ppm first.
e.g. convert ./unpaper -l double -s a5 00000001.pgm 00000001a.pgm. But in my experience it didn't work at all...
And this helps for OCR: http://blog.konradvoelkel.de/2010/01/linux-ocr-and-pdf-problem-solved/
Enjoy!
How to (Re-)Compress PDFs with Images for Free
I'll show you how to compress PDFs including their images for free using LibreOffice/OpenOffice.
Guess the Size of an Lrzip Archive of all Linux Kernel Sources Since 1.0
I've reported before about the efficiency of Lrzip. Now Con did a useful and fun thing: He created an lrzip archive of all the sources of all 2.6 linux kernels. And guess how much space it took? Update: Guess how big an archive of *all* Linux sources since 1.0 is.
A few hints:
- All sources in a tar are 10.3 GB.
- The 2.6.39.1 kernel is 73 MB as a tar.bz2 archive.
- Now it would be less, because the first kernel was smaller (just 32 MB).
- So taking the average (73+32=105/2=52.5) times 39 would be just 2GB (compressed!).
- 19,617,064,960 bytes linux-1.0-2.6.39.tar
- 11,067,473,920 bytes linux-2.6.0-2.6.39.tar
- ( 2,000,000,000 bytes linux-2.6.0-2.6.39.tar.bz) estimate
- 1,535,618,848 bytes linux-2.6.0-2.6.39.tar.xz 13.8%
With heavy, slow IO it took less than an hour to compress, and lrzip was more than twice as fast as xz.
Now that I gave you all these numbers let's see how much it really is... (make a guess an click the link)
A few hints:
- All sources in a tar are 10.3 GB.
- The 2.6.39.1 kernel is 73 MB as a tar.bz2 archive.
- Now it would be less, because the first kernel was smaller (just 32 MB).
- So taking the average (73+32=105/2=52.5) times 39 would be just 2GB (compressed!).
- 19,617,064,960 bytes linux-1.0-2.6.39.tar
- 11,067,473,920 bytes linux-2.6.0-2.6.39.tar
- ( 2,000,000,000 bytes linux-2.6.0-2.6.39.tar.bz) estimate
- 1,535,618,848 bytes linux-2.6.0-2.6.39.tar.xz 13.8%
With heavy, slow IO it took less than an hour to compress, and lrzip was more than twice as fast as xz.
Now that I gave you all these numbers let's see how much it really is... (make a guess an click the link)
Learn Flashcards Efficiently - Tips and How to get OpenCards Running in Linux - Slow Opening of Files in Openoffice and LibreOffice
OpenCards is a great, optimized memorizing software that ensures you need as little time as possible to learn your flashcards.
What you get
What you get
- As it's based on Openoffice, you can make full featured flash cards including diagrams, mind maps and everything else supported in Impress.
- Focus on learning. As it logs your progress and automatically schedules the next time to question you, you can learn without organizing what to learn when.
- The repetition schedule is based on modern psychological research. The Leitner system is "a widely used method to efficiently use flashcards that was proposed by the German science journalist Sebastian Leitner in the 1970s. It is a simple implementation of the principle of spaced repetition, where cards are reviewed at increasing interval." (Wikipedia)
Rzip - A new compression star is born
Remember when Bzip first came out and out-compressed Gzip\? Well, then came LZMA with another significant increase in compression ration a bit later. And then one of the authors of Samba, Andrew Tridgell, developed a new compression algorithm called Rzip. It compresses even more efficient, though it needs large amounts (may be 1 GB) of memory to do so. And now Con Kolivas, author of the great Desktop Latency patches including the BFS scheduler and the man who designed the current kernel scheduler (though another implementation of his design was used), took it to himself to further develop the rzip algorithm. And the results are quite promising: The linux kernel is compressed about 3 times as fast as with LZMA2 with just 2 percent difference in final size. I look forward to this going downstream into end-user desktop software.
Update: Con just commented with a link to more detailed and accurate lrzip statistics.
Update: Con just commented with a link to more detailed and accurate lrzip statistics.
Is the Linux Desktop getting slower and more bloated?
In his "failure of logic" post "K. Mandla" writes that the Linux Desktop is not getting faster even though all the hardware around it is getting faster, pointing to an article with the same argument 10 years ago. The ensueing discussion was much too abstract for my taste. ("Why are clouds?" "What clouds, where?") But if you split up the question you get answers:
Android and Fritz Box VoIP
The only app that worked well in my experience was CSIPSimple. And it was easily configured and feature-laden yet small (1.3 MB) and low-resource at the same time. I couldn't get sipdroid or others to run properly.
If you like this article, you might want to subscribe for more.
If you like this article, you might want to subscribe for more.
Learning with Android
Learning flash cards with your mobile phone would be great, especially when you're on your way e.g. to work or uni. With OpenCards, there is a great application for that on your Computer. And it's already written in Java (though Openoffice, which it requires, isn't). But then there's already a basic Openoffice Document reader for Android. And they are both Java based and Open Source. Now if only someone would combine the two to have it both working together, that'd be really great...
If you liked this article, you might want to subscribe for more.
If you liked this article, you might want to subscribe for more.
Which Software-Scaler Looks Best - Mencoder and FFmpeg settings
-There is an old but good test showing you all of mplayers software scalers and how they look in the same image, here. The numbers mean this, see the mplayer man page:
If you want to translate that into ffmpeg language, it looks like this:
Happy transcoding!
0 fast bilinear
1 bilinear
2 bicubic (gute Qualität) (Standard)
3 experimentell
4 nearest neighbour (schlechte Qualität)
5 area
6 luma bicubic / chroma bilinear
7 gauss
8 sincR
9 lanczos
10 natural bicubic spline
If you want to translate that into ffmpeg language, it looks like this:
fast_bilinearJust add on of the above to -sws_flags in ffmpeg.
bilinear
bicubic
experimental
neighbor
area
bicubic_bilinear
gauss
sinc
lanczos
Happy transcoding!
Introducing (native!) µTorrent for Linux
If you've ever looked into the various programs available to download via bittorrent, you will probably have discovered µtorrent. Back then it was probably already tiny and full-featured at the same time. It even had customizations to better run inside WINE. But it didn't run natively on Linux. Of course that made the very low resource bittorrent client much more resource hungry. Now this all changed. (Screenshots inside)
Syncronized Folders across Windows and Linux - (Cloud-)Free Encrypted Cross-Platform Synchronisation with Unison
I always wanted to sync a few folders of my system across all my computers. E.g. the my scripts directory, where I constantly fiddle with my scripts and create new ones, my documents I always want to be able to have and edit everywhere, etc. I would never know where the most current version is without bothersome comparison of the dates. I would have to check every file and then copy the newer one. But that's now history, thanks to unison and my sync scripts.
What you need
The biggest problem is that you need a Linux server somewhere that is best constantly running and connected. I sync all my files with an online server. This is not a big deal because with SSH the connection is securely encrypted. Also due to compression and the fact that files are only transferred once, sync is pretty fast even with an ADSL connection. Of course this won't work for slow dial up connections in combination with large files. But as long as there are only small changes in certain files, even dial up might work for you. A Linux server is not really needed, but makes the setup much easier, which is why that's what I demonstrate here. And of course if you only want to sync two computers with each other, then there's no need for a constantly active server. It should work with Mac as a client or even server, but I don't own one so I can't help with that.
Downloads
You can get your unison downloads for Mac, Windows here and for Linux here (Ubuntu binaries i386 for 9.10 and 10.04 and more in this ppa. I recommend version 2.40.16, read below for why.
For Windows you also need to get Putty Agent (Pagent), Putty Puttygen and Plink get them at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. For Linux you also need openssh-server ssh-agent, ssh-keygen (in the openssh-client package) and keychain. You need to setup a working ssh connection with public key authentication for this to work without your interaction in the background. See here how to do this.
Bugs in the past
At the time I found it, over a year ago, it was still pretty buggy. It couldn't handle unicode, special characters or Umlauts properly. Especially between different system you'd end up with two differently named versions of a file unless you restricted yourself to normal a-z characters - very annoying.
But recently new version has come out, which fixes the problem. Now unison is not only a tool to synchronize flawlessly across different systems, it's also faster and prettier "GUI" than older versions and it still synchronized across encrypted ssh connections if you want it to. In my view this makes it the perfect tool for my needs. I've set it up to synchronize my laptop and my netbook with each other and my server system over ssh.
How it works
It's blazingly fast by only copying those parts of the files that have changed. And it doesn't transfer any files to check this. It runs both on the server and the client and only transfers the dates and hash coddes of the files via a secure compressed ssh connection. You can find out more about unison at LinuxJournal.
The easiest setup and the one I will show here is a star topology setup. This means there are several client systems synchronizing with one server. It works because unison knows which files are newer. The great side effect is that you automatically have a distributed backup on all your systems - the server and all clients of all your files.
The script runs automatically every X minutes in the background via cron on Linux (completely invisible) and is called by the Windows Task Manager on Windows (almost invisible).
Important to know
You need to use exactly the same version on all system you deploy it. There are easy to install packages for Debian and Ubuntu and precompiled versions for Windows. I haven't worked with OS X version yet, but they should work as well. I use a Linux server, Windows on the server side should be possible to set up but it's going to be much more difficult. Setting up the client on Windows is already non-trivial.
As you don't modify the same file on both systems at the same time before a server sync, then there won't be any problems. If you do, unison will not sync them. You need to call unison by itself and it will prompt you to chose how to deal with the situation.
The Linux version uses the symlink feature of Linux to let you configure which folders to sync on the go. In Windows this won't work, so all your folders you want to sync need to be inside one parent folder. I know no way around this, though the unison config file might have a solution somewhere...
Sync script:
It checks and exits when the system is running on battery. To be able to work in the background, it uses ssh-agent. So you need to setup ssh key authentication.
Unison config in ~/.unison/sync.prf:
This is a sample config file. It follows all symlinks in the $HOME/sync folder to syncfolder on syncserver via ssh. The ignore section shows you how to exclude certain files from synchronization.
Windows Setup
This should already work just fine in Linux. Now let's turn to the Windows client.
The Window setup, as you will see, it much more "fun". There are several steps you need: Putty Agent (Pagent), Putty Puttygen and Plink (see above for links) and then a few bash scripts.
You need to copy your private ssh key from your linux box and convert it to putty's format with puttygen. Then copy it into a safe folder. I have it in the same folder as the Unison.exe. Then setup an ssh connection to your server with Putty that uses the key and save it to profile name unisonssh. Copy the following bash files to your unison folder and adjust the path names accordingly.
Putty Agent.bat:
SSH Connect.bat
Unison Sync.bat
Testing it
Now is a good chance to try everything works fine. Try creating a file one one system and see how after two syncs it magically appears on the other. Edit it there to see how the edits are transferred back to the first system.
Scheduling it
Once everything works you can schedule it to run regularly without you needing to do anything. In Linux, you should install keychain for this to work in scripts and then enter the following into your cron. (To edit your cron type crontab -e)
In Windows it's a tad more difficult again. The most difficult part of it all is to make it run in the background without annyoing you every 15 minutes or so. The following command looks a bit quirky, but that's the best I could do. Enter exactly this behind Execute: in the task scheduler.
And now - finally - enjoy great, free, in sync folders!
Another older, less detailed guide is available here and here. Thanks to the authors of Unison.
What you need
The biggest problem is that you need a Linux server somewhere that is best constantly running and connected. I sync all my files with an online server. This is not a big deal because with SSH the connection is securely encrypted. Also due to compression and the fact that files are only transferred once, sync is pretty fast even with an ADSL connection. Of course this won't work for slow dial up connections in combination with large files. But as long as there are only small changes in certain files, even dial up might work for you. A Linux server is not really needed, but makes the setup much easier, which is why that's what I demonstrate here. And of course if you only want to sync two computers with each other, then there's no need for a constantly active server. It should work with Mac as a client or even server, but I don't own one so I can't help with that.
Downloads
You can get your unison downloads for Mac, Windows here and for Linux here (Ubuntu binaries i386 for 9.10 and 10.04 and more in this ppa. I recommend version 2.40.16, read below for why.
For Windows you also need to get Putty Agent (Pagent), Putty Puttygen and Plink get them at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. For Linux you also need openssh-server ssh-agent, ssh-keygen (in the openssh-client package) and keychain. You need to setup a working ssh connection with public key authentication for this to work without your interaction in the background. See here how to do this.
Bugs in the past
At the time I found it, over a year ago, it was still pretty buggy. It couldn't handle unicode, special characters or Umlauts properly. Especially between different system you'd end up with two differently named versions of a file unless you restricted yourself to normal a-z characters - very annoying.
But recently new version has come out, which fixes the problem. Now unison is not only a tool to synchronize flawlessly across different systems, it's also faster and prettier "GUI" than older versions and it still synchronized across encrypted ssh connections if you want it to. In my view this makes it the perfect tool for my needs. I've set it up to synchronize my laptop and my netbook with each other and my server system over ssh.
How it works
It's blazingly fast by only copying those parts of the files that have changed. And it doesn't transfer any files to check this. It runs both on the server and the client and only transfers the dates and hash coddes of the files via a secure compressed ssh connection. You can find out more about unison at LinuxJournal.
The easiest setup and the one I will show here is a star topology setup. This means there are several client systems synchronizing with one server. It works because unison knows which files are newer. The great side effect is that you automatically have a distributed backup on all your systems - the server and all clients of all your files.
The script runs automatically every X minutes in the background via cron on Linux (completely invisible) and is called by the Windows Task Manager on Windows (almost invisible).
Important to know
You need to use exactly the same version on all system you deploy it. There are easy to install packages for Debian and Ubuntu and precompiled versions for Windows. I haven't worked with OS X version yet, but they should work as well. I use a Linux server, Windows on the server side should be possible to set up but it's going to be much more difficult. Setting up the client on Windows is already non-trivial.
As you don't modify the same file on both systems at the same time before a server sync, then there won't be any problems. If you do, unison will not sync them. You need to call unison by itself and it will prompt you to chose how to deal with the situation.
The Linux version uses the symlink feature of Linux to let you configure which folders to sync on the go. In Windows this won't work, so all your folders you want to sync need to be inside one parent folder. I know no way around this, though the unison config file might have a solution somewhere...
Sync script:
#!/bin/bash
LOG="tee -a $HOME/logs/mysync2.log"
source $HOME/scripts/functions $HOME/scripts/variables
main ()
{
echo Starting at $(date)
# exit if running on battery
grep on-line /proc/acpi/ac_adapter/*/state >> /dev/null
if [ ! $? ]; # 1 if not "on-line"
then
echo Running on battery. Leaving now...
exit 0;
else
echo Running on AC Adapter.
fi
# use ssh-agent
source $HOME/.keychain/*-sh 2>&1
echo sock $SSH_AUTH_SOCK pid $SSH_AGENT_PID me $(whoami)
ssh-add -l || (echo "SSH Key not active\!"; ssh-add || exit 1)
cd $HOME
unison-2.40.16 sync -batch -maxbackups 2 ${@} 2>&1
echo Exiting at $(date)
}
main | $LOG
It checks and exits when the system is running on battery. To be able to work in the background, it uses ssh-agent. So you need to setup ssh key authentication.
Unison config in ~/.unison/sync.prf:
# Unison preferences file
root = /home/user/sync
root = ssh://user@syncserver:port/syncfolder
follow = Path *
ignore = Path {scripts/s3.sh}
This is a sample config file. It follows all symlinks in the $HOME/sync folder to syncfolder on syncserver via ssh. The ignore section shows you how to exclude certain files from synchronization.
Windows Setup
This should already work just fine in Linux. Now let's turn to the Windows client.
The Window setup, as you will see, it much more "fun". There are several steps you need: Putty Agent (Pagent), Putty Puttygen and Plink (see above for links) and then a few bash scripts.
You need to copy your private ssh key from your linux box and convert it to putty's format with puttygen. Then copy it into a safe folder. I have it in the same folder as the Unison.exe. Then setup an ssh connection to your server with Putty that uses the key and save it to profile name unisonssh. Copy the following bash files to your unison folder and adjust the path names accordingly.
Putty Agent.bat:
pageant.exe sshkey.ppkThis needs to be a script or otherwise it's not started in the right folder and won't find the key. Try it with the full path of the key file then. This must be linked into Autostart if your and will prompt you for your ssh key password if your key is password protected.
SSH Connect.bat
@plink -C -ssh -load unisonssh -i "C:\unison\sshkey.ppk" -l djtm -P 22 unison -server -autoChange the path to where your ssh key lies and the port to your server's port if necessary.
Unison Sync.bat
C:
cd "C:\unison\"
unison2.4.exe -sshcmd sshconnect.bat -backups -backupdir unisonbackups -backuplocation central -batch -confirmbigdeletes -contactquietly
Testing it
Now is a good chance to try everything works fine. Try creating a file one one system and see how after two syncs it magically appears on the other. Edit it there to see how the edits are transferred back to the first system.
Scheduling it
Once everything works you can schedule it to run regularly without you needing to do anything. In Linux, you should install keychain for this to work in scripts and then enter the following into your cron. (To edit your cron type crontab -e)
*/15 * * * * $HOME/scripts/unisonsyncThe */15 means to sync every 15 minutes. Don't worry, usually nothing will be done - I hardly ever notice anything happening. Of course the path should be where your unison sync script lies.
In Windows it's a tad more difficult again. The most difficult part of it all is to make it run in the background without annyoing you every 15 minutes or so. The following command looks a bit quirky, but that's the best I could do. Enter exactly this behind Execute: in the task scheduler.
cmd /C start /LOW /MIN "Unison Sync" "C:\unison\unison.bat"and "C:\unison" next to execute in. Check both execute only when logged in and, under the settings tab, not to start the task if you're running on battery.
And now - finally - enjoy great, free, in sync folders!
Another older, less detailed guide is available here and here. Thanks to the authors of Unison.
0
comments
Categories:
backup,
howto,
linux,
netbooks,
network,
open source,
software,
tips,
windows
Power Naps for your Linux System
I've always wanted a tool that can automatically suspend my system automatically once all the jobs (mencoder scripts, updatedb, etc.) are finished. Then I could start tasks, leave my system alone and trust that it would take care of going into standby itself. Most software only checks for keyboard and X input, which exactly doesn't help for my scenario. But now there's "powernap".
It's included in normal Ubuntu repositories and in its default configuration it suspends your system if no activity is detected for 5 minutes. What's still confusing me is that it by default checks for activity of initd. This does not seem to make much sense and I think a long list of typical software would be a much better alternative. Also I wonder whether it would also detect mouse and keyboard inputs, which might be nice and useful. But it's a good start in any case and you can set it up to run for your purposes.
It's included in normal Ubuntu repositories and in its default configuration it suspends your system if no activity is detected for 5 minutes. What's still confusing me is that it by default checks for activity of initd. This does not seem to make much sense and I think a long list of typical software would be a much better alternative. Also I wonder whether it would also detect mouse and keyboard inputs, which might be nice and useful. But it's a good start in any case and you can set it up to run for your purposes.
Help with Stopping Software Patents in Europe
I know this is quite political, but it's open source politics: A new initiative has been taken to propose a EU directive that prevents software patents. I have just signed the petition and invite you do to so as well. http://petition.stopsoftwarepatents.eu/
Remember to click the link in the email you will receive from them to confirm your signature.
Please don't start a flamewar of any kind here. But you are welcome to post any other comments.
Remember to click the link in the email you will receive from them to confirm your signature.
Please don't start a flamewar of any kind here. But you are welcome to post any other comments.
Running Untrusted Programs in a Sandbox in Linux
Isolate is the program to do it. It has quite a nice introduction on it's website but unfortunately has to be downloaded in source and compiled yourself. It can help running a media player or your browser more safely.
You can download it with subversion via:
svn checkout http://isolate.googlecode.com/svn/trunk/ isolate-read-only
You need to install at least the libelf headers to compile it, e.g. sudo aptitude install libelf-dev in Debian based systems like Ubuntu. There is absolutely no documentation inside the tree except a GPL 2.0 license.
Thanks to LWN. See the comments there for more suggestions about isolation technologies like Rainbow.
You can download it with subversion via:
svn checkout http://isolate.googlecode.com/svn/trunk/ isolate-read-only
You need to install at least the libelf headers to compile it, e.g. sudo aptitude install libelf-dev in Debian based systems like Ubuntu. There is absolutely no documentation inside the tree except a GPL 2.0 license.
Thanks to LWN. See the comments there for more suggestions about isolation technologies like Rainbow.
Use your ssh-agent for cron scripts with keychain
Here's a great IBM howto explaining how to use your ssh-agent for cron scripts with keychain.
Related: Copy your public SSH-Key to another Computer.
Related: Copy your public SSH-Key to another Computer.
Resumable, fast and efficient hard disk data recovery dd_rhelp
dd_rhelp is a script that uses dd_rescue, but includes a log file and parameters to automatically read all the good blocks first and skip the bad ones. And it automatically resumes where you left off when it's interruped.
Porting Chrome back to KDE
Greg just had a great idea. Port the browser (Chrome) based on the browser (safari) that is based on the browser of KDE(konqueror) back to KDE again. Chrome coming home to KDE again would be a great thing. A native, fast browser that can really compete.
I think the code has been improved a lot since the beginning and as KDE is already running on Windows, OS X and Linux, it's an idea that Google probably could have followed from the beginning.
IMHO Google should the very least do everything to help the KDE community to achieve that port, as without them and KHTML they would never have come this far as quickly.
I think the code has been improved a lot since the beginning and as KDE is already running on Windows, OS X and Linux, it's an idea that Google probably could have followed from the beginning.
IMHO Google should the very least do everything to help the KDE community to achieve that port, as without them and KHTML they would never have come this far as quickly.
Online Video Chatting with a Flash Plugin
One of the fastest and easiest ways to video chat with someone is with the flash browser plugin. Here are several pages available:
- MeBeam
- feel free to post more in the comments!
- MeBeam
- feel free to post more in the comments!
Subscribe to:
Posts (Atom)