Freitag, 22. Juli 2011

How to play Minecraft with a Sixaxis Controller on Ubuntu

Follow this tutorial and you will be able to play games like Minecraft with the Sixaxis Controller.

Minecraft mit einem Playstation 3 Controller auf Ubuntu

Wenn diese Anleitung befolgt wurde, ist es ganz einfach QJoypad für ein Spiel, wie zum Beispiel Minecraft, zu konfigurieren. Wie das geht zeig ich euch in diesem Video:

How to set up a Sixaxis Controller with QJoypad in Ubuntu

Dualshock 3 Controller with a mini-USB-cable

We are going to connect the Controller via USB, so you make sure your Sixaxis Controller is plugged in with a mini-USB-cable.

First of all we install the joystick Package via
sudo apt-get install joystick
In order to make sure Ubuntu is able to read the Controller input execute
cat /dev/input/js0
Now move the sticks or press some buttons on the Controller. The text output (which is the raw controller data) in your terminal should change.
Qt's logo
QJoyPad, our Linux Xpadder or joy2key equivalent, is based on the Qt framework so we will have to install it as well.
sudo apt-get install libqt4-core  libqt4-dev qt4-dev-tools qt4-designer  qt4-doc
We will also need these packages
sudo apt-get install libxtst6 libxtst-dev


Now comes the more complicated part: Download QJoyPad. Open up a Terminal an execute the following commands in order to extract the source.
cd ~/Downloads
tar xzf qjoypad-4.1.0.tar.gz
compile the source:
cd cd qjoypad-4.1.0/src/
./config
make
sudo make install

QJoyPad will start minimized in the system tray, but Natty doesn't allow every application to show up in the system tray. We will change these settings; execute:
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
After logging out and in again or simply restarting unity you will be able to execute qjoypad. Now you can take input from the controller translate it into key strokes or mouse actions. The UI should be self explanatory ;)


Donnerstag, 21. Juli 2011

Sixaxis / Dualshock 3 Controller mit Ubuntu und QJoyPad benutzen

Nachdem ich hier und hier erklärt habe, wie man seinen Wiimote mit Ubuntu verbinden und benutzen kann, möchte ich in diesem Beitrag erklären, wie man seinen Dualshock 3 bzw. Sixaxis Controller von der Playstation 3 auch am Ubuntu-PC benutzen kann.
Dualshock 3 Controller mit Mini-USB-Kabel

Nachdem man den PS3-Controller per Mini-USB-Kabel mit dem PC verbunden hat und das Paket joystick installiert hat:
sudo apt-get install joystick
überprüft man ob die Verbindung funktioniert. Dazu führt man den Befehl
cat /dev/input/js0
aus und drückt einige Tasten oder bewegt die Analog-Sticks des Controllers. Verändert sich die Ausgabe im Terminal, kann der PC die Eingaben des Controllers lesen.
Das Logo von Qt
Das Programm QJoyPad, das nachher die Controllereingaben zu Maus-, bzw Keyboardeingaben umwandelt basiert auf der Qt-Bibliothek. Falls noch nicht geschehen, installiert man Qt mit:
sudo apt-get install libqt4-core  libqt4-dev qt4-dev-tools qt4-designer  qt4-doc
Außerdem werden die X11-Bibliotheken von libxtst benötigt.
sudo apt-get install libxtst6 libxtst-dev


Jetzt kann man QJoyPad herunterladen. Nach dem Download wechselt man im Terminal ins Download-Verzeichnis und entpackt den Quellcode:
cd ~/Downloads
tar xzf qjoypad-4.1.0.tar.gz
Nun kompiliert man den Quellcode:
cd cd qjoypad-4.1.0/src/
./config
make
sudo make install

Da QJoyPad im Tray minimiert startet muss man den Unity-System-Tray so einstellen, dass er alle Tray-Icons erlaubt. Das geschieht mittels:
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
Wenn man sich jetzt einmal aus und wieder einloggt (oder Unity neustartet) kann man das Programm qjoypad ausführen. Und die Tasten des Controllers mit Tastatur oder Mauseingaben verknüpfen.


Samstag, 25. Juni 2011

Hard Disk backup / mirroring with Ubuntu and dd

In this post I will show you how to mirror  your hard disk with Ubuntu and the dd command. I used this method to backup the data from my laptop, which didn't start anymore. I was sure the hard disk was still alive and i wanted to save all my data.

You will need a s-ATA to USB cable like this one
At first you've got to make sure both hard disks are connected to the PC.
In my case /dev/sdc is the source and /dev/sdd is the target hard disk.


Use this command to mirror the whole hard disk, bit per bit.

pv /dev/sdc | dd bs=128k of=/dev/sdd
Where /dev/sdc is the source- and /dev/sdd is the target-hard-disk!

The dd command copies the hard disk bit per bit and the pv command adds a neat progress bar, because by default dd comes with no visual feedback.


For me it took like 3 hours to mirror all the data to my new USB-hard-disk.

Datensicherung / Festplattenbackup mit Ubuntu

