Entries posted by repat

Bei Perl unter Windows 7 fehlt Tk und lässt sich nicht über cpan installieren

Posted on 7. Februar 2013 Comments

Die neue Perl Version enthält aus irgendeinem Grund Tk nicht (mehr?) standardmässig. Perl schlägt dann vor Tk mit dem folgendem Befehl nachzuinstallieren:

cpan -i Tk

Das funktioniert aber nicht, weil u.a. keine Compiler und Linuxtools wie make installiert sind. Also werden diese automatisch heruntergeladen. Allerdings schlägt die Installation trotzdem mit dem folgenden Ausgaben fehl:

rc -fo tk.res -r -i . -i mTk\win\rc mTk\win\rc\tk.rc
'rc' is not recognized as an internal or external command,
operable prgram or batch file.
dmake.exe: Error code 129, while making 'tk.res'
dmake.exe: Error code 255, while making 'pTk\libpTk.a'.

Was jedoch wunderbar und schnell funktioniert hat ist der folgende Befehl:

ppm install Tk

Cisco VPN mit Windows 8: Error 442: Failed to enable virtual adapter

Posted on 6. Februar 2013 Comments

Der Cisco-VPN Client in der Version 5.0.0.05.0440 für Windows 8 verursacht bei mir folgendes Problem. Jedes mal wenn ich Username und Passwort eingeben sagt er (auf der Kommandozeile die vpnclient.exe)

Intializing the VPN connection
Contacting the gateway xxx.xxx.xxx.xxx
Authenticating user.
Negotiating security policies
Securing communiation channel
Secure VPN Connection terminated locally by the Client
Reason: Failed to enable Vitual Adapter

bzw. GUI gibt zurück:

Secure VPN Conection terminated locally by the Client
Reason 442: Failed to enable Virtual Adapter
Connection terminated on XYZ

Wobei XYZ für Datum und Länge steht.

Auch wenn diverse Rechenzentren von Universitäten was anderes erzählen… Der Fehler liegt dabei in der Registry und zwar genauer beim Schlüssel DisplayName unter HKEY_LOCAL_MASCHINE\SYSTEM\CurrentControlSet\Serices\CVirtA. Der enthält die Zeichenkette @oem4.inf,%CVirtA_Desc%;, welche man einfach rauslöschen kann. So steht da einfach nur noch Cisco Systems VPN Adapter for 64-bit Windows. Bei der 32-bit Version steht einfach nichts dahinter(also keine 32-bit!)

Um das zu automatisieren kann man .reg-Dateien schreiben in dem man mit regedit den Wert ändert, und dann mit Datei/Exportieren eine .reg-Datei erstellt. Die übernimmt allerdings alle Werte aus dem Unterordner. Mit seinem Lieblingseditor kann man nun einfach die restlichen Einträge aus der Datei löschen, so dass dort nur noch steht:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA]
"DisplayName"="Cisco Systems VPN Adapter for 64-bit Windows"

oder im Fall von 32-Bit Systemen:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA]
"DisplayName"="Cisco Systems VPN Adapter"

Hier findet ihr die beiden .reg-Dateien gezippt als Download:

Credits gehen an ITServiceDRoeding für sein YouTube Video.

OpenVPN TLS Handshake failed auf Port 443

Posted on 4. Februar 2013 Comments

Gerade habe ich den folgenden Fehler bekommen:

TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
TLS Error: TLS handshake failed

Passiert ist das, weil ich die Portsperre umgehen wollte und von Port 1194 auf Port 443(also „HTTPS“) umgestellt habe. Dabei habe ich aber vergessen, dass durch die Firewall nur TCP-Verkehr durchgelassen wird(HTTPS geht über TCP). Da OpenVPN aber standardmässig UDP benutzt, bekommt man trotz offenem Port diese Fehlermeldung.

Einfach in der client.conf und der server.conf die Zeile proto tcp einkommentieren und proto udp auskommentieren. Wenn man zusätzlich noch UDP möchte, muss man 2 OpenVPN Instanzen laufen lassen. Das geht natürlich auf die Performance, hilft aber gegen blöde Firewalls.

GPG Fehler beim Spotify Repository unter Ubuntu

Posted on 4. Februar 2013 Comments

Eine Weile lang bekam ich bei einem apt-get update den folgenden Fehler:

W: GPG-Fehler: http://repository.spotify.com stable InRelease:
Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist:
NO_PUBKEY 082CCEDF94558F59

