Archive for the 'Linux' Category

Sorting images according to their width and height

I wrote a script to sort images according to their width and height.
I found myself in need of such a thing after my previous post on how to download 4chan images automatically.
I used this script a few times to get all the wallpapers on the /wg/ board.

After a few GB of images, nautilus starts to get a headache when opening the containing folder.
So I needed to split it up in different folders.
So here’s the script that does it.

There still seems to be a problem with character escaping when the filename contains a ” – ” in it’s title.
But I’m too tired to figure it out now.

Download 4chan images automatically with this simple script

I like to spice up my desktop with various wallpapers and have to say, that /wg/ on 4chan has been a great provider.
But keeping track of all the images, shifting forth and back and forth again between the 10 pages has been taking too much effort.
So the solution to avoid spilling too much time lurking on that imageboard, I just wrote a bash script. (Sorry Windows users)

Be careful, as this script might run a while before it finishes.
You can modify the script as you like.
You might want to remove the user-agent string or the -nd option or ad a -x for that last wget call, etc…

I’ll post later on how I actually remove the duplicated images ;)
A hint for people eager to know: fdupes

fdupes -r -f . > duplicates && echo ./duplicates > duplicates && rm `cat duplicates`

This would actually throw errors when there are spaces in the filenames.

So it was a long, verry long night.
The spirit driving me was like this:

But in the end, it felt more like:

Going to Fosdem 2010

FOSDEM, the Free and Open Source Software Developers' European MeetingIt’s finally there. The 10th edition of Fosdem.
For the people whom don’t know Fosdem (yet):It’s the finest free and non-commercial event where FOSS developers and communities can meet.There are a lot of interesting talks and demo’s, food, drinks, booths, and if you search good enough you might encounter a (real) girl.
And the best thing… it’s in Belgium :) Here’s a list of talks I’d like to attend

Saturday

  • 11:45 to 12:30 Evil On the Internet

    This talk will show you live examples of these sites, explain how they work, and tell you what we currently know about the criminals who operate them.
    There’s a lot of evil things on the Internet if you know where to look for them. Phishing websites collect banking credentials; mule recruitment websites entice people into money laundering; fake escrow sites defraud the winners of online auctions; fake banks hold the cash for fake African dictators; and there are even Ponzi scheme websites where (almost) everyone knows that they’re a scam. This talk will show you live examples of these sites, explain how they work, and tell you what we currently know about the criminals who operate them.

  • 13:15 to 13:45 Mozilla Europe

    General Introduction followed by an update on the work of Mozilla in Europe.

  • 13:45 to 14:00 Mozilla Foundation

    Latest MoFo news and projects.

  • 15:30 to 16:30 HTML5
  • Read the rest of this entry »

Why you should read your ISP’s Custommers Conduct Code

The idea:

Install ConnectBot on my HTC Hero, connect to my home ssh server to hook up with my Screen session.
‘Why?’ you ask? Because we can!

The process:

  1. Create a DynDNS account
  2. Configure my router to automatically update the DynDNS service
  3. Set up the ssh daemon on my desktop
  4. Set up the screen session and configure irssi
  5. Forwarded the default ssh port (22) to my desktop PC which has a fixed IP
  6. Drink a coffee.
  7. Added the credentials needed to the ConnectBot’s configuration

Read the rest of this entry »

Funny Gnome-Cups-Manager README file :)

gnome-cups-manager
------------------

Once upon a time there was a printer who lived in the woods.  He was a
lonely printer, because nobody knew how to configure him.  He hoped
and hoped for someone to play with.

One day, the wind passed by the printer's cottage.  "Whoosh," said the
wind.  The printer became excited.  Maybe the wind would be his
friend!  

"Will you be my friend?" the printer asked.

"Whoosh," said the wind.

"What does that mean?" asked the printer.

"Whoosh," said the wind, and with that it was gone.

The printer was confused.  He spent the rest of the day thinking and
jamming paper (for that is what little printers do when they are
confused).

The next day a storm came.  The rain came pouring down, darkening the
morning sky and destroying the printer's garden.  The little printer
was upset.  "Why are you being so mean to me?" he asked.
 Read the rest of this entry »

Microsoft’s Bing.com is running on Linux servers

Ok, Windows Server 2003 was great, and Windows Server 2008 is even greater, as told by Microsoft @ the It-pro days in Ghent (Belgium) 2 years ago.
So, we’re going flat on the assumption that they’re using their own ‘great’ server technology for their own good.
After all, according to their website, Windows Server is cheaper, safer and better than any other technology around.

But wait, what’s this?

Bing_hosted_on_linux

As a search page should be quick, secure and efficient I agree you should use Linux, but I never saw this one coming!
Other searches for microsoft results in different linux hosted services beneath the microsoft.com domain.

wb.dlservice.microsoft.com
search.microsoft.com
vista.gallery.microsoft.com
social.microsoft.com
fullproduct.download.microsoft.com
silverlight.dlservice.microsoft.com (This one is even hosted on Ubuntu)

I know the saying: “Keep your friends close, but your enemy’s closer” (not sure who came up with this slogan), but this is way too funny!

How to change the DNS servers in Ubuntu

You might want to change the DNS server if your ISP’s servers can sometimes be slow or outdated.

sudo gedit /etc/resolv.conf

and change or add the lines:

nameserver your_DNS1
nameserver your_DNS2