Der Laptop, auf dem ich die meisten Artikel hier verfasst habe, hat nach einer Bierdusche das Zeitliche gesegnet. Da die Festplatte aber noch lief und ich die ganzen Daten vor der Reparatur sichern wollte habe ich mich ein bisschen über Datensicherung mit Ubuntu schlau gemacht.

s-ATA-USB-Kabel mit Stromversorgung und IDE-Anschluss
In dem Laptop war eine 320 GB Festplatte verbaut und glücklicherweise habe ich auch eine 320 GB USB-Festplatte von CnMemory. Am einfachsten habe ich mir eine komplette 1:1 Spiegelung der Laptop-Festplatte vorgestellt. Dazu brauchte ich ein s-ATA zu USB Kabel wie z.B. dieses hier.
Ubuntu  hat die s-ATA-Festplatte des Laptops dann sofort als /dev/sdc erkannt. Die USB-Festplatte auf die ich die Daten sichern möchte ist /dev/sdd.

Nach ein wenig googeln und nachlesen in den manpages habe ich mir dann diesen Befehl zusammengesetzt:
pv /dev/sdc | dd bs=128k of=/dev/sdd
Wo /dev/sdc die Quell- und /dev/sdd die Zielfestplatte ist!

dd ist der eigentliche Befehl zum bit-genauen Kopieren der Festplatte ist, durch den Befehl pv wird die Ausgabe von dd mit einem Fortschrittsbalken versehen.


Nach ein paar Stunden war die gesamte Laptop-Festplatte auf meine USB-Festplatte gespiegelt, inklusive der verschiedenen Partitionen und Betriebssysteme!

Mittwoch, 22. Juni 2011

Ubuntu in Big Bang Theory

Saw this episode just a few minutes ago :D

Ubuntu in Big Bang Theory

Lief vor ein paar Minuten auf ProSieben :D

Dienstag, 31. Mai 2011

How to play Minecraft with a Wiimote


How to set up Bluetooth correctly

  1. sudo apt-get install bluez-utils libopenobex1 wmgui wminput
  2. sudo /etc/init.d/bluetooth restart
  3. sudo modprobe uinput
  4. sudo su
    echo "uinput" >> /etc/modules

Edit the file /etc/cwiid/wminput/minecraft eg. with sudo gedit /etc/cwiid/wminput/minecraft and copy and paste the code below. You could also save this file as /etc/cwiid/wminput/minecraft
Now start wminput: sudo wminput -c minecraft -w

Pointing does not work but I'm figuring it out ;)
I think the key assignment is self-explanatory.
#Head Movement
Plugin.acc.X = REL_X
Plugin.acc.Y = REL_Y
#Body Movement
Plugin.nunchuk_stick2btn.Up = KEY_W
Plugin.nunchuk_stick2btn.Down = KEY_S
Plugin.nunchuk_stick2btn.Left = KEY_A
Plugin.nunchuk_stick2btn.Right = KEY_D
#Left Mouse Button, Right Mouse Button and Space
Wiimote.B = BTN_LEFT
Nunchuk.Z = BTN_RIGHT
Wiimote.A = KEY_SPACE
Wiimote.Home = KEY_E
Wiimote.2 = KEY_ESC


[Tutorial] Minecraft mit Wiimote und Nunchuk spielen


Falls Bluetooth noch nicht läuft

Hier habe ich eine Anleitung geschrieben um Bluetooth zum laufen zu bekommen.
  1. sudo apt-get install bluez-utils libopenobex1 wmgui wminput
  2. sudo /etc/init.d/bluetooth restart
  3. sudo modprobe uinput
  4. sudo su
    echo "uinput" >> /etc/modules

Bearbeite die Datei /etc/cwiid/wminput/minecraft z.B. mit sudo gedit /etc/cwiid/wminput/minecraft und füge den Code von unten ein. Du kannst auch diese Datei als /etc/cwiid/wminput/minecraft speichern.
Dann wminput per sudo wminput -c minecraft -w starten.

Die Maus wird dann durch Kippen des Wiimote gesteuern, WASD liegt auf dem Stick den Nunchuk. Die B-Taste ist die Linke Mausstaste, Z (Nunchuk) die Rechte, mit A hüpft man (Leertaste), mit der Home-Taste öffnet man das Inventar (E) und mit Taste 2 drückt man Escape. Ich bin gerade dabei, eine Config zu machen, mit der man Minecraft mit dem Infrarotsensor, also wirklich durch zielen auf den Bildschirm und nicht nur durch kippen
#Head Movement
Plugin.acc.X = REL_X
Plugin.acc.Y = REL_Y
#Body Movement
Plugin.nunchuk_stick2btn.Up = KEY_W
Plugin.nunchuk_stick2btn.Down = KEY_S
Plugin.nunchuk_stick2btn.Left = KEY_A
Plugin.nunchuk_stick2btn.Right = KEY_D
#Left Mouse Button, Right Mouse Button and Space
Wiimote.B = BTN_LEFT
Nunchuk.Z = BTN_RIGHT
Wiimote.A = KEY_SPACE
Wiimote.Home = KEY_E
Wiimote.2 = KEY_ESC


Sonntag, 29. Mai 2011

