Month: October 2013

Como resolver o problema do Firefox com o Java

Eu ja’ postei aqui uma dica de como instalar o Java no Linux, porém o Java tem tantas vulnerabilidades que a cada duas ou tres semanas sai uma versao nova.

E infelizmente alguns (todos?) bancos brasileiros insistem em usar esta m***a de plugin. E eles nao deixam voce logar com a versao mais antiga, o que eu nao acho errado, se realmente existe uma vulnerabilidade na versao anterior.

Entao atualizei o java para a versao mais recente: 1.7.0_45 porem o ao entrar no site http://www.java.com e clicar no link “Eu tenho Java?” e’ exibida a mensagem: “Este plugin tem vulnerabilidades de segurança” ou em inglês “This plugin has secutiry vulnerabilities”.

Entrei no about:plugins na barra endereços e vi que a versao estava correta, porem aparecia a “flag” STATE_VULNERABLE_NO_UPDATE na frente da versao. “Ouch”, como pode ter vulnerabilidades se e’ a versao mais nova?

O mais estranho e’ que ao entrar no site da propria Mozilla mostra que o plugin esta atualizado: mozilla.com/plugincheck

Apos muita pesquisa descobri que o jeito fechar era o Firefox, entrar em ~/.mozilla e pesquisar pelo arquivo blocklist.xml:

$ find . -name blocklist.xml
./firefox/mwad0hks.default/blocklist.xml

Entao basta apagar este arquivo e iniciar o Firefox novamente! BINGO!

Resolvendo o problema de chave publica no Ubuntu

Ao tentar adicionar o repositório para baixar o Kicad mais novo, recebi esta mensagem de erro:

W: GPG error: http://ppa.launchpad.net raring Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8A75A3A697B014A

Encontrei a sugestão:

$ gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 4D270D06F42584E6

# You should see the following output while executing the above command.
gpg: Total number processed: 1
gpg:               imported: 1

$ gpg --armor --export 4D270D06F42584E6 | apt-key add -
OK

$ apt-get update
[Note: Now update will work without the key error message]

Mas não funcionou, pois o endereço do site wwwkeys.eu.pgp.net não é encontrado. Tentei usar outros sites, mas estava demorando muito e aparentemente nada funcionava.

Nos comentários do link da sugestão acima encontrei esta outra sugestão:

# aptitude install debian-keyring debian-archive-keyring

Porém também não funcionou…

Então resolvi baixar o conteúdo da chave publica (da linha BEGIN até END) :
http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xD8A75A3A697B014A

e salvei com o nome de 697b014a.pub e adicionei manualmente com o comando:

# cat 697b014a.pub | apt-key add -

WoW I found a kernel BUG in the Linux Mint 15

