Ir a contenido

Baterías de Litio-Ion: Mitos y Leyendas


¿Es verdad que antes de usar por primera vez mi dispositivo debo cargarlo durante 10 a 12 horas?
NO. Las baterías de Litio-Ion son mucho más eficientes que las basadas en Níquel, por lo que no requieren una carga inicial prolongada. De hecho, ninguna batería Li-Ion actual requiere cargas superiores a 8 horas, independiente de las circunstancias.
¿Es verdad que la batería debe pasar varios ciclos de carga/descarga antes de alcanzar su máximo rendimiento?
NO. Las baterías de Litio-Ion no requieren un periodo de “rodaje” debido a que su capacidad máxima está disponible desde el primer uso. A una batería de Li-Ion le es indiferente que una carga sea la número 1, 5 ó 50.

¿Es verdad que debo agotar por completo la batería antes de volver a cargarla para mejorar su desempeño?
Absolutamente NO. Esta es una de las confusiones más comunes legadas por el ‘efecto memoria’ que sufrían las baterías de Níquel-Cadmio y, en menor medida, las Níquel-Metal.
La composición de las baterías de Litio-Ion hace preferibles las descargas parciales a una completa. Peor aún, si es sometida con frecuencia a pérdidas totales de energía, sus circuitos pueden asumir un desperfecto que disparará un mecanismo de bloqueo. Un 80% a 90% de baterías consideradas ‘defectuosas’ llegan a servicios técnicos por este motivo.
Pero hay una excepción: Las baterías de dispositivos grandes - como los notebooks - dotadas con válvulas de medición, pueden descalibrarse con el uso y entregar lecturas equivocadas. Por ello es recomendable agotarlas completamente una vez cada 30 ciclos, a fin de que sus niveles vuelvan a cero.

Si quieres leer más consejos sigue en [elfrancotirador.cl] “Baterías de Litio-Ion: Mitos y Leyendas” …

Referencias y enlaces
Etiquetas: , , ,

intltoolize: cannot copy ‘/usr/share/intltool/Makefile.in.in’ to ‘po/Makefile.in.in’


Informática

Un pequeño problema para el que no he encontrado la solución por más que he buscado.
El problema ha surgido ahora que estoy usando las autotools para automatizar toda la compilación, linkado y distribución de GLKM.

El caso es que al ejecutar el autogen.sh que tengo preparado me salía un mensaje, entre la maraña que sueltan estas herramientas, del tipo:

user@einstein:~/svn/pfc/trunk/gui$ ./autogen.sh

cp: no se puede crear el fichero regular «po/Makefile.in.in»: No existe el fichero o el directorio

Acotando el comando que fallaba lo ejecuté en modo depuración, para saber que hacía exactamente.

user@einstein:~/svn/pfc/trunk/gui$ intltoolize –copy –force –automake –debug
intltoolize: enabling shell trace mode
+ test -f configure.ac
+ configure=configure.ac
+ files=’intltool-extract.in intltool-merge.in intltool-update.in po/Makefile.in.in’
+ auxdir=.
++ egrep ‘^AC_CONFIG_AUX_DIR’ configure.ac
+ auxdirline=’AC_CONFIG_AUX_DIR([build-aux])’
+ test -n ‘AC_CONFIG_AUX_DIR([build-aux])’
++ echo ‘AC_CONFIG_AUX_DIR([build-aux])’
++ sed ’s/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/’
+ auxdir=’[build-aux]‘
+ test ‘[build-aux]‘ = ‘AC_CONFIG_AUX_DIR([build-aux])’
++ echo ‘[build-aux]‘
++ sed ’s/^\[\(.*\)\]$/\1/g’
+ auxdir=build-aux
+ case “$auxdir” in
+ test -z yes
++ pwd
+ cur=/home/user/svn/pfc/trunk/gui
+ test build-aux ‘!=’ .
+ test -z yes
+ cd build-aux
+ for file in ‘$files’
+ test -f intltool-extract.in
+ test -z yes
+ rm -f intltool-extract.in
+ test -n ”
++ basename intltool-extract.in
+ cp -f /usr/share/intltool/intltool-extract.in intltool-extract.in
+ :
+ for file in ‘$files’
+ test -f intltool-merge.in
+ test -z yes
+ rm -f intltool-merge.in
+ test -n ”
++ basename intltool-merge.in
+ cp -f /usr/share/intltool/intltool-merge.in intltool-merge.in
+ :
+ for file in ‘$files’
+ test -f intltool-update.in
+ test -z yes
+ rm -f intltool-update.in
+ test -n ”
++ basename intltool-update.in
+ cp -f /usr/share/intltool/intltool-update.in intltool-update.in
+ :
+ for file in ‘$files’
+ test -f po/Makefile.in.in
+ rm -f po/Makefile.in.in
+ test -n ”
++ basename po/Makefile.in.in
+ cp -f /usr/share/intltool/Makefile.in.in po/Makefile.in.in
cp: no se puede crear el fichero regular «po/Makefile.in.in»: No existe el fichero o el directorio
++ basename po/Makefile.in.in
+ echo ‘intltoolize: cannot copy ‘\”/usr/share/intltool/Makefile.in.in’\” to ‘\”po/Makefile.in.in’\”’
intltoolize: cannot copy ‘/usr/share/intltool/Makefile.in.in’ to ‘po/Makefile.in.in’
+ status=1
+ exit 1
+ exit 1