A fast and easy way to install the Minecraft server in Ubuntu Linux

All you've got to do in order to install the minecraft server is follow these instructions.
Or you can use a shell script i wrote:
  1. download
  2. make it executable ( chmod a+x minecraft_server_setup.sh )
  3. execute it( ./minecraft_server_setup.sh )
show me the magic
#!/bin/bash
echo -n 'Do you want to (i)nstall or (s)tart the minecraft server?'
read watdo
startit(){ 
 if [ -d ~/.minecraft\ server/ ]; then
  cd ~/.minecraft\ server/
  echo -n "Do you have more than 1024MB of RAM?
  (y)es or (n)o"
  read watram
  echo -n "Do you want to start the server with a GUI?
   (y)es or (n)o"
  read watgui
  case "$watram" in 
   y|Y|Yes)
    case "$watgui" in
     y|Y|Yes)
      java -jar minecraft_server.jar
     ;;
     n|N|no|No)
      java -jar minecraft_server.jar nogui
     ;;
     *) echo "Unknown Parameter"
     read ''
     ;;
    esac 
   ;;
   n|N|no|No)
    case "$watgui" in
     y|Y|Yes)
      java -Xmx1024M -Xms1024M -jar minecraft_server.jar
     ;;
     n|N|no|No)
      java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
     ;;
     *) echo "Unknown Parameter" 
     read ''
     ;;
    esac 
   ;;
   *) echo "Unknown Parameter" 
   read ''
   ;;
  esac
 else
  echo "You don't seem to have the Minecraft server installed.
Do you want to install it now?
(y)es or (n)o"
  read watdo
  installit
 fi
 
}
installit(){
 case "$watdo" in
 y|Y|yes|Yes|i|I|install|Install) 
 if [ ! -d ~/.minecraft\ server/ ]; then
  mkdir ~/.minecraft\ server
  cd ~/.minecraft\ server/
  wget http://www.minecraft.net/download/minecraft_server.jar
  chmod a+x minecraft_server.jar
  echo -n "Do you want to start the server now?
   (y)es or (n)o"
  read startnow
  case "$startnow" in
  y|Y|Yes)
   startit
  ;;
  *)  
  ;;
  esac
 else
  echo "The Minecraft Server seems to be installed.
Do you want to start it now?
(y)es or (n)o"
  read watnowdo
  case "$watnowdo" in
  y|Y|yes|Yes)
   startit
  ;;
  *)
  ;;
  esac
 fi
 ;;
 s|S|start|Start)
  startit
 ;;
 n|N|no|No)
  exit 0
 ;;
 *) 
  echo "Unknown Parameter" 
  read ''
 ;;
esac
}
installit
exit 0

I know the code is pretty messy, but it's the first shell script i've written so I'm OK with it ;)

Minecraft Server unter Ubuntu Linux installieren

Um Minecraft auf Ubuntu zu installieren muss man nur diesen Anweisungen folgen.
Noch einfacher gehts mit einem Script, dass ich geschrieben habe.
  1. Downloaden
  2. Ausführbar machen ( chmod a+x minecraft_server_setup.sh )
  3. Ausführen ( ./minecraft_server_setup.sh )
Klick mich um Code anzuzeigen
#!/bin/bash
echo -n 'Do you want to (i)nstall or (s)tart the minecraft server?'
read watdo
startit(){ 
 if [ -d ~/.minecraft\ server/ ]; then
  cd ~/.minecraft\ server/
  echo -n "Do you have more than 1024MB of RAM?
  (y)es or (n)o"
  read watram
  echo -n "Do you want to start the server with a GUI?
   (y)es or (n)o"
  read watgui
  case "$watram" in 
   y|Y|Yes)
    case "$watgui" in
     y|Y|Yes)
      java -jar minecraft_server.jar
     ;;
     n|N|no|No)
      java -jar minecraft_server.jar nogui
     ;;
     *) echo "Unknown Parameter"
     read ''
     ;;
    esac 
   ;;
   n|N|no|No)
    case "$watgui" in
     y|Y|Yes)
      java -Xmx1024M -Xms1024M -jar minecraft_server.jar
     ;;
     n|N|no|No)
      java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
     ;;
     *) echo "Unknown Parameter" 
     read ''
     ;;
    esac 
   ;;
   *) echo "Unknown Parameter" 
   read ''
   ;;
  esac
 else
  echo "You don't seem to have the Minecraft server installed.
Do you want to install it now?
(y)es or (n)o"
  read watdo
  installit
 fi
 
}
installit(){
 case "$watdo" in
 y|Y|yes|Yes|i|I|install|Install) 
 if [ ! -d ~/.minecraft\ server/ ]; then
  mkdir ~/.minecraft\ server
  cd ~/.minecraft\ server/
  wget http://www.minecraft.net/download/minecraft_server.jar
  chmod a+x minecraft_server.jar
  echo -n "Do you want to start the server now?
   (y)es or (n)o"
  read startnow
  case "$startnow" in
  y|Y|Yes)
   startit
  ;;
  *)  
  ;;
  esac
 else
  echo "The Minecraft Server seems to be installed.
