20081126

Renombrando identidad (hostname-username)

Para cambiar el nombre de nuestro equipo

# vi /etc/hosts
127.0.1.1 viejoHostname --> 127.0.1.1 nuevoHostname
# hostname nuevoHostname
# vi /etc/hostname
viejoHostname --> nuevoHostname


Para cambiar el nombre y grupo de nuestro usuario

# usermod -l nuevoUserName viejoUserName
# mv /home/viejoUserName /home/nuevoUserName
# usermod -g nuevoGrupo nuevoUserName

20081112

Empleo del teclado en fluxbox

De las cosas que me agradan en fluxbox es el empleo de combinaciones en teclado para ejecutar acciones de una manera rápida y fácil de configurar.

Para ello se requiere modificar el archivo .fluxbox/keys con las atajos y su respectiva función.

Para no desperdiciar la tecla de winbug$ hago uso de esta como Mod4; para identificar como reconoce esta tecla empleo el comando xev.

petrohs@tlahtolli:/home/petrohs$ cat .fluxbox/keys
OnDesktop Mouse1 :HideMenus
OnDesktop Mouse2 :WorkspaceMenu
OnDesktop Mouse3 :RootMenu
OnDesktop Mouse4 :NextWorkspace
OnDesktop Mouse5 :PrevWorkspace

Mod1 Tab :NextWindow
Mod1 Shift Tab :PrevWindow
Mod4 F1 :Workspace 1
Mod4 F2 :Workspace 2
Mod4 F3 :Workspace 3
Mod4 F4 :Workspace 4
Mod4 F5 :Workspace 5
Mod4 F6 :Workspace 6
Mod4 F7 :Workspace 7
Mod4 F8 :Workspace 8
Mod4 F9 :Workspace 9
Mod4 F10 :Workspace 10
Mod4 F11 :Workspace 11
Mod4 F12 :Workspace 12
Mod4 l :ExecCommand xlock
Mod4 t :ExecCommand xterm
Mod4 f :ExecCommand firefox
Mod4 r :ExecCommand bbrun -w
Mod4 g :ExecCommand gvim
Mod4 m :ShowDesktop
XF86AudioMute :ExecCommand mocp --pause
Mod4 XF86AudioMute :ExecCommand mocp --unpause
XF86AudioRaiseVolume :ExecCommand mocp -v +2
XF86AudioLowerVolume :ExecCommand mocp -v -2
Mod4 Menu :RootMenu
Mod4 3 :Maximize
Mod4 Shift 3 :Minimize
Mod4 comma :ExecCommand gksudo dhclient
Mod4 period :ExecCommand gksudo "/sbin/iwconfig wlan0 essid red key contra"
petrohs@tlahtolli:/home/petrohs$


Donde:
Mod1 Alt
Mod4 Win
NextWindow Siguiente ventana
PrevWindow Ventana anterior
Workspace # Cambia al escritorio #
ExecCommand Ejecuta el comando
ShowDesktop Minimiza todo
RootMenu Muestra el menú
Maximize Maximizar ventana
Minimize Minimizar ventana

20081111

identificar teclas xev

xev es un programa (viene en el paquete x11-utils) que nos permite monitorizar los eventos que ocurren en nuestro sistema gráfico.
Si movemos el ratón o presionamos una tecla nos regresa como es interpretado por X.

windows
KeyRelease event, serial 32, synthetic NO, window 0x5800001,
root 0x53, subw 0x0, time 169107828, (35,221), root:(519,267),
state 0x40, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False


Punto
KeyRelease event, serial 32, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 111760512, (226,71), root:(595,393),
state 0x0, keycode 60 (keysym 0x2e, period), same_screen YES,
XLookupString gives 1 bytes: (2e) "."
XFilterEvent returns: False


Tabulador
KeyRelease event, serial 32, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 111762984, (226,71), root:(595,393),
state 0x0, keycode 23 (keysym 0xff09, Tab), same_screen YES,
XLookupString gives 1 bytes: (09) " "
XFilterEvent returns: False


Disminuir volumen
KeyRelease event, serial 29, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 112005797, (378,-17), root:(770,328),
state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False


Aumentar volumen
KeyPress event, serial 32, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 112007206, (378,-17), root:(770,328),
state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False


Quitar sonido
KeyRelease event, serial 32, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 112007847, (378,-17), root:(770,328),
state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False


Menu
KeyPress event, serial 32, synthetic NO, window 0x5a00001,
root 0x53, subw 0x0, time 112012636, (169,-13), root:(561,332),
state 0x0, keycode 117 (keysym 0xff67, Menu), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False