quinta-feira, 9 de dezembro de 2010

Twinkle: USB Headset Microphone (Fedora/Linux)

My usb heaset (Halfmman Cobra HS-87, which are the same as the ozone oxid) worked perfectly in my Fedora Core 13 (2.6.34.7-63.fc13.x86_64) KDE 4.5.3, both output(speakers) as well as the input(microphone). That was until I've tried to use it with twinkle.
Didn't have any problems getting it to work in skype, just plugged it in and it was automatically detected and added to the system.
Went to System Settings -> Multimedia -> Phono and could see it there. Gave it higher priority over the other devices, and after that it worked perfectly in my system.

The problem appeared when I tried to use it in twinkle, though I could ear perfectly, it wasn't using my headset's microphone, instead it was using my laptop's.

Since I use pulse audio (default in Fedora) I noticed that twinkle uses directly alsa. So after a litle search (not so little) I came across this thread, and it saved me =)

Since I only needed the micro to work, I created the following .asoundrc in my home directory:


pcm.usb_in {
type pulse
device alsa_input.usb-04d9_0020_832R-00-U0x4d90x20.analog-mono
hint {
description "halfmman Cobra Micro"
}
}


To find the device value use:
pactl list
And search for the device you want, which in my case was: alsa_input.usb-04d9_0020_832R-00-U0x4d90x20.analog-mono.

After that open twinkle -> Edit -> System Settings -> Audio

On the Microphone select ALSA: other device
and on the other device field put: usb_in

It should be working now!

quinta-feira, 25 de novembro de 2010

Fedora: Java JRE from SUN (64 Bit)

This was shamelessly "stolen" and adapted from backtrack forum

System

Fedora release 13 (Goddard)

Linux shinigami 2.6.34.7-61.fc13.x86_64 #1 SMP Tue Oct 19 04:06:30 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux



Download the .bin file

sudo sh jre-6u22-linux-x64-rpm.bin

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.6.0_22/bin/java" 1

sudo update-alternatives --set java /usr/java/jre1.6.0_22/bin/java

sudo ln -s /usr/java/jre1.6.0_22/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/

Restart Firefox

quinta-feira, 5 de agosto de 2010

kde - network manger plasmoid and wpa-wpa2

I had a problem connecting to my enterprise wireless network. They use WPA-WPA2 Enterprise with TTLS authentication and PAP as inner authentication.

I use the plasma widget of network manager, running on kubuntu 10.04

I figured it was a problem with reading/parsing the certificate file, from my syslog i got this message:

Aug 5 10:31:46 namikaze wpa_supplicant[848]: OpenSSL: tls_connection_ca_cert - Failed to parse ca_cert_blob error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag

I got on-line...with other means =)

and got to this bug report:

Bug 209673 - knetworkmanager applet (NOT THE PLASMOID) can't connect to WPA PEAP when validating by CA certificate

Well...they do say it's not related to the plasmoid...but i figured it should be similar...

They say it has something to do with network manager not feeding the certificate to the wpa_supplicant in the correct form/way (comment #21).

I've tried their workaround (comment #25)...well i failed...

~ #cat cacert.pem | grep -v "CERTIFICATE" | base64 -d > cacert.dem
base64: dados de entrada inválidos


so I thought to use openssl to convert the certificate to dem:

openssl x509 -in cacert.pem -outform der > cacert.dem

...and that did work!

I've just changed the configuration of the network...to point to the new certificate....and that actually did the trick =)

terça-feira, 6 de julho de 2010

Firefox - Mouse Middle Button

To click the mouse's middle button and firefox paste and load an url from clipboard:

In firefox enter: about:config

And change the value of middlemouse.contentLoadURL to true.

terça-feira, 11 de maio de 2010

wbinfo :: doesn't update new group information

After adding a new group to user, getent showed user on the group, but wbinfo -r user, didn't:

# wbinfo -a [domain\\]user%password

then

# wbinfo -r user

it should now print all the same groups as getent

* [optional]

source

quinta-feira, 29 de abril de 2010

linux :: bash :: removing duplicate files


find /dir/where/to/search -type f -print0 | xargs -0 -n1 md5sum | sort --key=1,32 | uniq -w 32 -d | awk {'print $2'} | while read a ; do rm $a ; done

quarta-feira, 28 de abril de 2010

linux :: 3g :: wvdial :: tmn :: vodafone :: zon

Configurações para utilizar com o wvdial de forma a ligar por 3g às redes tmn, vodafone e zon:

vim /etc/wvdial.conf

; ligacao tmn
[Dialer tmn]
Init2 = ATZ
Init3 = AT+CGDCONT=1,"ip","internet"
Stupid Mode = 1
ISDN = 0
Phone = *99***1#
Ask Password = 0
Modem = /dev/ttyUSB2
Username = tmn
Dial Command = ATD
Password = -PIN-DO-CARTAO-
Baud = 460800

; ligacao vodafone
[Dialer vodafone]
Phone = *99***1#
Username = vodafone
Password = vodafone
Stupid Mode = 1
Ask Password = 0
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = AT+CMEE=1
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 =AT+CGDCONT=1,"IP","internet.vodafone.pt";

;ligacao zon
[Dialer zon]
Phone = *99***1#
Username = Zon
Password = Zon
Stupid Mode = 1
Ask Password = 0
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = AT+CMEE=1
Init2 = ATZ
Init3 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem
Init5 =AT+CGDCONT=1,"IP","internet.zon.pt";


num terminal/consola executar: wvdial _rede_
sendo que _rede_ poderá ter o valor tmn, vodafone ou zon.

no caso da pen estar protegida por pin usar:
gcom -d /dev/ttyUSB0
colocar o pin, e esperar pelo registo da pen na rede
poderá ser ttyUSB0, ttyUSB1 ou ttyUSB2, depende onde estiver o device.

segunda-feira, 29 de março de 2010

KDE - akonadi mysql error

When getting this error:

[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist

try this:

stop akonadi
Code:
akonadictl stop

remove the db_data dir:
Code:
rm -r ~/.local/share/akonadi/db_data

recreate mysqldb with
Code:
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/

start akonadi
Code:
akonadictl start

sources:
Arch Linux::Akonadi::MySQL errors

segunda-feira, 8 de março de 2010

Sony Ericson(w595) - secret menu (menu secreto)

How to access to Sony Ericson secret menu (tested on SE W595)

<> are the directional keys

secret menu: >*<<*<*
imei: *#06
lock status: <**<
last dials: 0#
default options(lang,theme,etc...): <0000>