Do you want to start it now?
(y)es or (n)o"
  read watnowdo
  case "$watnowdo" in
  y|Y|yes|Yes)
   startit
  ;;
  *)
  ;;
  esac
 fi
 ;;
 s|S|start|Start)
  startit
 ;;
 n|N|no|No)
  exit 0
 ;;
 *) 
  echo "Unknown Parameter" 
  read ''
 ;;
esac
}
installit
exit 0

Der Code ist deshalb so chaotisch, weil es mein erstes Shell-Script ist ;)

Donnerstag, 26. Mai 2011

How to turn off the log in sound in Ubuntu

If you are like me, and often switch between different OS, you will get annoyed by login sounds easily. I tried to turn the Ubuntu login sound off, but the option to do so is somewhat hidden.


The Ubuntu login sound.


The settings in gdmsetup, didnt change anything

gdmsetup in german Unity options for gdmsetup in german
In order to turn off the login sounds you have to start gnome-session-properties:
gnome-session-properties in Unity Remove this check mark

In the gnome-session-properties search for "GNOME Login Sound" and remove the check mark
When you log in the next time, no login sound will be played :)


Here you can compare the Windows 7 login sound to the Ubuntu one
What do you think, which one sounds better?
And if you have a custom login sound for Windows or Ubuntu, leave a comment and let us know!

Anmeldemelodie bzw. Loginsound deaktivieren.

Da mich die Anmeldemelodie von Ubuntu ziemlich nervt, vor allem wenn der Sound aus versehen auf voller Lautstärke ist, habe ich versucht den Loginsound auszustellen.


Der Ubuntu Login Sound.


Die Einstellung im gdmsetup ( in Unity Anmeldebildschirm genannt ) bringt jedoch keine Veränderung.

gdmsetup in Unity Optionen von gdmsetup
Abhilfe schafft das Bearbeiten der Startprogramme (gnome-session-properties):
gnome-session-properties in Unity Das Häkchen entfernen

Dort nach "GNOME Login Sound" suchen und den Haken entfernen.
schon kann man Ubuntu starten ohne von der Startmelodie begrüßt zu werden.


PS Trotz aller Nervigkeit gefällt mir der Login Sound von Ubuntu beser als der von Windows ;)

Donnerstag, 19. Mai 2011

4 different wallpapers in Ubuntu 11.04 with Compiz

You want to have a different wallpaper on each workspace? Take a look at my screencast




The commands i used:

sagi compizconfig-settings-manager // installs the compiz settings manager

ccsm // starts the settings manager
gconf-editor // starts the gnome configuration tool
In the compizconfig-settings-manager search the wallpaper plugin, add the 4 wallpapers you want and then activate it.

Then start the gconf-editor and remove the check mark at apps>nautilus>preferences>show_desktop .

Your 4 workspace should now have different wallpapers.
If Unity displays the menubar or the dock incorrectly just log out and then log in again.

4 verschiedene Wallpaper in Ubuntu 11.04 mit Compiz

Die willst für jede der 4 Arbeitsflächen in Ubuntu 11.04 ein eigenes Hintergrundbild?
Wie das geht zeige ich hier in einem Screencast:




Die Befehle, die ich benutze:

sagi compizconfig-settings-manager // Installiert den Einstellungs-Manager von Compiz

ccsm // Startet  den Einstellungs-Manager

gconf-editor // Started das Gnome Konfigurations-Programm
Im Einstellungs-Manager von Compiz sucht man das Wallpaper-Plugin, stellt dort vier gewünschte Hintergrundbilder ein und aktiviert das Plugin dann.

Dann startet man den gconf-editor und entfernt das Häkchen unter apps>nautilus>preferences>show_desktop .

Eure 4 Workspaces sollten jetzt die verschiedenen Wallpaper anzeigen.
Wenn es, wie bei mir im Video auch, zu Darstellungsfehlern in Unity, z.B. in der Menüleiste kommt, einfach ab- und wieder anmelden.

Montag, 16. Mai 2011

how to replace the sudo apt-get install command with sagi

Installing applications with terminal commads is pretty easy and often faster than opening up the software center and searching the application in there.
sudo apt-get install $PACKETNAME
The only hard part is typing sudo apt-get install again and again ;)
If you want to replace sudo apt-get install with a shorter command like "sagi" you have got to download  this script . Now open up a terminal and move the script to your home folder and make it invisible using this command.
mv ~/downloads/pastie-1907126.sh ~/.sagi
Open the file ~/.bashrc with this command:

gedit ~/.bashrc

Add this line to the end of the file:
source ~/.sagi

Restart the terminal and you are good to go! You can now use sagi instead of sudo apt-get install, with tab-completion for package names!

Source

Sonntag, 15. Mai 2011

Sudo apt-get install mit sagi ersetzen