Estoy usando un directorio para guardar los archivos de autoconf (config-aux) y tener la estructura de directorios y archivos ordenadita.
Ahí radicaba el problema. Así que con crear un directorio llamado po bajo ese directorio ha desaparecido el error.

user@einstein:~/svn/pfc/trunk/gui$ cd config-aux/
user@einstein:~/svn/pfc/trunk/gui/config-aux$ mkdir po
user@einstein:~/svn/pfc/trunk/gui/config-aux$ ll
total 412K
-rwxr-xr-x 1 user user 44K 2007-04-20 04:09 config.guess*
-rwxr-xr-x 1 user user 32K 2007-04-20 04:09 config.sub*
-rwxr-xr-x 1 user user 18K 2007-06-07 21:28 depcomp*
-rwxr-xr-x 1 user user 13K 2007-06-07 21:28 install-sh*
-rw-r–r– 1 user user 23K 2007-06-14 16:53 intltool-extract.in
-rw-r–r– 1 user user 36K 2007-06-14 16:53 intltool-merge.in
-rw-r–r– 1 user user 28K 2007-06-14 16:53 intltool-update.in
-rw-r–r– 1 user user 193K 2006-03-11 19:49 ltmain.sh
-rwxr-xr-x 1 user user 11K 2007-06-07 21:28 missing*
-rwxr-xr-x 1 user user 2,0K 2007-06-14 16:52 mkinstalldirs*
drwxr-xr-x 2 user user 48 2007-06-14 17:51 po/

Etiquetas: , , , ,

Vodafone 3G HSDPA para linux


GNU/Linux (Debian)

En esta entrada voy a describir el proceso a llevar a cabo para configurar una tarjeta PCMCIA Vodafone Mobile Connet HSDPA/ 3G/ EGPRS/ GPRS.
La marca es OPTION - QUALCOMM 3G CDMA. La gama GLOBETROTTER HSDPA.

Si se llega a la necesidad de usar este artículo es porque ya sabes de que va el tema de la Internet mediante la red de cobertura de los móviles y que lo que quieres es que te funcione en GNU/ LINUX.

Yo lo hago en Debian, pero esto no excluye a nadie.

Requisitos

  • Hay que “instalar el paquete virtual” nozomi-modules, que para kernels superiores al 2.6.18 no compila. Este paquete nos proporciona los drivers para la tarjeta.
  • El paquete gcom es útil para gestionar la tarjeta. Por ejemplo, como veremos, sirve para ver la calidad de la señal, o introducir el PIN.
  • Para que se produzca la conexión es necesario el paquete de marcación PPP para modem wvdial.

Instalación

Para ver los paquetes relacionados con las tecnologías HSDPA y con PPP hacemos lo siguiente:

user@einstein:~$ apt-cache search HSDPA
gcom - Option GlobeTrotter and Vodafone datacard control tool
nozomi-source - source for GlobeTrotter HSDPA kernel driver
user@einstein:~$ apt-cache search PPP

