Tag Archives: linux

Replacing Unity with XFCE in Ubuntu

Here is what I do as soon as I install a new Ubuntu instance: I remove unity desktop and replace it with XFCE. And if you want to do the same it’s pretty straightforward. 😉

Perform all of these as root in a terminal window, or prepend with sudo. (Look elsewhere for GUI steps 🙂 )

  1. Update your repos:
    apt-get update
  2. Uninstall Unity and ubuntu-desktop:
    apt-get purge ubuntu-desktop unity-*
  3. Install XFCE Desktop environment:
    apt-get install xubuntu-desktop
  4. Restart lightdm:
    /etc/init.d/lightdm restart

Voilà! You’re using XFCE desktop! 😉

ý yerine ı görmek istiyor musunuz?

Türkçe karakterlerin sorunsalı olan ISO-8859-9 formatıyla UTF-8 arasındaki uyuşmazlığı çözen küçük bir python scripti yazdım. Program girdi olarak ISO-8859-9 formatlanmış bir yazı alıyor ve de UTF-8 ile formatlayıp dosyaya yazıyor.


python convertToUnicode.py --input /path/to/filename.srt --output /path/to/convertedfilename.srt

ya da

python convertToUnicode.py -i /path/to/filename.srt -o /path/to/convertedfilename.srt

Siz de kullanmak istiyorsanız: https://github.com/emresaglam/convertToUnicode

OpenVPN client test, without a client.

If you need to test the connectivity of your openvpn server from a client’s perspective, you can use this command:

echo -e “\x38\x01\x00\x00\x00\x00\x00\x00\x00” |     timeout 10 nc -u your.openvpnserver.ip port | cat -v


This sends TLS negotiation header to the server and expects a reply in 10 seconds. If you get an empty line, things timed out. If you get a reply like the line below, you have connectivity.


Raspberry Pi carputer update

The only update of the week is that I tested the composite output in a Toyota Highlander’s entertainment system. It booted fine. The fonts are not as crispy as I wanted, but still readable. I didn’t have a chance to test the XBMC however web browsing was acceptable with an open wifi around the campus. 🙂

I’m also waiting some batteries for my old Voltmeter 🙂 Once it’s working I can start some prototyping.

Hopefully more updates in a week.


rarcrack with big files

If you are trying to crack a big rar file with rarcrack (Mine was 2.6G) and you’re receiving this error:

$ ./rarcrack --type rar ./file.rar
 RarCrack! 0.2 by David Zoltan Kedves (kedazo@gmail.com)

 ERROR: The specified file (./file.rar) is not exists or
 you don't have a right permissions!

You need to add these lines below in rarcrack.c and recompile. (Put them before #include rarcrack.h )

#define _FILE_OFFSET_BITS 64

While you’re there you can fix the error message’s English 😉 I leave it to you to find it. 😉

Raspberry Pi powered carputer.

I got myself a raspberry pi couple of weeks ago. First I tried to make a HTPC out of it using XBMC but the interface was too slow for my taste. So I decided to build a carputer. 🙂 I have very basic electronic knowledge, so this will be a learning process for me too.

So far what I need is this list below:

  • a car (Check)
  • a 12V to 5V converter: I have cheap lighter to USB adapter. I’ll start with that but I’m thinking about this in the future.
  • a 5V power source activated when the car power is shut: For this one I’m going to start with a circuit I had in hand that I was using to charge my wifey’s phone using a small solar panel. It has a 2000mAh Li-Po battery on it. (That battery is most probably flat. I’ll need a new one)
    I will need this power source for only maybe 1 min. Read next bullet point.
  • a relay circuit that will detect that the car power is shut off and will send a GPIO signal to Rpi to shut itself off. Otherwise there will be corruption at some point of time. 😛 I believe I should write a simple script to shutdown to tie it to that GPIO signal.
  • a 7″ touchscreen screen (possibly with an HDMI input. I have couple of candidates.)
  • a software to play music and video. Biggest candidate so far is XBMC.

Nice to have:These will require a USB hub since I only have 2 USB inputs. (I need to look at the power requirements for the USB hub)

  • a wifi/bluetooth solution for phone interaction.
  • a GPS interface.

More update weekly. (hopefully!)


Airlink Ultra Mini USB Adapter with Linux

We recently bought this Ultra mini usb wifi adapter for our laptop that had it’s internal wifi card fried. Since this laptop was acting really bad with Windows XP, we installed Ubuntu on it.

At first Ubuntu couldn’t recognize the adapter. Then I wanted to try ndiswrapper. All I had to do was to install ndisgtk (sudo apt-get install ndisgtk). It installs ndiswrapper-utils package as a dependency. Then point the ndisgtk to the .inf file of the driver.  (net8192cu.inf)

Here is a more detailed write-up for generic ndiswrapper configuration from ubuntu.

The ID for this adapter is: 0bda:8176
When you run lsusb it shows as: Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp.
The manufacturer id is: AWLL5088

Creating random files.

Here is a bash script to create 100 random files with random sizes smaller than 400KB. I needed this to quickly generate 100 files to use it on a stress test.

for ((i=1;i<101;i++)); do
size=`expr $RANDOM % 400`
dd if=/dev/urandom of=/tmp/testfile.$i bs=1024 count=$size


The for loop is pretty straightforward, it counts from 1 to 100.

size=`expr $RANDOM % 400`

This line generates a random number between 0 – 399

dd if=/dev/urandom of=/tmp/testfile.$i bs=1024 count=$size

This line generates a file with blocksize (bs / not bullsh!t) 1024 times the random number that we generated. The input for that file is the special urandom device in linux. (It’s the random number generator for the linux kernel)
The name of the file is also straightforward.

Lotus Notes 8.5 on Ubuntu 10.04

If you need to run native Linux client for Lotus Notes 8.5 on Ubuntu 10.04:

1) After installing your ibm_lotus_notes*.deb files, drop the following files under /opt/ibm/lotus/notes


You can get the files here.

2) Install msttcorefonts package: sudo apt-get install msttcorefonts

3) Go to File -> Preferences and choose Windows and Themes on the left pane. For Theme, choose Operating System Theme. This way most of the fonts in the UI look much better.