Wenn man Ubuntu schon etwas länger benutzt wird man feststellen, dass die Installation von Programmen per Terminal eigentlich sehr einfach und praktisch ist.
sudo apt-get install $PAKETNAME
Das einzige schwierige daran ist, jedes mal sudo apt-get install zu tippen ;)
Doch dem Abhilfe zu verschaffen ist wirklich einfach. Man lädt sich dieses Skript herunter. Dann öffnet man ein Terminal und verschiebt das Skript in den persönliche Ordner und macht es unsichtbar.
mv ~/Downloads/pastie-1907126.sh ~/.sagi
Ich gehe davon aus das sich das heruntergeladene Skript im standardmäßigen Downloadsordner befindet. Dann fügt man der Datei .bashrc aus dem persönlichen Ordner folgende Zeile ans Ende hinzu:
source ~/.sagi
Da die .bashrc-Datei unsichtbar ist muss man in der Ordneransicht unsichtbare Dateien erst per [Strg]+[H] sichtbar machen um sie zu bearbeiten. Oder man bearbeitet sie per Terminalbefehl:
gedit ~/.bashrc
Wenn man jetzt das Terminal neu startet kann man sich das Tippen von sudo apt-get install sparen und hat auch mit dem sagi Befehl noch Tab-Komplettierung für Paketnamen!

Hier ist der Originalbeitrag auf englisch:
http://ubuntuforums.org/showthread.php?t=392508

Donnerstag, 5. Mai 2011

Ubuntu Natty Narwhal install - now with Youtube and HTML5 !

When you install a new OS like Windows, you will spend a lot of time just looking at the slowly moving progress bar. But not in Ubuntu!

Watch Youtube while installing Ubuntu Natty Narwhal!
I'm installing Ubuntu 11.04 right now on my Acer ASPIRE 5742G. But even the Ubuntu installation takes some time, so I opened up Firefox and visited my Homepage.

And I was pretty surprised when I was perfectly able to watch the Family Guy Dubstep Video i uploaded a week ago. The Adobe Flash player was not even installed. Seems like Ubuntu 11.04 and the shipped Firefox 4 browser support HTML5 videos Out Of The Box.

Good job Canoncial and the Ubuntu Community! And thank you Youtube for enabling HTML5 embedded Videos!

Ubuntu Natty Narwhal Installation - Mit Youtube und HTML5 !

Wenn man ein neues Betriebssystem wie Windows installiert verbringt man viel Zeit damit, einfach auf den Fortschrittsbalken zu gucken. "Da er hat sich bewegt - Nein doch nicht :( "
Nicht aber auf Ubuntu!

Youtube-Videos während der Installation von Ubuntu angucken!
Ich verfasse diesen Artikel gerade auf meinem Acer ASPIRE 5742G - und zwar während Ubuntu 11.04 installiert! Da aber auch die Installation von Ubuntu halt ihre Zeit braucht wollte ich mal schnell meine Homepage checken und -

- wurde ziemlich überrascht als ich ohne Probleme das Family Guy Dubstep Video anschauen konnte, das ich letzte Woche hochgeladen habe. Dabei habe ich nicht einmal den Adobe Flash Player installiert! Sieht so aus als unterstütze Ubuntu mit dem mitgelieferten Firefox 4 HTML5 Videos out of the box.

Hut ab Canoncial und an die Ubuntu Community! Und Dankeschön an Youtube, dafür dass ihr eingebette Videos auch in HTML5 unterstützt!

Donnerstag, 28. April 2011

Family Guy Dubstep - Bass Cannon

Well this post is not actually about Ubuntu, but i created the Video on Ubuntu 11.04 "Natty Narwhal" ;)
//
Dieser Post handelt zwar nicht wirklich von Ubuntu, aber ich hab das kleine Video in Ubuntu 11.04 "Natty Narwhal" erstellt ;)



Sonntag, 3. April 2011

Ubuntu Maverick vs. Natty vs. Mint vs. Elementary

Here you can compare the default interfaces of the different Ubuntu versions and the derivates Linux Mint and Elementary OS. Which design do you prefer?
I'll examine the differences between the different versions in an upcoming post.

Ubuntu 10.10 (Maverick Meerkat)
Ubuntu 11.04 (Natty Narwhal)
Linux Mint
Elementary OS


Freitag, 1. April 2011

How to play Minecraft on Linux Ubuntu

Minecraft is one of those games, which run on Ubuntu natively. Of course you will have to have Java set up correctly. I'll show you how to do that in a short video!
Disregard the sloppy gameplay in the video, without screencasting, everything will run smooth.


You need to install Sun Java 6
sudo apt-get install sun-java6-jdk
The most important command i used is
sudo update-java-alternatives -s java-6-sun
because even if the the sun-java6-jdk/jre is installed correctly, another jre/jdk like openjdk may be the preferred version of java, preventing Minecraft from starting.
The command will set SUNs JRE as the default one and evade problems.

Minecraft auf Linux Ubuntu installieren

Minecraft ist eines der Spiele, das man dank Java nativ auf Linux spielen kann. Das kleine Video zeigt euch wie man das richtige Java-Version installiert um Minecraft auf Linux spielen zu können.
Im Video sieht das Gameplay ein wenig ruckelig aus, ist es aber nicht. Das Spiel an sich läuft super flüssig!.


Hier noch einmal die benötigten Befehle aufgelistet und erklärt.