Para compilar el driver de nozomi nos valemos de los siguientes comandos:

user@einstein:~$ aptitude install module-assistant nozomi-source gcom

user@einstein:~$ m-a a-i nozomi

Tras esto se habrá instalado el nuevo driver:

user@einstein:~$ dpkg -l|grep nozomi
gcom - Option GlobeTrotter and Vodafone datacard control tool
nozomi-source - source for GlobeTrotter HSDPA kernel driver
nozomi-modules-2.6.18-4-686 - GlobeTrotter HSDPA driver for LINUX (kernel 2.6.18-4-686)

Si tu kernel es superior a la versión 2.6.18 dará un error en la compilación.

Si ahora introducimos la tarjeta el kernel mostrará algo de información sobre la detección del dispositivo.
Que también se puede comprobar con un ls -la en /dev que mostrará nuevas entradas con el patrón /dev/noz* si todo ha ido bien, claro.

user@einstein:~$ dmesg |grep noz
…(información relacionada)…
user@einstein:~$ dmesg |tail
…(información relacionada)…
user@einstein:~$ tail -30 /var/log/messages
…(información relacionada)…
user@einstein:~$ ls -la /dev/noz*
/dev/noz0
/dev/noz1
/dev/noz2
…(información relacionada)…

user@einstein:~$ aptitude install wvdial g\nome-PPP
…cositas…

La configuración de wvdial se basa en los siguientes ficheros que ya se encuentran en estado óptimo para su uso.

root@maquina:~$ cat /etc/wvdial.conf
[Dialer Defaults]
Phone = *99***1#
Username = any
Password = any
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/noz0
Baud = 460800
SetVolume = 0
FlowControl = NOFLOW
#Init1= AT+CPIN=7342
Init1= AT
[Dialer PIN]
Init1= AT+CPIN=7342
[Dialer HSDPA]
Init2 = ATZ
#Init2 = ATM0
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
[Dialer 2gonly]
Init4 = AT+COPS=0,0,”vodafone.ES”,0
[Dialer 3gonly]
Init4 = AT+COPS=0,0,”vodafone.ES”,2
[Dialer vodafone]
Init5 = AT+CGDCONT=1,”IP”,”ac.vodafone.es”;
[Dialer 384k]
Init6 = AT+CGEQMIN=1,4,64,384,64,384
Init7 = AT+CGEQREQ=1,4,64,384,64,384
[Dialer 144k]
Init6 = AT+CGEQMIN=1,4,64,144,64,144
Init7 = AT+CGEQREQ=1,4,64,144,64,144
[Dialer 64k]
Init6 = AT+CGEQMIN=1,4,64,64,64,64
Init7 = AT+CGEQREQ=1,4,64,64,64,64
root@maquina:~$ cat /etc/ppp/peers/wvdial
#noauth
#name wvdial
#usepeerdns
plugin passwordfd.so
noauth
name wvdial
replacedefaultroute
noipdefault
nomagic
usepeerdns
ipcp-accept-local
ipcp-accept-remote
nomp
noccp
nopredictor1
novj
novjccomp
nobsdcomp
root@maquina:~$ cat /etc/ppp/peers/wvdial-pipe
noauth
name wvdial
plugin passwordfd.so
defaultroute
replacedefaultroute

Uso

Lo primero será comprobar que tal la cobertura, por que si no tenemos, pa que intentarlo.
Luego introduciremos el PIN para que “la red vodafone” nos escuche.
Y ya por último nos conectamos

ladamadelascamelias:~# gcom -d /dev/noz0 sig
Signal Quality: 19,99
ladamadelascamelias:~# gcom -d /dev/noz0
Enter PIN number: XXXX
Waiting for Registration..(120 sec max)…
Registered on Home network: “vodafone ES”,2
Signal Quality: 19,99
ladamadelascamelias:~# wvdial vodafone
–> WvDial: Internet dialer version 1.56
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: AT
AT
OK
–> Sending: AT+CGDCONT=1,”IP”,”ac.vodafone.es”;
AT+CGDCONT=1,”IP”,”ac.vodafone.es”;
OK
–> Modem initialized.
–> Sending: ATDT*99***1#
–> Waiting for carrier.
ATDT*99***1#
CONNECT 1800000
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Wed Apr 25 21:59:25 2007
–> Pid of pppd: 3916
–> Using interface ppp0
–> local IP address 212.73.35.196
–> remote IP address 10.64.64.64
–> primary DNS address 212.73.32.3
–> secondary DNS address 212.73.32.67

