20201224

Instalação do OpenBSD 6.8 como guest no QEMU 4.2.1 (EFI boot) com Fedora 32 como host

Se bootar o qemu com EFI, a tela não rola direito e fica impossível instalar. Então precisei mudar algumas configurações para permitir uma instalação normal. Para rodar o qemu:
qemu-system-x86_64 \
  -drive file=$VMDISK,format=qcow2,if=virtio \
  -m 2G \
  -device virtio-net-pci,netdev=nd0 \
  -netdev tap,id=nd0,ifname=tap1 \
  -enable-kvm $*
  -drive file=$INSTALLDISK,format=raw,if=virtio \
  -boot menu=on \
  -bios /usr/share/edk2/ovmf/OVMF_CODE.fd \
  -serial stdio
No console de boot:
set tty com0
machine video mode 0
machine gop mode 0

20201013

OCRmyPDF no Fedora 30

Os pacotes sistema não funcionaram. Para instalar o ocrmypdf.
pip3 install --user git+https://github.com/jbarlow83/OCRmyPDF.git
Clonei o repositório e em seu diretório:
./autogen.sh
./configure
make
sudo make install
Clonei o repositório e copiei seus os arquivos .traineddata para /usr/local/share/tessdata.

20200620

NAT no Fedora 30 com firewalld

% sudo firewall-cmd --change-interface=$IF_INTERNAL --zone=internal
% sudo firewall-cmd --get-default-zone
FedoraWorkstation
% sudo firewall-cmd --add-masquerade --zone=FedoraWorkstation

20190410

wine no Fedora 29

% sudo setsebool mmap_low_allowed 1
% sudo sysctl -w vm.mmap_min_addr=0
% wine64 --check-libs | grep missing
libnetapi.so: missing
% wine32 --check-libs | grep missing
libnetapi.so: missing

20190208

Teclado us com cedilha no acento agudo, Fedora 29

 $ sudo dnf install immodules-gtk3 immodules-gtk2 