sudo apt-get install sun-java6-jdk → Installiert das Java Development Kit, das benötigte Programmbibliotheken mitbringt.
upgrade-java-alternatives -l → Zeigt die installierten Java Versionen an.
upgrade-java-alternatives -s java-6-sun → Legt das Java von SUN als standard fest.

Der letzte Befehl kann wichtig sein, wenn man neben sun-java6 noch das openjdk-java6 installiert hat. Minecraft läuft nach meinen Erfahrungen besser mit der Version von SUN.

Mittwoch, 30. März 2011

Crysis 2 Screenshots

Well, i have to admit, I did not take these Screenshots on Ubuntu. But gaming is the only reason why I still have Windows 7 installed on my Desktop PC. And because of the fact that i just bought the game I felt like sharing a few pics with you.
My PC's Specs are:
  • Intel Core 2 Dou E8400 3.00GHz OC@3.73GHz
  • nVidia 250GTS 1GBVRAM
  • 4GB PC2-6400-DDR2-RAM
  • on a MSI P43 Neo-F Motherboard
Not really the latest equipment, but i think the graphics are still awesome and I can play the game with a reasonable framerate on my 1920*1200 26'' Monitor.


I love the graffiti pieces in Crysis 2!

Gaming on Linux?

The first question I hear when talking about Ubuntu is:

Will I be able to play my games on Linux?

And the clear answer is yes and no. Yes because of the fact, that there are some games which run on Linux natively, but I have to admit that these are few.
You will be able to play Bejeweled on Linux!
(Maybe the "project bossanova" will change things)

Flash games work on Linux, as long as Flash works ;)

The interesting part about gaming on Linux is:
You will be able to play Windows games!

There is a tool called wine, which allows you to run (most) Windows applications on LInux. I'll show you how to configure it to be able to play certain games some time soon, because not being able to play your favourite game, is what keeps most Windows users sticking to Windows.

In order to demonstrate, how easy playing Windows games on Linux can be, I made a short video in which i run Warcraft III in Linux Ubuntu.


But keep in mind, that most modern games won't run on Linux just like that!

Spielen unter Linux

Das erste, was ich gefragt werde, wenn ich jemandem empfehle Ubuntu zu installieren ist meistens:

Kann ich mit Linux denn auch meine ganzen Games spielen?

Bejeweled  läuft auch mit Linux!
Die klare Antwort ist Jein. Es gibt natürlich Spiele die auch, oder sogar exklusiv für Linux entwickelt werden. Doch machen wir uns nichts vor, gute Linux-Spiele sind rar gesät.
(Vielleicht bringt das "project bossanova" ja ein bisschen Schwung in den Linux-Spiele-Sektor)


Flash-Games laufen unter Linux, sofern Flash funktioniert ;)

Jetzt aber zu dem interessanten Teil: Windows Spiele funktionieren unter Linux!

Wieso ich mich traue, das zu sagen? Weil ich noch (fast) jedes Spiel mit wine auf Ubuntu zum Laufen kriegen konnte. Und darauf möchte ich in nächster Zeit gerne etwas öfter eingehen, weil wenn ich mich so umhöre, ist die Angst davor, sein Lieblingsspiel nicht mehr spielen zu können, das häufigste Argument gegen Ubuntu.

Und um zu zeigen, wie einfach Windows Spiele manchmal auf Linux laufen, hier ein kleines Video indem ich Warcraft III mittels wine auf Ubuntu starte.

Das ist aber doch eher eine Seltenheit, dass das so einfach klappt. Die meisten modernen Spiele kriegt man nur unter Umständen zum Laufen.

Montag, 28. März 2011

Firefox 4 ganz einfach in Ubuntu installieren


If you are not from Germany, you may be interested in the english version of this tutorial.


Öffne ein Terminal deiner Wahl, kopiere den gesamten nachfolgenden Code:


sudo add-apt-repository ppa:mozillateam/firefox-stable && sudo apt-get update && sudo apt-get upgrade

füg ihn ins Terminal ein und drück Enter! Dieses kleine Code-Schnippselchen wird deinen Firefox in Ubuntu auf die aktuelle Version 4 upgraden.


Wie genau das geht, seht ihr hier

sudo = super user do: sagt Ubuntu, dass der nächste Befehl mit Administrator-Rechten ausgeführt werden soll.

add-apt-repository ppa:mozillateam/firefox-stable = Fügt das Firefox/Stable PPA des Mozillateams deiner sources.list hinzu

&& = Bedeutet das noch ein Befehl augeführt werden soll, wenn der vorhergehende erfolgreich war.

apt-get update = Lässt Ubuntu die Paketquellen abfragen und auffrischen

apt-get upgrade = Dadurch werden alle installierten Programme aktualisiert

A fast and easy way to install Firefox 4 in Ubuntu

Just open up a terminal, copy and paste the whole code

sudo add-apt-repository ppa:mozillateam/firefox-stable && sudo apt-get update && sudo apt-get upgrade

and hit Enter! That's it, your firefox will now be upgraded to version 4.


Explanation of the commands:

sudo = super user do: tells Ubuntu to run the following command with root privileges.