Y la línea de comando se queda así, no esperes una nueva línea de comandos. Mientras la conexión este activa no podrás hacer nada más en esa terminal.
Por lo tanto, si se desconecta lo notarás fáctilmente. Y si te quieres desconectar bastará con el típico <CONTROL> + C.

Descarga de archivos:

GUI y Monitorización

Si quieres llevar la cuenta del tiempo que te conectas o evitarte el coñazo de escribir en línea de comandos cada vez que te conectes échale un ojo a umtsmon.
Este programa aún no lo he probado, pero durante la redacción de esta entrada he descubierto que han sacado la versión 0.6 hace unas semanas. A ver que tal va.

Consejos:

Si el navegador no carga páginas (o la aplicación que sea no se conecta) revisa la configuración del cortafuegos y la del navegador (quita proxies, etc).
Si sólo se te conecta por GPRS y te acabas de dar de alta, espera unas horas, porque tardan un poco en registrarte en todos los sistemas. Si no, llama a vodafone.

Hace un tiempo intente descubrir dónde podía conseguir una tarjeta de estas en Europa, pero es cercano al imposible encontrarlas si no es a través del fabricante, creo recordar.
Lo mismo que encontrar un módems USB para 3G para yoigo, ya que no los suministra. Su precio es desorbitado. Unos 200 €.

Referencias:
Etiquetas: , , , , , , , , , , , ,

Subversion Quick Reference


Informática

It’s really easy, there are many version control systems. Subversion has been widely adopted, not as wide as CVS, but.

Check out code from a remote web repository Explaination
svn co http://svn.collab.net/repos/svn/trunk subversion This command will check out a working copy of the subversion source code into a new subdirectory called subversion. Note, this is just an example, checking out the subversion source could take a while, so don’t do it. You would generally substitute the URL with the one you are trying to access, and change the working directory to something different.
svn checkout –username myuser –password …… On the majority of the commands you can set the –username parameter and the –pasword to help automate things, instead of being prompted for them. Once you create a local working copy, your client should really cache that information, however.
Basic Subversion Commands
svn update Run this in your project directory to get the latest changes from the source control server.
svn update -r 123 Run this in your project directory to update to the specific revision 123
svn stat OR svn st Run this in your project directory, gives you the status of all the files and directories. If it returns nothing, then you are in sync. M before a file means modified, and ? means the file is not in source control.
svn revert This will revert the changes that you have made to your working copy.
svn diff filename.cpp This will show the differences between filename.cpp and the working copy. This is most useful after running an svn stat and seeing that the file is modified. You can then run this command to see what the differences are.
svn revert filename.cpp This will revert all changes you have made to filename.cpp back to the copy in the repository.
svn revert -R * This will revert all changes you have made to the entire project back to the repository version.
svn -v list This will list the files in source control for the current workspace directory
svn -v list http://svn.collab.net/repos/svn/trunk This will list all files in source control at the particular subversion repository URL. Fairly useful if you want to see what the structure is before doing a checkout.
svn info Gives you info about the current working copy, including the URL of the repository it points to, and the last changed date/author.
svn commit -m “Adding new function” filename.cpp Commit the changes in filename.cpp, and give it a useful message. Using the messages is highly important down the road when you want to figure out what a particular change did. Make sure you use them.
svn commit -m “Adding lots of new functions” Use this function without the filename to commit all changes to all files. This is useful when you have a set of changes spanning multiple files. (common)
svn commit -F log-filename - - username USUARIO Commit all changes with a log prepared (about current committing changes). BE CAREFULL: subversion username and files owner must be the same. If not you can get a commit failed: (…) svn: Accces Denied
svn log OR svn log filename.cpp OR svn log –limit 5 http://svn.collab.net/repos/svn/trunk Use this function to take a look at the log messages. The first one is for the entire working copy, the last one shows just the last 5 log messages on a web repository.
svn add newfile.cpp Add a file or directory to version control. Note that you still have to commit to actually send the file to the source control server. You also can only use this command from within a working copy directory, meaning if you haven’t used source control on that directory you will need to import it first.
svn move filename.cpp newfilename.cpp Allows you to rename or move files within source control. You can either use filenames in your local repository, or you can even pass in two URL locations to have it be moved/renamed on the server side. This command is the same as doing a copy and then a delete.
svn copy MySource MyNewSource Allows you to copy a file or directory, either with local files, or on the repository using the URL syntax.
svn delete filename.cpp Deletes the filename from source control. Note that the filename will still exist in older revisions, but will be deleted from the current revision.
svn blame filename.cpp This is one of my favorite commands in subversion. This lists out the file, giving the revision and person who changed every single line in the file. Very useful
Import Code into Subversion
svn import -m “Importing the files” MySource http://svn.theserver.com/mysource Imports the directory MySource and all files contained within into the subversion server. The URL can be several levels deep or more. Note: once you import a source code directory, you should remove the directory and then checkout the directory so that you can have a proper working copy. Oh, and back up your files before you delete them. I don’t want any nasty emails about how you lost source code.
Commands for administrators Explaination
svnadmin create /svnroot/RepositoryName Creates a new repository at RepositoryName. If you are using the URL model for accessing your site, make sure that the location you create it at is accessible via your local web server.
svnadmin hotcopy /svnroot/reponame /backups/reponame Makes a “Hot Copy” of the repository, which means a copy of the repository that can be instantly reusable. This method seems to work pretty well for full backups.
svn copy -m “Making a new branch for that new feature” http://://svn.server.com/trunk http://svn.server.com/branches/johnnysbranch Make a branch copy of the trunk into a seperate branch. This should only be used by power users or people that know what they are doing.
svn copy -m “Tagging version 1.0″ http://svn.server.com/trunk http://svn.server.com/versions/version_1.0 Tag a version of the application. This uses the same copy command that the branching does, and it’s really the same underlying operation. Copying in subversion does not actually make a new copy of the file, it just tags the current version. Once changes are made, then the changes would be stored to the file seperately.