Abhilfe schafft dieser Befehl:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 082CCEDF94558F59

How I pay podcast producers and other online artists and don’t spend any extra money on it

Posted on 5. Januar 2013 Comments

//update: This doesn’t work anymore. Quote from the website: „aFlattr is currently unavailable. Due to the termination of the operating agreement from Amazon aFlattr is not operating right now and the future is not yet clear.“

 

1. I listen to a lot of podcasts and would like to thank them by throwing them a coin in their hat but don’t really have money left to spend.

2. I also buy something at Amazon nearly every month, be it for university or private, for work or friends(-> I get the money back)

Most of the (German) podcasts have a rel:payment-tag in their feeds and use it for the Swedish micopayment system flattr. This enables me to just press a button in my podcatcher.

The website and Firefox plugin aFlattr generates affiliate links for the stuff I buy on amazon and sends the money to my flattr account. That way I give away some money by buying stuff 🙂

Apple USB Ethernet Adapter for Android Tablets

Posted on 29. Dezember 2012 Comments

I just tried this for fun and didn’t expect it to work… I used a $3 USB adapter I usually use for USB sticks and just plugged in the Apple USB Ethernet adapter for the Macbook Air. Then I turned off WiFi. There was no notification or anything, it just worked out of the box 🙂 The tablet is a 32GB Nexus7 with Android 4.2.

image

Ausloggen über Konsolenbefehl bei Ubuntu

Posted on 14. Dezember 2012 Comments

Letztens habe ich mich ein bisschen beim Wechsel der Windowmanager verdaddelt. Zum Glück konnte ich mich noch über SSH einloggen und kam dann mit dem folgenden Befehl zurück zur Anmeldung:

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1

(Credits)

How to get facebook back online #facebookdown

Posted on 11. Dezember 2012 Comments

Seems like facebook has some kind of DNS-Problem right now(#facebookdown). To fix this enter the facebook IPs in your hosts-file. To get them, have a look at your DNS Cache with a tool like dig(or use the ones I provide below).

 

Linux

repat@laptop:~$ dig facebook.com

; <<>> DiG 9.8.1-P1 <<>> facebook.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11887
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;facebook.com.            IN    A

;; ANSWER SECTION:
facebook.com.        6010    IN    A    69.171.229.16
facebook.com.        6010    IN    A    173.252.100.16
facebook.com.        6010    IN    A    173.252.101.16
facebook.com.        6010    IN    A    66.220.152.16
facebook.com.        6010    IN    A    66.220.158.16
facebook.com.        6010    IN    A    69.171.224.32

 

So just enter this into your /etc/hosts file:

#vi /etc/hosts

66.220.158.16   facebook.com
66.220.158.16   www.facebook.com


Windows
Windows has a similar file, which is located in %SystemRoot%\system32\drivers\etc\hosts. Where %SystemRoot% is your Windows directory, so most likely C:\Windows.

At least in Windows 7 the file is locked by the system, so unless you have notepad++, which doesn’t care about all this, you have to open your explorer, go to C:\Windows\system32\, right-click notepad.exe and select „start with admin rights“(or something like that…). Then click File/open, go to C:\Windows\system32\drivers\etc and select „all files“ on the right side(see screenshot). Then again open the file and enter the following:

66.220.158.16   facebook.com
66.220.158.16   www.facebook.com

 

 

 

 

MacOS

1. Click on the looking glass icon in the top right corner of the screen
2. Type „Terminal“ and press Enter, a new app called „Terminal“ will appear
3. Don’t get confused by it, just follow the steps
4. Copy this text into your clipboard : echo „173.252.101.16 www.facebook.com“ | sudo tee -a /etc/hosts
5. Paste it into the „Terminal“ window and press Enter
6. You will be prompted to enter your password (it will not show up on the screen, don’t worry about it), press Enter again when you finished typing your password.
7. The line „173.252.101.16 www.facebook.com“ will appear on the screen.
8. Done!

Mauszeiger unsichtbar machen unter Linux

Posted on 9. November 2012 Comments

Diese Methode funktioniert auf jeden Fall auf dem Raspberry Pi mit Debian 7.0 und Ubuntu 12.04:

Installiert unclutter

sudo apt-get install unclutter

Dann mit den Standardparametern starten:

unclutter ­grab ­visible &

Sobald man den Mauszeiger wieder bewegt ist er wieder da. Für weitere Möglichkeiten siehe:

man unclutter