Editar
/usr/lib64/gtk-*/*/immodules.cache
e adicionar :en na linha que começa com "cedilla". Adicionar as seguintes linhas ao /etc/environment
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla

20180727

Crase e til no Fedora 28 com teclado Matias Mini Tactile Pro

Teclado: https://matias.ca/minitactilepro/mac/
Tecla crase e til são reconhecidos como maior e menor. Edite
/usr/share/X11/xkb/symbols/us
e, na segunda ocorrência de LSGT, troque por
{ dead_grave, dead_tilde, grave, asciitilde }

20180226

root_numpy 4.7.3 no macOS 10.13.1

Instalado com pip dava o problema:
$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import root_numpy
Traceback (most recent call last):
  File "", line 1, in 
  File "/Library/Python/2.7/site-packages/root_numpy/__init__.py", line 51, in 
    from ._tree import (
  File "/Applications/root_v6.12.06/lib/ROOT.py", line 318, in _importhook
    return _orig_ihook( name, *args, **kwds )
  File "/Library/Python/2.7/site-packages/root_numpy/_tree.py", line 6, in 
    from . import _librootnumpy
  File "/Applications/root_v6.12.06/lib/ROOT.py", line 318, in _importhook
    return _orig_ihook( name, *args, **kwds )
ImportError: dlopen(/Library/Python/2.7/site-packages/root_numpy/_librootnumpy.so, 2): Library not loaded: @rpath/libHist.so
  Referenced from: /Library/Python/2.7/site-packages/root_numpy/_librootnumpy.so
  Reason: image not found
Resolvido com:
$ sudo install_name_tool -add_rpath /Applications/root_v6.12.06/lib/ /Library/Python/2.7/site-packages/root_numpy/_librootnumpy.so

20171203

pdflatex no Fedora 26

pdflatex não conseguia completar, com o erro:
I can't find the format file pdflatex.fmt
Pra conseguir, instalei os seguintes pacotes (provavelmente mais do que o necessário):
texlive-amscls
texlive-attachfile
texlive-auto-pst-pdf
texlive-babelbib
texlive-beamer
texlive-bera
texlive-bibtex-bin
texlive-breakurl
texlive-breqn
texlive-cm-super
texlive-collection-basic
texlive-collection-fontsrecommended
texlive-collection-latex
texlive-collection-latexrecommended
texlive-ctable
texlive-currfile
texlive-dvipdfmx
texlive-dvipdfmx-bin
texlive-dvips-bin
texlive-eso-pic
texlive-etoolbox
texlive-extsizes
texlive-fancyvrb
texlive-filehook
texlive-fontspec
texlive-geometry
texlive-gsftopk-bin
texlive-hyperref
texlive-ifplatform
texlive-jknapltx
texlive-koma-script
texlive-l3experimental
texlive-l3kernel
texlive-l3packages
texlive-latex
texlive-latex-bin
texlive-latex-bin-bin
texlive-lineno
texlive-listings
texlive-ltabptch
texlive-ltxmisc
texlive-lualatex-math
texlive-luaotfload
texlive-luaotfload-bin
texlive-luatex
texlive-luatex-bin
texlive-luatexbase
texlive-makeindex-bin
texlive-mathtools
texlive-memoir
texlive-metalogo
texlive-mfware-bin
texlive-microtype
texlive-mptopdf-bin
texlive-ms
texlive-oberdiek
texlive-pdfpages
texlive-pdftex
texlive-pdftex-bin
texlive-pdftex-doc
texlive-pgf
texlive-powerdot
texlive-psfrag
texlive-psnfss
texlive-pst-3d
texlive-pst-blur
texlive-pst-coil
texlive-pst-eps
texlive-pst-fill
texlive-pst-grad
texlive-pst-node
texlive-pst-pdf
texlive-pst-pdf-bin
texlive-pst-plot
texlive-pst-slpe
texlive-pst-text
texlive-pst-tools
texlive-pst-tree
texlive-pstricks
texlive-pstricks-add
texlive-qstest
texlive-rotating
texlive-sansmathaccent
texlive-sauerj
texlive-seminar
texlive-showexpl
texlive-subfig
texlive-tex
texlive-tex-bin
texlive-tex-gyre
texlive-texconfig-bin
texlive-texlive-scripts-bin
texlive-thumbpdf
texlive-thumbpdf-bin
texlive-tipa
texlive-tools
texlive-typehtml
texlive-ucs
texlive-unicode-math
texlive-wasy2-ps
texlive-xcolor
texlive-xdvi-bin
texlive-xetex
texlive-xetex-bin
texlive-xkeyval
texlive-xunicode
texlive-ae
texlive-algorithms
texlive-amsfonts
texlive-amsmath
texlive-anysize
texlive-avantgar
texlive-babel
texlive-babel-english
texlive-beton
texlive-bibtex
texlive-bookman
texlive-booktabs
texlive-caption
texlive-carlisle
texlive-charter
texlive-chngcntr
texlive-cite
texlive-cm
texlive-cmap
texlive-cmextra
texlive-colortbl
texlive-courier
texlive-crop
texlive-csquotes
texlive-dvipdfmx-def
texlive-dvips
texlive-dvisvgm-def
texlive-ec
texlive-enctex
texlive-enumitem
texlive-environ
texlive-etex
texlive-etex-pkg
texlive-euenc
texlive-euler
texlive-euro
texlive-eurosym
texlive-fancybox
texlive-fancyhdr
texlive-fancyref
texlive-filecontents
texlive-finstrut
texlive-fix2col
texlive-float
texlive-footmisc
texlive-fp
texlive-fpl
texlive-glyphlist
texlive-graphics
texlive-graphics-cfg
texlive-graphics-def
texlive-gsftopk
texlive-helvetic
texlive-hyph-utf8
texlive-hyphen-base
texlive-ifetex
texlive-ifluatex
texlive-iftex
texlive-ifxetex
texlive-index
texlive-kastrup
texlive-knuth-lib
texlive-knuth-local
texlive-kpathsea-doc
texlive-latex-fonts
texlive-latexconfig
texlive-lm
texlive-lm-math
texlive-lua-alt-getopt
texlive-lualibs
texlive-makeindex
texlive-manfnt-font
texlive-marginnote
texlive-marvosym
texlive-mathpazo
texlive-mdwtools
texlive-mflogo
texlive-mflogo-font
texlive-mfnfss
texlive-mfware
texlive-mparhack
texlive-mptopdf
texlive-multido
texlive-natbib
texlive-ncntrsbk
texlive-ntgclass
texlive-palatino
texlive-paralist
texlive-parallel
texlive-parskip
texlive-pdftex-def
texlive-plain
texlive-pslatex
texlive-pspicture
texlive-pst-math
texlive-pst-ovl
texlive-pxfonts
texlive-rcs
texlive-rsfs
texlive-sansmath
texlive-section
texlive-sepnum
texlive-setspace
texlive-soul
texlive-symbol
texlive-tex-gyre-math
texlive-tex-ini-files
texlive-texconfig
texlive-texlive-common-doc
texlive-texlive-docindex
texlive-texlive-en
texlive-texlive-msg-translations
texlive-texlive-scripts
texlive-textcase
texlive-times
texlive-trimspaces
texlive-txfonts
texlive-type1cm
texlive-ucharcat
texlive-underscore
texlive-unicode-data
texlive-updmap-map
texlive-url
texlive-utopia
texlive-varwidth
texlive-wasy
texlive-wasysym
texlive-xdvi
texlive-xetex-def
texlive-xetexconfig
texlive-zapfchan
texlive-zapfding
zziplib

 

20161013

Til no p9p sobre gnome3

No dconf-editor, atualizar org.gnome.desktop.wm.keybindings.switch-group{-backward} para outra combinação (ou vazia).

20160201

Destravando bootloader + root no Android 4.4.2 sobre Motorola XT890

http://fernandoadantas.blogspot.com.br/2014/03/recuperacao-da-rom-motorola-razr-i-xt890_20.html http://truquesrazri.blogspot.com.br/2015/01/como-fazer-root-no-kit-kat-442.html

Modo fastboot Motorola XT890 Android 4.4.2

Com o telefone desligado, segurar a tecla de diminuir volume e conectar o cabo usb. O telefone irá vibrar em entrar em fastboot.

Opções de desenvolvedor no Android 4.4.2

Tocar 7 vezes seguidas sobre o número da versão.

20141114

Desabilitar barras de rolagem dinâmicas no GNOME

gsettings set com.canonical.desktop.interface scrollbar-mode normal

20140804

Out of memory no sysupdate do 9front

O pull havia sido feito, mas o update não. Bastou rodar o hg update (agora com mais memória no qemu).

Qemu com rede tap sem sudo no Ubuntu

Adicionei a seguinte linha no /etc/security/capability.conf:
cap_net_admin           $user
cap_net_raw             $user
E rodei:
sudo setcap cap_net_admin=ei /usr/bin/qemu-system-*
Reloguei e tudo funcionou.
[1] http://pacita.org/books/server-setup/output/htmlchunk/ch04.html
[2] http://blog.bravi.org/?p=912

20130614

Interoperabilidade entre C e Fortran 90

% cat a.c
typedef struct X X;
struct X {
 float f;
 int  d;
};

void
setf_(X *x)
{
 x->f = 1.8;
}

void setd_(X*);

void
setd2_(X *x)
{
 setd_(x);
}
% cat xmod.f90
module xmod
  type X
    real :: f
    integer :: d
  end type
end module

subroutine setd(tx)
  use xmod
  type(X) :: tx
  tx%d = 18
end subroutine
% cat b.f90
program B
  use xmod

  type(X) :: tx

  call setf(tx)
  call setd2(tx)
  print *, tx

end program
% gcc -c a.c; ifort -c xmod.f90; ifort -c b.f90; ifort -o ab a.o b.o xmod.o; ./ab
   1.800000              18

20130609

Ubuntu 12.10 sem NetworkManager usando rede WPA2

# rfkill 0 unblock
# rfkill 1 unblock
# wpa_passphrase ssid pwd >ssid.conf
# wpa_supplicand -D wext -i wlan0 -c ssid.conf
Se isso funcionar, adicionar a /etc/network/interfaces:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid ssid
wpa-psk pwd

20130519

NFS + /home encriptado

Se o /home é encriptado, aparentemente não será possível exportá-lo por NFS.

20130516

Removendo ícones de $HOME na área de trabalho do GNOME

Já aconteceu comigo mais de uma vez. Edite $HOME/.config/user-dirs.dirs e verifique a linha XDG_DESKTOP_DIR. O meu arquivo atual - funcionando bem - é:
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"