Original URL (I’m only archiving it): subversion-quick-reference

Etiquetas: , , , , , ,

Subversion Server. Howto


GNU/Linux (Debian)

Here you can find how to prepare a subversion repository and its integration with Apache 2.

You need apache with webDAV to access repository content using HTTP or HTTPS protocol. If you prefer not to use apache, then you should use svnserve (prefered in daemon mode). This will mean using svn protocol.
Be careful with firewalls (see ahead).
And, of course, always better with Debian.

Subversion for repository administrators (using Apache 2)

In order to create a repository you need to follow these steps (do it in a root shell).

Install the needed packages:

  • apache2
  • subversion
  • libapache2-svn

Add next rules to your host in Apache 2. In Debian a mostly equal config (that you should modify) exists under /etc/apache2/mods-available/dav_svn.conf
Configuration sniplet:

< Location /svn>
# Uncomment this to enable the repository,
DAV svn
# Set this to the path to your repository
# SVNPath /var/lib/svn
# SVNParentPath /var/lib/svn/repository
SVNPath /var/lib/svn/repository
# The following allows for basic HTTP authentication. Basic authentication
# should not be considered secure for any particularly rigorous definition of
# secure.
# to create a passwd file
# # rm -f /etc/apache2/dav_svn.passwd
# # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon
# New password:
# Re-type new password:
# Adding password for user dwhedon
# #
# http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html
# configuration for mixed authenticated/anonymous access
Satisfy Any
Require valid-user
# Uncomment the following 3 lines to enable Basic Authentication
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/dav_svn.passwd
# Uncomment the following line to enable Authz Authentication
# AuthzSVNAccessFile /etc/apache2/dav_svn.authz
# The following three lines allow anonymous read, but make
# committers authenticate themselves.
< LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
< /LimitExcept>

(Important: Don’t use a DocumentRoot setting for this virtual host!”)

Restart apache with or reload apache configuration without finishing open connections with (prefered)