add-apt-repository ppa:mozillateam/firefox-stable = add the mozillateams stable firefox PPA to your sources.list

&& = Tells the Ubuntu to execute another command if the foregoing command was executed successfully

apt-get update = tells Ubuntu to update your sources.list

apt-get upgrade = tells Ubuntu to upgrade all installed applications

Sonntag, 27. März 2011

How to set up a squid proxy in Ubuntu

This works, so here is the tutorial I promised in the comments.
In order to turn your Ubuntu PC into a proxy server, you have got to install squid at first:
sudo apt-get install squid
squid will not work out of the box, so we've got to do some changes to the config file at /etc/squid/squid.conf
sudo gedit /etc/squid/squid.conf
In order to change the name of your proxy insert the line visible_hostname *yourname* at the top.

My school blocks all ports but port 80 so I have to change squids port to 80.
You can do that by locating the line containing http_port 3128 (line 1114 in Ubuntu 10.10 with squid 2.7.STABLE9) and change it to http_port 80

To allow other computers to access your squid server, you will have to find the line containing http_access allow localhost and change it to http_access allow all (line 677)

Now tell squid to apply the changes with
sudo squid -k reconfigure
Congrats, your proxy is now set up!

port forwarding with my router
If you want to access your proxy from the internet, you will have to forward port 80 from your router to port 80 on your PC. You can find a guide for your router here.

If your IP-adress is dynamic you will have to set up dyndns (or a similair service) to guarantee your proxy server is always accessible.
I'll show you how to do that in an upcoming post!

Ubuntu als Proxy Server mit squid // Internetzensur an Schulen umgehen

Kennt ihr das?
Ihr seid in der Schule/Uni/Arbeit/woauchimmeraußerhaltzuhause und wollt schnell mal die Seite XY (z.B. gulli.com) checken. Und dann taucht sie auf, die Zensurseite.

"Der Zugriff auf die Seite http://www.gulli.com mit folgender Begründung verweigert:

Extremist Content, Illegal or Unethical, Verbreitung von Weltübernahmemodellen, etc

Bei Fragen oder Beschwerden wenden Sie sich bitte an zensor@Schule/Uni/Arbeitgeber.de"

Weil das an unserer Schule wirklich sehr exzessiv praktiziert wird, wollte ich mal probieren, ob ich meinen Ubuntu-PC nicht als Proxy einrichten kann, um diese Sperre so zu umgehen.

Nach ein bisschen googlen bin ich dann auf squid und polipo gestoßen, habe mich aber für squid entschieden, weil die Wikipedia-Seite zu squid länger ist und ich das Tintenfisch-Maskottchen cool finde (no shit).

Es hat geklappt!!

Siehe Screenshot vom Remote-PC mit Windows 7 und Firefox:
Wenn das morgen wirklich die Zensurmaßnahmen der Schule aushebelt, dann poste ich mein Tutorial dazu :)
Das Setup zum Screenshot
 


Freitag, 25. März 2011

How to add a custom Icon to your blog

Not exactly a tip for Ubuntu users only, but this one might be useful for you!

I think the standard blogger / blogspot favicon is quiet ugly.
Even if you don't think it's ugly, you have to agree to the fact that one icon can not fit hundreds of thousands of different blogs. All with different themes and designs etc.

In order to change your favicon you will have to upload it to some imagehost and link it in your html code, because blogger does not give you any webspace or the ability to easily integrate your own icon. The problem is: most imagehosts don't accept the *.ico format.
Even if you found an imagehost that accepts icons you would encounter another problem. The image can easily be deleted by the hoster due to high traffic or whatever.

So here's my bulletproof way to embed your own favicon into your blog:

1.  Create or download an icon you like. (You can use The Gimp to save any image as an icon)


1.Upload it to this base 64 encoder.

2.Copy the base64 encoded output.

3.Paste it into this little code snippet:
<link href='data:image/x-icon;base64,[YOUR BASE64 ENCODED STRING]' rel='shortcut icon' type='image/x-icon' />

4.Go to Blogger Dashboard > Design > Edit HTML Find this piece of code
</head>

5.paste the whole snippet right in front of it.


6.That's it, enjoy your new custom favicon!

Donnerstag, 24. März 2011

Wiimote in Ubuntu [Video]

Because i seem to be getting more anglophone than german visitors, i decided to write my following tutorials in english and in german. But for now, enjoy this little video about how to connect your Wiimote to your Ubuntu PC using wmgui.
I'll show you how to do some cool stuff with your Wiimote in the upcoming posts.




Mittwoch, 23. März 2011

Wiimote per Bluetooth mit Ubuntu verbinden

Soo, heute möchte ich meinen Wiimote mit meinem Ubuntu-Laptop verbinden. Ich habe mir extra dafür diesen Bluetooth-Dongle gekauft.
Der Bluetooth-Stick kam heute nach 2 Tagen per Brief an und ich finde das Teil wirklich billig.
Ob es auch seinen Dienst tut, werden wir ja gleich sehen.

Als erstes sollte man seinen USB-Stick in den Rechner stecken und gucken ob dieser den auch erkennt. Dazu eignet sich z.B. der Befehl