You can add as many lines like these, but two should be enough.
Test the used domain name servers careful!

#dns-nameserver 192.168.0.1
#dns-nameservers 192.168.0.1 192.168.0.2
#dns-search somedomain.org
#dns-domain 192.168.0.1

Edit: Serge’s comment (the first one) made me search a little bit.
After searching google it wasn’t totally clear if the DNS should be configured in resolv.cof or /etc/network/interfaces, so I took the GUI for a spin.
I’ve set up the DNS trough the GUI and checked the changes inside both locations.
The DNS servers I addes, became listed inside the /etc/resolv.conf file.
So after all, I was right.
But as the configuration file starts with the line #Generated by NetworkManager, I was wondering if these settings would get overwritten by the NetworkManager.
So I wiped all configured interfaces from my computer and let the NetworkManager try its evil.
It worked like a charm and just added the line ‘domain morraye.local’ to the file, without erasing my dns settings.
This was tested on Ubuntu 9.04 and Ubuntu 9.10.

You might also want to play with these settings in your resolv.conf file

# dns-domain 208.67.222.222
# dns-nameserver 208.67.222.222
# dns-nameservers 208.67.222.222 208.67.220.220
# dns-search wikipedia.org

Note: When you’re behind a router, you should change the dns server at your router (unless it uses pass-trough DNS lookups)

One keyboard and mouse for multiple computers running Ubuntu

When you have multiple computers on your desk, it can be very annoying to switch keyboard an mouse each time you want to do something on one of the other computers.
So, you can solve this by just using one keyboard and one mouse for multiple computers without buying a hardware switch.
Synergy is a package, available from the repository that lets you share the mouse and keyboard over a range of different computers.
When synergy is active, your keystrokes will be send to the machine where your cursor is currently positioned.
The cursor will slide from screen to screen just as if you are working on one single system with multiple screens attached.
As far as I know, it’s not possible to drag windows from one machine to another. Which would be nice.
So if you’re a programmer and you’re still searching for a useful project, then this is just your bit.

Here is how you can easily start sharing your keyboard and mouse between different computers and screens using synergy on Ubuntu:

First off, install the synergy package and the QuickSynergy packages on each machine you want to use your pointer on with the command:

sudo apt-get install quicksynergy

Note that apt will install the synergy package as it’s required to run QuickSynergy. (QuickSynergy is in fact just a gui for Synergy)
When it’s installed, you’ll find QuickSynergy under the category ‘accessories’ in the application menu.

On the server:

The server is the computer where the used keyboard and mouse are attached to.
In the Share tab fill in the names of the computers where you want your keyboard and mouse to be operational.
Do not fill in the IP address, it won’t work.

Synergy server

To find out the name of your computer(s), open a terminal and type:

hostname

If all the hostnames are put in the right place, start the service by clicking ‘Execute’
Note that the window becomes gray.
You can now just minimize it and let it do it’s work.

On the client:

On the Client, fire up the QuickSynergy app and go to the Use tab.
Fill in the hostname of the server.
Note that you can also enter its IP, but know that when you’re using dynamic IP adresses, you’ll have to reconfigure this each time you fire up Synergy.

Synergy Client

Then just hit execute and minimize the window.
Now you can remove your keyboard and mouse from this computer.

When moving the mouse outside the window to the side you’ve configured the other computers position on the server, you’ll see your pointer go ‘troug’ the space between the two computers and appear on the other screen.
Als handy to know is that the clipboard is shared.
So you can actually copy something on machine 1 and paste it on machine 2. (text that is, don’t try this with data)

Note:
Synergy uses an unencrypted TCP/IP stream on port 24800. So if you’re on a network you can’t entirely trust, don’t use it unless you encrypt it.
I would even recommend ALL users using a wifi-network to encrypt the connection.
To Encrypt the Synergy data, you can simply follow the guide on their website.

Ubuntu-be on the Dipro Mega Market Ghent

Ubuntu-be will, as usual, be present at the next Dipro Mega Market event in Ghent.
Just like previous years, we’ll not only hand out free Ubuntu cd’s, but we’re also going to give advice and demo’s on how to use the most common applications.
Are you thinking about trying Ubuntu, but you don’t know how to start? Just come visit us.
We’ll give you the tips and help to get started.

But you could also just come by to say hi too of course. :)

If you feel like helping us out a bit, visit our wiki page here to find out what we still need or how you could help.

Ubuntu Server on VirtualBox returns error This kernel requires the following features not present on the cpu: 0:6

I installed Ubuntu Server 8.04 inside a VirtualBox (v 2.4.1_OSE) virtual machine.
The installation went smooth, but when I wanted to boot into my Ubuntu Server, it returned the following error right after GRUB:

This kernel requires the following features not present on the cpu: 0:6
Unable to boot – please use a kernel appropriate for your CPU

Screenshot or it didn’t happen?

Ubuntu Server on VirtualBox returns error

How to solve:

This can be easily resolved by enabling the PAE/NX option in the virtual machine’s settings.
This will expose the PAE of your CPU to the virtual machine.

Just:

  1. go to the homescreen of Virtualbox
  2. select your virtual machine
  3. click the ’settings’ button on top of the screen
  4. click the tab ‘Advanced’
  5. check the box next to ‘PAE/NX’

Like in this screenshot:

Screenshot-testserver - Settings-1

Now, you can fire up your virtual machine again, and it will start up without this error.