root@maquine:~ $ /etc/init.d/apache2 reload
or
root@maquine:~ $ apache2ctl graceful (prefered)

Create the repository and create a password file:

root@maquine:~ $ svnadmin create /var/lib/svn/repository
root@maquine:~ $ htpasswd2 -c /etc/subversion/passwd [username]
root@maquine:~ $ chown -R www-data:www-data /home/svn

Don’t forget to make the repository accessible for your web server:

To test it, try accessing it with a browser or try to check out the file:

user@maquine:~ $ lynx http://localhost/svn
user@maquine:~ $ svn co http://server/svn

(You will not be prompted for credentials. That’s normal.)

Worked?
Voila. The repository is set up.
You can check a ready setup in http://www.eldemonionegro.com/svn/.

Subversion for repository administrators (using subversion protocol)

You just need to put on work svn server.

user@maquine:~ $ ls -la /var/lib/svn/
total 1
drwxr-xr-x 4 root www-data 96 2005-06-06 00:45 .
drwxr-xr-x 56 root root 1480 2005-06-03 17:00 ..
drwxr-x— 7 root www-data 224 2003-02-20 00:37 project1
drwxr-x— 7 root www-data 224 2004-11-15 21:23 project2
user@maquine:~ $ svnserve -d -T -r REPOSITORY_DIR (Example 1: /var/lib/svn/project1/ - Example 2: /var/lib/svn/)

(-d: daemon, -T: spawn a thread instead of a process for each connection, -r root: root repository)

Try to check out the file:

user@maquine:~ $ svn co REPOSITORY_URL (Example 1: svn://server/ - Example 2: svn://server/project1/)

Worked?
Voila. The repository is set up.

Subversion for repository users

To checkout (=download) the files in the repository for the very first time run this command::

user@maquine:~ $ svn co http://server/svn

Don’t worry about other people working on the same files. Just do your changes to the files and when you seem to have a stable state (make sure everything works well enough so not everything will break for others) you should check in(=upload) your work:

user@maquine:~ $ svn ci

(Only when committing your changes you will be prompted for your username and password.)

Run the following command regularly to get the changes from other contributors::

user@maquine:~ $ svn update

If you want to add new files to the repository::

user@maquine:~ $ svn add [filename]

To get a status of which files have changed::

user@maquine:~ $ svn stat

Subversion for local repositories

This type of installation is used when you want subversion to track your local files but don’t want/need to put it on a host. You can create a local repository and access it directly. This repository is not password protected and it’s permissions depend on the filesystem’s permissions.

Install the needed packages (as root or with sudo) and create the repository (with your user):

root@maquine:~ $ apt-get install subversion
root@maquine:~ $ svnadmin create /home/joe/repositorie

The URL to your repository is it’s path preceeded with file://. For example to checkout you would do the following:

user@maquine:~ $ svn co file:///home/joe/repositorie

Subversion firewall rules

In order to acces your subversion repository using svn protocol you should reconfigure your firewall or update daemon config.
If you need to access subversion remotely, by default it runs on port 3690 using TCP.

Resources and comments

Original Authors: Christoph Haas, Tiago Cogumbreiro
Modified by: Enrique Garcia

Etiquetas: , , , , , , , ,

Viewvc (previously viewcvs)


Right now viewcvs is the old version which is available under Debian. I recomend to install the latest viewvc from official website until package gets updated.
For more about it’s history, look up in http://www.viewvc.org/who.html
Instalation is really simple, it’s only complexity resides in the apache 2 configuration. Which is not really well documented and can cause some headache.

Installation

Download here latest stable version from viewvc

I will install everything under /opt because it’s my favourite place (and because it’s standar (LSB rules I think) to put extrange things there).

user@machine:~$ cd /opt
user@machine:~$ wget http://viewvc.tigris.org/files/documents/3330/34803/viewvc-1.0.3.tar.gz
user@machine:~$ tar -xvzf viewvc-1.0.3.tar.gz
user@machine:~$ cd viewvc-1.0.3
user@machine:~$ ./viewvc-install

[will be prompted some easy questions] Answer first /opt and then leave it as it is.

Take a look at INSTALL and README. It’s always good to read this stuff, and doesn’t hurt.

user@machine:~$ emacs /opt/viewvc/viewvc.conf
[main changes I made]
user@machine:~$ diff viewvc.conf ../viewvc-1.0.3/viewvc.conf.dist
72c72
< #cvs_roots = cvs: /home/cvsroot
---
> cvs_roots = cvs: /home/cvsroot
80c80
< svn_roots = svn: /var/lib/svn/repository
---
> #svn_roots = svn: /home/svnrepos
105c105
< default_root = svn
---
> default_root = CVS
138c138
< mime_types_file = /etc/mime.types
---
> #mime_types_file = /usr/local/apache/conf/mime.types
142c142
< address = < a href="mailto:svn-admin@XXX.XXX">Administrador del repositorio Subversion< / a>

> address = < a href="mailto:cvs-admin@insert.your.domain.here">No admin address has been configured< / a>
248c248
< languages = es-es, en-us
---
> languages = en-us
391c391
< docroot = /viewvc-doc
--- (LOOK APACHE 2 CONFIG TO EXPLAIN THIS CHANGE)
> #docroot = /docroot
435c435
< use_enscript = 1
---
> use_enscript = 0
445c445
< use_highlight = 1
---
> use_highlight = 0
459c459
< use_php = 1
---
> use_php = 0
473c473
< allow_tar = 1
---
> allow_tar = 0

For coloured syntax I installed next packages. But I am not really sure they are needed.

user@machine:~$ apt-get install highlight enscript

Apache 2 configuration

Here I put my apache 2 configuration for viewvc. I’ve two versions, both of them work. Again I recomend take a take a look at INSTALL and README for answers. One is the version for CGI and the other for mod_python. I’m using mod_python because it’s known to be faster.

CGI

< IfModule !mod_python.c>
< IfModule cgi.c>
# para la instalacion local
ScriptAlias /viewvc /opt/viewvc/bin/cgi/viewvc.cgi
# para el paquete debian
# ScriptAlias /viewsvn /usr/lib/cgi-bin/viewcvs.cgi
< /IfModule>
< /IfModule>

mod_python

< IfModule mod_python.c>
Alias /viewvc-doc “/opt/viewvc/templates/docroot”
ScriptAlias /viewvc /opt/viewvc/bin/mod_python/viewvc.py
< Location /viewvc>
AddHandler python-program .py
# This appends “our path” to python path
PythonPath “['/opt/viewvc/bin/mod_python'] + sys.path”
PythonHandler handler
PythonDebug On
< /Location>
< /IfModule>

Look the result at http://www.eldemonionegro.com/viewvc/

Resources and comments
Etiquetas: , , , , , , , , , , ,

Screen: Guía rápida para empezar


GNU/Linux (Debian)

Screen es una herramienta genial para trabajar con varias sesiones a la vez desde una misma terminal.

Yo principalmente lo uso para control remoto de máquinas.
Otro de los usos más comunes es para compartir una consola con otros usuarios, de forma que todos trabajen o vean a la vez la misma línea de comandos.
No obstante, seguro que hay más usos.

De lo más interesante que nos aporta screen es que se pueden recuperar consolas/sesiones. Es como tener una terminal siempre abierta en un equipo remoto. Aunque se corte la conexión y estés haciendo alguna tarea crítica no vas a perder lo que estés haciendo, puedes volver a conectarte y allí estará todo tal y como estaba antes de la desconexión .
Un buen ejemplo de uso es si estas administrando remotamente una máquina. Se te ocurre hacer un apt-get install y se corta la conexión. Pues luego ándate con ojo, que lo mismo algo se ha quedado a medias y tienes dependencias rotas o que se yo.
No hablemos si haces cualquier otra cosa un poco más crítica, como un formateo de disco o una copia o desplazamiento de ficheros….

Ejemplo de uso

Bien, para empezar de forma rápida a usarlo un ejemplo.
Conectamos con la máquina remota, ejecutamos:

user@host $: screen -U

-U es para tener soporte para unicode uft-8
Para salir de screen y dejarlo corriendo tecleamos la secuencia < Control > + a d. Os saldrá lo siguiente:

user@host $: screen -U
[detached]

Pues para recuperar screen hacemos:

user@host $: screen -r -d

-r -d Reattach a session and if necessary detach it first.. Recuperamos la sesión seguro.

Listo.
El último comando que recomiendo es el maestro de maestros, para no memorizar nada, tenemos la fantástica ayuda instantánea de la secuencia < Control > + a ? que nos mostrará todos los atajos.

Accesos rápidos

Key Action Notes
Ctrl+a c new window
Ctrl+a n next window I bind F12 to this
Ctrl+a p previous window I bind F11 to this
Ctrl+a ” select window from list I have window list in the status line
Ctrl+a Ctrl+a previous window viewed
Ctrl+a S split terminal horizontally into regions Ctrl+a c to create new window there
Ctrl+a :resize rezize region
Ctrl+a :remove remove region Ctrl+a X is the same
Ctrl+a tab Move to next region
Ctrl+a d detach screen from terminal Start screen with -r option to reattach
Ctrl+a A set window title
Ctrl+a x lock session Enter user password to unlock
Ctrl+a [ enter scrollback/copy mode Enter to start and end copy region. Ctrl+a ] to leave this mode
Ctrl+a ] paste buffer Supports pasting between windows
Ctrl+a > write paste buffer to file useful for copying between screens
Ctrl+a < read paste buffer from file useful for pasting between screens
Ctrl+a ? show key bindings/command names Note unbound commands only in man page
Ctrl+a : goto screen command prompt up shows last command entered