[ 5813.114601] BUG: unable to handle kernel paging request at ffff880116ffd880
[ 5813.114638] IP: [] ext4_iget+0x3d0/0xa00
[ 5813.114667] PGD 1c0e063 PUD daffe067 PMD 116e43063 PTE 800000002
[ 5813.114694] Oops: 0000 [#1] SMP
[ 5813.114711] Modules linked in: parport_pc(F) ppdev(F) rfcomm bnep binfmt_misc(F) joydev(F) uvcvideo rts5139(C) videobuf2_vmalloc videobuf2_memops videobuf2_core videodev coretemp kvm_intel kvm snd_hda_codec_hdmi ghash_clmulni_intel(F) cryptd(F) snd_hda_codec_realtek dell_wmi snd_hda_intel snd_hda_codec snd_hwdep(F) sparse_keymap snd_pcm(F) snd_page_alloc(F) snd_seq_midi(F) snd_seq_midi_event(F) snd_rawmidi(F) arc4(F) ath9k snd_seq(F) ath9k_common dell_laptop ath9k_hw ath dcdbas mac_hid mac80211 snd_seq_device(F) snd_timer(F) dm_multipath(F) cfg80211 snd(F) psmouse(F) microcode(F) scsi_dh(F) serio_raw(F) ath3k btusb bluetooth mei lp(F) parport(F) soundcore(F) lpc_ich btrfs(F) zlib_deflate(F) libcrc32c(F) dm_raid45 xor(F) dm_mirror(F) dm_region_hash(F) dm_log(F) wmi i915 ahci(F) libahci(F) r8169 video(F) i2c_algo_bit drm_kms_helper drm
[ 5813.115072] CPU 0
[ 5813.115083] Pid: 2445, comm: dropbox Tainted: GF C 3.8.0-19-generic #29-Ubuntu Dell Inc. Inspiron 3421/0NCH57
[ 5813.115125] RIP: 0010:[] [] ext4_iget+0x3d0/0xa00
[ 5813.115159] RSP: 0018:ffff8800af55bbc8 EFLAGS: 00010202
[ 5813.115180] RAX: ffff880116a6d000 RBX: ffff8800aec267e0 RCX: 0000000000000001
[ 5813.115207] RDX: ffff880116a6d400 RSI: ffff880114c20780 RDI: ffffea00045bff40
[ 5813.115234] RBP: ffff8800af55bc38 R08: 0000000000000002 R09: ffffea00045bff5c
[ 5813.115262] R10: ffff880116a6d000 R11: 0000000000000014 R12: ffff880116ffd800
[ 5813.115289] R13: ffff8801175d2000 R14: ffff880116a6d400 R15: 00007fecb54ce770
[ 5813.115317] FS: 00007fecca3f2700(0000) GS:ffff88011f200000(0000) knlGS:0000000000000000
[ 5813.115347] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5813.115370] CR2: ffff880116ffd880 CR3: 00000000358ad000 CR4: 00000000001407f0
[ 5813.115397] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 5813.115424] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 5813.115452] Process dropbox (pid: 2445, threadinfo ffff8800af55a000, task ffff8800bff88000)
[ 5813.115483] Stack:
[ 5813.115492] ffff88009f8cd0d0 ffff88009f8cd0d0 ffff880110fd55b0 0000000000000800
[ 5813.115524] ffff8800000001a0 ffff8800af55bde8 ffff8800af55bc28 ffffffff811ab4fe
[ 5813.115556] 00000000f39097db ffff8800aa519a80 ffff88009f8e4b60 0000000000340f89
[ 5813.115587] Call Trace:
[ 5813.115601] [] ? __d_alloc+0x14e/0x180
[ 5813.115625] [] ext4_lookup+0xe7/0x170
[ 5813.115648] [] lookup_real+0x1d/0x60
[ 5813.115669] [] __lookup_hash+0x38/0x50
[ 5813.115692] [] lookup_slow+0x44/0xa7
[ 5813.115714] [] path_lookupat+0x6b9/0x740
[ 5813.115737] [] ? htree_dirblock_to_tree+0x148/0x220
[ 5813.115766] [] ? kmem_cache_alloc+0x31/0x130
[ 5813.115790] [] filename_lookup+0x34/0xc0
[ 5813.115813] [] user_path_at_empty+0x8c/0x100
[ 5813.115838] [] ? ext4_readdir+0x3d4/0x8a0
[ 5813.115862] [] user_path_at+0x11/0x20
[ 5813.115885] [] vfs_fstatat+0x52/0xb0
[ 5813.115907] [] ? fillonedir+0x100/0x100
[ 5813.115931] [] vfs_lstat+0x1e/0x20
[ 5813.115953] [] sys_newlstat+0x1a/0x40
[ 5813.115975] [] ? sys_getdents+0xc9/0x110
[ 5813.115999] [] system_call_fastpath+0x1a/0x1f
[ 5813.116023] Code: 48 89 c2 83 e0 fc 83 e2 03 48 c1 e8 02 48 c1 e2 20 48 89 83 48 02 00 00 48 09 93 40 02 00 00 e9 ba 01 00 00 0f 1f 80 00 00 00 00 0f b7 84 24 80 00 00 00 66 89 83 94 02 00 00 4c 8b ba 40 03
[ 5813.118709] RIP [] ext4_iget+0x3d0/0xa00
[ 5813.120021] RSP
[ 5813.121302] CR2: ffff880116ffd880
[ 5813.141734] —[ end trace 351bb71a729dc17b ]—

How to copy an external repository to your github

If you want to add/copy an external project (that already uses git) to your github then follow these steps:

– Enter on your github and create a new repository;
– Clone the original project (this project external to github) to your disk;
– Points its origin to github repository:

$ git remote add origin https://github.com/username/newcopiedproject.git

At this moment you probably will receive this error message:

"fatal: remote origin already exists."

To solve it execute:

$ git remote -v

You will see that this project is pointing to original repository from project’s author.
Then you need to remove this origin using this command:

git remote rm origin

Finally you can add the new repository and push everything to there:

$ git remote add origin https://github.com/username/newcopiedproject.git
$ git push -u origin master

How to use ST-Link V2 to program Freedom Board FRDM-KL25Z

This is the way I connected STM32F4Discovery (used as a ST-Link V2) to Freedom board:

STM32F4Discovery                   FRDM-KL25Z         Signal Name
CN2                                J6
------------------------------------------------------------------
2                                  4                  SWD_CLK
3                                  3                  GND
4                                  2                  SWD_IO
5                                  10                 /RST
------------------------------------------------------------------
P2                                 J6
------------------------------------------------------------------
5                                  1                  3V
------------------------------------------------------------------