lsusb | grep Bluetooth

In meinem Fall kommt folgendes als Ausgabe:

chris@chris-laptop:~$ lsusb | grep Bluetooth
Bus 002 Device 008: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Gibt der Befehl nichts aus, wird euer USB-Stick wahrscheinlich nicht als Bluetooth-Stick erkannt. Um das zu überprüfen kann man jeweils vor und nach dem Einstecken des USB-Sticks einfach den Befehl lsusb ausführen und die Ausgaben vergleichen. Verändert sich nichts, erkennt der Computer den USB-Stick überhaupt nicht.
Funktioniert jedoch alles soweit, dann geht es mit der Installation der benötigten Pakete weiter. Welche denn wären: bluez-utils, libopenobex1, wminput und wmgui
Nach deren Installation:
sudo apt-get install bluez-utils libopenobex1 wmgui wminput
Sollte man den Bluetooth-Daemon neutstarten:

sudo /etc/init.d/bluetooth restart
Möchte man den USB-Stick nur einmal ausprobieren, lädt man den Treiber
sudo modprobe uinput
Möchte man den Treiber in Zukunft nicht mehr von Hand laden sollte man "uinput" in die /etc/modules Datei eintragen, z.B. per:
sudo su
echo "uinput" >> /etc/modules 
Fragen können hier im Blog oder im Ubuntuusers Forum gestellt werden ! :)

Dienstag, 22. März 2011

DCP J315W unter Ubuntu

Ich habe mir letztens den WiFi-Drucker DCP-J315W von Brother zugelegt. Hauptsächlich aus dem Grund, weil ich von allen Geräten im Haus zentral und kabellos Drucken wollte. Die Treiberinstallation unter Windows lief super, nur unter Linux war es ein klein wenig holprig.


Den Drucker betreibt man am einfachsten mit CUPS. Cups kommt standardmäßig bei Ubuntu mit, wer dieses Drucksystem aber noch nicht installiert hat, macht dies einfach mit dem Befehl

sudo apt-get install cups

Brother bietet zwei *.deb Pakete zur Installation des Druckers an, beide benötigt man. Den LPR-Treiber (Link) und den Cupswrapper (Link) zum integrieren des LPR-Treibers in CUPS. Der Einfachheit halber gehe ich davon aus, dass der Treiber in den Download-Ordner innerhalb eures persönlichen Ordners geladen wurde.


Vor der Installation muss man CUPS in dem in Ubuntu integrierten Sicherheitsframework AppArmor "freischalten", sofern noch nicht geschehen. Das macht man mit dem Befehl

sudo aa-complain cupsd

Außerdem muss man noch die drei Ordner /var/spool/lpd/ /var/spool/lpd/dcpj315w und /usr/share/cups/model erstellen

sudo mkdir /var/spool/lpd /var/spool/lpd/dcpj315w /usr/share/cups/model

Nun installiert man zuerst den LPR-Treiber mit dem Befehl

cd /home/*dein Benutzername*/Downloads  //Wechsel in  Downloadordner
sudo dpkg -i --force-all dcpj315wlpr-1.1.1-1.i386.deb

und den Cupswrapper mit dem Befehl

sudo dpkg -i --force-all dcpj315wcupswrapper-1.1.1-1.i386.deb

Über das CUPS-Webinterface http://localhost:631/printers sollte man den automatisch eingerichteten Drucker namens DCPJ315W entfernen da dieser für eine USB-Verbindung eingestellt ist und nicht als W-LAN-Drucker funktionieren wird. "Administration->Delete Printer" und dann Benutzername und Passwort eingeben.

Über den Reiter "Administration" und dann "Add Printer" kann man den DCP-J315 hinzufügen. Der Rest erklärt sich eigentlich von selbst:





Montag, 21. März 2011

MediaTomb Webinterface disabled

Ich habe eben den UPnP-Server MediaTomb auf meinem Ubuntu Laptop installiert. Als ich diesen dann konfigurieren wollte bin ich auf folgendes Problem gestoßen.

Nach Klicken auf "Anwendungen->Multimedia->MediaTomb" öffnete sich in einem Browser-Fenster lediglich die Meldung

MediaTomb UI is disabled. Check your configuration. 

 

Damit man auf das Webinterface zugreifen und den MediaTomb-Server konfigurieren kann muss man zuerst die Config-Datei unter "/etc/mediatomb/config.xml" anpassen, zum Beispiel per

sudo gedit /etc/mediatomb/config.xml

Dann in der Zeile 7 den Wert von <ui enabled="no" [...]> auf <ui enabled="yes" [...]> ändern.

Passwortschutz für das Webinterface aktiviert man, indem man in Zeile 8 <accounts enabled="no" [...]> auf <accounts enabled="yes" [...]> ändert.
 
Den Standard-Account namens "mediatomb" mit dem Standard-Passwort "mediatomb" kann man in Zeile 9 ändern.




Nachdem man die Config-Datei nach seinen Wünschen verändert hat, muss man den Server neustarten, damit die Änderungen angewendet werden; z.B. per:

 sudo /etc/init.d/mediatomb restart