Referencias y enlaces:

Etiquetas: , , , , , ,

Corregir fallos de apt-get signatures


GNU/Linux (Debian)

Si utilizas la versión, actualmente inestable, de apt-get, puede que errores de este tipo se hallan convertido en habituales:

W: GPG error: Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXX

Se deben a la verificación de firmas de los repositorios.

A mí concretamente me aparecían estos:

W: GPG error: ftp://ftp.nerim.net stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: ftp://ftp.nerim.net unstable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: ftp://ftp.nerim.net testing Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: http://non-us.debian.org/debian-non-US Release: The following signatures couldn’t be verified because the public key is not available:
NO_PUBKEY B629A24C38C6029A
W: GPG error: http://debian.cihar.com/ unstable Release: The following signatures couldn’t be verified because the public key is not available:
NO_PUBKEY E64A2AA53714DD6A

Después de buscar por google, encontré una solución:

Escribir esto como root:

root@maquina:~$ gpg –keyserver wwwkeys.eu.pgp.net –recv-keys DD41397117E73B4E
gpg: directory `/root/.gnupg’ created
gpg: can’t open `/gnupg/options.skel’: No existe el fichero o el directorio
gpg: keyring `/root/.gnupg/secring.gpg’ created
gpg: keyring `/root/.gnupg/pubring.gpg’ created
gpg: requesting key 17E73B4E from hkp server wwwkeys.eu.pgp.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 17E73B4E: public key “Gianluigi Tiesi < sherpya @ netfarm.it >” imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
root@maquina:~$ gpg –armor –export 17E73B4E | apt-key add -

donde DD41397117E73B4E es la combinación de letras y números de la firma que dice no encontrar.

De esta forma se añaden las firmas que dan los errores.
El servidor de llaves puede cambiarse, pero a mí me funciona bastante bien, suele encontrar muchas de las claves públicas que necesito.

Actualización:
Para importar clases desde ficheros, se usan los siguientes comandos:

root@maquina:~$ wget http://download.tuxfamily.org/shames/A42A6CF5.gpg
–16:08:51– http://download.tuxfamily.org/shames/A42A6CF5.gpg
=> `A42A6CF5.gpg’
Resolviendo download.tuxfamily.org… 88.191.250.18
Connecting to download.tuxfamily.org|88.191.250.18|:80… conectado.
Petición HTTP enviada, esperando respuesta… 200 OK
Longitud: 1,690 (1.7K) [application/octet-stream]
100%[======================================================================>] 1,690 –.–K/s
16:08:52 (21.49 KB/s) - `A42A6CF5.gpg’ saved [1690/1690]
root@maquina:~$ apt-key add A42A6CF5.gpg
OK

Etiquetas: , , , , , , , ,

Cerrar
Enviar por Correo