Inspirado en un script originalmente escrito en Visual Basic y publicado en el sitio LifeHacker que cada 20 minutos pregunta si quieres seguir haciendo lo que estás haciendo o si deberías dejar de malgastar tu tiempo, un usuario sugirió en ALT1040 un equivalente para Linux, que es tan sencillo que podemos reproducir aquí completamente (traducción a cargo de este modesto servidor):
#!/bin/bash
# By Spayder26, GPLv3'ed
# Require: zenity
while $(zenity —question —text="Considera si es así como realmente necesitas estar pasando tu tiempo. ¿Continuar?" —ok-label="Sí" —cancel-label="No");
do
sleep 20m
done
Si hacemos click en Sí el script comenzará a contar el tiempo desde 0 y volverá a aparecer a los 20 minutos y si presionamos en No la ventana se cerrará (considerando que empezaste a trabajar y a hacer valer tu tiempo).
Esta versión para Linux requiere de Zenity, una pequeña utilidad que permite mostrar cuadros de diálogo GTK+ desde la línea de comandos.
(http://www.vivalinux.com.ar/soft/perdiendo-el-tiempo.html)
Steps to success for installing NX on PCLinuxOS. The freeNx that comes with PCLos is version 1.5, and the windows 1.5 client is no longer available on the www.nomachine.com site. And they now have a "free beer forever" linux nxServer version so this is the version the following instructions are for.
1. Activate the OpenSSH via PCLinuxOS Control Center. It's not turned on by the default install, and nx needs ssh to work.
2. Optional: use putty or other ssh client to test that you can ssh from your windows box to your linux box.
3. Download the nxnode, nxclient and nxserver files from www.nomachine.com
* the freenx server that is available via Synaptic is version 1.5 and needs the 1.5 client which I couldn't find on the www.nomachine.com client. So, since they now have a "free as in beer forever" linux server -- I used it instead of the FreeNx server.
4. as root -- navigate to the directory you downloaded the rpm's in
rpm -ivh <rpm_name.rpm> --- first do the node, then the client, then the server
1. Download and install the nx client for indows
2. Follow the "setup connection wizzard" on windows
3. You may need to update/generate dsa keys. The instructions for doing so are on the www.nomachines.com site: http://www.nomachine.com/ar/view.php?ar_id=AR01C00126
That's what it took for me, anyway.
(http://docs.pclinuxos.com/Advanced_Networking)
Esta versión de TMLinux es la última basada en los paquetes de PCLinuxOS 2009 actualizados, con núcleo 2.6.27.31, KDE 4.3.3, Firefox 3.5.6. Debido a limitaciones de espacio no fue posible incluir OpenOffice.org 3.2, aunque se cuenta con el instalador GetOpenOffice más reciente. En el CD están instalados Abiword y el conjunto der aplicaciones Koffice.
Se cuenta con la sesión demokde4 para conocer algunas de las funcionalidades de KDE 4.3.4, así como guiones para activar efectos gráficos de compiz, KDE4 con OpenGL y XRender en la sesión visitante.
En el arranque el acceso es directo a la sesión visitante y desde ahí basta oprimir un botón para poder acceder a la sesión demokde4.
Se ofrecen en KDE dos menúes: El tradicional y el nuevo lancelot, que permite abrir programas sin tener que oprimir el ratón. Además se cuenta con los plasmoides, pequeñas aplicaciones que forman parte del escritorio, los cuales se pueden agrupar junto con los fondos de pantalla en actividades. Tanto la sesión visitante como la demokde4 tienen ejemplos de actividades a las que se puede acceder usando el panel superior.
En la sesión visitante la ayuda pasa de la barra que existía en la parte superior a una vista de carpeta en la actividad plasmoides, por lo que ahora es más visible y fàcil de usar.
En especial la ayuda remota puede ser ahora inmediata, sin necesidad de introducir los datos del usuario o la dirección del servidor al cual conectarse. Sólo cabe recordar que primero hay que establecer contacto a través de la página con la persona que vaya a brindar la ayuda.
Ya estamos trabajando en la versión 0.7, de la cual se publicará una beta en las próximas semanas y la cual será la base para la nueva guía inicial TMLinux, en este caso con escritorio KDE 4.4
Mientras tanto disfruten la 0.6 y envíen sus sugerencia para la nueva. 8-)
TMLinux crece y ahora está disponible en un DVD
Entre las novedades incluye:
Soporte de archivos .cdr (Corel Draw) mediante uniconvertor e Inkscape
Metapaquetes de aplicaciones instalados:
Básico
Multimedios
Gráficos
Efectos 3D
Juegos
1) Reboots are not SOP (Standard Operating Procedure). If an application dies, or locks up (which is rare, but can happen, usually with bleeding edge versions of apps), your OS is usually fine. If the app window stays open, iconify it or run xkill and click on it, no worries. The same is true for updates, software installs, etc. Except for kernel upgrades (infrequent), the message "You must reboot for changes to take affect" or what ever you are used to seeing is a thing of the past.
2) "It is recommended that you close all apps before proceeding" is a message you will fail to see. There is no reason to stop listening to online music, surfing the web, downloading updates or new programs and/or flipping back to your word processor, all while burning a music CD. The mouse tie ups common in other "multitasking" operating systems doesn't happen. You know the one where the icon becomes an hourglass and you are free to multi-task once the computer decides to give you cursor control back.
3) You don't need to renew your spyware/spamware and virus checker subscriptions. Sorry, you will have to find something else do with your money. Of course, nothing Linux can do about phishing links, so always beware there, but know that if you install it from your CD or open source vendor, you are spyware and virus free.
4) Linux comes with many, many, many, many applications to do pretty much anything you want to do with a computer. You won't find many Linux applications at the store because 1) they are included on your CDs/DVDs and 2) A free copy is just a download away. Always search your CD first. (with the software install method for the program you want) It is likely there, a few clicks and NO REBOOT away from running on your computer)
5) Stop looking for EULA boxes. You may have to occasionally agree to the GPL, however, email keys, digging out the CDs to find that security code to install xyz, email reminders about upgrades, all that joy doesn't exist, it is all yours to use in any way you desire.
6) Autoconfiguration. After you buy that USB drive, or that printer (you did verify that it is Linux compatible), plug it in then start using it. Your days of loading driver CD:reboot, load application CD:reboot, load OS CD x:reboot, register-click through 6 EULA boxes then finally get around to configuring it are over. You plug the USB drive in, 10 seconds later, it is fully installed and configured, and up opens your filemanager, or a printer dialogue box opens (select paper size, resolution, etc). The same thing you saw during your install, the usual lack of driver configuration is SOP in Linux.
7) You don't need to try to find the Linux equivalent of "PC Doctor" or whatever you are used to. Linux does not slow down over time, installing 40,000 apps (if you have the disk space) does not corrupt anything and feel free to uninstall any app through your distro's GUI interface, you WON'T clutter anything up.
8) Defrag. There is no Linux defrag tool, so don't look for it. In Linux, disks don't fragment in any substantial way. If you keep you HD at 98% all the time, then some fragmentation (obviously, about 2%) can occur since contiguous space is not available.
9) Under the "Start" menu, or Linux equivalent, you will find applications usually (sometimes your vendor makes strange placement choices) grouped in logical terms such as Internet (for of course, internet applications) or Office (for office applications) or Games. This is counter to the usual very logical way of Start-->Roxio-->Easy CD Creator 5-->Easy CD Creator--> Creator (You mean you forgot that Roxio makes the CD creation software for your lightscribe drive?
10) You computer is yours. No one is phoning home to check up on you. None of your music collection is about to be obsolete. None of your players require any internet connection to a "validation server" and none of your computer habits are being sent to any corporate entity that "believes strongly in your privacy" while it collects stats, no program is going to ask for revalidation if you decide to upgrade your motherboard, or video card, or add 3 USB hard drives. Your computer is yours, and you are free.
1. Conseguir y mantener actualizado un sistema completo legalmente sin pagar ningún dinero.
2. Poder correr diferentes interfaces gráficas si no te gusta la que viene por defecto o no se adecúa a tus necesidades.
3. Tener control total del hardware del ordenador y saber que no hay puertas secretas traseras en mi software, puestas por compañías de software o gobiernos malintencionados.
4. No hace falta desfragmentar los discos duros, nunca.
5. Probar programas, decidir que no me gustan, desinstalarlos y saber que no he dejado basura en un registro que puede ralentizar el mi máquina.
6. Usar el SO sin necesidad de correr antivirus ni ningún tipo de software anti-espía, y no reiniciar mi ordenador durante meses.
7. Personalizar lo que quiera, legalmente, incluyendo mis programas favoritos. Y puedo preguntar a los desarrolladores, proponerles ideas y participar en el proceso de diseño/programación de software si quiero.
8. Usar el mismo hardware durante más de 5 años hasta que realmente necesites reemplazarlo.
9. Recibir ayuda de cientos de usuarios, expertos y novatos de manera gratuita y desinteresada.
10. Tener un escritorio con efectos espectaculares, y muy superiores a los de Windows Vista, en un ordenador de hace tres años.
http://vivalinux.com.ar/articulos/10-cosas-solo-en-linux.html
Ayer me topé con problemas al instalar un disco duro externo.
Después de usar Gparted mi instalación de Sidux-Debian ya no podía trabajar con la conexión de red inalámbrica, ni montar automáticamente dispositivos USB, así que corté por lo sano, respaldo todo lo que pude y volví a instalar Sidux pero en versión Eros ó 2007-4.
En este momento estoy instalando programas y recuperando configuraciones. Me agrada bastante. Sólo tuve que instalar b43-fwcutter para que funcionara el adaptador de red inalámbrico.
Solamente firefox está consumiendo más memoria de lo que debería, pero tal vez es porque copié los archivos de configuración que usaba anteriormente. Más al rato voy a ver de que se trata.
La nueva versión de TMLinux está basada en los paquetes de PCLinuxOS 2009 actualizados, como el núcleo 2.6.26.8, KDE 3.5.10, OpenOffice.org 3.0, Firefox 3.0.7, Java 6 y nuevos activadores nativos para tarjetas de red inalámbricas y tarjetas de video. En KDE se cuenta con nueva decoración de ventanas. Los escritorios Gnome y Openbox, incluidos en el DVD, cuentan con nuevos temas.
En la versión CD se cambió amarok por xmms y amule por frostwire para poder incluir los activadores de red para que la mayoría de las computadoras portátiles pueda conectarse a internet fácilmente
La versión DVD incluye los efectos 3D de compiz-fusion, el emulador de máquinas virtuales virtualbox, así como amarok, songbird, vlc, gimp y una gran cantidad de programas educativos, juegos y fondos de escritorio.
apt-get update
apt-get --purge remove synaptic
apt-get install synaptic
El mismo método funciona para Midnight Commnader
(gracias a Martín por el dato)
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1073&ref=featured
Con una cuenta AWS de Amazon se usa el servicio de almacenaje (s3) para contar con descargas rápidas de contenidos premium
El agregado s3fox sirve para enviar y administrar los archivos
Los archivos se entregan a los usuarios mediante javascript para redireccionarlos a las direcciones de tipo http://descargas.tmlinux.com.s3.amazonaws.com/nombre_archivo.ext
Las rutinas javascript se activan después de recibir el pago via paypal o correo con copia de la ficha de deposito
Se instala openbox y los paquetes relacionados con synaptic o apt-get, incluyendo pypanel
después se copia /usr/share/xsessions/openbox.desktop como /usr/share/apps/kdm/sessions/30openbox.desktop para que esté disponible al iniciar sesión
Posteriormente hay que configurar con obconf y obmenu
Al aparecer la pantalla de GRUB (donde están las opciones de arranque) se oprime F3 y se agrega la opción "noscsi" a la línea de comando.
En otros casos se selecciona Safeboot (= Arranque seguro)
Al aparecer la pantalla de GRUB (donde están las opciones de arranque) se oprime F3 y se agrega la opción "nonetwork" a la línea de comando.
Aquí está la posible explicación
The hardware detection is starting during the initrd-phase of the booting system. In this phase some of the WLAN and LAN devices cannot be configured proberly.
The cheatcode "nonetwork" does not start the configuration of the network in the script hwdetect. The network will be configured by the booting livesystem (after finishing the initrd-phase and chrooting to the real livesystem) and this will solve the problem with most of the affected WLAN and LAN devices.
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=54787.15)
La nueva versión de TMLinux está basada en los paquetes de PCLinuxOS 2009 actualizados, con núcleo 2.6.26.8, KDE 4.3.1, OpenOffice.org 3.1.0-993, Firefox 3.5.2. Además vienen instalados los entornos de escritorio Gnome y LXDE, este último para utilizarse en condiciones de poca memoria o cuando se requiera el máximo de rendimiento.
Hay programas que debutan en TMLinux 0.6 beta, como el sincronizador de archvos Dropbox, para el cual hay que abrir una cuenta gratuita, la cual brinda 2GB de almacenamiento en Internet y el instalador Click2Install, el cual permitirá instalar programas al usar vínculos especiales en páginas de internet.
Se cuenta con la sesión demokde4 para conocer algunas de las funcionalidades de KDE 4.3.1, así como guiones para activar efectos gráficos de compiz, KDE4 con OpenGL y XRender en la sesión visitante.
Se ofrecen en KDE dos menúes: El tradicional y el nuevo lancelot, que permite abrir programas sin tener que oprimir el ratón. Además se cuenta con los plasmoides, pequeñas aplicaciones que forman parte del escritorio, los cuales se pueden agrupar junto con los fondos de pantalla en actividades. Las actividades se usan para cambiar el entorno predeterminado del usuario sin tener que cerrar los programas que utiliza en ese momento, pero como es algo difícil de explicar en pocas palabras es mejor verlo funcionando en la sesión demokde4.
Esta versión de TMLinux servirá para exponer a los usuarios algunas de las alternativas disponibles y permitir que ellos participen en la decisión de cuales de ellas permanecerán en la versión 0.6 final.
Lista y publicada la versión 0.3 de TMLinux, dedicada al Festival Latinoamericano de Instalación de Software Libre (FLISOL)
Entre las novedades incluye:
Ayuda remota
Synaptic en español
Información del FLISOL 2008
Se publicó en el sitio de internet de TMLinux (http://tmlinux.com) un video demostrativo de la instalación de esta distribución, donde se muestra el proceso completo, paso a paso y con comentarios en subtítulos.
Este es el primero de una serie de videos que muestra la forma de realizar las operaciones más comunes en TMLinux. Más adelante se convertirá en un curso de computación para aprender imitando. Este curso está enfocado a nuevos usuarios, no sólo de TMLinux, sino de computación, por lo que se busca que sea lo más sencillo posible de entender y practicar.
El video que aparece en internet tiene resolución menor a la original, pero suficiente para distinguir los detalles de la instalación. La versión DVD de TMLinux que se publicará en unos cuantos días incluye el video en su resolución original, de tal manera que cualquier usuario que desee instalar a disco duro puede usar el video como una referencia de lo que debe ir haciendo a tiempo real.
http://www.dailymotion.com/video/x5rf66_instalacion-tmlinux-usando-disco-co_tech
<html><div><object width="420" height="336"><param name="movie" value="http://www.dailymotion.com/swf/x5rf66&related=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/x5rf66&related=1" type="application/x-shockwave-flash" width="420" height="336" allowFullScreen="true" allowScriptAccess="always"></embed></object></html>
El video se encuentra también disponible en la página dedicada a la documentación de TMlinux: http://tmlinux.com/documentos.htm
Ayer instalé actualizacion de Ubuntu para pasar de 7.04 a 7.10rc.
No hubo mayor problema con la actualización y estoy probando nuevos efectos 3D, activador nvidia, y algunas otras cosas que lo hacen todavía más sencillo de usar.
Como de costumbre la lista completa de programas disponibles para instalar es avasalladora, pero muy recomendable para darse una idea de lo que se puede hacer con Ubuntu.
Mañana estaré instalando las modificaciones de la versión final.
Pendiente de aprobación proyecto en SourceForge. En cuanto le den visto bueno envío imagen iso y comienzo campaña de difusión para desarrolladores y comunidad Linux.
Publicado el torrent de TMLinux utilizando Ktorrent y la siguiente lista de rastreadores:
http://open.tracker.thepiratebay.org/announce
http://www.torrent-downloads.to:2710/announce
http://denis.stalker.h3q.com:6969/announce
udp://denis.stalker.h3q.com:6969/announce
http://www.sumotracker.com/announce
(Aunque parece que denis.stalker no funciona con esta dirección)
Por supuesto hay que abrir los puertos para Ktorrent en la pared de fuego (6881-6889 y 4444)
Ahora voy a enviar un mensaje a cofradia, vivalinux, linuxman, etc para solicitarles su ayuda para sembrar la imagen iso de TMLinux
También esta disponible la imagen iso en Adrive.com
http://adrive.com/public/c3e6a1dc3c5069fcfd7b2a5a85078305dfee9384accb89502244f60dea4ccbac.html
y el torrent
http://adrive.com/public/5bd2b7489cbedf2d6d347e427990bb1434473ae0cd593d92ad4fb2dfc24b2792.html
Al recibir clave pública ssh del usuario visitante se ejecuta el comando para abrir el tunel y ejecuta el guión de ayuda remota, esto se logra usando command="/home/visitante/ayuda_remota" en el archivo authorized_keys (http://troy.jdmz.net/rsync/index.html)
Más adelante se puede usar su visitante para ejecutar el ssh y que envíe la clave pública de nuevos usuarios, que posteriormente podrán usar la ayuda desde sus sesiones. (http://ghantoos.org/tag/ssh)
Se descarga uniconvertor
http://sourceforge.net/project/showfiles.php?group_id=198620&package_id=235294
y se instala libpython2.4-devel
apt-get install libpython2.4-devel
después se construye la aplicación desde el directorio donde se descomprimió uniconvertor
python setup.py build
y se instala
python setup.py install
por último se desinstala libpython2.4-devel
apt-get --purge remove libpython2.4-devel
Hay algunos paquetes que no se reconocen en el conjunto educativo.
Se puede instalar el metapaquete desde la línea de comando como superusuario usando:
apt-get install jclic kdeedu geogebra gcompris childsplay stellarium tuxpaint tuxmath tuxtype
Una falla en el proceso de instalación desde el DVDenVivo provoca que no aparezca el menu de GRUB, con lo cual no es posible arrancar TMLinux desde el disco duro donde se instaló.
Prosigo con la promoción de TMLinux
Ya quedó inscrito en los proyectos comunitarios de PCLinux
http://www.mypclinuxos.com/doku.php/tmlinux
Y anunciado en el principal foro de TMLinux en español
http://pclinuxos.es/foro/viewtopic.php?t=113
Ahora estoy esperando autorización para poder enviar un mensaje a http://www.pclinuxos.com/index.php?option=com_smf&Itemid=26&topic=31717.0
Y así aparece en la lista de remasters de PCLinuxOS
http://www.pclinuxos.com/index.php?option=com_content&task=view&id=37&Itemid=89
Siguen las descargas a buen nivel y ya aparecen 3 siembras completas
Está llegando gente de México y España a descargar
Todavía tengo que enviar una comunicación al foro de localización para coordinar la traducción del instalador y las pantallas de arranque del cdlive donde pregunta por el teclado y red
http://www.mypclinuxos.com/forum/index.php?board=49.0
Tal vez se pueda corregir actualizando los paquetes makelivecd, gfxboot y syslinux desde el depósito testing para que se instale nuevamente /usr/lib/syslinux/gfxboot.com
Lista y publicada la versión 0.2 de TMLinux
Entre las novedades incluye:
Instalación de metapaquetes
Barra de ayuda (kooldock)
La nueva versión de TMLinux está basada en los paquetes de PCLinuxOS 2009 actualizados, con núcleo 2.6.27.31, KDE 4.3.3, Firefox 3.5.6. Debido a limitaciones de espacio no fue posible incluir OpenOffice.org y en su lugar se cuenta con Abiword y el conjunto der aplicaciones Koffice.
Hay programas que debutan en TMLinux 0.6 beta, como el instalador Click2Install, el cual permitirá instalar programas al usar vínculos especiales en páginas de internet.
Se cuenta con la sesión demokde4 para conocer algunas de las funcionalidades de KDE 4.3.4, así como guiones para activar efectos gráficos de compiz, KDE4 con OpenGL y XRender en la sesión visitante.
Se ofrecen en KDE dos menúes: El tradicional y el nuevo lancelot, que permite abrir programas sin tener que oprimir el ratón. Además se cuenta con los plasmoides, pequeñas aplicaciones que forman parte del escritorio, los cuales se pueden agrupar junto con los fondos de pantalla en actividades. Las actividades se usan para cambiar el entorno predeterminado del usuario sin tener que cerrar los programas que utiliza en ese momento, pero como es algo difícil de explicar en pocas palabras es mejor verlo funcionando en la sesión demokde4.
Esta versión de TMLinux suttiuye al DVDenVivo publicado en septiembre y servirá para exponer a los usuarios algunas de las alternativas disponibles y continuar el proceso para permitir que ellos participen en la decisión de cuales de ellas permanecerán en la versión 0.6 final.
Ahora también se pueden descargar las imágenes iso desde distromania.com
http://www.distromania.com/distro_info.php?distro=1205
Estas son las descargas más rápidas que tenemos disponibles hasta la fecha y esperamos que ayuden a nuestros usuarios a tener una experiencia más agradable reduciendo el tiempo de descarga.
Nuestro agradecimiento al excelente equipo de distromania.
Para arrancar como CDenVivo hay que hacerlo con safeboot
Al instalar dio un error de arranque 22 en Grub
Franz logró resolverlo de la siguiente forma:
========================================
Como no podemos iniciar linux, arrancamos desde el live cd
abrimos la consola y nos identificamos como root
y ponemos lo siguiente, paso por paso
grub -> ejecutamos el interprete de comando de grub
fin /boot/grub/stage1 -> busca donde está la partición de linux (por ejemplo hd0,7 )
root (hdX,Y) -> poner el valor devuelto anterior
setup (hd0) -> instala grub en nuestro primer disco duro (hd0), que es con el que inicia el computador
quit -> salimos del interprete de comando grub
=====================================
Probablemente el problema surgió al haber instalado grub a sda1 en lugar de sda, sin número
8:awn-core-applets ########################################### [ 11%]
I/O warning : failed to load external entity "/etc/gconf/schemas/awn-clock.schemas"
Failed to open `/etc/gconf/schemas/awn-clock.schemas': No such file or directory
I/O warning : failed to load external entity "/etc/gconf/schemas/cpumeter.schemas"
Failed to open `/etc/gconf/schemas/cpumeter.schemas': No such file or directory
I/O warning : failed to load external entity "/etc/gconf/schemas/stack.schemas"
Failed to open `/etc/gconf/schemas/stack.schemas': No such file or directory
Utilizando openbox se puede reducir el uso de memoria de manera significativa
La mejor solución es iniciar en nivel 3 (línea de comandos) agregando el 3 al final de la línea de inicio de GRUB. Se entra a una sesión de usuario en modo texto y se escribe
startx openbox -- :0
para iniciar openbox
Después podemos usar fbpanel para tener el acceso al menú y la barra de tareas
Me falta poder arrancar sin que se abran aplicaciones de KDE como knotify o kded, que consumen bastante memoria
Openbox está disponible a partir de la versión 0.3.3
Tuve que compilar x11vnc (http://www.karlrunge.com/x11vnc/) para contar con servidor vnc confiable, que mostrara el escritorio actual y que pudiera conectarse a un cliente vnc en modo de escucha (-listen)
primero instalé libxorg-x11-devel para cubrir las dependencias
y luego
./configure
make
y como superusuario
make install
Al final hay que remover los programas que se instalaron con libxorg-x11-devel
apt-get remove libxorg-x11-devel libapplewm7 libapplewm7-devel libdmx1-devel libfontconfig1-devel libfontenc1-devel libfreetype6-devel libfs6-devel libice6-devel liblbxutil1 liblbxutil1-devel libmesagl1-devel libmesaglu1-devel libmesaglut3-devel libmesaglw1 libmesaglw1-devel liboldx6 liboldx6-devel libsm6-devel libstdc++5-devel libwindowswm7 libwindowswm7-devel libx11_6-devel libxau6-devel libxaw-devel libxaw6 libxcomposite1-devel libxcursor1-devel libxdamage1-devel libxdmcp6-devel libxevie1-devel libxext6-devel libxfixes3-devel libxfont1-devel libxfontcache1-devel libxft2-devel libxi6-devel libxinerama1-devel libxkbfile1-devel libxkbui1-devel libxml2-devel libxmu6-devel libxorg-x11-devel libxp6-devel libxpm4-devel libxrandr2-devel libxrender1-devel libxres1-devel libxscrnsaver1-devel libxt6-devel libxtrap6-devel libxtst6-devel libxv1-devel libxvmc1-devel libxxf86dga1-devel libxxf86misc1-devel libxxf86vm1-devel x11-proto-devel x11-server-devel x11-xtrans-devel zlib1-devel
----------------------------------------------------
Primero había instalado tightvnc-server y tuve conflictos entre kded y avahi al configurar /home/visitante/.vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
TMLinux 2008 es 0.1.1 incluye un error en open office calc que provoca que se congele el sistema al tratar de "guardar como"
Para corregirlo basta con hacer los siguiente como superusuario (root) desde la línea de comando:
apt-get update
apt-get --reinstall install openoffice.org
O también se puede utlizar synaptic para reisntalar el paquete base de Open Office
Gracias a Gaby por el reporte
Pruebas para ayuda remota
Echar a andar el demonio ssh en la máquina que va a brindar ayuda
/etc/init.d/sshd start (como superusuario)
Arrancar un servidor vnc desde la maquina que recibirá ayuda
x11vnc -bg
Establecer tuneles desde la máquina que recibirá ayuda
ssh -ngfNT -R 5901:localhost:5900 visitante@tmlinux.sytes.net
ssh -ngfNT -R 6022:localhost:22 visitante@tmlinux.sytes.net
Abrir el visor vnc en la maquina que brinda ayuda
vncviewer localhost:5901
al terminar hay que cerrar el visor y el servidor ssh
/etc/init.d/sshd stop
Esto debe cerrar también el tunel
Aqui dejo 59 programas disponibles para Linux
AbiWord
Es un procesador de textos similar al Microsoft Word. Tiene multitud de opciones y es gratis.
Adobe Flash Player
Es un programa que sirve para visualizar contenido multimedia en Internet.
Adobe Reader
Programa para ver e imprimir archivos de formato de documento portátil de Adobe (PDF)
AntiVir
Antivirus que ofrece protección efectiva contra virus.
AVG Anti-Virus
Es un antivirus para uso personal que te protege ante los virus.
Azureus
Cliente mejorado de la red BitTorrent. Opciones avanzadas y muy configurable.
BitTorrent
Programa de intercambio de ficheros. Con muy buenas tasas de transferencia.
Blender
Es una herramienta de diseño 3D gratuita, tanto para uso personal como profesional.
BurnInTest
Es un programa que permite realizar una serie de test a los componentes del ordenador para comprobar su rendimiento y estabilidad.
Dia
Sirve para crear todo tipo de diagramas: UML, entidad relación, diagramas de flujos, diagramas de red, diagramas eléctricos y muchos más.
Dr. Web
Potente Antivirus con un buen motor de detección y limpieza de virus.
ePSXe
Es un emulador de la consola PlayStation (PSX) con el que podrás jugar a los juegos de la PlayStation.
FileZilla
Es un cliente FTP con multitud de opciones y posibilidades.
FreeMind
Es un programa que sirve para crear mapas mentales y conceptuales.
Frets On Fire
Frets On Fire es un juego en el que emularas ser un guitarrista y tendrás que usar el teclado a modo de guitarra.
FrostWire
Es un programa de intercambio de ficheros con el que puedes compartir todo tipo de archivos con otros usuarios.
GIMP
Es un programa de distribución libre que nos permite hacer retoques fotográficos, composiciones y edición de imágenes. Al más puro estilo Photoshop.
Gizmo
Sirve para realizar llamadas de teléfono gratis a través de Internet.
Google Earth
Es un programa que te permite explorar el mundo a tus anchas. Es como tener un Atlas Virtual pero con muchas más posibilidades.
Griffith
Es un programa que sirve para catalogar y gestionar nuestras películas, ya sean en DVD o DivX.
Grisbi
Es un programa de contabilidad personal que nos ayuda a controlar nuestros gastos.
Hamachi
Sirve para comunicar dos o más ordenadores a través de Internet mediante una red virtual propia para tener una comunicación segura.
HTTrack
Es un navegador Offline. Te permite descargar páginas web en el disco duro para luego poder navegar por ellas sin tener que estar conectado a Internet.
IHMC CmapTools
Es un programa que permite crear mapas conceptuales, para analizar situaciones o facilitar el estudio de distintos temas, sin importar su grado de complejidad.
Inkscape
Es un programa editor de gráficos vectoriales similar a Freehand, Xara X, Illustrator o CorelDraw.
Kompozer
Kompozer es un editor de código HTML que te permite crear páginas web con calidad profesional.
LimeWire
Es un programa de intercambio de ficheros que permite compartir música, vídeos, documentos y programas.
Memtest86
Programa que testea la memoria RAM de nuestro ordenador.
Miro
Es un reproductor de vídeo que permite suscribirse a canales de Internet.
Mozilla Firefox
Navegador preparado para la próxima generación es rápido como el rayo en todos los sentidos. ¡Disfrútalo!
Mozilla Thunderbird
Es un gestor de correo fácil de usar, seguro y con filtros anti-spam.
Nvu
Es un completo sistema de edición Web que combina un sencillo manejo de ficheros con una interfaz de usuario intuitiva.
OpenOffice
Programa gratuito que es una alternativa al Ms-Office. Ofrece editor de texto, hoja de cálculo, creador de presentaciones, etc.
OpenProj
Es un programa gratuito y de código abierto, para la administración de proyectos.
Opera
Imprescindible navegador para internet. Mucho más rápido y estable que el Internet Explorer.
Pando
Es un programa de intercambio de ficheros con el que puedes descargar y compartir ficheros con otros usuarios.
PCSX2
Es un emulador de PlayStation 2 que permite jugar a los juegos de PS2 en el PC.
Pidgin
Es un programa de mensajería multiplataforma con el que podrás hablar con tus amigos de AIM, Jabber, ICQ, Yahoo, MSN Messenger, IRC y otros.
PowerISO
Es una herramienta que sirve para manejar imágenes ISO de CD/DVD.
Scribus
Es un programa que sirve para realizar maquetaciones y publicaciones profesionales.
Secret Maryo Chronicles
Es un juego de plataformas 2D inspirado en el famoso Mario Bros.
Skype
Programa para hablar gratis por teléfono en internet. Basta con unos cascos, microfono y conexión a internet.
Stellar Phoenix
Programa para recuperar los datos perdidos de tu Sistema Operativo. Muy efectivo.
Stellarium
Es un programa gratuito, que muestra un cielo en tres dimensiones similar al real, tal como si lo estuvieras observando con un telescopio.
StepMania
Es un juego de baile que emula al famoso Dance Dance Revolution.
SystemRescueCd
Es un sistema Gnu/linux arrancable desde cdrom que sirve para reparar tu sistema y recuperar tus datos después de un fallo.
TightVNC
Programa de acceso remoto a PCs.
TrueCrypt
Permite crear unidades encriptadas que solo podrán ser accedidas si conoces la contraseña de la unidad.
Unstoppable Copier
Recupera datos desde discos dañados o rayados.
VirtualBox
Es un programa que sirve crear máquinas virtuales en nuestro PC y ejecutar cualquier sistema operativo en esas máquinas virtuales.
VLC
Es un reproductor multimedia que soporta tanto vídeo como audio.
VMware Player
Sirve para tener un ordenador dentro de nuestro ordenador. Podrás ejecutar un nuevo ordenador en una ventana de tu Sistema Operativo.
War of Conquest
Es un juego de estrategia online multijugador en el que tendrás que crear y hacer crecer a tu nación.
Workrave
Es un programa que nos ayuda a controlar el tiempo que pasamos trabajando delante del ordenador.
XAMPP
Facilita la instalación de Apache, MySQL, PHP y Perl en nuestro ordenador.
Xara Xtreme
Es un programa de edición gráfica que permite crear ilustraciones vectoriales.
XnView
Programa para visualizar y convertir más de 400 formatos gráficos.
Zattoo
Es un programa que te permite ver la televisión en tu PC sin tener que instalar ningún componente adicional.
ZSNES
Es un emulador de la consola Super Nintendo. Podrás jugar a los juegos de la Super Nintendo en tu PC.
http://mx.answers.yahoo.com/question/index;_ylt=AuaPGITZYwtkNA08EBdx.KnB8gt.;_ylv=3?qid=20080624090248AA8dky6
TMLinux 2008 en preparación, a partir de PCLinux 2008 mini instalado en una máquina virtual y agregando los programas que pudieran ser más interesantes para usuarios promedio de computadora. ([[Adaptaciones de PCLinux a TMLinux]])
Estoy probando que extensiones de Firefox requieren licencia para poner vínculos aparte y que el usuario pueda instalar directamente.
Se modificó el escritorio para que muestre dispositivos extraíbles y se continuó la modificación de draklive-install al español
Se iniciaron pruebas de grabación en video con recordmydesktop. Al utilizar la imagen de TMLinux montada en el CD de la máquina virtual no está mostrando el apuntador del ratón. Tal vez haya que cambiar el tipo de sistema operativo o deshabilitar laintegración del ratón.
En Sidux se puede usar el guión smxi para instalar los programas de virtualización VMware-player y Virtualbox de forma automática al cambiar el kernel.
Lo probé con Sidux-eros y creó perfectamente los módulos necesarios.
1. Enable pipelining
Browsers are normally very polite, sending a request to a server then waiting for a response before continuing. Pipelining is a more aggressive technique that lets them send multiple requests before any responses are received, often reducing page download times. To enable it, type about:config in the address bar, double-click network.http.pipelining and network.http.proxy.pipelining so their values are set to true, then double-click network.http.pipelining.maxrequests and set this to 8.
Keep in mind that some servers don't support pipelining, though, and if you regularly visit a lot of these then the tweak can actually reduce performance. Set network.http.pipelining and network.http.proxy.pipelining to false again if you have any problems.
2. Render quickly
Large, complex web pages can take a while to download. Firefox doesn't want to keep you waiting, so by default will display what it's received so far every 0.12 seconds (the "content notify interval"). While this helps the browser feel snappy, frequent redraws increase the total page load time, so a longer content notify interval will improve performance.
Type about:config and press [Enter], then right-click (Apple users ctrl-click) somewhere in the window and select New > Integer. Type content.notify.interval as your preference name, click OK, enter 500000 (that's five hundred thousand, not fifty thousand) and click OK again.
Right-click again in the window and select New > Boolean. This time create a value called content.notify.ontimer and set it to True to finish the job.
3. Faster loading
If you haven't moved your mouse or touched the keyboard for 0.75 seconds (the content switch threshold) then Firefox enters a low frequency interrupt mode, which means its interface becomes less responsive but your page loads more quickly. Reducing the content switch threshold can improve performance, then, and it only takes a moment.
Type about:config and press [Enter], right-click in the window and select New > Integer. Type content.switch.threshold, click OK, enter 250000 (a quarter of a second) and click OK to finish.
4. No interruptions
You can take the last step even further by telling Firefox to ignore user interface events altogether until the current page has been downloaded. This is a little drastic as Firefox could remain unresponsive for quite some time, but try this and see how it works for you.
Type about:config, press [Enter], right-click in the window and select New > Boolean. Type content.interrupt.parsing, click OK, set the value to False and click OK.
5. Block Flash
Intrusive Flash animations are everywhere, popping up over the content you actually want to read and slowing down your browsing. Fortunately there's a very easy solution. Install the Flashblock extension (flashblock.mozdev.org) and it'll block all Flash applets from loading, so web pages will display much more quickly. And if you discover some Flash content that isn't entirely useless, just click its placeholder to download and view the applet as normal.
6. Increase the cache size
As you browse the web so Firefox stores site images and scripts in a local memory cache, where they can be speedily retrieved if you revisit the same page. If you have plenty of RAM (2 GB of more), leave Firefox running all the time and regularly return to pages then you can improve performance by increasing this cache size. Type about:config and press [Enter], then right-click anywhere in the window and select New > Integer. Type browser.cache.memory.capacity, click OK, enter 65536 and click OK, then restart your browser to get the new, larger cache.
7. Enable TraceMonkey
TraceMonkey is a new Firefox feature that converts slow Javascript into super-speedy x86 code, and so lets it run some functions anything up to 20 times faster than the current version. It's still buggy so isn't available in the regular Firefox download yet, but if you're willing to risk the odd crash or two then there's an easy way to try it out.
Install the latest nightly build (ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/), launch it, type about:config in the address bar and press Enter. Type JIT in the filter box, then double-click javascript.options.jit.chrome and javascript.options.jit.content to change their values to true, and that's it - you're running the fastest Firefox Javascript engine ever.
8. Compress data
If you've a slow internet connection then it may feel like you'll never get Firefox to perform properly, but that's not necessarily true. Install toonel.net (toonel.net) and this clever Java applet will re-route your web traffic through its own server, compressing it at the same time, so there's much less to download. And it can even compress JPEGs by allowing you to reduce their quality. This all helps to cut your data transfer, useful if you're on a limited 1 GB-per-month account, and can at best double your browsing performance.
(http://www.techradar.com/news/software/applications/8-hacks-to-make-firefox-ridiculously-fast-468317)
It was the best of times. It was the worst of times. They say never to begin a novel talking about the weather. I guess nobody told Dickens, but I digress…
Today I booted into Windows XP MCE for the first time in 24 days. I would like to share my experience. I kept careful notes because I knew what to expect from past experience and I anticipated some of the problems that I will share.
First let me say that I am not a newbie. I have used PCs from the earliest days. I began on the Apple II and I have used Windows extensively ever since there first was such a thing. I have used Linux as my main OS for about 7 years. Now that I have got past the preamble, here is my tale of two experiences.
It took XP 42 seconds to boot. That is fairly typical for my computer. The Windows desktop first appeared at 10:56 a.m. However, I was not able to use my computer for some time as it went nuts with updates, probably because it had not been into Windows for awhile. I got several pop-up notices about updates available and blithely began to answer everything in the affirmative. Four minutes later, the update notices stopped coming and I was able to get control over the computer and set to work. However, three minutes later I got a flurry of activity as the hard drive became very busy once again. This may sound extreme, but it happens after not using Windows for a long time.
I loaded Firefox and began to read messages. At 11:06 the hard drive settled down to a normal level. One minute later I got my first notice to restart the computer. I wanted to work so I clicked on Later. At 11:08 the hard drive started to get busy once more and I received yet another update notice. I answered Yes. At 11:13 I got an Update Complete notice. I set back to work after this short interruption.
At 11:17, I got my second nag to restart. I chose Later once again and got back to reading messages in Firefox. At 11:26 I got a third nag to restart. By now my work was thoroughly messed up due to all of the interruptions and it was clear that I would be nagged until I relented which I did.
I installed a program that I had downloaded and then proceeded to clean up the shortcut on my desktop and then to edit the menu to move the new folder into a logical group. I created a group called Utilities and moved the folder into it. I restarted at 11:32. Three minutes later I was back where I started in Windows.
I got a busy icon for a minute. I got a pop-up security message that a file had been changed. I agreed and dismissed the security message. I got another pop-up that there were updates to install. I said yes in the vain hope that they would allow me to work while it was busy. Then another balloon appeared on my system tray telling me just that.
One minute later I got yet another security warning about changes made previously. I agreed and dismissed the message. I set to work at 11:38, but one minute later I got a busy icon and the hard drive went crazy once more. I then got a notice to restart. I chose Later and continued to work. I got more restart notices every 9 minutes until such time as I re-booted at 12:11 p.m.
I had been working for a little over an hour and had received 6 nags and was rebooting for the second time. I had got little done. However at 12:12, I was back in Windows XP for the third time. Again I got a busy icon for roughly a minute. However, when it returned the Language Bar which had been turn off appeared on my task bar. I shut it off and changed the settings so it would not reappear. By 12:15 the hard drive was still busy and I got a security notice that a program was trying to access the internet. It was an antispam program, so I gave it permission (something that my firewall already knew). The hard drive settled down and I began to work at 12:16. After using Firefox for about a minute I got a notice that a script was running and would use resources for some time and asked if I wanted to continue running the script. I said yes.
Two minutes later I got a pop-up that my printer was now installed. It had been installed for months, so this was news to me. Then I got a notice that updates for Windows were available. I wanted details so I got Internet Explorer to open the update screen. I checked out what had previously installed and saw that it was a security update and SP3 for MS Office. Now it wanted to install WGA which had been installed previously. I said yes and it installed. Then it wanted to install SP3. This is what I was waiting for and my real reason for going into Windows. I said yes.
As it began to prepare itself for SP3, Internet Explorer became unusable. In fact, it would not even allow me to minimize it which was a nuisance since it was running maximized. I had run out of desktop real estate because Windows XP has only one desktop. Fortunately I could use the menu and task bar. I would have to work around the IE window. After the downloading was complete I got a pop-up that SP3 was ready to install. I said Yes. It was complete by 1:00. I was asked to restart. I was tempted to say yes, but said Later. After all, I came to work. Nine minutes later though I was nagged to once again restart. I said no and at 1:18 I got my second nag to re-boot. I gave in at 1:23 and rebooted.
However, Windows would not restart. It spontaneously rebooted after just a few seconds. I tried again. This time I watched closely and saw a fleeting BSOD appear before it rebooted. This time I booted into safe mode. I did a System Restore at 1:29. Ten minutes later I was back into XP once again. I got a Restore Complete notice. I got a busy icon and the hard drive set to a flurry of activity once again. When it stopped, I had to remove the Language Bar and change the settings a second time. Two minutes later I left XP.
I booted into Ubuntu 8.04, my default OS. It booted in 57 seconds. After a brief stop at the login screen I was at my desktop complete with Compiz-Fusion and Avant Window Navigator. There was no busy icon and no hard drive activity. I did not receive one update notice and no nags to reboot. It did not give me a language bar that had been previously shut off and it did not install a previously installed printer. In short, I was able to work without interruption.
For fun I installed an application. I loaded Synaptic and a chose a random program. It did not put a shortcut on my desktop that I had to remove and it created the icon in an existing folder that made logical sense. When it was installing I could minimize Synaptic and even if I couldn’t minimize it out of the way I had several desktops to use because Linux allows me as many virtual desktops as I can manage.
These are two very different experiences. You can choose which one suits you the best. I know which one I prefer. By the way I never did get SP3 to work. I knew that it would not be smooth sailing but proceeded anyway, because if you can’t trust the company who gives you your OS, who can you trust?
http://linuxcanuck.wordpress.com/2008/06/03/a-tale-of-two-experiences-or-why-i-dont-use-windows/
Si al tratar de abrir programas graficos desde línea de comando se obtienen avisos del tipo
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
** CRITICAL **: Unable to open display
Hay que habilitar a otros usuarios para usar la misma sesión gráfica
Suponiendo que el usuario que abre originalmente la sesión gráfica es juan y el usuario que quiere abrir el programa es jorge
como juan se escribe en la línea de comando
xhost +
su jorge
y ya como jorge se pueden abrir los programas en ambiente gráfico
Sin embargo es un método que deja expuesta la sesión a ataques. Es preferible utilizar el archivo sudoers siempre que sea posible.
Si se trata de abrir una aplicación gráfica con una línea en un guión como:
/usr/bin/amule
Se obtiene una advertencia: Gtk warning :: cannot open display
agregando env DISPLAY=:0.0 se corrige el problema quedando la línea como sigue:
env DISPLAY=:0.0 /usr/bin/amule
Por ejemplo, si quiero abrir TMLinux wiki en el tema Metapaquetes utilizo
http://tm.com.mx/wikis/linux.php#open:Metapaquetes
Más instrucciones aquí
http://www.scribd.com/doc/2189287/Tiddlywiki-Formatting-Guide
para conectarse al servidor dominio.com.mx se introduce lo siguiente en Konqueror
sftp://usuario@dominio.com.mx
Para Una máquina en la direccion 192.168.0.1:
sftp://usuario@192.168.0.1
Anteriormente se recomendó en este artículo el protocolo fish://, pero es más propenso a errores de conexión
(Más detalles)
If you have ssh running on a remote host which you need to access, you can dramatically reduce the amount of typing you have to do to manage files by using Konqueror. To access a remote host in this manner, use "fish://" in the Location Toolbar. Then put your username followed by the @ character and the hostname. Here's an example:
fish://willy@10.197.99.55/home/willy
...lets me access a computer which is local on my home network, while:
fish://willy@www.linuxgazette.com/
...lets me access the Linux Gazette site.
After you press enter, you will be presented with a username/password dialog box. Your username should already be there, so just enter your password and you should see your default directory appear in the browser window.
The sftp: really doesn't have anything to do with ftp:. It's really using ssh to do all the directory and file management.
Depending on your permissions on the host, you can read, write, delete, and copy files in this way. This could also be used in conjunction with some of the other Konqueror functions which have been discussed here in Linux Gazette; for example, you should be able to generate thumbnails and webpages as discussed in Hal Stanton's article Building Image Galleries with Konqueror, as long as you start Konqueror as the file manager.
Note that you can use the right-click Konqueror functions such as "Open with" or "Save as...", but that if you open a document with a word processor and you edit it, you won't be able to save it back to the host from within the word processor. In this case you'll have to save a local copy and copy it. But, you can do the copy with another Konqueror window or tab. Also, if the ssh connection times out, you'll be prompted to enter your password again when you do a file operation.
If it doesn't work, here's a troubleshooting list:
1) Be sure to start ssh on the host you want to access.
2) Make sure you have a valid username/password on that system.
3) Make sure that port 22 (ssh port) is open through any firewall in front of the host.
4) Note that "fish:" is not a registered protocol, so it won't work on other browsers.
Es posible manejar una máquina remota usando ssh desde Linux si en la máquina WinXP se instala cygwin (http://www.cygwin.com/setup.exe) con los paquetes openssh y openssl.
Una vez instalado cygwin se ejecuta
ssh-host-config -y
para dejar instalado el demonio ssh
En algunos casos se presentan problemas de permisos que se puden evitar usando
ssh-host-config
y contestando las preguntas manualmente, aunque este método es menos seguro
Ya instalado el servidor sshd se procede a crear el archivo con las claves de usuarios
mkpasswd.exe -l > /etc/passwd
y con
paswwd
se genera la clave para el usuario actual
Si se acaba de instalar el servidor sshd se echa a andar con
net start sshd
En ocasiones posteriores arrancará automáticamente
(http://www.noah.org/wiki/Sshd_on_Windows)
Firefox tiene habilitada la biblioteca de funciones pango en forma predeterminada y al parecer provoca que Firefox tenga una perdida de redimiento de hasta 45%
Para dejar de utilizar pango, sólo hay que agregar la siguiente línea al archivo .bashrc o .bash_profile (de la carpeta del usuario) o el archivo de configuración en /etc/pango:
export MOZ_DISABLE_PANGO=1
(http://www.dreamlogic.net/archives/speed-up-ubuntu-firefox)
Here's something for broadband people that will really speed Firefox up:
1.Type "about:config" into the address bar and hit return. Scroll down and look for the following entries:
network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests
Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.
2. Alter the entries as follows:
Set "network.http.pipelining" to "true"
Set "network.http.proxy.pipelining" to "true"
Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.
3. Lastly right-click anywhere and select New-> Integer. Name it "nglayout.initialpaint.delay" and set its value to "0". This value is the amount of time the browser waits before it acts on information it receives.
If you're using a broadband connection you'll load pages MUCH faster now!
abre una terminal y escribe: sudo ln [[-s /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/libnpjp2.so /usr/lib/chromium-browser/plugins]]
Luego podrás revisar en about:plugins si ya está instalado Java
(http://cofradia.org/2010/03/05/version-beta-de-software-para-envio-de-multiples-sms-desde-aplicacion-web-con-gnokii-nokia/)
utilizar
modprobe hci_usb
hciconfig hci0 up
debe estar instalado el paquete bluez-utils
Descargar el archivo de instalación y ejecutarlo sólo me produjo un error. Así que a buscar en foros.
Luego intenté instalando algunos paquetes, como se hace en Fedora 11 (http://rootblock.wordpress.com/2009/06/24/fedora-11-adobe-air-installation-not-allowed-by-administrator/#comment-3), pero sin éxito.
Seguía apareciendo el siguiente mensaje de error:
"An error occurred while installing Adobe AIR. Installation may not be allowed by your administrator linux"
Después intenté actualizar cerrando Firefox, ya que en algún sitio se comentaba que ha llegado a causar problemas. Igualmente no funcionó.
Por último desinstalé la versión anterior y volví a instalar. De esta forma fue que lo conseguí, aunque no descartaría que los pasos anteriores hayan colaborado en la solución.
Primero hay que asegurarse de que en /etc/apt/sources.list se modifique la línea que se usa para indicar el depósito de programas para que use la sección correspondiente a kde4
Por ejemplo, si se usa:
rpm http://spout.ussg.indiana.edu/linux/pclinuxos/pclinuxos/apt/ pclinuxos/2007 main extra nonfree kde gnome
Tiene que quedar así:
rpm http://spout.ussg.indiana.edu/linux/pclinuxos/pclinuxos/apt/ pclinuxos/2007 main extra nonfree kde4 gnome
Después se aplica
apt-get update
apt-get upgrade
Para realizar una actualización completa del sistema, todavía sin instalar kde4
Para actualizar KDE 3.5.10 a 4.3 basta con utilizar
apt-get install task-kde4-minimal
Si aparece un error respecto a dependencias no cumplidas o algo similar se pueden desinstalar algunos paquetes usando
apt-get remove libx264_60 libmlt0.2.5 kdemultimedia kdemultimedia-kaudiocreator kdemultimedia-kscd kmixautostart kdegraphics-kooka kdegraphics-kpdf kdegraphics-kruler kdegraphics-ksnapshot kdegraphics-kview kdelibs
Una vez resueltas las dependencias y conflictos basta con ejecutar task-kde4-minimal para realizar la actualización a la versión 4.3
Al terminar de instalar kde4 hay que utilizar ctr+alt+sup para reiniciar, ya que el apagado normal no funciona.
Para contar con kde4 en español hay que configurar desde la aplicación de configuración del escritorio de KDE, en el menú (Personal)->(Región e Idioma)->(País, región e idioma), donde se agrega el idioma español y se especifica tamaño carta para la impresión.
Al instalar task-kde4-minimal en TMLinux se pierden openoffice y kate, entre otros. Para reinstalar openoffice se usa GetOpenOffice y para Kate se usa kdesdk4
Para reinstalar juegos, aplicaciones educativas y obtener plasmoides adicionales basta con usar apt-get install task-kde4 task-kde4-extra
A partir de la versión 2.4.1 de OpenOffice en PCLinuxOS y TMLinux se separa la aplicación en varios paquetes adicionales, los cuales no se instalan automáticamente al utilizar apt-get upgrade.
Hay que asegurarse de instalar cuando menos los siguientes paquetes:
openoffice.org-base
openoffice.org-core
openoffice.org-common
openoffice.org-impress
openoffice.org-calc
openoffice.org-draw
openoffice.org-java
openoffice.org-kde
openoffice.org-l10n-es
openoffice.org-mimelnk
openoffice.org-writer
A la gente que usa Virtual Box (yo personalmente uso VMware) les suele suceder que al actulizar el kernel de linux deja de funcionar la VirtualBox y tiene que instalar un kernel genérico, pues bien, aquí os dejo un pequeño truco que funciona en bastantes casos, simplemente tendreis que escribir en consola la siguiente línea:
sudo /etc/init.d/vboxdrv setup
(http://pinguinosycia.blogspot.com/2008/12/problema-kernel-virtual-box.html)
Lo primero es utilizar LocaleDrake para cambiar el idioma a español es_MX_utf8
Para que la instalación sea en español hay que sustituir los archivos en la carpeta /usr/share/draklive-install por versiones en español
Se cambia el contenido de /etc/version para reflejar los cambios
Instalar OpenOffice
streamtuner
streamripper
amule
amarok
amsn
kate
firefox
xsane
kcalc
vlc
k3b
yakuake
cups
mplayerplugin
vlcplugin
kdeaddons
jpilot
se vuelven a instalar los programas para que funcionen en español
Se crea la cuenta visitante en donde se prepara el entorno para los nuevos usuarios. A partir de este momento se hacen los cambios desde una sesión de este usuario.
Se cambian los nombres de los íconos del escritorio a español
modificar los vinculos .desktop para incluir lineas de idioma
Name[es]=
Se agrega un botón de Firefox al panel
A aMule se le agregan listas de servidores y nodos actualizadas
Se agrega al menú kde un vínculo al programa de instalación drakliveinstall y se enlaza en el escritorio
Para los archivos wma y wmv se hace la asociación de kde para abrirlos en primera instancia con vlc
Se configura el escritorio para que muestre dispositivos extraíbles
Se instalan /usr/share/tmlinux-metapaquetes/metapaquetes.sh
y /usr/share/tmlinux-ayuda-remota/ayuda_remota.sh
Tambien se copian los archivos de /root/vbcompartido/tmlinux/ssh a /home/visitante/.ssh
se desinstala firefox y se instala firefox 3 con los archivos para soporte en español
En KDE se establece firefox3 como navegador predeterminado
Se instala conky (monitoreo de cpu, ram, etc)
Se instala kooldock, y se copia la configuración .kooldock a /home/visitante
se instalan extensiones para firefox, incluyendo las que requieren aceptar licencia, sólo que usando cleo
colorful tabs
unplug
tabmixplus
flashblock
interclue
También se copia /root/vbcompartido/extensiones_firefox/extensiones_tmlinux.xpi a /usr/share/tmlinux-extensiones/extensiones_tmlinux.xpi
Una vez completados los cambios a la sesión demo se copian los archivos y subdirectorios a /etc/skel para que los nuevos usuarios los tengan como predeterminados.
Solamente se eliminan verificar y authorized_keys de /etc/skel/.ssh para que la ayuda remota solo se pueda ofrecer desde el usuario visitante y se modifica el autostart de kde para que no inicie firefox junto con la sesión, solamente kooldock
La página de inicio se copia de /root/vbcompartido/tmlinux a /usr/share/doc/HTML
--Se instala jnext en /usr/lib/firefox*/plugins copiando jnext.so y la carpeta jnext
Los íconos de inicio del menú kde (/root/vbcompartido/tmlinux/beautification/kdemenu*.png) se copian a /usr/share/icons/crystalsvg/*x*/apps
Se descarga tm.com.mx/wikis/linux.php a /usr/share/doc/HTML/linux.html
Se usa el procedimiento indicado en [[29/3/2008 Compilar x11vnc para la ayuda remota en TMLinux]]
Se compila uniconvertor para soporte .cdr con inkscape
Se agrega openbox (para arranque e instalación con poca memoria)
Se instalan metapaquetes para versión DVD
Se actualiza pidgin a versión 2.4.3
Se actualiza openoffice a versión 2.4.1
En la edición DVD se instala JMF de acuerdo a las indicaciones en [[Agregar soporte multimedios a Openoffice con JMF]]
Se instalan xine-flac y xine-faad
Se elimina openoffice-draw de la edición CD (desde la versión 0.4)
Se actualiza amsn a 0.97.1
Se aplica el procedimiento [[Cambiar la configuración UTC del reloj en TMLinux para usar hora local]]
Para contar con acceso a mensajes de Skype desde Pidgin se instala el [[Conector Skype para Pidgin]] en la versión DVD
En TMLinux 0.5 CD
Se actualizan los paquetes (> 600 MO)
Vuelve a quedar instalado OpenOffice Draw
Se tiene que volver a configurar firefox (ya no firefox3) para usar español
y las traducciones de draklive-install y finish-install
Se vuelven a copiar los kmenu.png para que aparezca el ícono de TMLinux en el menú
Se agrega kernel-latest (2.6.26.8.tex3)
En la versión CD Se elimina el kernel anterior (2.6.22.15), así como ruby y se sustituye amule con frostwire, amarok con xmms y xmms-alsa y se elimina el tema de íconos nuovext-aero para que quepa la imagen iso en el CD. También se incluyen activadores y firmware de tarjetas inalámbricas.
En la versión DVD se agrega ntfs-3g, dkms-fuse, dkms-omnibook los diferentes activadores de nvidia, ati.
Para que al instalar desde el CDenVivo y que respete los temas de gfxboot de TMLinux es necesario en la instalación desde donde se genera el CDenVivo hacer una reinstalación de grub al sector de arranque a modo texto y reinstalar nuevamente a modo gráfico, usando la herramienta Centro de Control PCLinuxOS->Arranque->Configurar sistema de arranque. Después hay que copiar los archivos del tema TMLinux2008 a pclinuxos en las carpetas de /usr/share/gfxboot. Al parecer esto último es debido al draklive-install, que insiste en instalar el tema pclinuxos, en lugar del tema actual del CDenVivo.
Se instala openbox, obconf, openbox-i10n, openbox-i10n, nitrogen y librsvg para contar con una sesión de inicio de openbox para particionar e instalar TMLinux en máquinas con poca memoria y sin partición de intercambio
Se copia message de /usr/share/gfxboot/themes/TMLinux2008/boot a /boot/grub/
Se utilizan los fondos de escritorio de
http://www.gnome-look.org/content/show.php/Surreal+Sunset++Blue++Human+Colors?content=85183
y
http://www.cubemine.com/
a partir de TMLinux 0.5
Antes de crear la imagen iso se ejecuta
"Konqueror Control Center -> Security & Privacy -> Cleanup"
y
apt-get clean
además de limpiar los datos de firefox
Para la versión 0.5.1 se agregan lame y vorbis-tools. También se cambia el fondo de pantalla a The_space_between_by_pincel3d_tmluna.jpg y el panel se cambia a color negro para que haga juego con la parte de abajo del fondo de pantalla
En TMLinux 0.5.1 se eliminan
cups-drivers-foo2kyo
cups-drivers-foo2zjs
cups-drivers-m2300w
cups-drivers-pegg
min12xxw
pentaxpj
ppmtocpva
printer-filters
Se instala keytouch y se agregan al metapaquete gnome:
gksu
gnome-control-center
task-gnome-minimal
y se sustituye Avant-Window-Navigator con
cairo-dock
cairo-dock-plugins
cairo-dock-plugins-extra
y cairo-dock-themes
Tambien se eliminan los paquetes coreutils-doc, xfsprogs, xmms, xmms-alsa y nano y /usr/share/doc/HTML/... y los idiomas que no se usan. También los caches de miniaturas e íconos
En la versión 0.6 de TMLinux se incluye KDE 4.3 utilizando el procedimiento indicado en
[[Actualizar KDE de 3.5.10 a 4.3 en TMLinux]]
Se usa el tema de plasma Oxyzone, el tema de pantalla anunciadora predeterminado, el fondo de escritorio Aire, la combinación de colores Ia Ora-Gray y el estilo de ventanas glowglass con el decorador de ventanas Aurorae. El estilo de ventanas es Oxígeno y se modificó el arranque de KDM para que use también Aire como fondo y el logo de TMLinux.
Se asigna alt+espacio a krunner e Impr pant a ksnapshot
Se instalaron varios plasmoides en la sesión demokde4, junto con dos actividades
visitante sigue siendo la sesión predeterminada.
Se agregaron íconos de usuarios con imágenes de Tux a /usr/share/apps/kdm/pics/users y /usr/share/faces. El Tux superman es el ícono para el superusuario, Tux extraterrestre para visitante.
Se agegaron las nuevas versiones de kdenlive y k9copy.
Para el CD de TMLinux 0.6 se toma la imagen iso de pclinuxos.2009 minime kde 3.5 y se agrega el idioma español, kde4-task-minimal, abiword, koffice, amarok, ktorrent, audacity, entre otros. Quedan fuera del CD openoffice, frostwire, java.
Se instala prism y luego se usa el procedimiento Agregar conector Flash a Prism en TMLinux
Se agregan las siguientes líneas en draklive-install
"""system("perl -pi -e 's/title linux/title TMLinux/gi' $::prefix/boot/grub/menu.lst");"""
"""system("perl -pi -e 's/title failsafe/title TMLinux-a_prueba_de_fallos/gi' $::prefix/boot/grub/menu.lst");"""
Let's say for instance that we want to add Seattle, WA (the birthplace of Linux Journal) to the list of time-zones that Linux knows about. First, look in the list of predefined time-zones for a city that's in the the same time-zone as the city you want to add, in this case Los Angeles. Then as root do the following:
$ cd /usr/share/zoneinfo
$ cp America/Los_Angeles America/Seattle
This will make the new "Seattle" time-zone use the same time-zone data as "Los Angeles" uses. Note: if /usr/share/zoneinfo doesn't exist try /usr/lib/zoneinfo.
Now edit the file /usr/share/zoneinfo/zone.tab and find the line for the time-zone that you copied, in this case "Los Angeles":
US +340308-1181434 America/Los_Angeles Pacific Time
Duplicate that line and change the old time-zone name to the new one:
US +473622-1221955 America/Seattle Pacific Time
The numbers are the latitude and longitude of the city in the form +/-DDMM+/-DDDMM or +/-DDMMSS+/-DDDMMSS (D=Degrees, M=Minutes, S=Seconds). You can find that information on the web, for example at infoplease.
(http://www.linuxjournal.com/content/add-your-city-linuxs-list-time-zones)
growisofs -M /dev/dvd -J -r "directory name with files to add to DVD"
replace "directory name with files to add to DVD" with actual directory containing files you want to add to growable DVD
(http://www.commandlinefu.com/commands/view/2151/add-files-to-existing-growable-dvd-using-growisofs)
Usando Menú->Sistema->Monitoreo->Netapplet obtenemos un indicador en la barra de tareas con los datos más relevantes de la conexión
Si oprimimos con botón izquierdo del ratón abre una ventana con los datos actuallizados de la transferencia de información
Con botón derecho presenta otras opciones de configuración, entre ellas la posibilidad de cambiar de red inalámbrica
Para que cualquier usuario pueda cambiar la configuración inalámbrica al configurar la interfaz de red hay que seleccionar la opción correspondiente, al igual que permitir el cambio de red (roaming)
Primero hay que crear la carpeta /usr/lib/prism/plugins
mkdir /usr/lib/prism/plugins
Y luego vincular a /usr/lib/mozilla/plugins/libflashplayer.so desde esa carpeta
ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/prism/plugins/libflashplayer.so
For Linux, you can build it from source:
1. You will need to have libpurple and pidgin headers first. For Ubuntu, these are libpurple-dev and pidgin-dev packages
2. Download microblog-purple source code and untar it somewhere
3. cd microblob-purple-x.x && make && make install
4. The executable will be installed in your pidgin plug-in installation dir, detected from pkg-config command. You can also modify variable and path in global.mak
Después es cuestión de activar el conector dentro de la configuración de Pidgin
(http://webupd8.blogspot.com/2009/03/twitter-in-pidgin-plugin.html)
Add in the following to /boot/grub/menu.lst :
title Windows
root (hd0,0)
makeactive
chainloader +1
-----------
hd0,0=primer disco,primera partición
-----------
http://mailman.lug.org.uk/pipermail/wolves/2005-October/017485.html
I installed bplay and in the sounds tab of my preferences set the sound method to command and as sound command entered
bplay %s
http://modfree.org/index.php?topic=458.msg2272
1. Download JMF from the sun website (Instalar con apt-get para TMLinux)
2. Look up, which JRE you are using in Openoffice(it is important to know precisely where the one which OO uses is located), look it up under "Tools-Options-Java"
In my case this is /usr/java/jre1.6.0
3. "Install" the JMF (Actally at least on my machine this dumb installation procedure doesn't install anything but just unfolds the JMF to some place).Locate the place, where the JMF files were dumped. (/usr/share/jmf/lib para TMLinux 0.4)
4. Manually copy the files "jmf.jar", "mediaplayer.jar" and "multiplayer.jar" into the "/ext" directory of the JRE that Openoffice uses. They must be located there, otherwise they don't work!!!!!! - took me days to find that one out :roll: :roll:
In my case this is /usr/java/jre1.6.0/lib/ext (may be symlinks would be more elegant....) (/usr/lib/jvm/java-1.6.0-sun-1.6.0.06/jre/lib/ext para TMLinux 0.4)
5.In Openoffice select "Classpath" from "Tools-options-java" in Openoffice. Add the three files "jmf.jar", "mediaplayer.jar" and "multiplayer.jar" to the classpaths
6. Optional: You might replace "jmf.jar" by "fobs4jmf.jar" in the above procedure to be able to play more video formats. (Google will easily give you a location to download fobs4jmf.jar from.)
7. Restart openoffice and hopefully your videos will play like a charm.
(http://user.services.openoffice.org/en/forum/viewtopic.php?f=10&t=5849)
Ejecutar como superusuario
cd /etc/init.d
update-rc.d mysql defaults
(En este ejemplo agrega el guión mysql)
Para poder ajustar los valores gamma del monitor que utilizamos se usa el programa xgamma
Por ejemplo: En una computadora Vaio con un problema en la pantalla LCD había que incrementar el valor gamma global a 2.5 para evitar que las imágenes aparecieran como "negativos"
Desde línea de comandos se usa
xgamma -gamma 2.5
Es necesario deshabilitar "menú de ventanas" en las opciones generales de compiz con un truco:
Se habilita una opción de teclado, por ejemplo: "slow animations", con la combinación de teclas alt-espacio
Manda una advertencia de que esa combinación de teclas está siendo utilizada por "menú de ventanas"
Se deshabilita la combinación de "menú de ventanas" desde el mismo cuadro de diálogo
Se deshabilita "slow animations" o la opción que se haya usado
Se reinicia la sesión para que katapult pueda usar alt-espacio
Si aparece el mensaje de error
Could not reliably determine server's fully qualified domain name [FAILED]
Basta con comentar (colocar un # al principio) la línea que dice
LoadModule unique_id_module modules/mod_unique_id.so
en el archivo /etc/httpd/conf/httpd.conf
Al utilizar apt-get puede encontrarse la siguiente advertencia:
W: GPG error: http://www.stanchina.net ./ Release: The following signatures couldn't be verified
because the public key is not available: NO_PUBKEY 3DCCCCACE46F104F
Para activar el reconocimiento de las claves públicas se usa:
apt-get install debian-keyring
apt-key add /usr/share/keyrings/debian-role-keys.gpg
De esta forma se verifican las claves de los depósitos de Debian
Para agregar la clave de marillat se hace:
To import my key from a GPG server :
gpg --keyserver hkp://pgpkeys.mit.edu --recv-keys 1F41B907
do the following under root :
gpg --armor --export 1F41B907 | apt-key add -
Para otros repositorios se repiten estos dos últimos pasos, pero sustituyendo el número que identifica a marillat con el número correspondiente a cada depósito
============================================
https://drupal.gulic.org/node/367
ftp://ftp.nerim.net/debian-marillat/faq.html
Algunos vídeos que descargamos no tienen un alto volumen de sonido,incluso con alsamixer al 100%. Hay un truco para esto.Arranca tu vídeo con:
mplayer -softvol -softvol-max 300 video_file.avi
o
mplayer some.avi -aop volume:volume=300
El nivel de volumen se puede configurar con distintos valores: 300,400,500,etc..
(http://phyx.wordpress.com/2009/08/16/aumenta-el-volumen-de-mplayer-a-un-300/)
Okay, as pointed out in a comment on my last post, there are lots of ways to do this sort of thing. Many (most?) real sysadmins would probably choose to write a short shell script. Here's the deal: I actually like PHP. Anyway, in my last post I shared a way to do site backups using PHP. Here's a short followup, how to backup a MySQL database using PHP. You can put this script into the same file as the last script, to be run by a cron job, or you can do this at a different time. Like the last one, this script also originated from this site.
I hope someone finds this useful.
Again, sorry for the crossed out lines in the beginning of the script when the system command is called. My blog software uses a double dash to initialize and terminate the strikeout, and for some reason, even though the text is set as "preformatted," parts are still being struck out. I presume it is because of the presence of quotation marks in the line. The interior of the line should read
mysqldump --user=$dbuser --password=$dbpswd --host=$host $mysqldb
<?php
$emailaddress = "yourname@emailaddress.com";
$host="localhost"; // database host
$dbuser="weird_user_name"; // database user name
$dbpswd="strong_password"; // database password
$mysqldb="important_data"; // name of database
$filename = "~/sqlbackup_important_data." . date("d") . ".sql";
if ( file_exists($filename) ) unlink($filename);
system("mysqldump user=$dbuser password=$dbpswd --host=$host $mysqldb > $filename",$result);
$size = filesize($filename);
switch ($size) {
case ($size>=1048576): $size = round($size/1048576) . " MB"; break;
case ($size>=1024): $size = round($size/1024) . " KB"; break;
default: $size = $size . " bytes"; break;
}
$message = "The database backup for " . $mysqldb . " has been run.\n\n";
$message .= "The return code was: " . $result . "\n\n";
$message .= "The file path is: " . $filename . "\n\n";
$message .= "Size of the backup: " . $size . "\n\n";
$message .= "Server time of the backup: " . date(" F d h:ia") . "\n\n";
mail($emailaddress, "important_data db backup" , $message, "From: Website <>");
?>
http://matthewhelmke.net/index.php/2008/02/01/31-automatic-mysql-backups-using-php
Estas reglas son las indicadas
KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /mnt/usb%n"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /devk /mnt/usb%n", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /devk /mnt/usb%n", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /mnt/usb%n"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /mnt/usb%n", OPTIONS="last_rule"
Place these udev rules in /etc/udev/rules.d/ with any file name ending in .rules For instance on my system this code is in /etc/udev/rules.d/sda.rules.
A version with symlinking /media to /mnt:
KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usbhd-%k", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /devk /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /devk /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
Important! If you are using any fixed devices (for example SATA hard disks - check your /etc/fstab) which are recognized as /dev/sdX change all occurrences of sd[a-z] to the first unused letter for a sd* device. For example if you have one SATA hard disk recognized as /dev/sda change all "sd[a-z]" to "sd[b-z]". It's a good idea to start the name of your custom udev rules file with a number for example: 10-my-udev.rules so udev will read it first before standard rules. These rules require no other setup in /etc/fstab. Review mount commands options to change permissions, syncing etc. (search forums for details about the consequences of different setups).
(http://wiki.linux-sevenler.org/index.php/ArchLinux_-_Udev)
Para que se monten correctamente las memorias USB en un Knoppix 5.0.x hay que modificar el fichero:
/etc/udev/knoppix.rules
y eliminar en ambas líneas:
-u knoppix -g knoppix
Para que monte la unidad en modo lectura/escritura habrá que modificar el parámetro -r y poner -rw
Después habrá que reiniciar.
Actualizaciones
[[16/09/2009 TMLinux 0.6 beta liberado]]
[[12/3/2009 TMLinux 0.5 liberado]]
[[09/5/2008 TMLinux 0.3.2 DVD liberado]]
[[16/4/2008 TMLinux 0.3 Flisol liberado]]
[[24/3/2008 TMLinux 0.2 liberado]]
[[19/2/2008 Torrent publicado]]
Avisos
[[20/5/2009 No funciona la instalación desde la versión de desarrollo del DVDenVivo]]
[[13/3/2009 Arranque de algunos equipos viejos con TMLinux 0.5 y PCLinux 2009.1]]
[[13/3/2009 Solución para hacer funcionar algunos adaptadores inalámbricos con TMLinux 0.5 y PCLinuxOS 2009.1]]
[[20/4/2008 No funciona el metapaquete educativo en TMLinux 0.3]]
[[3/3/2008 Error en Open Office Calc]]
Bitácora
[[25/6/2008 Descargas disponibles en distromania.com]]
[[16/6/2008 Video de instalación TMLinux]]
[[2/5/2008 Instalar uniconvertor e inkscape para abrir archivos .cdr en TMLinux]]
[[12/4/2008 Como usar amazon S3 para descargas premium]]
[[12/4/2008 Como tener synaptic funcionando en español en versiones de TMLinux previas a la 0.3]]
[[2/4/2008 Ayuda remota en TMLinux]]
[[30/3/2008 Ayuda remota]]
[[29/3/2008 Compilar x11vnc para la ayuda remota en TMLinux]]
[[27/3/2008 Instalando TMLinux en una Compaq F564LA]]
[[27/3/2008 Prueba de metapaquete Gnome]]
[[6/3/2008]]
[[21/2/2008]]
[[17/2/2008]]
[[6/2/2008]]
[[17 October 2007]]
[[Mi experiencia con Linux]]
pv -ptre FILE | dd of=FILE bs=1M
Gives a nice output with a progressbar, good for writing cf cards from images.
(http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html)
Bill Gates ¿En ocasiones te has sentido frustrado utilizando Windows? ¿Sí? Bueno, no te preocupes, Bill Gates también. En un mail interno que envió a varios departamentos de Microsoft en el año 2003 y que se acaba de hacer público, el todavía máximo dirigente de la multinacional norteamericana mostró su malestar por el desbarajuste general de Windows, por la nula usabilidad del sitio microsoft.com, por la dificultad que conllevaba bajarse según que programas, por los problemas de Windows Update, por la lentitud del sistema operativo para instalar algunos paquetes de software, porque fuera necesario reiniciar el ordenador tras instalar prácticamente cualquier cosa o por el gran consumo de recursos que demandaba para determinadas acciones.
El contenido del correo resulta tragicómico por cuanto en él, Bill Gates relata a sus empleados los pasos que ha debido seguir para instalar un programita de lo más inofensivo como es Movie Maker. Comenzando por los problemas para localizar la descarga en microsoft.com, el jerifalte de Microsoft se muestra disconforme con la exasperante lentitud del portal y lo poco eficiente que es de cara al usuario.
A continuación, y ante la imposibilidad de bajárselo directamente de Internet, acude a Windows Update y se encuentra con que el sistema le pide que, si quiere instalar el programa Movie Maker, deberá hacer lo propio con otros 17 MB de datos. Y eso, obviamente, no gusta a Gates, que por si fuera poco se encuentra con que, una vez completada la descarga, el proceso de instalación se alarga 6 largos minutos durante los que el ordenador se ralentiza en exceso y le impide realizar otras tareas.
A continuacvión le aparece una bonita ventanita en la que se le solicita que reinicie el sistema, lo que acaba de cabrear a Gates, que como cualquier hijo de vecino no comprende porqué debe realizar tantas acciones para instalar un programa sin importancia.
Pero es que lo mejor aún está por venir. Una vez completados todos los pasos, Gates se dirige al apartado "Añadir y quitar programas" del Panel de Control para asegurarse de que Movie Maker, efectivamente, se ha instalado correctamente y, vaya por dios, resulta que se encuentra con un montón de nuevos paquetes llamados Microsoft Autoupdate Exclusive test package, Microsoft Autoupdate Reboot test package, Microsoft Autoupdate testpackage1, Microsoft AUtoupdate testpackage2 o Microsoft Autoupdate Test package3, pero, pero, pero... Movie Maker no aparece por ninguna parte sonrisa
En definitiva, que Bill Gates se quejaba de lo mismo que nos quejamos todos. Por tanto, no debemos sentirnos extraños cuando no entendemos según qué cosas de Windows, porque al presidente de Microsoft le pasa (o le pasaba) exactamente lo mismo sonrisa
El contenido íntegro del correo electrónico, en formato PDF, lo podéis consultar en http://blog.seattlepi.nwsource.com/microsoft/library/2003Jangatesmoviemaker.pdf
(http://www.abadiadigital.com/noticia3201.html)
Bloqueando el messenger (Score: 1)
by rubioq (nose@hotmail.com) on Saturday, November 26 @ 11:42:31 CST
(User Info | Send a Message) http://rubioq.275mb.com
En squid yo hice esto que vi en linuxparatodos.com y me funciono.
acl MSN req_mime_type ^application/x-msn-messenger$
acl MSN3 url_regex -i gateway.dll?
http_access deny MSN
http_access deny MSN3
http://cofradia.org/modules.php?name=News&file=article&sid=15848
El servicio MSN, a nivel laboral, es el primer dolor de cabeza en las Instituciones y Empresas, tanto para el Jefe, como el Administrador de la Red.
La forma de bloquearlo haciendo uso de nuestras iptables es de la siguiente manera
[BASH]# iptables -I FORWARD -p tcp -m string –string "VER " –from 51 –to 56 –algo bm -j REJECT
El módulo STRING hace una búsqueda en el contenido del paquete por una determinada cadena de caracteres. Los parámetros –from y –to indican el final del encabezado TCP y el final de los datos, si se omiten la búsqueda se realiza en el paquete entero.
El parámetro –string indica la cadena a buscar, en este caso "VER ", que es parte del protocolo en algunos paquetes de MSN, principalmente los usados durante el login.
(http://www.linuxparatodos.net/portal/article.php?story=bloquear-msn-iptables)
This command will delete files i a given path (/dir_name) , which older than given time in days (-mtime +5 will delete files older than five days.
find /dir_name -mtime +5 -exec rm {} \
(http://www.commandlinefu.com/commands/view/1394/delete-files-older-than..)
revisar en rc.sysinit la parte que empieza con
if [ -f /etc/delete-guest-account ];
then
action "Removing Guest Account on first boot"
Primero hay que arrancar el CDenVivo de TMLinux con la opcion "noswap" en la línea de arranque de la pantalla de Grub. De otra forma la partición de intercambio queda montada para su uso con el CDenVivo y Gparted no permitirá borrarla, ni borrar otras particiones en ese disco.
Después se abre Gparted y se desmontan todas las particiones del disco duro donde se quiere borrar particiones.
Luego se procede a seleccionar las particiones e indicarle a Gparted que porceda a borrarlas.
Un script muy útil pero no tan comúnmente utilizado es apt-file. Te permite buscar archivos dentro de los paquetes que tiene tu repositorio de apt. Esto es muy útil cuando necesitas una librería o cualquier archivo pero no sabes específicamente quien la provee.
En Ubuntu por ej. si necesitamos la librería bt829_drv.so, primero instalamos y actualizamos apt-file.
sudo aptitude install apt-file
sudo apt-file update
Y entonces podemos buscar por cualquier archivo.
apt-file search bt829_drv
(http://www.pablasso.com/2009/03/05/busca-archivos-en-repositorios-con-apt-file)
Muchas veces queremos buscar una cadena dentro de todos los ficheros del sistema en linux, pues bien, aquí teneis la instrucción necesaria para hacerlo desde consola:
find "ruta" -type f | xargs grep "cadena a buscar"
Con find (y la opción usada) se buscan archivos en el directorio especificado (usar . para el directorio actual), el comando xargs combina cada elemento con el comando especificado y grep busca patrones en el archivo.
(http://www.pinguinosycia.com/buscar-cadena-texto-en-todos-los-archivos-de-linux/)
To start searching Google by image color, all you have to do is append &imgcolor=colorname to the URL of a Google Image Search—where colorname is replaced by one of a number of colors of your choice. So, for example, your search URLs might look like this:
http://images.google.com/images?q=cat&hl=en&imgcolor=green
(http://lifehacker.com/5180835/search-google-images-by-color)
apt-cache search nombre_del_programa
noapic, nolapic, nscsi
ide=nodma
nonetwork (for computers with wireless network adapters that won't work with the Live CD)
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=56898.msg455854#msg455854)
Para limpiar la memoria caché basta con dar el valor “3″ al archivo /proc/sys/vm/drop_caches, el comando sería:
# sudo echo “3″ >> /proc/sys/vm/drop_caches
(http://www.k4ch0.net/blog/2010/02/23/como-limpiar-la-memoria-cache-del-sistema-de-archivos/)
la mayoria de los creative zen usan el microsoft transfer protocol para poder transferir contenidos, por lo que al conectarlo en un sistema linux este no parecera como una unidad montada. Para acceder a su contenido y transferir musica, fotos o videos es necesario instalar Gnomad2
(la mayoria de los creative zen usan el microsoft transfer protocol para poder transferir contenidos, por lo que al conectarlo en un sistema linux este no parecera como una unidad montada. Para acceder a su contenido y transferir musica, fotos o videos es necesario instalar Gnomad2)
First of all this must be used as a super user.You must first "down" the interface.
sudo ifconfig eth0 down
after that you set the mac address like you
did sudo ifconfig eth0 hw ether 00:11:22:33:44:55
then you "up" the interface back, like this
sudo ifconfig eth0 up
But most important these changes are valid until system is rebooted.
(http://www.commandlinefu.com/commands/view/2148/change-mac-address)
Una de las cosas que no me gusto del efecto cubo de Kwin fue el no poder cambiar la imagen de las capas o caras superior e inferior, que bien si llegaron a usar Compiz Fusion se les llamaba Cubecaps. Desde aquí podrás encontrar algunos o bien poner la imagen que quieras.
Una vez que tengas la imagen que desees poner abrimos la terminal y navegamos al directorio /usr/share/kde4/apps/kwin con el siguiente comando:
cd /usr/share/kde4/apps/kwin/
En este directorio se encuentra la imagen cubecap.png que es la imagen que se muestra en las caras del cubo. La respaldamos por si acaso:
su -c 'mv cubecap.png cubecap.png.backup'
Después copiamos la imagen que queramos poner al este directorio con el nombre de cubecap.ong, hacemos esto con el siguiente comando:
su -c 'cp /home/Gomez/Imágenes/4ulquiorra.png ./cubecap.png'
Y listo! ahora desactiva los efectos de escritorio y vuelvelos a activar, acciona el efecto del cubo y verás como la imagen de las capas superior e inferior han cambiado.
(http://fedoreando.wordpress.com/2009/02/24/cambiar-el-cubecap-del-cubo-con-kwin/)
The Debian way of changing the default mouse pointer is to run the following:
update-alternatives --config x-cursor-theme
También se puede hacer con KDE desde el Centro de Control -> Periféricos
gconftool-2 --type integer --set /apps/nautilus/desktop/text_ellipsis_limit 0
Si el número es mayor que 0, el nombre del archivo no deberá exceder el número de líneas indicadas. Si el número es 0 o menor,no se impone ningún límite en el número de líneas mostradas
(http://phyx.wordpress.com/2009/05/21/como-mostrar-todas-las-lineas-del-nombre-de-los-archivo-en-el-escritorio-gnome/)
Un problema común de TMLinux cuando se usa en máquinas con arranque dual es que la hora cambia después de utilizar el otro sistema operativo instalado.
Para evitar que esto suceda hay que indicarle a TMLinux que utilice la hora local en lugar de la hora universal (UTC)
Simplemente hay editar el archivo /etc/sysconfig/clock para que la línea que especifica el uso de UTC quede como sigue:
UTC=false
hay que iniciar con un CD de Knoppix
Para aumentar tamaño
Se usa Qparted para aumentar la partición al tamaño deseado
con resize2fs -p /dev/hdxx se aumentan sistemas de archivos ext2 o ext3 hasta el tamaño total de la partición
Para reducir tamaño
Se usa primero resize2fs -p /dev/hdxx tamañoG para reducir el sistema de archivos
Después con Qparted se decrementa el tamaño de partición para que sea el mismo del sistema de archivos
Al utilizar solamente compiz --replace en KDE4 suele suceder que no se carga emerald como decorador de ventanas. Esto se soluciona utilizando:
compiz --replace --sm-disable --ignore-desktop-hints ccp &
O también con el paquete compiz icon, el cual se abre desde línea de comandos con:
fusion-icon
Además de seleccionar e instalar los paquetes que aparezcan al buscar "spanish" en synaptic, también se debe reinstalar drakconf, agregar idioma español al país seleccionado en la configuraciòn de KDE y reiniciar el equipo.
Hyper's CD Catalogizer, o CDCat, para abreviar, permite crear bases de datos con los nombres de los archivos almacenados en discos CD, DVD, etc. y poder buscarlos posteriorrmente. Además se pueden agregar comentarios para hacer más sencillas las búsquedas.
Basta con abrir el programa y la base de datos y oprimir un botón para que se monte el disco y realice una búsqueda recursiva de carpetas y archivos en forma automática.
Para cerrar sesión se usa
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 2
Para apagar
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2
En http://majewsky.wordpress.com/2009/07/11/shutdown-your-machine-automatically-or-from-remote/ hay más detalles sobre como usar los parámetros:
"the three parameters are values from the enumerations KWorkspace::ShutdownConfirm, KWorkspace::ShutdownType, KWorkspace::ShutdownMode (in that particular order). The possible values for these enumerations can be found in the API documentation for KWorkspace (http://go2.wordpress.com/?id=725X1342&site=majewsky.wordpress.com&url=http://api.kde.org/4.x-api/kdebase-workspace-apidocs/libs/kworkspace/html/namespaceKWorkSpace.html)"
"The parameters (0,2,2) mean that, without confirmation (the 0), the machine should be shut down (the first 2) immediately (the second 2)."
touch -amct [[CC]YY]MMDDhhmm[.ss] FILE
-a for access time, -m for modification time, -c do not create any files, -t timestamp
http://www.commandlinefu.com/commands/view/2303/change-timestamp-on-a-file
I downloaded PCLOS Gnome 2008.2 and was pleased to see it run without any problems on my Acer Aspire 5612ZWLMi - Couldn't run PCLOS Gnome 2008.1 on my PC.
I then optioned to install PCLOS Gnome 2008.2 on my harddisk, where I had appr. 70Mb free, and I let PCLOS Gnome use that space as it pleased, and it installed without any problems.
I then restarted my PC and it booted up in PCLOS Gnome ... Except that PCLOS Gnome will not boot.
Changing (something) from 'silent' to 'verbose', I get the following output (its not all though):
Loading jbd.ko module
Loading ext3.ko module
Mounting /proc filesystem
Mounting sysfs
Creating device files
Mounting tmpfs on /dev
Creating root device
Trying to resume from /dev/hda6
Unable to access resume device (/dev/hda6)
Echo: cannot open /proc/suspend2/do_resume for write: 2
Mounting root filesystem /dev/root with flag noatime
mount: error 6 mounting ext3 flags noatime
well, retrying without the option flags
mount: error 6 mounting ext3
well, retrying read-only without any flag
mount: error 6 mounting ext3
Switching to new root
ERROR opening /dev/consule!!!!: 2
unmounting old /proc
unmounting old /sys
switchroot: mount failed: 22
Initrd finished
Kernel panic - not syncing: Attempted to kill init!
That was the last 23 lines of output.
Does anybody know what the problem is?
Why the LiveCD runs without any problems, but PCLOS Gnome not even will boot when installed?
Solution:
during boot selection you type all-generic-ide
you choose what you are going to boot, or just boot default choice, take your mouse down to boot line and hit space bar then type all-generic-ide
then boot.
(http://www.linuxgator.org/forums/viewtopic.php?f=4&t=1086&st=0&sk=t&sd=a&start=15)
The following codes are available as of December 2007:
initrd Only boot the initrd, not the actual CD. This option is (mostly) only useful to LiveCD developers. livecd debug Prints useful information (for developers) from the various scripts while loading the LiveCD.
livecd fstab=<opts> Override the default generation of the fstab
Valid options, combined with "," are the following: auto or noauto and ro or rw.
livecd home=usb For use with a USB memory stick/pen device when attached. Allows you to use the guest account to save and store settings.
livecd noeject Disable the ejection of the CD on shutdown (power-down) or reboot.
livecd noscsi Disable the probing of SCSI devices at boot. Do not use this option when booting from a SCSI device since the boot will fail.
livecd nousb Disable the probing of USB devices at boot. Do not use this option when booting from a USB device since the boot will fail.
livecd nopcmcia Disable the probing of PCMCVIA devices at boot.
livecd nonetwork Disable probing for network at boot.
livecd nosound Disable probing for soundcard at boot.
livecd xdrv= Specify the xdriver such as fbdev or nv
livecd xbpp=<depth> Specify the bitdepth for X
<depth> can be one of 8, 15, 16, 24 or 32.
livecd xres=<res> Specify the resolution for X.
<res> can be one of 800x600, 1024x768, 1280x1024 or 1600x1400.
livecd hwdetect=no Don't run the hardware detection script, booting with the default hardware configuration as stored on the LiveCD.
livecd keyb=<mapping> Use a different keyboard layout mapping from the one the LiveCD was built with
http://linux.exton.net/pclinuxos-exton/pclinuxos-cheatcodes.html
Tan sencillo como copiar el archivo y cambiar la identificación
cp disk1.vdi disk2.vdi
VBoxManage internalcommands setvdiuuid disk2.vdi
# dd if=/dev/sda | gzip -c | ssh user@ip 'dd of=/mnt/backups/sda.dd'
(http://www.commandlinefu.com/commands/view/2570/clone-a-hard-drive-to-a-remote-directory-via-ssh-tunnel-and-compressing-the-image)
Lo primermo que tenemos que tener en cuenta es saber que es un repositorio, asi que voy a hacer una breve reseña...
La palabra repositorio deriva de la palabra repositorium (latin) que significa alacena o armario, y bueno un repositorio no es mas que eso un "armario" centralizado de informacion, en este caso de paquetes para una distribucion....
una vez explicado esto procedo a explicar los beneficios de tener un repositorio local...
La utilidad de un repositorio local se encuentra cuando no se tiene una conexion rapida de internet o esta conexion es lenta en ciertos horarios del dia (lease al mediodia) o si se quiere recomendar una distribucion especifica a alguien q no tiene internet y quiere instalar paquetes, que hacemos ante esta situacion? bueno lo que tenemos que hacer primero es encontrar las direcciones de los repositorios de nuestra distro en internet, para el caso de pclinuxos los repositorios son los siguientes:
*http://spout.ussg.indiana.edu/linux/pclinuxos/pclinuxos/apt/
*http://ftp.heanet.ie/pub/pclinuxos/apt/
*http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/
*http://www.gtlib.gatech.edu/pub/metalab/distributions/texstar/pclinuxos/apt/
*ftp://ftp.belnet.be/pub/mirror/pclinuxonline.com/apt/
*ftp://ftp.ch.debian.org/mirror/pclinuxos/apt/
*http://ftp.sh.cvut.cz/MIRRORS/pclinuxos/apt/
*http://ftp.nl.freebsd.org/os/Linux/distr/texstar/pclinuxos/apt/
*ftp://ftp.pbone.net/pub/pclinuxos/apt/
*http://linuxstation.net/pub/pclinuxos/apt/
*http://ftp.leg.uct.ac.za/pub/linux/pclinuxos/apt/
*http://mirror.pacific.net.au/pub1/linux/texstar/pclinuxos/apt/
*ftp://mirror.internode.on.net/pub/pclinuxos/apt/
luego necesitamos alrededor de 40gb libres en nuestro disco, una conexion a internet, y necesitaremos instalar los siguientes programas del repositorio de pclinuxos: rsync y createrepo
una vez que tenemos instalados todos los pragramas y verificamos el espacio en disco procedemos a usar rsync para descargar los archivos del repositorio que mas nos guste.
BAJANDO Y CONFIGURANDO EL REPOSITORIO
*Creamos la carpeta repositorio en algun lugar por ejemplo en /mnt/datos.
*Luego abrimos una consola y escribimos rsync -av --progress --delete --exclude=SRPM*/ ftp.heanet.ie::pub/pclinuxos/apt/ /mnt/datos/PCLinuxOS-repo
-av es para q este en archive mode y sea verboso (o sea q nos indique todo el tiempo q es lo q esta haciendo)
--progress muestra el progreso de la transferencia de archivos
--delete borra los archivos q se encuentran en la carpeta de destino y q no corresponden con la lista de archivos del servidor
--exclude=SRPM* le indica a rsync que escluya cierto tipo de paquetes, en este caso q excluya los SRPM q son las fuentes de algunos programas
/ftp.heanet.ie::pub/pclinuxos/apt/ le indica el repositorio o la direccion desde donde tiene q bajar los archivos (puede ser cualkier repositorio)
/mnt/datos/PCLinuxOS-repo le indica adonde tiene q guardar los archivos (puede ser cualkier carpeta, en este caso es un ejemplo)
una vez escrito el comando, apretamos enter y rsync se va a conectar al repositorio va a mirar la lista de archivos y va a comenzar a bajar los archivos mostrando el progreso de cada uno, si tenemos q apagar la maquina o algo lo q hacemos es cancelar el comando con control+c y se va a detener pero si lo arrancamos otra vez va a continuar desde donde se habia quedado.
Una vez q rsync termine de bajar todos los archivos (puede llevar bastante tiempo debido a q son alrededor de 30 gb), se puede actualizar el repositorio mediante el mismo comando, q automaticamente elimina los paquetes viejos y baja los nuevos.
Cuando finalicemos de bajar el repositorio y tenerlo bien actualizado tenemos q instalar el programa createrepo q esta en el manejador de paquetes.
Luego abrimos una consola y nos dirigimos a la carpeta donde hayamos guardado el repositorio (nuestro caso seria cd /mnt/datos/PCLinuxOS-repo/)
una vez ahi hacemos
[lab@ServerLab PCLinuxOS-repo]$ cd pclinuxos/2007/
nos ponemos como root
y luego ejecutamos el siguiente comando
[root@ServerLab 2007]# createrepo base/
y les va a generar esta salida
Saving Primary metadata
Saving file lists metadata
Saving other metadata
luego si ingresamos a la carpeta base y hacemos un ls nos vamos a dar cuenta q hay una carpeta dice repodata, esta carpeta contiene en su interior varios archivos de extension .xml, estos archivos son necesarios para q synaptic/apt-get puedan leer la informacion de los paquetes y cargar la lista de paquetes.
hasta aca ya tenemos el repositorio totalmente funcional.
CONFIGURANDO SYNAPTIC
Ingrsamos a synaptic que es nuestro manejador de paquetes predeterminado y nos dirigimos al menu settings y hacemos clic en repositories.
Nos va a aparecer otra ventana en la cual tenenmos la lista de repositorios y abajo del todo tres botones, uno q dice New, otro q dice Cancel, y otro q dice Ok.
Hacemos clic en New y se nos van a habilitar tres campos en blanco.
en el que dice url tenemos q poner la direccion de la carpeta donde esta guardado el repositorio, en nuestro caso seria asi la direccion
file:/mnt/datos/PCLinuxOS-repo/
luego en el segundo campo que dice Distribution escribimos
pclinuxos/2007
y en el tercer y ultimo campo "Sections" escribimos las secciones q qremos q esten en nuestro repositorio, en nuestro caso la eleccion fue
main extra nonfree kde kde4 (se escribe tal cual esta escrito ahi).
una vez echo esto buscamos el repositorio que estaba chequeado y lo "deschequeamos" , luego hacemos clic en ok y nos va a salir un cartel que nos avisa q la informacion del repositorio ah cambiado y que debemos actualizarlo para ver los paquetes correctamente, hacemos clic en Ok y luego hacemos clic en el boton reload.
Si siguieron paso a paso este tutorial y no saltearon ningun paso eh hicieron todo correctamente deberian encontrar el repositorio bajar los archivos de información y actualizar la lista de paquetes correctamente, y ya podemos probar la velocidad de tenerlo local.
CONFIGURANDO EL REPOSITORIO EN UNA LAN (SIN PROXY)
Cuando ya tengamos el repositorio debidamente configurado y actualizado le podemos dar su verdadera utilidad, distribuirlo en una red de computadoras, si bien todas pueden tener internet, la transferencia va a ser mucho mas veloz por la red q por internet.
Lo primero q tenemos q hacer es levantar una red entre las maquinas (samba, NIS, NFS, etc) o un servidor apache2 en el server, todo esto se explica en otro tutorial por eso no vamos a profundizar mas q en darles los nombres.
En nuestro caso elegimos apache, en la carpeta /var/www/html hacemos un enlace simbolico (acceso directo) a la carpeta q esta conteniendo nuestro repositorio local y luego probamos a ver si via navegador web podemos ver las carpetas, para esto es necesario escribir la direccion ip del servidor en el navegador y tendrian q aparecer las carpetas q tenemos en apache.
una vez q esto este funcionando correctamente, nos dirigimos a alguna de las maquinas clientes y probamos si podemos ver las carpetas via navegador web, si esto funciona abrimos el synaptic de dicha pc, vamos al menu settings y luego a repositories, se va a abrir la lista de repositorios, hacemos clic en new y donde dice url escribimos "http://ip.del.servidor/PCLinuxOS-repo" (sin las comillas), en distribution escribimos "pclinuxos/2007", y en sections escribimos "main extra nonfree kde kde4".
"Deschequeamos" el repositorio q estaba chequeado y chequeamos el nuestro, le damos Ok y nos va a aparecer el cartelito q nos informa q la informacion del repositorio ah cambiado y debemos hacer clic en reaload para actualizarla, hacemos eso y voilà ya tenemos nuestro repositorio funcionando a velocidad "copada".
(http://www.taringa.net/posts/linux/1709424/Repositorio-Linux-en-Disco.html)
One of the more advanced options for resizing your Windows Vista partition is to use the GParted Live CD, a bootable linux CD that takes you straight into GParted, the great linux utility for managing partitions. The problem is that if you resize your boot/system partition, you will be completely unable to boot without repairing windows.
First make sure that you have a bootable Windows Vista installation DVD, as you will be unable to use your computer if you don't. Next, download the GParted Live CD and burn it to cd.
Boot off the GParted cd, and you will see your hard drives in the drop-down list. The first drive is typically your boot drive, but you can check the Flags column to make sure.
image
Next you'll need to right-click on the partition and choose Resize/Move from the menu.
image
Now you can either use the New Size textbox, or just click and drag the partition to make it smaller (or bigger). When you are done, click the Resize/Move button.
image
This doesn't immediately apply the changes, though. You can make other changes to your partitions and then when you are finished click the Apply button.
image9
Depending on the amount of data and the speed of your computer, it can take quite a while to resize the partitions. On my computer it took more than 30 minutes.
image
Once it's done, quit, remove the live cd and then reboot your computer. Unless you are very lucky, you'll be greeted with this horrible error message saying "Windows Failed to start. A recent hardware or software change might be the cause."
File: Windowssystem32winload.exe
Status: 0xc0000225
Info: The selected entry could not be loaded because the application is missing or corrupt.
Here's a screenshot of the error, but don't worry, we'll fix it.
image
Insert your Windows Vista installation dvd and make sure you boot off it. At the welcome screen click the Next button.
image
On the next screen, click the "Repair your computer" link in the lower left hand corner.
image
The system recover options dialog will show up, and will ask you if you want to Repair and restart, which we do.
image
If you happened to click the View details link you'll see that the error is "Windows Device: Partition=Not found", which indicates the problem is the partition that we resized.
image
Your computer will reboot, and you'll see Windows Vista in the list although it now has a different name indicating that it was recovered.
image
When Vista first starts up, it will start running a check of the disk. Whatever you do, don't hit any keys here because we want the system to check the disk.
image
Once it's done it will reboot, and you'll have Vista back up and running again!
image
If you want to rename the Windows Vista entry in the list back to normal, you can use VistaBootPro.
(http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/)
nmap -p22 -oG - $(ip addr | awk '/inet .*global/ {print $2}' | tr '\n' ' ') | awk '/22\/open/ {print $2}' | uniq
(http://www.shell-fu.org/lister.php?id=405)
Cuando lanzas un juego OpenGL, google-earth, etc..,a veces es necesario desactivar compiz.Muchos probablemente usan el fusión-icon o aplicaciones similares en lugar de habilitar/inhabilitar compiz via un terminal.Hoy les voy presentar un sencillo script para desactivar automáticamente compiz cuando pongas en marcha algunas aplicaciones/juegos.Este script también va a reiniciar compiz después de salir de la application (ver Nota).Desafortunadamente es sólo para Gnome.
Crear un archivo vacío llamado game en /usr/bin/ usando el comando 'touch' y hacerlo ejecutable:
sudo touch /usr/bin/game && sudo chmod +x /usr/bin/game
Abrimos el archivo con gedit o con tu editor favorito:
sudo gedit /usr/bin/game
y pegamos el texto siguiente:
#!/bin/bash
COMP="false";
if ps -A | grep compiz > /dev/null ; then
echo "Warning: Compiz Detected!!!"
metacity –replace > /dev/null &
COMP="true"
fi
echo "Starting"
$1
echo "Finish"
if $COMP ; then
echo "Warning: Starting Compiz!!!"
compiz –replace > /dev/null &
fi
exit
Guardar y salir.
Ahora simplemente agrega game antes de de la aplicación/juego a lanzar,por ejemplo:
game urban terror
Nota: Si al cerrar el juego o la aplicaciòn,el script te envia al GDM (reinicia X server),elimina exit al final del script y esto puede solucionar el problema reiniciando compiz y no las X.Enjoy!.
(http://phyx.wordpress.com/2009/05/13/como-inhabilitar-compiz-automaticamente-al-poner-en-marcha-un-juego/)
Hay que utilizar la guía publicada en http://linux-blog.org/how-to-pclinuxos-2007-and-mythtv/
Puedes instalar cpulimit y limitar una determinada aplicación en ejecución, ya sea por nombre o por el ID del proceso:
cpulimit -e firefox -l 30
El comando anterior no va a dejar que Firefox vaya más allá de un 30% el uso del CPU.Si prefieres ir por el proceso, puedes hacerlo de este modo:
cpulimit -p 3493 -l 40
Esto limitará el proceso número 3493 al 40% (Consumo del CPU).
(http://phyx.wordpress.com/2009/07/09/como-limitar-el-uso-de-la-cpu-de-una-aplicacion-determinada-en-linux/)
Como superusuario se usa la instrucción:
monitor-edid
ln -s /usr/lib/firefox/plugins/* /home/oposit/Descargas/firefox/plugins
I always got this question in my mind. How to run a command line within python, get the output and manipulates it. Before I learn python, I was doing bash scripts all the while to helps me manipulates text which I get it from log files, or pipes out from some certain command line.
To do it in bash script is straight forward, where I just puts my command line into text like I put in my bash prompt. But to run a command line in python is not like bash script, so what options do I have?
The first function I discover was system in os library.
import os
os.system("ls -l")
http://linux.byexamples.com/archives/366/python-how-to-run-a-command-line-within-python/
By passing the command line to the system function will cause the command executed in subshell and print it straight away to standard output. I don't have chance to keep the outcomes for further manipulations.
The second function that drags my attention is popen, which the same way I pass my command line in, and this time it returns the result into a file object which allows me to manipulate it consequently.
import os
f=os.popen("ls -l")
for i in f.readlines():
print "myresult:",i,
What it returns for me is a the result of standard output, what if I purposely make a wrong command line? let say …
import os
f=os.popen("ls -z")
The error will be print to screen instead of store in file object f,
ls: invalid option -- z
Try `ls --help' for more information.
The error is actually print to standard error, to store the standard error, we need to call popen3().
fi,fo,fe=os.popen3("ls -z")
for i in fe.readlines():
print "error:",i
popen3() returns stdin, stdout and stderr which are standard input, standard output and the standard error. The examples above, I extract the error description from the stderr file object.
How can I tell the command line is success or fail? I have no idea too, the only thing I can do is run readlines() to extract the output from respective file object.
There is another Popen function in subprocess library, I will covers it after I get my hands dirty on that lib more.
Es tan sencillo como
diff <dir1> <dir2>
y el comando mostrará el detalle de cada diferencia encontrada
Se descarga el conector desde http://myjobspace.co.nz/images/pidgin/libskype.so y se copia en /usr/lib/purple-2/ ó ~/.purple/plugins
Después se agrega la cuenta de Skype a Pidgin
Skype pide confirmación del acceso
Y se pueden comenzar las pláticas de Skype desde Pidgin
(http://myjobspace.co.nz/images/pidgin/)
La configuración de todo lo que está incluido en los contenedores (paneles. carpetas, escritorios) de KDE4 se encuentra en el siguiente archivo:
/home/usuario/.kde4/share/config/plasma-desktop-appletsrc
Desde aquí se pueden obtener los parámetros que utilizan paneles, actividades, plasmoides, aplicaciones, etc.
With the plugin window showing in your browser, right click anywhere over the screen and select 'Configure'.You'll notice that the entries for video and audio output are blank, and this is the source of your problem.
All you need to do is click on the down arrows next to each window and select 'X11' and 'Alsa' output (these obviously depend on how your machine is set up, but play around with the various options until you find the one that works for you.Now click 'OK' and try again – the film should run, audio and all.
http://reddevil62-techhead.blogspot.com/2008/04/tips-tricks-getting-mplayer-mozilla.html
auto-apt es útil para los usuarios que instalan desde el código fuente (source).Haz tenido alguna frustración con ./Configure? por la cantidad de dependencias que no estaban instaladas.Bien,auto-apt resuelve este problema mediante la instalación de paquetes automaticamente al correr ./Configure.
Instalacion
sudo apt-get -y install auto-apt
ejecutar los comandos siguientes para hacerlo utilizable (base de datos).
sudo auto-apt update && sudo auto-apt updatedb && sudo auto-apt udate-local
Uso
En el futuro,en vez de ejecutar el comando
./configure
use el comando
auto-apt run ./configure
(http://phyx.wordpress.com/2008/11/07/auto-apt-on-demand-package-installer/)
La mayor parte de la configuración se puede realizar oprimiendo el botón derecho del ratón sobre el área de reproducción del conector.
Algunas características de este conector se configuran desde el archivo
/etc/mplayerplug-in.conf
En especial el tiempo de reproducción sobre pantalla (OSD)
para desactivarlo basta poner
osdlevel=0
/etc/skel
The /etc/skel directory is quite simple to setup and use. It provides a way to make sure that all new users on your LFS system begin with the same settings. The /etc/skel directory is used by the /usr/sbin/useradd program.
For more information see man useradd.
To get started create a /etc/skel directory. Creating the directory as root is the best way to go. Next copy any files into /etc/skel that you want every new user to have placed in their home drive. Examples include .bash_profile, .bashrc, .bash_logout, dircolors, .inputrc and .vimrc.
When creating a new user with /usr/sbin/useradd use the -m parameter. For example:
useradd -m -s/bin/bash jwrober
The /usr/sbin/useradd program uses a collection of default values. It will read them from the /etc/default/useradd file if it exists. If the file does not exist, then it uses some internal defaults. They can be found by running /usr/sbin/useradd -D.
To change these values to something new, create a base /etc/default/useradd file with the same values as the output of /usr/sbin/useradd -D. Here is a sample.
# Begin /etc/default/useradd
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=
SKEL=/etc/skel
# End /etc/default/useradd
The only thing missing from the file is a default shell. Add that by running:
/usr/sbin/useradd -D -s/bin/bash
This will set the SHELL= line to SHELL=/bin/bash. This makes it even easier to add new users to your LFS system. The /usr/sbin/useradd has many parameters that can be set in the /etc/default/useradd file. See the man page for more details.
http://www.fr.linuxfromscratch.org/view/blfs-1.0/postlfs/skel.html
Para cambiar el idioma de los nuevos usuarios se cambia la siguiente sección en file:/etc/skel/.kde/share/config/kdeglobals
[Locale]
Charset=iso8859-15
Country=de
Language=de
Y se deja como sigue
[Locale]
Charset=iso8859-1
Country=mx
Language=es_mx
En /etc/skel/.kde/share/config/desktop0rc se puede especificar el papel tapiz
en /etc/skel/Desktop se encuentran los íconos que aparecerán en el escritorio
Interface Aliasing -- Many IPs on One Physical Card
(The file /usr/src/linux/Documentation/networking/alias.txt contains the kernel documentation on this.)
If you have one network card which you would like to double as several different IP addresses, you can. Simply name the interface eth0:n where n is from 0 to some large integer. You can use ifconfig as before as many times as you like on the same network card--
/sbin/ifconfig eth0:0 192.168.4.1 broadcast 192.168.4.255 netmask 255.255.255.0
/sbin/ifconfig eth0:1 192.168.5.1 broadcast 192.168.5.255 netmask 255.255.255.0
/sbin/ifconfig eth0:2 192.168.6.1 broadcast 192.168.6.255 netmask 255.255.255.0
in addition to your regular eth0 device. Here, the same interface can communicate to three LANs having networks 192.168.4.0, 192.168.5.0, and 192.168.6.0. Don't forget to add routes to these networks as above.
(http://www.icon.co.za/~psheer/book/node28.html.gz#SECTION002890000000000000000)
Como superusuario se utiliza la instrucción xorgconfig
El inconveniente es que hay que saber datos de tasas de sincronización horizontal y refresco vertical, así como memoria de la tarjeta de video.
El uso de este método está limitado a los casos en que no se cuente con un archivo de respaldo de xorg.conf
Otra opción es el comando do-vesa, que genera un archivo xorg.conf con una configuración genérica usando un activador vesa
Este sería el último recurso a utilizar
Se instaló el programa Conky y se agregó a la barra de ayuda.
Con este programa se puede monitorear diversos aspectos del funcionamiento de la computadora, como uso de cpu, memoria ram, procesos activos, transferencia de datos, partición de intercambio, etc.
Disponible a partir de la versión 0.3.3
convert image123.png -colors 14 -resize 640x480 grubimg.xpm
(http://www.commandlinefu.com/commands/view/1470/convert-your-favorite-image-in-xpm-for-using-in-grub)
Para convertir el título 2 de un dvd a divx se puede usar
mencoder dvd://2 -alang es,en -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3:vhq:v4mv:trell:autoaspect -ofps 23.976 -vf crop=720:364:0:56 -o nombre.avi
timidity -Ov nombre_del_archivo.mid
Recientemente he tenido que reinstalar un equipo en el que tenía máquinas virtuales de VMware y en el otro he instalado VirtualBox así que me hice un backup de mis máquinas virtuales y las restauré de la siguiente forma.
Primero instalamos qemu:
sudo apt-get install qemu
A continuación convertiremos la imagen VMWare a una imagen Bin con qemu:
qemu-img convert guinows.vmdk guindows.bin
Y finalmente usaremos VBoxManage para convertir el fichero de imagen .bin al nativo de virtualbox vdi:
VBoxManage convertdd guindows.bin guindows.vdi
(http://www.pinguinosycia.com/convertir-discos-vmware-vmdk-a-virtualbox-vdi/)
mkisofs -dvd-video -v -o /media/hdxx/trayectoria/nombre.iso /media/hdxx/trayectoria/nombre_estructura
Method 1
Start Virtualbox
Inside the Virtualbox Menu click: File > Virtual Media Manager
Click on the "Add" button.
Locate and select the VMware .vmdk file you'd like to convert.
Click Open.
Verify your disk image has been added to the list of images and that the virtual and actual sizes appear accurate.
Click OK
Create a new virtual machine profile, selecting your imported image for the storage.
Boot your new virtual machine.
Method 2
To use the second method we'll need an addition command-line tool called qemu.
sudo aptitude install qemu
You'll new be able to convert a .vmdk (VMware image) to a .bin format, which can then be converted to a Virtualbox native .vdi format.
qemu-img convert /path/to/original.vmdk converted.bin
You'll then need to use the VBoxManage utility that comes with Virtualbox to convert the .bin to a native .vdi format:
VBoxManage convertdd converted.bin converted.vdi
You can now create your new Virtualbox machine profile, using this new .vdi file as your disk image.
(http://ubuntu-tutorials.com/2009/03/22/how-to-convert-vmware-image-vmdk-to-virtualbox-image-vdi/)
Type the following command to convert foo.pdf to foo.png (foo1.png, foo2.png.. etc if you have multiple pages in a pdf file):
$ convert foo.pdf foo.png
You can specify a different file type by changing the file extension of the second file, type:
$ convert foo.pdf foo.jpg
(http://www.cyberciti.biz/faq/howto-convert-a-pdf-file-to-an-image/)
HTMLDOC es una aplicación que nos permite entre otras muchas acciones convertir páginas html a documentos pdf
Se puede abrir desde una terminal
Pincharemos en "Add url" y añadiremos la siguiente dirección: http://tmlinux.com
Luego nos vamos a Output, le damos un nombre al pdf que queremos crear y seleccionamos PDF:
Con lo que ya sólo nos queda darle a Generate
(http://pinguinosycia.blogspot.com/2008/09/convertir-una-web-pdf.html)
Para cámara rapida usamos
mencoder original_30fps.avi -ovc copy -ofps 300 -noskip -nosound -o timelapse-300fps.avi
Para cámara lenta
mencoder original_30fps.avi -ovc copy -ofps 3 -noskip -nosound -o timelapse-3fps.avi
Suponiendo que el archivo original usa 30 cuadros por segundo, entonces lo aceleramos o retardamos 10 veces con los valores usados en los ejemplos
Lo más sencillo es utilizar
mencoder input_file.ogg -ovc lavc -oac lavc -o output_file.avi
O usando WinFF como interfaz gráfica para ffmpeg
Aunque también se puede hacer con VLC
http://maketecheasier.com/convert-ogg-to-mp4-using-vlc-media-player/2008/02/18
ffmpeg -i movie.avi -y -f vcd -vcodec mpeg1video -map 0.
(http://www.commandlinefu.com/commands/view/1924/convert-plain-.avi-movies-to-.mpeg)
Hay que asegurarse de tener instaladas las bibliotecas de funciones del tipo facc ó libfaac0 y depués se ejecuta
ffmpeg -i origen.flv -s qcif -vcodec h263 -acodec libfaac -ac 1 -ar 44100 -r 25 -ab 32 -y destino.3gp
Copy a Linux installation with ext2/3 filesystem to a bigger harddisk
Submitted by Thomas on Wed, 2007-06-20 15:38.
* Linux
As I am running a Linux VDR installation with an old IBM Deskstar 40GB harddisk. The problem with this harddisk is that it is very small when you use VDR's autotimer functionality and it is far too loud for my living room. My new harddisk is a Samsung SP2514N with 250GB. This drive is very silent. When it is switched on you are wondering if it is really running. But how to copy the old installation to the new harddisk without a fresh and clean installation with all the hassle? Two tools made my day recently:
* dd_rescue
* resize2fs
Warning: Backup your data before you try any of the procedures described below! You have been warned!
You must start your computer with some live CD Linux system that has this tools installed because you cannot copy a filesystem that is mounted. I have used Knoppix for that purpose.
This procedure might work with other filesystems than ext2/ext3 as well (they must be resizable though). Step 4 differs for other filesystem types.
Step 1: Install the new harddisk
You need both the old and the new harddisk in the same computer. I installed my new harddisk as secondary slave (hdd). The old harddisk is the primary master (hda). We change that after we have copied all the data to the new disk. Boot up with Knoppix
Step 2: Create the partitions on the new harddisk
Use fdisk -l /dev/hda to print out all partitions on the disk. Write everything down or print it out. Use mount to find out which partition is your root-filesystem (mounted to /). You need this info in step 6. Now create on the new disk the same partition layout as on the old disk. These partitions need to be equal the size or larger than the old partitions. Swap partitions need to be prepared with mkswap /dev/hddx.
Step 3: Copy the data to the new harddisk
For every partition (skipping swap partitions) do the following:
dd_rescue /dev/hdax /dev/hddx
fsck -f /dev/hddx
Step 4: Resize the filesystems
Now it is time to resize the filesystems to the new partition sizes. Do the following for all the partitions on the new disk (skipping swap partitions again):
resize2fs -p /dev/hddx
Step 5: Remove the old harddisk
Now it is time to say goodbye to your old harddisk. Jumper the new harddisk to the same configuration as the old one and connect it to the cable-plug of the old harddisk. Shut down your computer before you do that! After that boot up with Knoppix again.
Step 6: Install the bootloader on the new harddisk
Now mount your root filesystem partition (it was hda2 in my case): mount /dev/hda2 /mnt And chroot to that mounted directory: chroot /mnt The next step depends on which bootloader you use. There are two possible ones: lilo and GRUB. In the lilo case just execute the command lilo. You should see something like "Linux added". In the case of GRUB execute grub-install.
So that's it. You should now enter reboot and see your new harddisk booting your old installation.
(http://www.peuss.de/node/25)
Los lanzadores de aplicaciones predeterminados están en /usr/share/applications
Para que una aplicación se pueda abrir desde una carpeta basta con arrastar el lanzador a la carpeta y crear un enlace
Now, one of the neat things here is that you're creating a stream of bytes... and you can do a lot with that: compress it, send it over the network, chunk it into smaller blobs, etc.
For instance:
dd if=/dev/sda | ssh user@backupserver "cat > backup.img"
But more powerfully:
dd if=/dev/sda | pv -c | gzip | ssh user@backupserver "split -b 2048m -d - backup-`hostname -s`.img.gz"
The above copies a compressed image of the source harddrive to a remote system, where it stores it in numbered 2G chunks using the source host's name while keeping you updated on progress.
Note that depending on the size of disk, speed of cpu on source, speed of cpu on destination, speed of network, etc. You may want to skip compression, or do the compression on the remote side, or enable ssh's compression.
(http://serverfault.com/questions/4906/using-dd-for-disk-cloning)
Assuming Master Linux box (from where you want to clone) is up and running with IP 192.168.0.1.
slave% nc -l -p 9000 | dd of=/dev/sda (Replace /dev/sda with actual drive on your slave machine)
This will listen at port 9000 and whatever it gets at port 9000 will hand over to dd command and dd will simply write that to on slave harddrive (sda) bit by bit.
On Master machine:
Now Login on master linux box and run following command. (It is advisable that Master Linux box should be in calm state , i.e no major jobs running on the machine). This command below will read master disk bit by bit and throw this bit stream to netcat command which is connected to netcat command at port 9000 on <slave> box.
master% dd if=/dev/sda | nc 192.168.0.254 9000
http://www.rajeevnet.com/hacks_hints/os_clone/os_cloning.html
¡Cuidado! Esta operación es peligrosa y puede resultar en la pérdida completa de datos si no se realiza correctamente
Como superusuario ejecutar
dd if=/dev/hda of=/dev/hdb
Los discos utilizadas aquí son hda y hdb, pero pueden cambiar.
¡Cuidado! Esta operación es peligrosa y puede resultar en la pérdida completa de datos si no se realiza correctamente
Como superusuario ejecutar
dd if=/dev/hda1 of=hdb1
Las particiones utilizadas aquí son hda1 y hdb1, pero pueden cambiar.
al terminar hay que desmontar las particiones
umount /dev/hda1
umount /dev/hdb1
Tratandose de la partición primaria puede ser necesario copiar el MBR de un disco a otro, para hacerlo se ejecuta
dd if=/dev/hda of=/dev/hdb bs=512 count=1
Copiar de una versión más actual el archivo:
usr/share/zoneinfo/America/Mexico_City
How to stop "before running Cinelerra do 'echo 0x7fffffff /proc/sys/kernel/shmax':
sudo kwrite /etc/sysctl.conf
add the line: "kernel.shmmax=0xe0000000"
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=45276.msg352528#msg352528)
Un cambio en shoutcast.com provocó que streamripper no pudiera obtener datos desde este sitio.
Para dejarlo funcionando nuevamente hay que modificar la dirección en el conector (plugin) para que apunte a classic.shoutcast.com tal como se especifica en (http://support.zenwalk.org/viewtopic.php?f=10&t=18691)
The classic shoutcast page resolves to The classic shoutcast page resolves to 205.188.234.120
I got streamtuner working with shoutcast again, in Debian Lenny, as follows:
1. Navigate to /usr/lib/streamtuner/plugins
2. As SuperUser, make backup copy of shoutcast.so (just in case)
3. As SuperUser, edit shoutcast.so with a binary editor (I used khexedit)
4. Find both occurrences of http://www.shoutcast.com
Be sure to use "Txt" mode in khexedit
5. Replace http://www.shoutcast.com with 205.188.234.120
padding with spaces at end as necessary
6. Save, exit editor, and restart streamtuner
I got streamtuner working with shoutcast again, in Debian Lenny, as follows:
1. Navigate to /usr/lib/streamtuner/plugins
2. As SuperUser, make backup copy of shoutcast.so (just in case)
3. As SuperUser, edit shoutcast.so with a binary editor (I used khexedit)
4. Find both occurrences of http://www.shoutcast.com
Be sure to use "Txt" mode in khexedit
5. Replace http://www.shoutcast.com with 205.188.234.120
padding with spaces at end as necessary
6. Save, exit editor, and restart streamtuner
Download this binary
Si al tratar de conectar con Pidgin a una cuenta de ICQ aparece un mensaje que dice que la versión de Pidgin es muy vieja, entonces se trata de un problema donde el servidor de ICQ confunde la versión de Pidgin con versiones viejas de ICQ.
Para resolverlo hay que hacer lo siguiente:
descargar http://fluxflux.net/pakete/liboscar.so.0.0.0
copiarlo como superusuario a /usr/lib/purple-2/
y ejecutar en línea de comando
ldconfig
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=47315.0;topicseen)
Se oprime el botón "Avanzados" para pasar a la ventana de configuración de gtk-recordmydesktop, donde se abre la pestaña Miscelanea.
Ahí hay un campo llamado "Opciones extra".
ahí se escribe <nowiki>--v_bitrate 2000000</nowiki> . ¡Eso es todo!
Esta tasa es la más alta. También pueden usarse valores más bajos.
Desde la versión 1.0.0 de libtheora se requiere la opción v_bitrate
Para la línea de comandos aquí hay un ejemplo funcional:
<nowiki>recordmydesktop -width 1024 -height 840 --v_quality 63 --v_bitrate 2000000 -o test.ogg</nowiki>
Esto codificará con la más alta calidad de video.
(¡Gracias a wolke! http://www.linuxquestions.org/questions/linux-software-2/recordmydesktop-is-skipping-frames-767616/#post3749812)
Si pruebas a crear una Live USB veras que en el Pendrive no te hace nada, es debido a que antes de crearla tienes que montar el pendrive en el directorio "/mnt/usbstick" y que este tenga permiso de escritura y lectura.Una vez montado ejecutas crear LiveUSB y sigues las instrucciones.
Si has lanzado anteriormente Crear LiveUSB en dicho directorio tendras la anterior Live, simplemente borrala.
To users that miss xorg.conf and complain about it
I get requests from users and see questions all the time for "where did my xorg.conf go in the latest Ubuntu or Fedora?", though it is usually a bit more of a flame.
The quick answer… press Ctrl+Alt+F2 or similar to log into a TTY console, or type 'init 3′ into a root X terminal.
If you haven't already, log in as root and kill X or type 'init 3′ if you want to be heavy handed. Then run:
X -configure
mv ~/xorg.conf.new /etc/X11/xorg.conf
xorg.config in two commands. Run the 'init 5′ command to get back to your GUI login (or kdm or gdm or startx, etc if you know what you are doing. Worst case remove the .conf and restart.)
If you are advanced enough to edit an xorg.conf, the above should be a cakewalk and you shouldn't complain about it.
Regardless, you should investigate 'xrandr' which makes it simple to do runtime adjustments.
If you are a newbie, look into a gui. KDE has KRandRTray which makes controlling outputs and resolutions a breeze. Don't forget to toggle the output on with the Fn key if you are a laptop user.
Needless to say, Xorg is moving in the right direction. Stop complaining about it.
To users that miss xorg.conf and complain about it
I get requests from users and see questions all the time for "where did my xorg.conf go in the latest Ubuntu or Fedora?", though it is usually a bit more of a flame.
The quick answer… press Ctrl+Alt+F2 or similar to log into a TTY console, or type 'init 3′ into a root X terminal.
If you haven't already, log in as root and kill X or type 'init 3′ if you want to be heavy handed. Then run:
X -configure
mv ~/xorg.conf.new /etc/X11/xorg.conf
xorg.config in two commands. Run the 'init 5′ command to get back to your GUI login (or kdm or gdm or startx, etc if you know what you are doing. Worst case remove the .conf and restart.)
If you are advanced enough to edit an xorg.conf, the above should be a cakewalk and you shouldn't complain about it.
Regardless, you should investigate 'xrandr' which makes it simple to do runtime adjustments.
If you are a newbie, look into a gui. KDE has KRandRTray which makes controlling outputs and resolutions a breeze. Don't forget to toggle the output on with the Fn key if you are a laptop user.
(http://www.kev009.com/wp/2009/05/to-users-that-miss-xorgconf-and-complain-about-it/)
Vcdimager para vcd ó cvcd
vcdimager -t vcd2 -c nombre.cue -b nombre.bin -l nombre -v nombre.mpg (nombre2.mpg nombre3.mpg ... nombren.mpg))
Convierte los archivos jpg en imágenes miniatura de una dimensión máxima de 150 pixeles.
Precaución: Se pierden los archivos originales.
mogrify -size 150x150 *.jpg -resize 150x150 + profile "*"
Con PCLinuxOS es muy sencillo convertir el sistema que está instalado en disco duro en un disco para ejecutar Linux sin tener que instalarlo (LIveCD)
Así que podemos instalar programas y configurar a nuestro gusto y cuando el estado de la instalación sea satisfactorio convertirla en un CD.
Como superusuario hay que posicionarse en la carpeta /root y crear las subcarpetas temp y livecd_iso
y luego ejecutar
mklivecd --nodir ^/root/temp,^/root/tmp,^/mnt,^/tmp,^/root/temp/livecd,^/root/livecd_iso,^/proc,^/sys --root / --workdir /root/temp/livecd --nofile ^/etc/X11/xorg.conf,^/etc/X11/XF86Config,^/etc/modprobe.conf,^/etc/modprobe.preload,^/etc/fstab --bootopt splash=silent --bootimg boot.lss /root/livecd_iso/nombre_de_la_imagen.iso
La imagen se genera en la carpeta /root/livecd_iso y desde ahí se puede grabar a un CD usando K3B o alguna herramienta de línea de comando.
Si utilizamos EasyVCD en Windows o con wine podemos generar un archivo xml que puede utilizarse en Linux.
vcdxbuild -v videocd.xml
Generate an HTML Gallery
find . -name "2004*.jpg" | egrep -v "minis" | sed -e \ 's/^\.\///' -e 's/\(\(.*\)\.jpg\)/<a href="\1"><img src="minis\/\1" height=113 width=150><\/a>/g'\ > index.html
Crea el album con las imágenes con extensión que empiezan con 2004 y con extensión jpg en el directorio actual e ignora las del directorio minis. Usa un tamaño de imagen de 113 pixeles de alto y 150 de ancho.
Si deseamos que cualquier persona pueda utilizar una computadora con Linux podemos crear uns cuenta de usuario generica para todos los usuarios invitados.
El equivalente a un congelador en Linux es facilisimo. Un usauario generico "alumno" sin contraseña ni nada o una contrasenya facil i :
Un script que se ejecuta al inicio con un userdel -r alumno y a continuación un useradd alumno. Y usuario (home) limpito.
Eso si en /etc/skel toda la configuación que deseemos ( se hace un escritorio del usuario alumno a tu gusto, con todo lo que creamos conveniente y se copia a skel).
(Información para GnuLinex)
Sometimes commands are long, but useful, so it's helpful to be able to make them permanent without having to retype them.
I discovered a find/grep/sed command chain that I knew I'd be using often, so I echoed it as a function:
echo -e "\nfoo()\n{\n!!\n}\n" >> /etc/profile
(http://www.commandlinefu.com/commands/view/1188/create-a-script-of-the-last-executed-command)
alias mkdd='mkdir $(date +%Y%m%d)'
(http://www.commandlinefu.com/commands/view/1993/create-directory-named-after-current-date)
Un muy buen curso para los que gustan de Ubuntu es el que publica el Ministerio de educación y Ciencia de España
http://formacion.cnice.mec.es/materiales/43/cd/index.htm
Cursos TMLinux
Arranque en CDenVivo
Opciones de arranque
Problemas de video
Red
Configuración
Prueba de navegación
Entorno de escritorio
Menú de aplicaciones
Instalación
Particionado de disco duro
Arranque en disco duro
Internet
Navegador Firefox
Extensiones de Firefox
Traducción -
Pestañas – Tab Mix Plug y Colorful Tabs
Reproducir contenidos multimedios – Media Player Connectivity
Descargar contenidos multimedios - UnPlug
Bloquear animaciones - FlashBlock
Búsquedas por texto seleccionado - Hyperwords
Mandar texto a bitácora (blog) -ScribeFire
Uso de marcadores
Pláticas, telefonía y videoconferencias
Intercambio de archivos
Oficina y escuela
Calculadora
Edición de textos
Procesador de textos
Hoja de cálculo
Presentaciones
Dibujos
Base de datos
Wikis
Multimedios
Reproductor de audio – Amarok
Audio por internet - Streamtuner
Reproductor de video - VLC
Editor de audio - Audacity
Editor de imágenes - Xara?
Fotografías - Digicam
Extraer canciones de CD
Grabación de CD y DVD
Juegos
Frozen Bubble
Enigma
Herramientas
Administrar archivos
Buscar archivos
Instalar programas
Instalar impresoras y otros periféricos
Actualizar programas
Personalizar escritorio y sistema
Cambiar de usuario
Manejar una computadora remota
Resolución de problemas
Cerrar programas y sesiones gráficas
Apagar la computadora
Cambiar resolución de pantalla
Opciones Avanzadas
Instalar servidor internet
Instalar mysql
How to Copy Damaged Disks (CD and DVD) in PCLinuxOS
No data storage medium is permanent in true sense. Storage media get damaged in due course of time. Hard disk drives and flash drives have less chance of being damaged as the storage surface is not exposed to human contact whereas optical drives are more prone to damages. Thanks god, there are some good disk recovery tools in GNU/Linux and ddrescue (http://www.gnu.org/software/ddrescue/ddrescue.html) tops their list. It is a data recovery tool. It copies data from one file or block device (hard disc, optical drives, etc) to another, covering data in case of read errors.
Ddrescue is not available in pclinuxos repository, but mandriva packages of ddrescue work like a charm in pclinuxos. Here are the links to download mandriva rpms of ddresce.
http://rpm.pbone.net/index.php3/stat/4/idpl/6755185/com/ddrescue-1.8-1mdv2008.1.i586.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/5142576/com/ddrescue-1.3-2mdv2008.0.i586.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/5101191/com/ddrescue-1.3-1mdv2007.1.i586.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/4321269/com/ddrescue-1.2-2mdv2007.0.i586.rpm.html
http://pclinuxos2007.blogspot.com/2008/04/copying-damaged-disks-cd-and-dvd-in.html
DeVeDe es un programa bien simple: agregas pistas, agregas los videos a las pistas, subtítulos opcionales, y listo. El programa te genera un .ISO listo para quemar con tu programa favorito. E incluso con menú de navegación.
Pero para qué les sigo hablando de lo que hace el programa si para eso está la página oficial de DeVeDe: http://www.rastersoft.com/programas/devede_es.html
(http://bootlog.org/blog/linux/devede-software-para-hacer-dvds-en-ubuntu-linux)
Puedes participar en este wiki usando la palabra "visitante" como usuario y contraseña, en la columna de la derecha, donde aparece "mts login"
Si deseas que tus comentarios y aportaciones aparezcan con tu nombre o apodo sólo tienes que enviar un correo a tmlinux con el nombre de usuario y la contraseña que desees utilizar. A la brevedad te daremos de alta y te avisaremos contestando tu correo.
There is a plugin available for openoffice that will convert the format so that we can open .docx files.
OpenOffice.org OpenXML Translator
From the download page:
"The OpenXML Translator provides support for opening and saving Microsoft* OpenXML-formatted word processing documents (.docx) in OpenOffice.org."
After the download, just double click the .deb file and start openoffice. You should be good to go!
http://ubuntulinuxhelp.com/how-to-get-docx-working-in-linux/#more-1270
So my brother recently got himself a Wii, and I decided it would be fun if I started trying to get the Wii Remote working with Linux. Apparently I'm not the first to do this, and the work of other people has made it quite easy to get working. So, here are my steps to getting the WiiMote working in Ubuntu Gutsy:
1 - Purchase an ASUS WL-BTD201M adapter from NCIX
2 - Get all the required packages from the repository by running
sudo apt-get install wmgui wminput
this will pull in all dependencies including bluez (the bluetooth api, and various libraries)
3 - Run wmgui (should be in Applications->Accessories menu, or run from command line)
4 - Go to File->Connect in wmgui
5 - Click the 1 and 2 buttons at the same time on your WiiMote to put it into discovery mode
6 - Click OK on the prompt that came up in wmgui
7 - watch as your WiiMote now works in Linux!
Getting your WiiMote to control your mouse in Linux and do other fun things requires some more steps:
3 - Do steps 1 and 2 above
4 - Run the command
sudo modprobe uinput
5 - Put your WiiMote into discovery mode by pressing 1+2
6 - Run the command
sudo wminput
7 - Observe as the tilt of your WiiMote controls the mouse position, and the buttons control mouse clicks!
There are different config files for wminput, each can be viewed/modified at /etc/cwiid/wminput/ and you can run different config files by either changing the "default" symbolic link, or passing the -c option to wminput, eg:
sudo wminput -c ir_ptr
See how easy that was! Have fun!
http://almostdunn.blogspot.com/2007/12/how-to-get-wiimotes-working-with-linux.html
Here I'll show you a quick way to create a new superuser who has almost all rights as the root and you don't really need to understand how sudo works.
1. Let us start. Let us create a new user called root2 first
useradd root2
passwd root2
2. Next stept. If you guessed that it has something to do with modifying sudoers file, you are right.
Modify /etc/sudoers using the visudo which is a sudoers file editor and syntax checker.
sudo visudo
2.Go down to the line '# User privilege specification' You should see root ALL=(ALL) ALL
and add this line after that
root2 ALL=(ALL) ALL
http://anojrs.blogspot.com/2008/01/linux-sudo-tip-creating-new-super-user.html
mencoder -ovc xvid -oac mp3lame -af resample=44100:0:0 -xvidencopts
bitrate=2200 -o MyVideo.avi dvd://${TITLE} -chapter ${CHAPTER}
[[Versión actualizada]]
[[Cómo participar]]
[[Inicio rapido]]
find ~/.thumbnails/ -type f -atime +30 -print0 | xargs -0 rm
(http://www.commandlinefu.com/commands/view/1782/delete-more-than-one-month-old-thumbnails-from-home-directory)
To actually get ubuntu to give you some logging when connecting to wifi (you know so that you can act according to some information rather than at random):
1. Become superuser
2. Run killall NetworkManager
3. Run NetworkManager –no-daemon
This will then give you output for every stage of the connection process.
Network manager is (I believe) the tools that handles the overall process of opening a wifi connection using different processes (iwlist iwconfig wpa_supplicant etc) to do the actual connection.
Notes
Messages of the form "supplication connection state change number -> number" are (i think) from wpa_supplicant. Someone who isn't me should change NetworkManager so that these are written in english. For now note that the states mean the following:
0 - WPA is disconnected
1 - WPA is inactive (no enabled connections and wpa isn't trying to connect
2 - WPA is scanning
3 - WPA is associating (a loose-form of connection)
4 - WPA is associated
5 - WPA 4-way hand shake
6 - WPA group handshake
7 - WPA completed
I was seeing a lot of 3 -> 0 state changes when I was debugging. [This was taken from the wpa_supplicant source code in src/common/defs.h]
(http://argandgahandapandpa.wordpress.com/2009/03/07/debugging-wifi-on-ubuntu-linux/)
bash -x SCRIPT
(http://www.commandlinefu.com/commands/view/1472/debug-bash-shell-scripts.)
With Mplayer already installed, you simply use the -dumpstream command line option to tell it to read the stream and save it to a file (by default, called stream.dump).
$ mplayer -dumpstream streamurl
streamurl in this example is the URL of the stream, which usually begins with rtsp:// or mms://. The hardest part of actually ripping a stream in this way is discovering this URL, as sites often don't make this immediately available.
I'd recommend the Firefox extension UnPlug for this purpose, as it can often discover the stream URL for you, even if it is unable to do the whole ripping process. You can then copy and paste that URL into your mplayer -dumpstream command, and you'll get the media file.
http://fosswire.com/2008/03/29/save-streaming-audio-and-video-as-a-file-with-mplayer/
file -i <textfile>
(http://www.commandlinefu.com/commands/view/3381/detect-encoding-of-a-text-file)
Se pueden utilizar los siguientes programas:
discover
mdetect (mouse)
read-edid (monitor)
get-edid
parse-edid
Para configurar el servidor de ventanas X
dpkg-reconfigure xserver-xorg
ó
dpkg-reconfigure xserver-xfree86
Otras configuraciones se pueden realizar desde el centro de control de KDE
Primero se usa
ps auxw
y del listado que se obtenga se busca el proceso que se quiere cerrar y una vez localizada la línea en la que se encuentra se busca la columna correspondiente a la pid. Después se utiliza
kill -9 (pid)
Esto puede ser particularmente útil para cerrar procesos que se encuentran ejecutando de 'fondo'
Un programa simple y muy bueno para extraer el audio de un DVD de vídeos de música es Devidify.
Requiere Python y PyGTK, el reproductor multimedia MPlayer, la herramienta lsdvd de línea de comandos. Lame es necesario para la codificación de MP3, y oggenc se requiere para codificar Ogg Vorbis.
En un sistema Linux Ubuntu, los paquetes son: python, python-gtk2, mplayer, lsdvd, lame, vorbis-tools. En otros Linux, nombres de paquetes pueden variar (Para usuarios Mandriva usuarios necesitarán el paquete pygtk2.0-libglade.)
Ej. Para ubuntu los pasos para instalar son:
1.-
sudo aptitude install python python-gtk2 mplayer lsdvd lame vorbis-tools
2.- Bajar la versión mas nueva de: http://code.google.com/p/devidify/downloads/list
wget -c http://devidify.googlecode.com/files/devidify-1.14.tar.gz
3.- Finalmente
tar -zxvf devidify-1.14.tar.gz
cd devidify/
sudo python setup.py install
El programa se encontrará en: aplicaciones/sonido y vídeo/devidify
Finally, a more experienced friend helped me write some scripts that achieve a DeepFreeze-like effect for a single user account. This is actually better than DeepFreeze - assuming you don't give out your root account password! With DeepFreeze, you have to "thaw" a computer with the password, reboot, make changes, "freeze" the computer again, and reboot. With this Linux solution, you can just login as root, make changes, refresh the backup image, and log back in as "all" (or whatever account(s) you want the public to use).
Here are the basic steps:
1. Install your distro of choice and create the account(s) for public use.
2. Customize and lock down the public user account(s).
3. Write a script that creates the backup image(s) of the public user account(s).
4. Write a boot script that restores the backup image(s) of the public user account(s).
I'll assume you can handle (1) and (2). I recommend KDE and the KDE Kiosk Tool for easy interface lockdown. Now for the DeepFreeze-esque stuff:
Create a new text file on root's Desktop, make_backup.sh:
Code:
#!/bin/bash
rm -f /root/Desktop/clean_all.tar
tar -cpPf /root/Desktop/clean_all.tar /home/all
Give root execute permissions for it and add it to $PATH if necessary (I prefer to just execute it directly by going to its directory and typing ./make_backup.sh).
This is a very simple bash script. The third line removes the backup image (clean_all.tar) if it exists, without prompting for confirmation. The fourth line creates a tarball of the all user account directory (/home/all), which contains personal files and settings for the all user account. We use a tarball because it preserves permissions. We could compress the tarball, too, but here I'm more concerned with restoring the user account from backup quickly every time the computer boots than I am with conserving disk space.
I've stored the backup image in /root/Desktop. It doesn't matter where you store the backup or the scripts, as long as it's not in the home directory of a non-root user account or a temporary directory.
We should only run this script when the all user account exists exactly as we want it. So we'll run it once when we've set up the public user account (I've named it all). Then, we only run it after we make wanted changes to the all user account and verify it is working.
The second script will restore the all user account from the backup we just created. I'll call it restore_backup.sh:
Code:
#! /bin/bash
rm -fR /home/all
tar -xpPf /root/Desktop/clean_all.tar
Again, give root execute permissions for the file. This bash script removes the /home/all directory, which deletes all account files and settings without deleting the account. It then restores /home/all from the backup we created, preserving permissions. The tarball automatically unpacks to the directory from which it was created: /home/all.
Now we need to have the restore_backup.sh script run at boot. Linux boot scripts are located in the /etc/init.d directory. In openSUSE, I just made a copy of an existing script in /etc/init.d/rc3.d and cleared everything but the last line: rc_exit. In Xandros, the recommended boot script to modify for this sort of thing is bootmisc.sh.
Open the proper boot script for editing. First, we'll add a line so that we can easily enable or disable the code we're going to add. Near the top of the script, add the line
Code:
RESTORE=yes
This creates a variable called RESTORE and gives it the value "yes". So if we don't want restore_backup to run on startup, we can simply change "yes" to "no". Now, add this code later in the boot script:
Code:
if [ "$RESTORE" == yes ]
then
/root/Desktop/restore_backup.sh
fi
If RESTORE is equal to "yes", the restore_backup.sh script will be executed at boot. Otherwise, it won't.
Save the file, reboot, and you're done! Naturally, if you want the backup tarball or scripts stored somewhere else or named something else, just modify the scripts to indicate the correct directories and filenames. The scripts can also be easily modified to accomodate backup and restore of multiple public user accounts.
Now I hope more experienced Linux users will provide feedback, corrections, suggestions for improvement or clarification, additions for getting this to work on other distributions, etc. Questions are also welcome!
http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/Deepfreeze_for_Linux 20070302
La siguiente instrucción hace que los dispositivos estén disponibles
mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/group),devmode=664 /proc/bus/usb /proc/bus/usb
También se puede modificar /etc/fstab, agregando
none /proc/bus/usb usbfs devgid=devplug,devmode=666 0 0
Donde devplug se sustituye por el número ID correspondiente al grupo vboxusers
Se puede obtener usando
cat /etc/group | grep vboxusers
También se puede usar el grupo plugdev o usb en caso de que afecte al funcionamiento de los dispositivos usb en el anfitrión
==================================
Otra forma de hacerlo es modificando
/etc/init.d/mountdevsubfs.sh
Inside, you'll see a block of code that looks like this:
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb
Change it to look like this (uncomment out the region by deleting the "#'s"):
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb
(http://seogadget.co.uk/enable-usb-support-virtualbox/)
La siguiente instrucción hace que los dispositivos estén disponibles
mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/group),devmode=664 /proc/bus/usb /proc/bus/usb
También se puede modificar /etc/fstab, agregando
#Añadido para virtualbox
none /proc/bus/usb usbfs devgid=devplug,devmode=666 0 0
Donde devplug se sustituye por el número ID correspondiente al grupo vboxusers
Se puede obtener usando
cat /etc/group | grep vboxusers
También se puede usar el grupo plugdev o usb en caso de que afecte al funcionamiento de los dispositivos usb en el anfitrión
Para dividir un archivo en dos partes se usa
mpgtx -2 NombreDelArchivo.mpg -b NuevosArchivos
Lo cual dará como resultado
NuevosArchivos-1.mpg
NuevosArchivos-2.mpg
también se puede usar
mpgtx -s archivo.mpg {699M}
para dividir en archivos de 699MB
Y para unir los archivos
mpgtx -j Archivo1 Archivo2 Archivo3 -o ArchivoFinal.mpg
Si se desea obtener solo la parte inicial de un video se usa
mpgtx -s archivo.mpg [-03:00]
Con el ejemplo anterior se produce un archivo con los primeros 3 minutos de archivo.mpg
También pueden unirse ciertos archivos mpg utilizando
cat Archivo1.mpg Archivo2.mpg Archivo3.mpg > ArchivoFinal.mpg
Hace varios años atras cuando sacamos una copia de seguridad de nuestros documentos/archivos/base de datos etc, en windows creamos un archivo zip con Winzip y luego lo partiamos en varios diskettes.
En linux tenemos tres herramientas que utilizaremos para nuestro fin, las cuales nos permiten dividir, volver a unir y verificar cualquier archivo. Dividir (split), unir (cat) y verificar (md5sum) archivos.
Como partir archivos grandes en mas pequeños en linux
md5sum: Verificar los archivos
Antes de partir el archivo, siempre es aconsejable calcular el resumen md5 para el archivo original. Entre mas grande sea el archivo, mas tardara este proceso.
$ md5sum -b backupDB.zip > backupDB.zip.md5
El comando anterior crea un archivo de texto de 128 bits que contiene una secuencia numerica unica a partir del contenido de nuestro archivo.
split: Dividir el backup
Digamos que deseamos partir una copia de una base de datos para almacenarla en un lugar seguro. No importa si es MySQL, Oracle, PostgreSQL, para nuestro ejemplo tenemos un archivo llamado backupDB.zip. Crear los archivos necesarios de 695Mb, para quemarlos en un cd y ordenados por número y no por letras, tecleamos la instruccion:
$ split -b 695m -d backupDB.zip backupDB.zip.s
Al terminar, tendremos varios archivos llamados backupDB.zip.s00, backupDB.zip.s01 y así sucesivamente
cat: Unir los archivos
Ahora queremos recuperar el backup. Ya tenemos nuestros N cd's conteniendo un archivo cada uno, entonces procedemos a copiar el contenido de cada cd o dvd hacia un disco duro con el doble de espacio. Al terminar la copia tecleamos en nuestra línea de comandos:
$ cat backupDB.zip.s* >> backupDB.zip
Nuetro archivo original con la copia de seguridad de la base de datos ha sido restaurado.
(http://www.guatewireless.org/dividir-y-unir-archivos-de-copias-de-seguridad/)
I recently came across a typo that existed in a bunch of html files on my web server. I thought it should be easy enough to change, but since it was in a number of files, editing it by hand would be time consuming. Fortunately, there is an easy, one liner command to replace the text in multiple files in a sub directory using recursion.
grep -lr -e '<oldword>' * | xargs sed -i 's/<oldword>/<newword>/g'
This command broken down:
* grep for the word in a files, use recursion (to find files in sub directories), and list only file matches
* | xargs passes the results from the grep command to sed
* sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace)
(http://systembash.com/content/easy-search-and-replace-in-multiple-files-on-linux-command-line/)
El truco es cambiar el fourcc del encabezado del archivo de SEDG a DIVX
sed 's/SEDG/DIVX/g' < ejemplo.avi > resultado.avi
Con esto ya es posible editar el archivo con cualquier programa que soporte mpeg4.
El truco también sirve para reproducir el archivo con vlc ó kmplayer, ya que originalmente sólo mplayer puede reproducirlo sin cambios en la configuración.
found a nice solution here:
http://blog.autoedification.com/2006/11/vmware-guest-clock-runs-fast.html
basically you find your cpu freq:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1833000
then you add some lines to your vmware config file:
$sudo su
$nano /etc/vmware/config
host.cpukHz = 1830000
host.noTSC = TRUE
ptsc.noTSC = TRUE
I added the lines at the end and it slowed the clock right down.
then you start the gust windows os and click the vmware tools icon in the task bar and check the time synchronization checkbox under the options tab.
(http://ubuntuforums.org/archive/index.php/t-109655.html)
ps -ef | grep PROCESS | grep -v grep | awk '{print $2}' | xargs kill -9
(http://www.commandlinefu.com/commands/view/1138/ps-ef-grep-process-grep-v-grep-awk-print-2-xargs-kill-9)
Ejecutar como superusuario
cd /etc/init.d
update-rc.d -f mysql remove
(En este ejemplo elimina el guión mysql)
For some reason that great, well know shortcut has been disabled. Apparently people were pressing it by accident. I know …
It's been replaced by "alt gr + SysRq (print screen) + K", which is a bad short cut in my eyes.
Open up xorg.conf and add this to the bottom of the document:
Section "ServerFlags"
Option "DontZap" "false"
EndSection
(http://linuxowns.wordpress.com/2009/04/28/fixing-some-ubuntu-904-annoyances/)
Sometimes you need to know which debian package contains a specific file e.g. because you deleted a system file accidently or you try to install a new software that requires this file. The apt package management utility which is used in Debian and Ubuntu comes with a handy tool called apt-file which allows a saerch for filenames in the package database.
Install apt-file
apt-get install apt-file
Update the apt-file database
apt-file update
Search for a specific file name, e.g. "lcrypto"
apt-file search /bin/bash
apt-file search /bin/bash
bash: /bin/bash
bash: /usr/bin/bashbug
bash-minimal: /bin/bash-minimal
bash-static: /bin/bash-static
bashdb: /usr/bin/bashdb
mybashburn: /usr/bin/bashburn
(http://www.faqforge.com/linux/how-to-use-apt-file-to-find-which-deb-package-contains-a-specific-file/)
Google Docs Batch Upload
A tool for batch upload documents to a Google Docs account with recursive traversing of directories. The tool supports PDF upload.
Total list of supported formats: csv, doc, docx, html, htm, ods, odt, pdf, ppt, pps, rtf, sxw, tsv, tab, txt, xls, xlsx.
To run the application you need Java 1.6 or greater installed: http://java.sun.com/javase/6/
Update: In version 1.2 the ability to replicate folder structure in Google Docs has been implemented.
Usage: java -jar google-docs-upload.jar
Usage: java -jar google-docs-upload.jar <path> --recursive
Usage: java -jar google-docs-upload.jar <path> --username <username> --password <password>
Usage: java -jar google-docs-upload.jar <path> --authSub <token>
[--username <username>] Username for a Google account.
[--password <password>] Password for a Google account.
[--recursive] Recursively traverse directories.
[--without-folders] Do not recreate folder structure in Google Docs.
[--add-all] Upload all documents even if there are already documents with the same names.
[--skip-all] Skip all documents if there there are already documents with the same names.
[--replace-all] Replace all documents in Google Docs, which have the same names as the uploaded.
[--authSub <token>] AuthSub token.
[--auth_protocol <protocol>] The protocol to use with authentication.
[--auth_host <host:port>] The host of the auth server to use.
[--protocol <protocol>] The protocol to use with the HTTP requests.
[--host <host:port>] Where is the feed (default = docs.google.com)
(http://code.google.com/p/google-docs-upload/)
En ocasiones puede aparecer el siguiente error al ejecutar x11vnc a través de ssh
X Error of failed request: BadAccess (attempt to access private > > > > resource denied) > > > > Major opcode of failed request: 147 (MIT-SHM) > > > > Minor opcode of failed request: 1 (X_ShmAttach) > > > > Serial number of failed request: 34 > > > > Current serial number in output stream: 76
Una forma de solucionarlo es utilizar
x11vnc -noshm
aunque utiliza más ancho de banda
Aparece un error que dice que el kernel y los encabezados son ligeramente diferentes
the problem is not vmware nor the new kernel. currently there's a buggy version of the program "insmod" in debian sid.
use: apt-get install module-init-tools/testing
to install an old, working version of the program. then run vmware-config.pl again.
http://www.sidux.com/PNphpBB2-viewtopic-t-3814.html
Se ejecuta
apt-get install module-init-tools/testing
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Versión seleccionada 3.3-pre4-2 (Debian:testing) para module-init-tools
Se DESACTUALIZARÁN los siguientes paquetes:
module-init-tools
0 actualizados, 0 se instalarán, 1 desactualizados, 0 para eliminar y 129 no actualizados.
Necesito descargar 82,8kB de archivos.
Se utilizarán 4096B de espacio de disco adicional después de desempaquetar.
¿Desea continuar [S/n]? s
Des:1 http://ftp.us.debian.org testing/main module-init-tools 3.3-pre4-2 [82,8kB]
Descargados 82,8kB en 1s (42,8kB/s)
dpkg - atención: desactualizando module-init-tools de 3.3-pre11-1 a 3.3-pre4-2.
(Leyendo la base de datos ...
226351 ficheros y directorios instalados actualmente.)
Preparando para reemplazar module-init-tools 3.3-pre11-1 (usando .../module-init-tools_3.3-pre4-2_i386.deb) ...
Desempaquetando el reemplazo de module-init-tools ...
Configurando module-init-tools (3.3-pre4-2) ...
Instalando una nueva versión del fichero de configuración /etc/modprobe.d/arch/i386 ...
Y luego
./vmware-install.pl
En knoppix 5.1.1 aparece un error en kde su
Para eliminarlo hay que editar el archivo
/home/usuario/.kde/share/config/kdesurc
donde se cambia la línea
super-user-command=sudo
por
super-user-command=su
Esto se resuelve instalando task-qt4 o actualizando los paquetes que incluye.
También puede ser necesario actualizar los paquetes relacionados con libxml para eliminar la siguiente advertencia:
Warning: program compiled against libxml 207 using older 206
mencoder -of rawaudio -ovc copy -oac mp3lame -o output.mp3 input.avi
Extracts an MP3 encoded audio stream from an input video file.
(http://www.commandlinefu.com/commands/view/3492/extract-audio-track-from-a-video-file-using-mencoder)
Usage is very straightforward:
pdfimages -j foo.pdf bar
This will extract all images from foo.pdf and save them in JPEG format (option -j) to bar-000.jpg, bar-001.jpg, bar-002.jpg, etc.
(http://stefaanlippens.net/extract-images-from-pdf-documents)
rpm2cpio /path/to/file.rpm | cpio -i -d
(http://www.commandlinefu.com/commands/view/1441/extract-the-contents-of-an-rpm-package-to-your-current-directory-without-installing-them.)
pdfimages archivo.pdf nombre_para_imagenes
(pdfimages es parte de xpdf-utils)
1) mplayer -vo null -ao pcm nombre.avi
2) Te aparecerá en el directorio un fichero llamado audiodump.wav
3) cdrecord -v dev 0,0,0 -audio -pad audiodump.wav
cdxa2mpeg
-----------
A program to strip the RIFF header on CD-XA format tracks.
On Microsoft Windows, people would extract the payload tracks of
Video CD's (e.g the tracks other than the first one) by simply copying
the .dat/.mpg files as seen in the filesystem of a (Video) CD.
Since many MPEG players will play tracks copied this way, people
tend to think of these as an MPEG files, but they are not. Instead they
have a RIFF container around the MPEG stream, including some mode2
sector headers prepended to each MPEG "sector". In such a setting
`cdxa2mpeg' will extract the MPEG portion by stripping off the RIFF
container and mode2 sector headers.
The name cdxa2meg refers to the fact that it reads the XA-format
tracks of a CD and in such a circumstance described above turns them
"2" MPEG .
The ability to see or copy the .dat/.mpg requires some sort of
filesystem support to read or show the CD Mode2 XA tracks. Depending on
the Operating System and filesystem hooks, this might not be available.
A better, more universal way to extract MPEGs is to use the `--tracks'
option of *Note vcdxrip::.
vcdxrip
-----------
Perhaps all you want to do is rip a CD onto your disk to modify it. If
the CD is in the default location for your OS, then this might work:
vcdxrip
It means the same thing as:
vcdxrip --cdrom-device
and using the short option:
vcdxrip -C
I have a combined CD-ROM and DVD drive called `/dev/dvd'. I have
another CD-ROM drive which goes under the name `/dev/cdrom', but I
generally prefer to use the DVD/CD-ROM drive for reading since it
doesn't seem to run as hot. Since that drive is not the "default"
(`/dev/cdrom') on my GNU/Linux box, I have to give a location. So this
will work:
vcdxrip -C=/dev/dvd
Or even better, I'll let `vcdxrip' figure out it's a CD-ROM device:
vcdxrip -i /dev/dvd
The equals sign before `/dev/dvd' is optional in either format.
nmap -sP 192.168.0.*
or
arp-scan -l
(http://www.commandlinefu.com/commands/view/3268/find-all-active-ip-addresses-in-a-network)
find $HOME -type f -print0 | perl -0 -wn -e '@f=<>; foreach $file (@f){ (@el)=(stat($file)); push @el, $file; push @files,[ @el ];} @o=sort{$a->[9]<=>$b->[9]} @files; for $i (0..$#o){print scalar localtime($o[$i][9]), "\t$o[$i][-1]\n";}'|tail
(http://www.commandlinefu.com/commands/view/3563/find-and-display-most-recent-files-using-find-and-perl)
cat /var/log/secure | grep sshd | grep Failed | sed 's/invalid//' | sed 's/user//' | awk '{print $11}' | sort | uniq -c | sort -n
(http://www.commandlinefu.com/commands/view/1788/find-brute-force-attempts-on-sshd)
sudo find / -mmin 60 -type f
(http://www.commandlinefu.com/commands/view/1293/find-files-that-have-been-modified-on-your-system-in-the-past-60-minutes)
rpm -qif `which more`
Replace 'more' command with any command which is in your PATH.
(http://www.commandlinefu.com/commands/view/1252/find-out-what-package-some-command-belongs-to-on-rpm-systems)
Primero hay que instalar firefox 3
apt-get update
apt-get install firefox3
Luego se descarga la versión más reciente de firefox, con español de Argentina como lenguaje, desde esta página:
http://www.mozilla.com/en-US/firefox/all.html
Al descomprimir el archivo descargado se buscan los siguientes archivos:
/chrome/es-AR.jar
/chrome/es-AR.manifest
Y se copian en /usr/lib/firefox/chrome
Después se modifica /usr/lib/firefox/defaults/pref/firefox-l10n.js
para que en la línea que dice
pref("general.useragent.locale", "en-US");
se sustituya en_US por es_AR de forma que quede así
pref("general.useragent.locale", "es-AR");
Esta modificación está incorporada a TMLinux a partir de la versión 0.3.3
Se descarga el archivo correspondiente al español desde
http://www.mozilla.com/en-US/firefox/all-beta.html
y al descomprimir dicho archivo se tiene una carpeta con el firefox 3rc1 en español completamente funcional, pero sólo para el usuario que es propietario de los archivos
Si se desea que quede disponible para todos los usuarios se puede copiar la carpeta a /usr/share y poner como propietario al superusuario
Texstar publicó en el foro de PCLinuxOS una solución para que Flash 10 funcione más fluido
1. Abre una terminal
2. escribe su (te permite trabajar como superusuario)
3. introduce tu contraseña de superusuario
4. escribe mkdir -p /etc/adobe
5. y por último escribe echo "OverrideGPUValidation=true" > /etc/adobe/mms.cfg
No esperes que la modificación sea una opción mágica para incrementar la velocidad, pero ayuda e eliminar trabas y altibajos. Esperemos que Adobe arregle su versión de Flash para Linux en lugar de darnos remedios.
Probada y funcionando bien en TMLinux 0.6 beta con KDE 4.3.2
(http://www.pclinuxos.com/forum/index.php/topic,65075.0.html)
xwinwrap -ni -o 0.6 -fs -s -st -sp -b -nf -- mplayer -wid WID -quiet archivo.ogv -loop 0
You need a playlist of mp3's for shoutcast. An easy way to prepare the playlist, is to use find. For example:
find /mp3 -name *.mp3 > /usr/local/icecast/etc/shout.playlist
http://www.freeos.com/articles/3873/
Playlist Randomization Script
##########################################################################
# File Description
# Shuffles the sequence of lines in a pseudo-random order.
# Each line is printed exactly once.
##########################################################################
PN=`basename "$0"` # Program name
VER='1.3'
# We need a "new" awk having srand() and rand(). Examples: GNU awk "gawk",
# Solaris "nawk", or "mawk".
#NAWK=awk
Usage () {
echo >&2 "$PN - print lines of a file in random order, $VER
usage: $PN [file ...]"
exit 1
}
Msg () {
for MsgLine
do echo "$PN: $MsgLine" >&2
done
}
Fatal () { Msg "$@"; exit 1; }
searchprog () {
_search=$1; shift
for _dir in `echo "$PATH" | sed "s/^:/.:/;s/:\$/:./;s/:/ /g"`
do
[ -x "$_dir/$_search" ] || continue
echo "$_dir/$_search"
return 0
done
return 1
}
while [ $# -gt 0 ]
do
case "$1" in
--) shift; break;;
-h) Usage;;
-*) Usage;;
*) break;; # First file name
esac
shift
done
: ${NAWK:=`searchprog mawk || searchprog gawk || searchprog nawk || echo awk`}
randseed=${RANDOM:-}
"$NAWK" '
BEGIN { srand('"$randseed"') } # initialize random number generator
{ print rand() " " $0 }
' "$@" |
sort -n | # Sort numerically on first column
cut -f2- # Remove sorting column
# http://www.gnuware.com/icecast/chap_09.html
$ for i in `ls --color=none /sys/class/net`; do echo "# $i"; sudo ethtool $i | grep -E "Link|Speed" ; done
(http://www.commandlinefu.com/commands/view/1995/get-a-summary-of-network-devices-in-the-system)
This is an commandline utility to get fair piece of information about the attached network card.
ethtool eth0
(http://www.commandlinefu.com/commands/view/3225/get-ethernet-card-information)
mplayer -vo dummy -ao dummy -identify your_video.avi
(http://www.commandlinefu.com/commands/view/1872/get-information-about-a-video-file)
Método 1
I find this howto online and it works
for those of us who has been frustrated with ours realtek wireless card under Linux, this is a howto.
Hi there,
a little howto 4 U.
1. Download latest drivers (RTL8187B_driver_only) at Link: http://www.realtek.com.tw/downloads/...Downloads=true
2. Extract it
3. Open with an editor net8187b.inf ( WinXP folder )
4. Change at ControlFlags to 8197
ControlFlags
ExcludeFromSelect = USBVID_0BDA&PID_8197&REV_0200
and add following line to the end of IDs
;;****************************************************************************
;; IDs for 98SE/ME/2K/XP
;;****************************************************************************
Realtek
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8187&REV_0200
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8189&REV_0200
%RTL8187B.DeviceDesc% = RTL8187B.ndi, USBVID_0BDA&PID_8197&REV_0200
5. Save it and try again.
(http://www.linuxquestions.org/questions/linux-wireless-networking-41/get-your-rtl8187b-working-with-winxp-driver-610613/)
Método 2
A guy on the PCLinuxOS Forum gave me these guide lines: From what he says, I need to find the Windows98SE drivers.
"I got this adapter working last night on a newer whitebox that I have. It was quite easy.
Open PCC, (Drakconf), Configure your computer
Go to Network & Internet
Setup a new network interface
Select Wireless
Select Ndiswrapper
It will open the File Browse in /mnt/cdrom (I think)
You need the windows 98 drivers (the xp drivers reportedly don't work and I also tried the native driver with no luck and constant locking of the system for several seconds at a time)
Select the *.inf file (I think it was net8187.inf Huh) you also need the rtl8187.sys file present in the same directory.
and continue the setup process.
The only real annoying thing about using ndiswrapper in PCLOS/Mandriva is that every time you go to drakroam to use the adapter it prompts me to use the ndiswrapper driver again.
Other problems that I had after trying the native driver. I had to rmmod r8187 to allow ndiswrapper to take control of the adapter. You can tell what module is being used for the adapter in harddrak. It showed up at the bottom under unknown device.
Useful tools for diagnostics:
lsusb
lsmod, rmmod, modprobe
tail -f /var/log/syslog
tail -f /var/log/messages
and I think ndiswrapper -l
Sorry if somethings are slightly off, I am reporting from my work computer and I don't have access right now to my PCLOS computer.
After that you can use the PCLOS Control Center or net_applet in the system tray to administer you wireless connections."
(http://www.tjrforum.com/showthread.php?t=3279)
Método 3
Wireless: To get this working you will need to build and install the following driver.
http://pclinuxoshwdb.com/toshiba/a215-wireless/rtl8187b-modified-dist.tar.gz
(http://pclinuxoshwdb.com/index.php?option=com_content&task=view&id=997&Itemid=1)
sftp -s "sudo /usr/lib/sftp-server" user@host
(http://www.commandlinefu.com/commands/view/1773/given-nopasswd-privileges-on-a-remote-ssh-server-sftp-as-root-via-sudo)
It's an incompatibility between libcrypto provided by googleearth and libssl from opensuse.
I found this solution on WTF installing googleearth breaks ssh - openSUSE Forums
If you run googleearth from command line, you will see the message "symbol lookup error: /usr/lib/libssl.so.0.9.8: undefined symbol: EVP_camellia_128_cbc". I found the solution by googleing "EVP_camellia_128_cbc".
You just have to delete or rename /opt/google-erath/libcrypto.so.0.9.8 (path of a standard installation) to force google to use your opensuse library. And it works.
(http://forums.opensuse.org/applications/406756-google-earth.html)
Record high quality screencasts with:
ffmpeg -f oss -i /dev/dsp -f x11grab -s 1024x768 -r ntsc
-sameq -i :0.0 foo.avi
(http://gnufied.org/2008/07/14/screencasting-from-linuxubuntu/)
These are two examples on how to write an interactive shell script, either with a YES/NO prompt and with a LIST among which the user has to choose.As always, start your script file with:
#!/bin/sh
Interactive with a YES/NO prompt:
echo "What do you like me?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "So I do $USER!"; break;;
No ) echo "Neither do I $USER"; break;;
esac
done
After Yes ) and No) you can add a series of commands, each one delimited by a ; (semicolon) at the end.
When you finish your command sequence put ;; (two semiclon) (this way the script would be recursive)
If you do not want your script to be recursive and want to go to the next question put break;;
Interactive with a LIST from which to choose:
while :
do
clear
echo "Choose the mode which best fits you"
echo "1. AUTO (default)"
echo "2. HP generic laptop"
echo "3. Fujitsu"
echo "4. Acer"
echo "5. Dell"
echo "6. Lenovo Thinkpad"
echo "7. UNDO TWEAK / CHANGE MODE / PRESSED WRONG DIGIT"
echo "8. DONE TWEAKING!"
echo -n "Please enter option [1 - 8]"
read opt
case $opt in
1) echo;;
2) sudo echo "options snd-hda-intel model=hp" >> /etc/modprobe.d/alsa-base.conf;;
3) sudo echo "options snd-hda-intel model=fujitsu" >> /etc/modprobe.d/alsa-base.conf;;
4) sudo echo "options snd-hda-intel model=acer" >> /etc/modprobe.d/alsa-base.conf;;
5) sudo echo "options snd-hda-intel model=dell" >> /etc/modprobe.d/alsa-base.conf;;
6) sudo echo "options snd-hda-intel model=thinkpad" >> /etc/modprobe.d/alsa-base.conf;;
7) sudo sed '$d' /etc/modprobe.d/alsa-base.conf /tmp/alsa-base.conf ; mv /tmp/alsa-base.conf /etc/modprobe.d/alsa-base.conf;;
8 ) echo "Bye $USER";
exit 1;;
*) echo "$opt is an invaild option. Please select option between 1-17 only";
echo "Press [enter] key to continue. . .";
read enterKey;;
esac
done
As before remember to end each command with a semicolon ; and to end each menu entry with double semicolon ;;
The end of the script would be an exit 1;;
to display a file as a choice of the interactive script you can use the command more
2) more /etc/resolv.conf
to require user press the Enter key to acknowledge some message:
echo "Press [enter] key to continue. . .";
read enterKey;;
(http://aldeby.org/blog/index.php/how-to-write-an-interactive-shell-script.html)
You can embed movies and sounds in documents and presentations. On UNIX systems, the Media Player requires the Java Media Framework API (JMF). The documentation accompanying JMF includes a list of formats and codecs that JMF can play.
Install Java
You can get a copy of Sun Java from http://www.java.com
Install Java Media Framework
Download jmf-2_1_1e-linux-i586.bin from http://java.sun.com/products/java-media/jmf/.
To install the JMF files you need to make the file executable. Open a console window and type
chmod u+x jmf-2_1_1e-linux-i586.bin
Change to the directory containing jmf-2_1_1e-linux-i586.bin and run it
./jmf-2_1_1e-linux-i586.bin
Follow the onscreen instructions. Type “Yes” to accept the license. If you are only going to use Java Media Framework with OpenOffice.org, you can answer “No” to the other two questions.
Set the java user environment to identify the location of the Java Media Framework files. In the console window, type
export JMFHOME=/path_to/JMF-2.1.1e
export CLASSPATH=$JMFHOME/lib/jmf.jar::$JMFHOME/lib/sound.jar:.:${CLASSPATH}
export LD_LIBRARY_PATH $JMFHOME/lib:${LD_LIBRARY_PATH}
Add support for MP3 audio
Download javamp3-1_0.zip from
http://java.sun.com/products/java-media/jmf/mp3/download.html.
Extract mp3plugin.jar.
Move mp3plugin.jar to the lib/ext directory in your installed java directory. You may need administrator rights to do this.
Copy jmf.jar to the lib/ext directory in your installed java directory. You may need administrator rights to do this.
In the console window, type java com.sun.media.codec.audio.mp3.JavaDecoder. You may need administrator rights to do this.
Set up OpenOffice.org to use Java Media Framework
Use the Tools > Options > OpenOffice.org > Java menu
Click the Class Path... Button.
Click the Add Archive... Button.
Browse to the jmf.jar file to add it.
Check the installation
Start up simpress, the presentations tool. Create a new document
Use the Insert > Movies and Sound menu.
Browse to a supported movie or sound file. You can find sounds for testing in the /opt/openoffice.org2.0/share/gallery/sounds directory.
To play the media, click it, then click the play button on the Media toolbar. In simpress, the media file will also play automatically when you show the slide in the slideshow.
The Java Media format can not open all movie and sound files. In particular, some files from the Internet use proprietary compression codecs that JMF cannot decode.
http://www.oooforum.org/forum/viewtopic.phtml?t=26704&highlight=jmf+jmfhome+sun
Mint is close to perfect---except of course for the silly Ubuntu "no-root-user" thing.
To fix---in a terminal: "sudo passwd root"
the last Mint I tried gave you the option at the end to enable root.
(http://www.linuxquestions.org/questions/linux-mint-84/glorious-gloria-729064/)
En ocasiones puede ser necesario modificar /etc/X11/xorg.conf para que funcione la tecla super en compiz
Basta agregar altwin:super_win a la sección correspondiente al teclado, como se muestra a continuación:
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "es"
Option "XkbOptions" "compose:rwin,altwin:super_win"
EndSection
De entrada hay que usar la versión de código cerrado de VirtualBox (Al menos hasta la versión 1.6)
Para la mayoría de las distribuciones basta con modificar el archivo /etc/init.d/permissions.rules de forma que la línea que dice
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
quede así
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
Otra forma de hacerlo es agregar los usuarios que van a usar virtualbox al grupo que permite el uso de dispositivos usb, aunque no siempre es obvio de que grupo se trata. Por ejemplo: en Debian es el grupo plugdev.
The quick fix for this problem, at least for my own sake, is to increase the time between each of the saves performed by session restore. By opening about:config in your Firefox address bar, then typing browser.sessionstore.interval in the filter box, you'll see a value of 10000, which is in milliseconds. (Meaning your session is saved every 10 seconds.) I changed this to 300000, or every 5 minutes, as I don't have the urgent need for tab restoration. If you feel like being more on the safe side, try increasing it to something a bit lower, say 120000, or every 2 minutes.
(http://lifehacker.com/5342636/how-to-fix-annoying-youtube-jumpiness-in-firefox)
Lets say you installed a new window manager, Musca for instance. And upon installation, no GDM or KDM session was created so you cannot log into it. Solving this is rather simple.
cd over to /usr/share/xsessions/
if you ls the directory you'll see several *.desktop files. Fluxbox's looks like this:
[Desktop Entry]
Encoding=UTF-8
Name=Fluxbox
Comment=Highly configurable and low resource X11 Window manager
Exec=/usr/bin/startfluxbox
Terminal=False
TryExec=/usr/bin/startfluxbox
Type=Application
[Window Manager]
SessionManaged=true
All you really need to do is the following:
cp /usr/share/xsessions/fluxbox.desktop /usr/share/xsessions/musca.desktop
then modify musca.desktop in a text editor so it looks like the following:
[Desktop Entry]
Encoding=UTF-8
Name=Musca
Comment= Kickass tiling window manager
Exec=/usr/bin/musca
Terminal=False
TryExec=/usr/bin/musca
Type=Application
(http://tuxtraining.com/2009/10/16/how-to-add-sessions-to-kdm-and-gdm)
by pinoc
Contact info: peter.vogt@jrc.it
Two months ago I removed Windows and installed PCLinuxOS in our local nursery in Italy; the kids love playing Gcompris and Tuxracer and the teachers are happily using a free office suite on a suddenly much faster computer. Roberto, the head of the nursery, has just bought a new laptop and he was surprised to see that the applications on the shiny Vista were not running any faster than on his 4-year old laptop he had before, and that in spite of the multiple amount of RAM and CPU power, but we all know this story... After a brief discussion we quickly agreed to liberate the poor new laptop and replace the pre-installed Vista with an Italian PCLinuxOS installation.
This article summarizes some simple steps to change the English localization of a standard MiniME 2008 installation to the Italian language, but these steps are equally applicable to any other language. In case you are interested in a German localization, I strongly suggest you save yourself some time and download the excellent German remaster by LinuxDoc from the German PCLinuxOS web page.
So, let's start from a fresh MiniME 2008 installation and change the localization from English to Italian.
1.
Installation of the necessary language packages
We need to install some packages which are not on the MiniME2008 Live-CD, so set up your Internet connection first and make sure it works. Then start Synaptic: Start -> System -> Configuration -> Packaging -> Synaptic Package Manager and enter your root password. At first, you will only see the packages from the CD and we need to click on the "Reload" button to inform the system about all the other additional packages of the PCLinuxOS repository. Then we click on the "Search" button to search for and install the following three packages: locales-it, glibc-i18ndata, kde-i18n-it. Then we close Synaptic.
2.
Change the system language to Italian
Start the PCLinuxOS Control Center: Start -> System -> Configuration -> Configure Your Computer and enter your root password. In the left panel click on "System" and then on the right panel on "Select the language and the country or region of the system". In the following window select "Italian", click on the "Next" button, select your country, and click the "Next" button again; actually it is no longer called "Next" but already changed to the new language, in my case "Avanti". Finally we click on the "OK" button in the following window and then we close the PCLinuxOS Control Center.
3.
Change the KDE desktop to Italian
Start the KDE Control Center: Start -> System -> Configuration -> Control Center. On the left panel open the entry "Regional & Accessibility", then click on "Country - Region & Language" and on the right panel on "Add Language - Other - Italian" and you should see something like this:
After this, Italian will be at the top of the language list and the names of the tabs will already be in Italian. Now we can also amend some other useful things, for example in the "Altro" tab we can change the paper format to A4 and the system units to metric:
Finally, we click on "Apply", close the KDE Control Center and any other open windows, and terminate the session: Start -> Log Out...
4.
Start a new session and re-install existing programs
To start a new session, enter your user name and password at the Login window. Starting from now, any new installed software will have the interface of the new localization (Italian), if the programmers provided this language that is. However, all currently existing programs were installed with the default English interface and as a result they are all showing up in English. To change this, we need to reinstall all existing programs and it is thus meaningful to do the language conversion as early as possible. First, we need to get a list of the currently installed programs. Open a terminal (Start -> System -> Terminals -> Konsole) and enter the following command:
rpm -qa --queryformat " "%{NAME} > installedRPMS.list
Now open the file "installedRPMS.list" with any text editor and insert the following three lines at the beginning of this file in such a way that your RPM list starts in the third line after the "--reinstall " (Note: there is also one empty space after the --reinstall). So, the head of this file should look like this:
#! /bin/bash
apt-get update
apt-get install --reinstall <your rpm-list>
In the above example, replace "<your rpm-list>" by the actual list and remember to have one blank space between "--reinstall" and your rpm-list. Within your list you can also remove the "kernel"-entries since we do not need to reinstall the kernel. Next, we save this file, exit the text editor, and enter the following command in the terminal to make this file executable:
chmod u+x installedRPMS.list
To perform the re-installation we need to become root , so we enter the command "su -" in the terminal and supply the root password. At the red root prompt enter the full path to the now executable file "installedRPMS.list", e.g.:
/home/<your_username>/installedRPMS.list
Replace <your_username> by your actual username and press the Enter key. Now Apt, the "motor" under the hood of Synaptic, will reload the repository RPM sources and finally ask for your confirmation to re-install: "Do you want to continue ? [Y/n]" and our answer is "Y" (without the quotes). This will take some time...
NOTE: It may happen that Synaptic can not re-install some packages because they are no longer available in the repositories. In this case it will complain and provide you with a list of these packages. Remove these names from your file "installedRPMS.list" and then try again.
When the re-installation has finished, we can clean the packet cache by entering the following command in the root terminal:
apt-get clean
Finally, close all windows, do a Logout/Login and there you go! Now everything should be in your chosen language/locale. Only those programs which do not provide an interface in your language will have the default English interface. And now join in with Roberto and have fun with your newly localized PCLinuxOS!
lsof
With this command you need to enter
sudo lsof +M -i4
You will get an output like this:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
apt-cache 2763 www-data 3u IPv4 6403 TCP *:3143 (LISTEN)
portmap 2919 daemon 3u IPv4 6686 UDP *:sunrpc[portmapper]
portmap 2919 daemon 4u IPv4 6687 TCP *:sunrpc[portmapper] (LISTEN)
rpc.statd 2926 statd 5u IPv4 6726 UDP *:982
rpc.statd 2926 statd 7u IPv4 6736 UDP *:44807[status]
rpc.statd 2926 statd 8u IPv4 6741 TCP *:38599[status] (LISTEN)
cupsd 3407 root 0u IPv4 20058 TCP localhost:ipp (LISTEN)
cupsd 3407 root 3u IPv4 20061 UDP *:ipp
inetd 3441 root 4u IPv4 7612 TCP *:auth (LISTEN)
inetd 3441 root 5u IPv4 7615 TCP *:902 (LISTEN)
polipo 3455 proxy 0u IPv4 7649 TCP *:8123 (LISTEN)
polipo 3455 proxy 2u IPv4 11350 UDP debian.go2linux.org:59528->vnsc-bak.sys.gtei.net:domain
polipo 3455 proxy 5u IPv4 21863 TCP localhost:8123->localhost:56811 (ESTABLISHED)
polipo 3455 proxy 8u IPv4 21405 TCP localhost:8123->localhost:50403 (ESTABLISHED)
polipo 3455 proxy 22u IPv4 21872 TCP localhost:8123->localhost:56813 (ESTABLISHED)
polipo 3455 proxy 42u IPv4 21965 TCP localhost:8123->localhost:56828 (ESTABLISHED)
avahi-dae 3467 avahi 14u IPv4 7702 UDP *:mdns
avahi-dae 3467 avahi 16u IPv4 7704 UDP *:36555
vmware-ho 4096 root 6u IPv4 9022 TCP *:https (LISTEN)
vmware-ho 4096 root 7u IPv4 9023 TCP *:8222 (LISTEN)
vmware-ho 4096 root 30u IPv4 9455 TCP *:8307 (LISTEN)
firefox-b 4431 ggarron 58u IPv4 21862 TCP localhost:56811->localhost:8123 (ESTABLISHED)
firefox-b 4431 ggarron 61u IPv4 21871 TCP localhost:56813->localhost:8123 (ESTABLISHED)
firefox-b 4431 ggarron 62u IPv4 21964 TCP localhost:56828->localhost:8123 (ESTABLISHED)
firefox-b 4431 ggarron 68u IPv4 21404 TCP localhost:50403->localhost:8123 (ESTABLISHED)
Now you have the program running, as an example, netstat showed on 3143 (Perl) but lsoft showed (apt-cacher), which is a perl script.
http://www.go2linux.org/which_service_or_program_is_listening_on_port
Every now and then we install two distributions as dual boot or dual boot Window$ with Linux and then we are puzzled how to reinstall GRUB.
Here is a simple command line reinstallation for GRUB for PCLinuxOS that I learned from PCLinuxOS forum. It works 100 %.
-------------------------------------------------------------------------------------------------------------------------------------------
Reinstalling grub:
If you want to try reinstalling grub, boot from the live CD, log in as root, open a Konsole window, and at the prompt, ([root@localhost ~]#) type;
[root@localhost ~]# grub
GNU GRUB version 0.97 (640K lower / 3072K upper memory) <-- This is the output from grub after
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> <-- The grub prompt. It won't be blue.
From the grub prompt type;
grub> find /boot/grub/stage2
(hd0,0)
(hd0,4)
(hd0,5)
(hd0,9)
(hd0,11) <-- You'll only have one, use it
(hd1,0)
(hd1,2)
(hd1,4)
grub> root (hd0,5) <-- Use what showed up above for yours
Filesystem type is ext2fs, partition type 0x83 <-- Grub reports both ext2 and ext3 as ext2. Don't worry about it.
grub> setup (hd0) <-- That is a zero (hd0), not a letter
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,5)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
Your done; grub is reinstalled
startx -- `which Xvfb` :1 -screen 0 800x600x24 && DISPLAY=:1 x11vnc
This is sample output - yours may be different.
This starts an X server using Xvfb(1) (no graphics hardware required), then starts a VNC server on the display. Change :1 if there's a conflict with an existing display, and change 800x600x24 to suit your tastes (24 is the bit depth, 800x600 is the size). This command obviously requires X be installed, and also x11vnc(1); both are available via your favourite package manager. You can also use another VNC server of your choosing, as long as DISPLAY is set to the display of Xvfb(1). To change your desktop environment (the default is twm(1), which is rather fail), you can add it to your ~/.xinitrc file (see the startx(1) manpage for details).
(http://www.commandlinefu.com/commands/view/1816/how-to-run-x-without-any-graphics-hardware)
Want to loop a video clip or movie on your desktop? I did and found a nice little tool that does just that! Check out this easy howto
First lets grab some essential building libraries via the terminal: Applications->Accessories->Terminal
sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev cvs
Now lets Install xwinwrap:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps co xwinwrap
cd xwinwrap
make
sudo cp xwinwrap /usr/bin
Now lets start our video/movie as the Desktop Wallpaper!
First find a video/movie you would like to set as your backround and issue this command:
xwinwrap -ni -fs -s -st -sp -b -nf -- mplayer -wid WID -nosound "Steal This Film II.Xvid.avi" -loop 0
Now everything should be working fine, if you would like sound, remove -nosound
You can also display Screensavers as your background:
nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- /usr/lib/xscreensaver/glmatrix -root -window-id WID
Credit for the screen saver hack goes out to wayne@fsckin
http://www.ubuntu-unleashed.com/2008/04/howto-loop-movie-or-video-as-desktop.html
Put your CSV database file in a directory by itself.
Start OpenOffice.org 2 swriter.
File > Wizards > Address Data Source ...
Select Other external data source.
Click Next.
Click Settings
Choose Database Type: Text.
Click Next.
Click Browse.
Choose the folder containing your .csv file.
Click Test Connection.
If the test works, click OK and continue.
Click Next.
Under Specify the type of files you want to access, choose 'Comma separated values' (CSV).
Under Row Format, select the details about how your CSV file is constructed.
For example, for a CSV file exported from Microsoft Outlook 2000 (en-US) you set the details as follows:
Check Text contains headers (Checked)
Field separator is , (comma)
Text separator is " (double quote)
Decimal separator is . (period)
Thousands separator is (space)
Click Finish.
Click Next.
Click Finish.
To verify that your database is available for merging, hit F4.
To hide the available databases, hit F4 again.
(http://www.oooforum.org/forum/viewtopic.phtml?t=27706)
Ctrl-alt-f1 (f2, f3, etc.) para abrir una consola
Registrarse con el nombre y clave del nuevo usuario
startx -- :1 (2,3, etc.) para iniciar la sesión de X-windows
Ctrl-alt-f7 para regresar a la primera sesión de X-windows
Ctrl-alt-f8 (f9,f10, etc.) para ir a la sesión del nuevo usuario
Puede usarse para abrir una sesión gráfica con el superusuario, algo que no está permitido normalmente en algunas distribuciones.
En el caso de dominio.com.mx
ssh -l usuario dominio.com.mx
Para otros casos
Using SSH To Login To A Remote Machine
Using SSH is similar to Telnet. To login from another Linux box use the "ssh" command with a "-l" to specify the username you wish to login as. If you leave out the "-l", your username will not change. Here are some examples for a server named "smallfry" in your /etc/hosts file.
User "root" Logs In To smallfry As User "root"
[root@bigboy tmp]# ssh smallfry
User "root" Logs In To smallfry As User "peter"
The examples below assume that you have created a user called "peter" on smallfry.
Using default port 22
[root@bigboy tmp]# ssh -l peter smallfry
Using port 435
[root@bigboy tmp]# ssh -l peter -p 435 smallfry
TercerMilenioLinuxWiki es una colección de recetas y consejos para hacer trabajar a Linux, especialmente con distribuciones basadas en PCLinux, ya que esta es la distribución sobre la que se van a hacer modificaciones, aunque también va a incluir material sobre Debian y derivados, ya que vengo trabajando con ellos desde hace algunos años.
Ya sea para realizar alguna acción en particular, configurar programas o resolver problemas, el objetivo es reunir la experiencia adquirida desde 2003.
En ocasiones el contenido se encuentra en idiomas diferentes al español, tal como se encontró en diferentes fuentes al utilizar internet. Se recomienda el uso de servicios de traducción como babelfish y similares.
hacia el futuro estará más bien orientado a dar soporte a los desarrollos de programación y las modificaciones de distribuciones de Linux que hacemos en TM.
Descarga TMLinux
Busca la versión mas reciente en http://tmlinux.com/descargas.html
Graba el archivo con extension .iso en un CD.ó DVD
Arranca tu computadora desde el disco que grabaste con la imagen iso de TMLinux.
En la primer pantalla que te presenta opciones de arranque puedes esperar 10 segundos para que continue de forma automatica.
Cuando te pide el teclado selecciona español o latinoamericano.
Cuando llega a la pantalla para seleccionar usuario utiliza la contraseña igual al nombre del usuario que hayas escogido. Por ejemplo: La contraseña para el usuario visitante es también visitante.
Si es necesario configura el acceso a la red local e internet usando el vinculo Configurar red e internet en la carpeta Utiles del Escritorio.
Despues utiliza Firefox como navegador, Konqueror para administrar archivos y el menu de KDE para abrir otros programas
A partir de la versión 0.6 se incluye la Guía de Incio TMLinux para escritorio KDE en una de las páginas que se abren con Firefox. En versiones anteriores puede buscar este curso en el sitio de Internet de TMLinux (http://tmlinux.com/kde/guia_tmlinux.html)
Recuerda visitar los [[Avisos y actualizaciones]] para estar al tanto de novedades y avisos de actualización importantes
create a partition, or just format one if you have an unused one.
now mount your iso extract livecd.sgfs and isolinux to your partition.
add to grub and boot it, that's it.
my boot entry looks like this.
title ~LiveCD
kernel (hd1,6)/isolinux/vmlinuz ~BOOT_IMAGE=~LiveCD livecd=livecd initrd=initrd.gz ramdisk_size=100000 bootfrom=/dev/sda7 changes=/dev/sda7 acpi=on keyb=us fstab=rw,auto splash=silent vga=788
initrd (hd1,6)/isolinux/initrd.gz
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=26&topic=45245.45)
[[Instalar virtualbox en Mepis 6.5]]
[[Devolver escritorios de usuarios a su estado original]]
[[activar cambio de escritorio en KDE al tocar el borde con el ratón]]
[[Masquerading: Compartir conexión internet]]
[[Agregar partición Windows a GRUB]]
[[Lame para Audacity]]
[[Configurar valores por defecto para nuevos usuarios]]
[[Configurar varias direcciones IP en una sola tarjeta de red]]
[[Crear una cuenta para usuarios invitados]]
[[Acelerar firefox en banda ancha]]
[[Buscar programas instalables con apt-cache]]
[[Cambiar tamaño de partición y sistema de archivos]]
[[Instalar tarjeta de red inalámbrica con ndiswrapper]]
[[Instalar servidor dial-in]]
[[Modificar ejemplos de Gambas]]
[[Detectar y configurar nuevos componentes del equipo de cómputo]]
[[Instalar InternetExplorer en Linux]]
[[Mozilla/Firefox en español]]
[[Eliminar un guión de grupos de inicio]]
[[Agregar un guión a grupos de inicio]]
[[Instalar Knoppix 3.2 a disco duro]]
[[Instalar Sidux Kaos a disco duro]]
busca las instrucciones actualizadas en:
http://www.tatanka.com.br/ies4linux/page/Es/Instalación
add kde4 at /etc/apt/sources.list like this:
rpm ftp://ftp.ch.debian.org/mirror/pclinuxos/apt/ pclinuxos/2007 main extra nonfree kde kde4
then
su
apt-get update
apt-get install task-qt4 <-this is optional if apt-get install task-kde4 doesn't work
apt-get install task-kde4
http://linux-guider.blogspot.com/2008/04/how-to-install-kde-4-on-pclinuxos.html
instalar
knoppix (opcional) lang=es xmodule=vesa
abrir konsole
su root
knoppix-installer
crear partición en primeros 1024 bloques del disco duro (500MB aprox.)
crear particion swap del doble de memoria RAM
crear partición de datos (opcional)
confirmar instalación de servidores:
smail
ssh (cambiar el nombre de usuario de knoppix)
samba
etc.
ip 192.168.0.1 (2,3,...)
mask 255.255.255.0
broadcast ip 192.168.0.255
dns servers 200.33.146.209 (200.33.146.217)
(En caso de que no se pueda navegar hay que revisar el archivo /etc/resolv.conf. debe haber líneas individuales para cada servidor DNS)
Incluir en el archivo /etc/host los nombres y direcciones de cada máquina en la red local (192.168.0.1 maquina.dominio.com.mx)
habilitar las unidades detectadas por knoppix en /etc/fstab (quitar #) y darle el nombre deseado
Por ejemplo:
#/dev/hdb5 /mnt/hdb5 vfat auto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
se convierte en:
/dev/hda1 /mnt/multimedios vfat auto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
Modificar lilo.conf para que incluya lo siguiente:
install=boot/boot-bmp.b
bitmap = /boot/sid.bmp
bmp-colors=1,,0,2,,0
bmp-table=120p,173p,1,15
bmp-timer = 35,28,6,8,0
#(Suponiendo que windows está en el disco c:)
other=/dev/hda1
label="Win98(hda1)"
table=/dev/hda
boot-as=0X80
Copiar sid.bmp o equivalente al directorio /boot
Ejecutar lilo
instalar impresora (iniciar, preferencias, administrador de impresión, botón derecho, agregar impresora y directorio de archivos)
modificar /etc/samba/smb.conf para seleccionar el grupo de trabajo, permitir escribir archivos y directorios, incluir la impresora y el cdrom
; Change this for the workgroup your Samba server will part of
workgroup = tm
; By default, the home directories are exported read only. Change next
; parameter to "no" if you want to be able to write to them.
read only = yes
; File creation mask is set to 0700 for security reasons. If you want to
; create files with group=rw permissions, set next parameter to 0775.
create mask = 0775
; Directory creation mask is set to 0700 for security reasons. If you want to
; create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = yes
writable = no
create mode = 0700
guest ok = Yes
print ok = Yes
[EPSONSC60]
comment = Epson Stylus C60
path = /tmp
read only = No
printable = Yes
printer name = epsonstylusc60
; A sample share for sharing your CD-ROM with others.
[cdrom]
comment = Samba server's CD-ROM
writable = no
locking = no
path = /cdrom
public = yes
[documentos]
comment = Directorio publico
writable = yes
locking = no
; path = /var/publico
# La siguiente línea debe coincidir con lo que aparezca en /etc/fstab
path = /mnt/documentos
public = yes
Configurar kppp para conectar a internet, probablemente cambiando al dispositivo a ttyS0 ó ttyS1
(puertos paralelos lpt1 ó lpt2)
Conectar a internet
Probar navegación con Konqueror
Poner al día la base de datos de actualización (apt-get update)
Instalar programas como Opera, Kbear, Xsane
apt-get install opera-static
apt-get install kbear
apt-get install xsane
instalar firewall
copiar firewall-2.4 y rc.firewall-2.4 a /etc/init.d
modificar /etc/network/options para que incluya la líneas
ip_forward=yes
spoofprotect=yes
cd /etc/init.d
update-rc.d firewall-2.4 defaults
agregar usuarios, con sus grupos correspondientes (usar knoppix como guía)
mysqld
mysql
CREATE DATABASE dbnumeroa; (etc.)
GRANT ALL PRIVILEGES ON dbnumeroa.* TO usnumeroa;
SET PASSWORD FOR user = PASSWORD('password'); (ó) SET PASSWORD = PASSWORD('password'); (sólo para el usuario actual de mysql)
LOAD DATA LOCAL INFILE "dbnumeroa.tabla.txt" INTO TABLE tabla; (ó usar 127.0.0.1/phpMyAdmin para indicar el archivo con todas las tablas dbnumeroa.txt)
LOAD DATA INFILE '/mnt/unidad/trayectoria/data/dbnumeroa/dbnumeroa.indice.txt' REPLACE
INTO TABLE indice FIELDS
TERMINATED BY '¬'
ENCLOSED BY '~'
LINES TERMINATED BY '¥' ;
cd /etc/init.d
update-rc.d mysql defaults
Para obtener acentos en programas como OpenOffice:
Editar /etc/profile e incluir
[ -n "$LANG" ] || LANG="es_MX"
export LANG
Editar /etc/sysconfig/i18n
LANG="es_MX"
COUNTRY="mx"
LANGUAGE="es"
CHARSET="iso8859-1"
XMODIFIERS=""
Además usar dpkg-reconfigure locales para definir que configuración local se va a utilizar (es_MX)
Reinstalar OpenOffice con la versión actualizada
apt-get install openoffice.org
Para instalar fuentes true type en linux se copian los archivos en un subdirectorio de /user/share/fonts/truetype (por ejemplo:windows) y se ejecuta en una terminal
ttmkfdir -o fonts.scale
mkfontdir
o se copia cp fonts.scale fonts.dir
Se edita /etc/X11/XF86Config (o el archivo de configuración señalado por xset -q) en la sección 'Files' y se agrega la trayectoria donde están las fuentes
FontPath "/usr/share/fonts/truetype/(windows)"
En /etc/X11/XftConfig se agrega la línea
dir "/usr/share/fonts/truetype/windows"
Para instalar las fuentes solamente en OpenOffice se busca el directorio de instalación (/root/office)
se ejecuta ./spadmin en una terminal y se oprime el botón 'fuentes'. Se busca el directorio donde están las fuentes truetype y se agregan como vínculos simbólicos
Usar apt-get update y apt-get upgrade para actualizar los programas
Después se puede usar apt-get clean para recuperar espacio de disco
Puede ser necesario desactivar el inicio de algunos programas
update-rc.d -f dhcp3-server remove
update-rc.d -f isdnutils remove
update-rc.d -f isdnactivecards remove
update-rc.d -f squid remove
tal vez sea necesario desinstalar brltty si el ratón se bloquea
apt-get remove brltty
Si hay un equipo actualizado los programas se encuentran en /var/cache/apt/archives
--------------------------
Actualizar fuentes de knoppix
--------------------------
Al actualizar los programas de knoppix hay que asegurarse de eliminar los vinculos en los directorios /etc/rc#.d, donde # es un número
Introducción
Existen muchos debates sobre la utilidad y conveniencia de tener NOVIA, y es que si bien NOVIA puede traer muchas ventajas si se sabe utilizar adecuadamente, también es cierto que NOVIA acapara muchísimos recursos y, en ocasiones, simplemente se cuelga sin ninguna explicación lógica y es necesario meter mano en todo el sistema para que vuelva andar, por lo que muchos terminan desinstalando el paquete y todo rastro de su existencia.
En algunos foros y listas podemos ver usuarios complacidos por tenerle, aseguran que los problemas se compensan de sobra con las ventajas. Lo cierto es que al principio todos siempre están felices de tener NOVIA, aunque la gran mayoría comienza a quejarse después de un tiempo.
Si a pesar de todo quieres tener NOVIA, entonces comencemos.
Preparativos
Lo primero que necesitamos es tener el soporte adecuado en el Kernel, toma en cuenta que hay ciertas incompatibilidades entre NOVIA y algunas cosas que seguramente tienes ya compiladas, pero que te traerían problemas si las mantienes junto con NOVIA.
:~$ cd /usr/src/linux
:~$ sudo make -menuconfig
Primero tienes de quitar el soporte en el kernel de los módulos siguientes:
<>Borrachera
<>Largas horas con videojuegos
<>Pláticas sobre tecnología que solo tu entiendes
<>Criticar a artistas famosos por lo estúpidos que son
<>Mirar a otras mujeres
<>Deseos de ahorrar
<>Intenciones de querer meterle Linux a todo aparato que caiga en tus manos
Y debes habilitar el soporte para los siguientes:
<*>Paciencia
<*>Capacidad de alejarse más de 15 min de la computadora
<*> Deseos de socializar
<*>Capacidad para aguantar largas charlas en las que no se mencione a Linus Torvalds ni una sola vez
Nota: Si realmente no deseas retirar por completo el soporte a lo que mencionamos anteriormente, puedes colocarlos como módulos y activarlos con modprobe cuando NOVIA no esté en uso. Pero ten cuidado pues a veces NOVIA se activa de improviso y si están activos estos módulos cuando lo haga puede colgarse todo el sistema (sobre todo si tienes activo mirar a otras mujeres).
:~$ make && make modules_install
:~$ make install
Instalando NOVIA
Primero descarga NOVIA desde el repositorio de tu preferencia, existen muchos repositorios, algunos libres y otros privativos, elige bien a la NOVIA que deseas y descárgarla.
Los repositorios que te puedo recomendar son:
* $wget http://cafeteria.escuela.edu/novia.deb
* $wget http://salondeclases.escuela.edu/novia.deb
* $wget http://antromascercano.com/novia.deb
* $wget http://forodeencuentros.com/novia.deb
* $wget http://citaaciegas.mama.org/novia.deb
* $wget http://amiga.hermana.net/novia.deb
* $wget http://novia.mejoramigo.net/novia.deb
* $wget http://amiga.infancia.org/novia.deb
* $wget http://desconocida.concierto.com/novia.deb
* $wget http://vecinita.vecindario.net/novia.deb
Estate preparado para satisfacer las dependencias con los siguientes paquetes:
:~$ sudo aptitude install baño-diario peinado-decente mira-sus-ojos-y-no-sus-pechos
:~$ sudo aptitude purge hablar-estupideces videojuegos-adiccion
Y también es recomendable contar con los siguientes paquetes:
:~$ sudo aptitude install flores chocolates cena-romantica cine
Una vez que tengas todo listo, instala el paquete:
:~$ sudo dpkg -i novia.deb
Es importante que no intentes instalar mas de un NOVIA al mismo tiempo, pero si tienes dos o más procura tener solo un módulo activo o se te colgará el sistema.
Reinicia el sistema y tendrás a NOVIA totalmente operativo.
Utilizando NOVIA
Puedes levantar el servicio con el comando:
:~$ /etc/init.d/llamaportelefono start
Esto arrancará a novia cada vez que la necesites, para detenerla necesitas el siguiente comando:
:~$ /etc/init.d/llevalaacasa stop
Si no vas a hacer uso seguido de NOVIA, usa con frecuencia:
:~$ /usr/bin/llamaparasaludar
De lo contrario pudiera ser que NOVIA ya no responda cuando intentes levantar el servicio.
También procura no usar en exceso este último comando, pues al parecer algunas versiones de NOVIA tienen un bug que hace que se cuelguen definitivamente, sobre todo si lo utilizas más de 5 veces al día.
Resolviendo problemas con NOVIA
Si en algún momento NOVIA se cuelga, puedes usar lo siguiente:
:~$ echo "Te Quiero" >> /etc/novia/oido.conf
:~$ cat /sbin/besotierno >> /etc/novia/mejilla.conf
:~$ /etc/init.d/llamaportelefono forcereload
Y si no resulta, puedes intentar:
:~$ cat /sbin/regalocaro >> /etc/novia/mano.conf
:~$ /etc/init.d/llamaportelefono forcereload
Si notas que NOVIA se cuelga muy seguido, revisa si no te falta alguna dependencia. También sería conveniente que tengas estos paquetes si no los tenías instalados con anterioridad:
:~$ sudo aptitude install ponte-desodorante lavate-bien-la-boca pon-atencion-cuando-habla
Paquetes Extras
Entre otras cosas, los usuarios avanzados de NOVIA recomiendan los siguientes paquetes:
:~$ sudo aptitude install novia-gusto-por-el-wow novia-usa-linux novia-vuelvete-geek
El paquete sexo es bastante recomendado, pero se recomienda haber tenido ya un poco de tiempo en el manejo de NOVIA, pues muchos usuarios novatos quieren instalar sexo apenas terminan de configurar a NOVIA, lo cual casi siempre lleva a un bug que hace que NOVIA se desinstale a si mismo y te arroje todos los logs de error sobre tu /home de un solo golpe.
Si quieres instalarlo, es recomendable que en tu kernel actives como módulo:
preservativo
O, si no quieres estar levantando el módulo cada vez que quieras usar sexo con NOVIA, puedes poner de forma permanente:
<*> vasectomia
Ninguno de estos dos es obligatorios, pero si no lo haces tarde o temprano NOVIA ejecutará el comando:
wget https://cigüeña.paris.org/bebe.tar.gz
Este paquete privativo ocupa gran cantidad de espacio (tarda aproximadamente 9 meses en descargar el tar comprimido y unos 18 años en descomprimirse y compilar), y en algunos países es obligatorio instalar:
:~$ sudo aptitude install novia-matrimonio
Lo cual no siempre es lo que el usuario desea. En estos casos algunos han encontrado la solución corriendo uno de los tres siguientes comandos:
:~$ killall bebe
:~$ killall embarazo
:~$ /sbin/NOVIA –aborto
Pero está demás decir que por licencia esto es ilegal en muchos países.
Conclusiones
Bien, ahora que están mejor informados disfruten de NOVIA si encuentran el paquete apropiado y recuerden que NOVIA es solo una versión de prueba que pueden elevar a ESPOSA si corren el script:
:~$ /usr/bin/boda -i /sbin/NOVIA -o /sbin/ESPOSA
(http://www.mclarenx.com/2008/11/13/instalar-novia-en-ubuntu-linux/)
El paquete getopenoffice 1.6 que sirve para instalar Openoffice 3.2 no se encuentra en los depósitos de PCLinuxOS 2009 o 2007, así que hay que instalarlo con los siguientes comandos en una terminal:
wget http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2010/RPMS.main/getopenoffice-1.6-1pclos2010.i586.rpm
su -c 'rpm -Uvh getopenoffice-1.6-1pclos2010.i586.rpm'
Una vez realizado se puede instalar OpenOffice 3.2 con el comando
getopenoffice
o desde el menú principal
PCmenu -> System -> Configuration -> Get OpenOffice
The following tutorial covers the process of installing PCLinuxOS MiniMe 2008 to a USB flash pendrive via the intuitive Make LiveUSB installer that is included with the Live CD. Although the MakeLiveUSB script is not perfect, it does get most of the job done. However, there are some additional steps necessary to make your Portable PCLinuxOS MiniMe work properly.
Some problems we have found when using the included installer are as follows. Inability to format and partition the USB stick. Misconfigured syslinux.cfg file (causes the system to hang on shutdown). And the need to create an img for saving changes. The good news is that were going to show you how correct these issues and get MiniMe installed and working.
1. Download the MiniMe 2008 iso, burn the iso to a CD
2. Boot from the CD. Logging in as the root user
3. Insert your USB flash drive
4. Open the Konsole from the desktop shortcut and type:
wget http://ftp.nl.freebsd.org/os/Linux/distr/texstar/pclinuxos/live-cd/english/preview/pclinuxos-minime-2008.iso
5. Type fdisk -l and locate your USB flash drive (example: /dev/sda) Throughout this tutorial, replace x with your flash drive letter. For example, if your flash drive is sda, replace x with a.
6. Type umount /dev/sdx
7. Type fdisk /dev/sdx
* type p to show the existing partition and d to delete it
* type p again to show any remaining partitions (if partitions exist, repeat the previous step)
* type n to make a new partition
* type p for primary partition
* type 1 to make this the first partition
* hit enter to use the default first cylinder
* hit enter again to use the last cylinder
* type a to make this partition active
* type 1 to select partition 1
* type t to change the partition filesystem
* type 6 to select the fat16 file system
* type w to write the new partition table
8. Type umount /dev/sdx1 to ensure the partition is unmounted
9. Type mkfs.vfat -F 16 -n minime /dev/sdx1 to format the first partition
10. Remove and Re-insert your flash drive
11. Back at the Konsole, type liveusb to start the USB installer script
12. Select your USB device from the list and click OK
13. Next, select the pclinuxos-minime-2008.iso and click Open
14. Sit back and let the installer do it's thing
15. Back at the Konsole type umount /dev/sdx1
16. type mkdir /mnt/minime && mount /dev/sdx1 /mnt/minime
17. type dd if=/dev/zero of=/mnt/minime/changes bs=1M count=256
18. type echo 'y'|mkfs.ext3 /mnt/minime/changes
19. type kwrite /mnt/minime/syslinux.cfg and edit the file as follows, again replacing x with your actual device. The changes are marked green for reference:
default liveusb
prompt 1
timeout 150
gfxboot bootlogo
label liveusb
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 vga=788 keyb=us bootfrom=/dev/sda1 changes=/dev/sdx1/changes fromusb
label safeboot
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 acpi=off vga=normal keyb=us noapic nolapic nopcmcia nomce unionfs=no fromusb
label liveusbhw
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 vga=788 bootfrom=dev/sda1 changes=/dev/sdx1/changes hwdetect=yes fromusb
20. Save the file and reboot. If all went well, you should now have a persistent PCLinuxOS MiniMe 2008
(http://www.pendrivelinux.com/2008/02/05/usb-pclinuxos-minime-2008/)
The following tutorial covers the process of installing PCLinuxOS MiniMe 2008 to a USB flash pendrive via the intuitive Make LiveUSB installer that is included with the Live CD. Although the MakeLiveUSB script is not perfect, it does get most of the job done. However, there are some additional steps necessary to make your Portable PCLinuxOS MiniMe work properly.
Some problems we have found when using the included installer are as follows. Inability to format and partition the USB stick. Misconfigured syslinux.cfg file (causes the system to hang on shutdown). And the need to create an img for saving changes. The good news is that were going to show you how correct these issues and get MiniMe installed and working.
1. Download the MiniMe 2008 iso, burn the iso to a CD
2. Boot from the CD. Logging in as the root user
3. Insert your USB flash drive
4. Open the Konsole from the desktop shortcut and type:
wget http://ftp.nl.freebsd.org/os/Linux/distr/texstar/pclinuxos/live-cd/english/preview/pclinuxos-minime-2008.iso
5. Type fdisk -l and locate your USB flash drive (example: /dev/sda) Throughout this tutorial, replace x with your flash drive letter. For example, if your flash drive is sda, replace x with a.
6. Type umount /dev/sdx
7. Type fdisk /dev/sdx
* type p to show the existing partition and d to delete it
* type p again to show any remaining partitions (if partitions exist, repeat the previous step)
* type n to make a new partition
* type p for primary partition
* type 1 to make this the first partition
* hit enter to use the default first cylinder
* hit enter again to use the last cylinder
* type a to make this partition active
* type 1 to select partition 1
* type t to change the partition filesystem
* type 6 to select the fat16 file system
* type w to write the new partition table
8. Type umount /dev/sdx1 to ensure the partition is unmounted
9. Type mkfs.vfat -F 16 -n minime /dev/sdx1 to format the first partition
10. Remove and Re-insert your flash drive
11. Back at the Konsole, type liveusb to start the USB installer script
12. Select your USB device from the list and click OK
13. Next, select the pclinuxos-minime-2008.iso and click Open
14. Sit back and let the installer do it's thing
15. Back at the Konsole type umount /dev/sdx1
16. type mkdir /mnt/minime && mount /dev/sdx1 /mnt/minime
17. type dd if=/dev/zero of=/mnt/minime/changes bs=1M count=256
18. type echo 'y'|mkfs.ext3 /mnt/minime/changes
19. type kwrite /mnt/minime/syslinux.cfg and edit the file as follows, again replacing x with your actual device. The changes are marked green for reference:
default liveusb
prompt 1
timeout 150
gfxboot bootlogo
label liveusb
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 vga=788 keyb=us bootfrom=/dev/sda1 changes=/dev/sdx1/changes fromusb
label safeboot
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 acpi=off vga=normal keyb=us noapic nolapic nopcmcia nomce unionfs=no fromusb
label liveusbhw
kernel vmlinuz
append livecd=livecd initrd=initrd.gz root=/dev/rd/3 vga=788 bootfrom=dev/sda1 changes=/dev/sdx1/changes hwdetect=yes fromusb
20. Save the file and reboot. If all went well, you should now have a persistent PCLinuxOS MiniMe 2008
(http://www.pendrivelinux.com/2008/02/05/usb-pclinuxos-minime-2008/)
Una vez realizada la instalación básica se debe utilizar el guión du-fixes-h2.sh para actualizar programas y núcleo del sistema a la versión más reciente. Esto es especialmente importante para utilizar
tarjetas de red inalámbricas y activadores para tarjetas gráficas.
wget -NqO /usr/local/bin/du-fixes-h2.sh http://techpatterns.com/du-fixes
Y se hace ejecutable
chmod +x /usr/local/bin/du-fixes-h2.sh
Normalmente el guión muestra advertencias sobre la actualización, pero siempre es buena idea consultar www.sidux.org para verificar que no haya contraindicaciones
Para castellanizar se instala
apt-get install language-env
y se ejecuta
set-language-env -R
Para kde y openoffice en español se usan
apt-get install kde-i18n-es openoffice.org-l10n-es openoffice.org-help-es
para que iceweasel quede en castellano es necesario instalar
apt-get install iceweasel-l10n-es-ar
ó
iceweasel-l10n-es-es
apt-get install user-es
castellanizar
En el Centro de Control del menú de KDE se selecciona
Regional->País/Región e Idioma
Y en a pestaña Configuraciones locales se oprime el botón Añadir idioma y se selecciona español
Por último se oprime el botón Aplicar
Incluir fuentes de marillat para apt en el archivo /etc/apt/sources.list agregando al final las siguientes líneas:
# Marillat
deb http://www.debian-multimedia.org sid main
Instalar programas adicionales
apt-get install
jpilot (opcional)
gaim
krdc (opcional)
glabels (opcional)
lame (fuentes marillat)
mplayer (fuentes marillat)
w32codecs (fuentes marillat)
unrar (opcional)
amule (opcional)
Make sure harddrake is set not to start at boot in the PCLinuxOS Control Center under System -> Enable Disbale System Services. Then go into the Hardware Section and Click on Setup the graphical server. Click on the top button, go to the Intel section and pick i810 driver instead of i810 and later.
(http://www.pclinuxos.com/forum/index.php/topic,60351.15.html)
Primero se descarga la versión para Linux desde:
http://www.xirrus.com/library/wifitools.php
Y hay que asegurarse de que gdesklets esté instalado
Después de utilizar el procedimiento normal de instalación (menú->sistema->monitoreo->gdesklets) hay una carpeta que no se ha instalado en la configuración de gdesklet y que hay que copiar a mano:
In some cases the widget controller does not install automatically upon widget installation. In this case you must install the controller by hand. (move the IXirrusWifiMonitor folder from /home/YourUserName/.gdesklets/Displays/SomeName/controls/ to /home/YourUserName/.gdesklets/Controls/
(http://www.xirrus.com/library/pdf/XirrusWiFiMonitorDeskletLinux_InstallationGuide1.0.txt)
Went to install my HP 2100 Laserjet with CUPS. This printer worked fine under CUPS in PCLinux 2007.
This is where the nightmare begins. No matter how many times I tried to configure the HP 2100 Laserjet with CUPS it would not print test pages correctly (if at all). I finally removed all of the HP libs and this HP Config Tool (what the heck is this mess?). Going back to CUPS, I manually installed the 2100 using:
CUPS + Gutenprint (ijl5.1?)
drivers. Finally have a working printer.
Waaaay too many printer utility default installs here. Between Kjobviewer, the HP utility and CUPS, there is some kind of war over who owns the HP 2100 Printer. NOTE: in PCLinux 2007 and this beta I can NEVER get a ghostcript, or postscript driver to work for the 2100. Removed all of the Lexmark junk and Epson junk.
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=26&topic=53641.60)
We want the machine to allow dial-in access via attached (inserted?) modem or modems. It will provide either regular shell or restricted shell (that only executes pppd daemon). Windows 95/98 users should be able to effortlessly dial in using all default settings of their computers.
Linux setup
To handle login via serial line some version of getty program is needed. This program monitors the serial line (/dev/ttyS1 will be used throughout the document, see serial HOWTO for details) and upon connection shown the login prompt or starts a program.
I suggest using the mgetty program (as it has more features and is easier to setup than some of the competitors).
RH comes with mgetty-1.1.21-2, that also has extensions to receive faxes and voice mail (if the modem supports this). Check whether mgetty is installed by doing: rpm -qa | grep mgetty.
After installing mgetty some reconfiguration is necessary. The files that should be changed and the details follow:
/etc/inittab
That enables mgetty to start when system is booted and be respawned accordingly. These lines should be added in the end.
#for dialins use mgetty
#note this S1 in the beginning of the line and ttyS1 in the end
S1:2345:respawn:/sbin/mgetty ttyS1
/etc/ppp/options
This file controls the pppd daemon whenever it is started. Some of the options here are optional (hey, that why they are called options, right?).
auth -chap +pap login modem crtscts debug proxyarp lock
ms-dns 200.33.146.209
Here is their brief meaning:
auth : use some sort of authentication for dialin clients
-chap: not CHAP
+pap: use PAP
login : use the system password file for authenticating the client using PAP and record the user in the system wtmp file, /etc/ppp/pap-secrets should still be present (see below)
modem : use the modem control lines (for carrier detection and other stuff)
crtscts : use hardware flow control
debug : log extra info (might be removed after everything is fine)
proxyarp : this is needed to connect from the client to the Internet, not just to the LAN you dialed into
lock: pppd should create a lock file for the serial device
ms-dns 200.33.146.209: this info is provided to Windows box as a default DNS server
Look at pppd man page for all the juicy details (parts of the above info is adapted from there)
Another note is appropriate here. Some people reported that they had more success with +chap -pap in authenticating both Windows and Linux dial-up clients. If you are having problems, try changing /etc/ppp/options to have +chap -pap. In this case the new file /etc/ppp/chap-secrets should be created (same contents as recommended /etc/ppp/pap-secrets).
Some other people reported that having default line from /etc/mgetty+sendfax/login.config works fine. I am very happy to hear that, and I never claimed that my way to set things up is the only true way.
/etc/ppp/options.ttyS1
This file serves purpose similar to the previous one, but only applies to particular modem line. It specifies the IP address given to the remote machine (dynamic, in some sense, if you have more than one line) and the local IP as well.
192.168.0.2:192.168.0.21
/etc/mgetty+sendfax/login.config
This file is the main mgetty control file. Mgetty is Windows-PPP-aware, so it has provisions to start pppd automatically upon receiving connect from the Windows machine.
These lines should be present:
/AutoPPP/ - - /usr/sbin/pppd
Before adding them, check that some other version of similar command is absent there (commented out by default).
/etc/ppp/pap-secrets
This is similar to /etc/password file, but only used for dialins and contains plain text passwords (apparently, only visible to root). All users that you want to be able to dialin must have their usernames and password listed in this file. They should enter the same username and password into Windows Dial Up Networking configuration.
# Secrets for authentication using PAP
# these two users below can use dialin
# client server secret pword remote IP addresses
dialinuser1 * b1ab1a!? 192.168.0.21
dialinuser2 * p8sSw0rD 192.168.0.21
Check that mgetty is running by looking for similar line in the output of ps ax command.
4625 ? S 0:00 /sbin/mgetty ttyS1
Now this machine will allow modem calls from any Windows 95/98 box.
Para permitir el paso a otras máquinas de la red local y acceso a internet compartido
/etc/network/options debe incluir
ip_forward=yes
spoofprotect=yes
As was noted by one of the readers some steps are to be taken to prevent users from sharing their dialin password with others. A simple perl/shell script will do the job by killing and logging connections that use the same username.
Also, if it is desirable to prevent users from using dialing in their usernames should not be put into /etc/ppp/pap-secrets .
Windows setup
This is really straightforward.
Click on My Computer
Click on Dial Up networking
Click on Make New Connection
Proceed according to directions, enter the phone number etc
After a new connection is created click on it and enter the username and password (same as mentioned in /etc/passwd and /etc/ppp/pap-secrets)
Click Connect and it should work (it did in my case ;-) )
En Knoppix-Debian basta con utilizar
Knoppix->Red/internet->Configuración de Ndiswrapper
Indicar donde están los archivos .sys y .inf del activador para WinXP
Knoppix->Red/internet->Configuración de red inalámbrica
Dar nombre de la red, canal y en caso necesario otros parámetros
(En Kanotix hay que usar iwconfig wlan0 essid <nombre_de_la_red> key s:<contraseña> channel <canal_utilizado> )
Knoppix->Red/Internet->Configuración de tarjeta de red
Seleccionar busqueda de DHCP
y en una terminal ejecutar como superusuario
ifconfig wlan0 up
ó
ifup wlan0
Para administrar la conexión en form gráfica se usa el programa KWiFiManager
Para ejecutar al arrancar Linux hay que incluir en /etc/init.d/networking la línea
iwconfig wlan0 essid <nombre_de_la_red> key s:<contraseña> channel <canal_utilizado>
antes de ifup -a
Las instrucciones se encuentran en
http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=44655.0
y los archivos, inlcuyendo touchkit para la calibración en
http://www.touchkit.com/Drivers.htm
y
http://www.touchkit.com/LinuxDriver.htm
# It is recommended to do this from an Elive system and specially the same version that you want to put on the USB, also from the same machine Create a partition in ext2 or fat32 in the USB of at least 800 Mb so that you can copy the ISO contents on it
# Open the ISO file and put all the contents to the USB
# Install grub on your USB: grub-install --recheck --no-floppy --root-directory=/media/your_usb_partition_mounted /dev/your_usb_device.
You can use the command mount to found these values, if you run it you have on the first column, the name of the partition, and in the third column you have the point where it is mounted, if for example the partition of your USB is called /dev/sdb1, the number means the number of the partition and the device is /dev/sdb (entire device), on the same example, if /dev/sdb1 is your partition of the USB, the command that you need should look very similar to that: grub-install --recheck --no-floppy --root-directory=/media/sdb1 /dev/sdb . Warning: Do not confuse your partition name or device name, in such case you will delete a different device, like your hard disk, and this could be very bad. Note: If your mount-point has a name that includes a space, you need to add quotes to look something like: ...--root-directory="/media/JOHN 4GB" /dev.... in order to interpret it as a single parameter.
# One time is installed, Reboot and press the bios key for selecting the device where to boot from. It is usually F12, F10, F8, F2, or ESC
(http://www.elivecd.org/Help/Howto/boot-elive-from-usb)
Primero se instalan algunas librerías de las que depende Virtualbox y la aplicación Kpackage
apt-get update
apt-get install libxalan-c0 libxerces-c0 kdeadmin-kpackage
Se descarga el rpm para PCLinux desde el sitio de Virtualbox
http://www.virtualbox.org/wiki/Downloads
(Al 13/02/2008 el archivo era http://195.34.175.98/download/1.5.4/VirtualBox-1.5.4_27034_pclinuxos2007-1.i586.rpm)
y con Konqueror seleccionamos el archivo descargado para abrirlo con Kpackage
Procedemos a la instalación y ya podemos crear máquinas virtuales con Virtualbox
Required knowledge
* Opening a console and issuing simple commands
* Copy and Paste
[edit]
Introduction
VirtualBox is a software package that allows you to run another OS from within MEPIS, in a so called Virtual Machine (VM). Of course, there are other VM solutions, but VirtualBox has some outstanding characteristics:
* Almost completely Open Source (except for some addons)
* Easy installation
* For Linux and Windows host systems
* Linux, PC BSD and Windows guest systems
* Very fast and lightweight
[edit]
Preparations for installation
To prepare MEPIS for installation of VirtualBox, you need to install a couple of required packages. Act as follows:
Open a console --> type "su" and enter root password --> paste these commands into the console:
apt-get install linux-headers-`uname -r` && ln -sf /usr/src/linux-headers-`uname -r` /usr/src/linux
apt-get install libxalan110 libxerces27 build-essential
Done. We can now proceed to get VirtualBox and install it.
Installing in MEPIS 6.x
Go to the VirtualBox website and download from this link. Make sure you get the correct binary package. If you use MEPIS 6.x, you need to get Ubuntu 6.06 LTS ("Dapper Drake"). For MEPIS 7, you need to get Debian 4.0 ("Etch") version.
When the package is downloaded, open Konqueror and go to the folder where you saved the VirtualBox package. Press F4 to open a console in that folder. We are now going to install it via the command line.
dpkg -i VirtualBox*.deb
Please note that your actual package name may differ. To avoid problems with the name, start typing dpkg -i Virtual and then enter a TAB. This will autocomplete the command.
The package will now be installed. At one time, it will ask you if you want to compile the kernel module. Just answer yes and the module will be created automatically.
[edit]
Post installation
Once the package is installed, you need to reboot. If you don't do that, you can only run it as root. After a reboot you should be able to run VirtualBox in your regular user account. Virtual Machines will be created in ~/.VirtualBox.
You might have to add your username to the user group "vboxusers". To do this, launch KUser by clicking KMenu --> System --> More Applications --> User Manager (KUser).
[edit]
Settings
To create a virtual machine click the new icon on the toolbar. You will be guided in creating a virtual machine. Once created and before booting a VM you can tweak the settings by clicking on the appropriate item on the right side of the Vbox screen. Settings such as System memory, video memory, Audio and others can be refined here.
For example audio should be set to what your host is using such as alsa. Slow and unresponsive VM's can be improved by increasing system memory, but do not set it too large or it will be counterproductive. A setting of 356 MEG seems to work fine for most Linux distros on a 1 MEG nachine.
A nice feature and an essential one on machines without a CDROM drive is to set the CDROM to virtual and specify an iso file of the Linux distro you want to boot. It will then boot directly from the iso file into your VM and you can install permanently for those LiveCD's having an install feature. Remember to check the physical CDROM box before booting into your install. or no CDROM for machines without a physical drive.
Don't forget to get the excellent User Documentation. There you will find info regarding host shares, how to install the VirtualBox addons (for better screen resolution and mouse integration) and loads more.
Important tip: Be sure to install VirtualBox GuestAdditions to your Guest OS, from the .iso file that is included with your VirtualBox installation. This will allow you to link one or more folders on the hard disk, which are accessible from the Host OS, with the virtual network installed in the Guest OS. This enables sharing files between Guest and Host. There are other features that are enabled with VirtualBox GuestAdditions (see product documentation).
Happy VM-ing....
[edit]
Troubleshooting
If you get a message saying "VirtualBox kernel driver not accessible, permission problem" when starting VirtualBox right after installation, your user account is probably not listed in the vboxusers group. The installation takes care of creating that group, but you will need to manually add all users to it that should be allowed to run VirtualBox.
As root, for each such user, run
usermod -G vboxusers -a username
http://www.mepis.org/docs/en/index.php/VirtualBox
(1) Navigate to the download location and extract the images...
$ tar -zxvf OxygenBlueAir_GrubBootsplash.tar.gz
(2) Create a folder for your bootsplash images.
$ sudo mkdir /boot/grub/images
# Copy the theme tho the correct location.
$ sudo cp "./Oxygen Blue Air/*.xpm" /usr/share/kde4/apps/kdm/themes/
# Optionally remove the downloaded file and the extracted theme folder...
$ rm OxygenBlueAir_GrubBootsplash.tar.gz
$ rm -r "Oxygen Blue Air"
(3) Find out where your boot loader is at...
$ sudo grub
$ grub> find /boot/grub/stage1
# Note the value returned. It will be something like "(hd0,5)".
$ grub> quit
(4) Make a copy of menu.lst in case something goes wrong...
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.original
(5) Edit the menu.list file using a text editor...
$ kdesudo kate /boot/grub/menu.lst
(6) Add the following lines. Change "(hd0, 5)" to the boot loader location from step 3.
# Appearance
splashimage=(hd0,5)/boot/grub/images/air.xpm
foreground fffafa
background 0f88b3
shade 0
viewport 6 3 76 23
(7) Change the time out value to 30 seconds, or adjust to your preference.
timeout 30
(8) Comment-out the following line, so that the boot options are displayed.
# hiddenmenu
(9) Save menu.lst and exit your editor.
(10) Since menu.lst references "air.xpm", copy the image whose proportions match your resolution as "air.xpm"...
If your desktop resolution is 1024x768...
$ sudo cp -f "/boot/grub/images/air1024x768.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 280x1024...
$ sudo cp -f "/boot/grub/images/air1280x1024.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1280x800...
$ sudo cp -f "/boot/grub/images/air1280x800.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1360x768...
$ sudo cp -f "/boot/grub/images/air1360x768.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1440x900...
$ sudo cp -f "/boot/grub/images/air1440x900.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1600x1200...
$ sudo cp -f "/boot/grub/images/air1600x1200.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1920x1080...
$ sudo cp -f "/boot/grub/images/air1920x1080.xpm" "/boot/grub/images/air.xpm"
If your desktop resolution is 1920x1200...
$ sudo cp -f "/boot/grub/images/air1920x1200.xpm" "/boot/grub/images/air.xpm"
(9) Set the permissions correctly.
$ sudo chmod -R a+r /boot/grub/images
(http://www.kde-look.org/content/show.php/Oxygen+Blue+Air?content=107268)
# Navigate to the download location and extract the theme.
$ tar -zxvf OxygenBlueAir_KDMTheme.tar.gz
# Copy the theme tho the correct location.
$ sudo cp -rf "./Oxygen Blue Air" /usr/share/kde4/apps/kdm/themes/
# Optionally remove the downloaded file and the extracted theme folder...
$ rm OxygenBlueAir_KDMTheme.tar.gz
$ rm -r "Oxygen Blue Air"
((2))
This KDM theme uses Liberation fonts. You can optionally install Liberation fonts using...
$ sudo apt-get install ttf-liberation
If you HAVE Liberation fonts installed, set this them to use them...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/oxygen.liberation.xml" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/oxygen.xml"
If you DO NOT have Liberation fonts installed or DO NOT want to use Liberation fonts...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/oxygen.sans.xml" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/oxygen.xml"
((3))
Set the proportions of the KDM background to match your screen resolution...
If your resolution is 600x400...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/600x400.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
If your resolution is 800x600...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/800x600.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
If your resolution is 1024x768...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/1024x768.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
If your resolution is 1280x1024...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/1280x1024.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
If your resolution is 1600x1200...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/1600x1200.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
If your resolution is 1920x1200...
$ sudo cp -f "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/1920x1200.svg" "/usr/share/kde4/apps/kdm/themes/Oxygen Blue Air/background.svg"
((4)) Chose the new KDM Theme...
1. Click K
2. Click System Settings
3. Select the Advanced tab
4. Click Login Manager
5. Select the Theme tab
6. Select Oxygen Blue Air
7. Click the OK button
(http://www.kde-look.org/content/show.php/Oxygen+Blue+Air?content=107266)
# Navigate to the download location and extract the theme.
$ tar -zxvf OxygenBlueAir_KSplash.tar.gz
# Copy the theme tho the correct location.
$ cp -rf \"./Oxygen Blue Air\" ~/.kde/share/apps/ksplash/Themes
# Optinally remove the downloaded file and the extracted theme folder...
$ rm OxygenBlueAir_KSplash.tar.gz
$ rm -r \"Oxygen Blue Air\"
((2)) Chose the new KSplash Theme...
1. Click K
2. Click System Settings
3. Click Appearance
4. Select Splash Screen in the left pane
5. Select Oxygen Blue Air
6. Click the Apply button
(http://www.kde-look.org/content/show.php/Oxygen+Blue+Air?content=107265)
After you download any Linux distro from the internet, you have to burn it to a DVD, CD or a number of CDs to install it. That CD or DVD is generally used only once after which it lies unused , and worse, almost every Linux distro comes up with a new release every 6 months. So if you are in the habit of upgrading to every new version, you must have dozens of CDs lying at the bottom of your drawer. What a wastage of CDs! But with a little trick you can install any Linux directly from the hard disk without burning a single CD or DVD. The prerequisite of this trick is to have an operating system already installed on your computer. This is obvious because unless you are able to boot into your machine, you can't install anything; and we are not going to boot from the Linux disk because we aren't burning any. Here I'm going to focus on Microsoft Windows as the pre installed operating system.
Almost all Linux installers uses two files to boot the computer: a Linux kernel, and an initial root file system containing a minimal set of directories that is mounted prior to when the real root file system is available. This initial root file system is also called Ram disk (initrd). We will use these two files to boot our PC. Now lets get to the actual procedure.
1. The first thing you will have to do is copy the ISO file(s) of the Linux to your hard disk (ofcourse, you already have it). Make sure that the partition is FAT32 unless the distro you are installing has native NTFS read/write support. Some distros require you to copy the ISO file(s) to the root of the partition. If you keep it inside a folder, the setup might not be able to detect it.
2. Use Winrar to open the ISO file (you need not need to extract it). Now you will have to extract the two files I talked about earlier. The files are usually found inside a directory called isolinux. Different distros might place the files in different location; you just have to search for it, but it isn't hard to locate. These two files are also named differently in different distros. The files that you will need to search and extract are: (the kernel file is shown in green and the Ram disk is shown in red)
Fedora: vmlinuz and initrd.img
Suse: linux and initrd
Mandriva: vmlinuz and all.rdz
Ubuntu: vmlinuz and initrd.gz
Gentoo: gentoo and gentoo.igz
Knoppix: vmlinuz and initrd.img
Slackware: bzImage and initrd.img
Debian: vmlinuz and initrd.gz
3. After you have extracted the two files, copy them to c:\boot (you will need to create the folder "boot")
4. Now download the file called grub4dos from here. (Note: the new versions of grub4dos i.e. 0.4.2 and 0.4.3 does not work. So download the earlier version 0.4.1. Direct download link) Extract the folder "boot" and the file "grldr" from the downloaded zip file. Inside the folder "boot" is another folder called "grub"; copy the folder "grub" to c:\boot. Copy the file "grldr" to c:\
5. Open c:\boot\grub\menu.lst and add these following lines. (Notice that hd0 refers to the first hard drive. If you have more than one hard drive, they will be named hd1, hd2 etc. Replace hd0 with the proper hard drive number incase you have windows installed on another drive.) Replace Linux_kernel and Ram_disk with the appropriate file names below. (the ones you copied to c:\boot)
title Install Linux
kernel (hd0,0)/boot/Linux_kernel
initrd (hd0,0)/boot/Ram_disk
6. Now you have to add grub to your c:\boot.ini file. You can open boot.ini by clicking on Start>Run and typing c:\boot.ini. If Windows does not allow the file to be modified, then go to Control Panel>System and click on the Advanced tab. Now under Startup and Recovery click Settings and then under System Startup click Edit. Open boot.ini and add this line in the end.
C:\grldr="Start GRUB"
7. You are now ready to install Linux. Restart your PC and from the boot screen select "Start GRUB". This will load GRUB. From the grub screen select "Install Linux". During the setup you will be asked the source of installation. Choose hard disk and then select the hard drive partition where you copied the ISO files. Sometimes you might have to type the whole path of the partition and the exact name of the ISO. So write it down before you begin.
I have personally tested this with Fedora, Suse and Mandriva and it works without problem. I have no doubt it will work for others too.
Update: dougfractal adds that this is possible from Linux too. The method as he describes is:
From the terminal enter these commands
sudo mkdir /distro
sudo chmod `whoami`:`whoami`
cp MYLINUX.iso /distro/distro.iso
Now extract Linux_kernel & Ram_disk to /distro#
Open /boot/grub/menu.lst
1. ADD NEW ENTRY#
title Install Linux
root (hdX,X)
kernel /distro/Linux_kernel
initrd /distro/Ram_disk
Reboot and select "Install Linux" from grub.
(http://www.instantfundas.com/2007/08/install-any-linux-distro-directly-from.html)
# Navigate to the download location and extract the theme.
$ tar -zxvf OxygenBlueAir_PlasmaTheme.tar.gz
# Copy the theme tho the correct location.
$ cp -rf "./Oxygen Blue Air" ~/.kde/share/apps/desktoptheme
# Optionally remove the downloaded file and the extracted theme folder...
$ rm OxygenBlueAir_PlasmaTheme.tar.gz
$ rm -r "Oxygen Blue Air"
((2)) Chose the new Desktop Theme...
1. Right-click on your desktop
2. Select Appearance Settings
3. Click the drop down next to "Theme:"
4. Select "Oxygen Blue Air"
5. Click OK button
(http://www.kde-look.org/content/show.php/Oxygen+Blue+Air?content=107263)
Assuming that you called the serial port COM1 in the VBox setup and that you also selected Host device. (This is what it needs to be by the way)
You then start the guest (XP)
Windows will not see this and there is no way that you can make it see this port as plug-n-Play but you can make it work.
1. Go to control panel (select classic view) and double click new hardware.
2. Click next to start the discovery process.
3. Select yes I have already connected the hardware then click next.
4. Scroll to the end of the list and select add new hardware device and click next.
5. Select Search for and install the hardware automatically.
6. When the scan has completed you should see the Com port.
7. Select finish to end the process.
8. Open the device manager (right click my computer and left click on manage) select device manager.
9. Click the + beside ports and you should see the com port.
(http://forums.virtualbox.org/viewtopic.php?f=2&t=15324)
.
Upside-Down-Ternet
My neighbours are stealing my wireless internet access. I could encrypt it or alternately I could have fun.
Split the network
I'm starting here by splitting the network into two parts, the trusted half and the untrusted half. The trusted half has one netblock, the untrusted a different netblock. We use the DHCP server to identify mac addresses to give out the relevant addresses.
/etc/dhcpd.conf
ddns-updates off;
ddns-update-style interim;
authoritative;
shared-network local {
subnet *.*.*.* netmask 255.255.255.0 {
range *.*.*.* *.*.*.*;
option routers *.*.*.*;
option subnet-mask 255.255.255.0;
option domain-name "XXXXX";
option domain-name-servers *.*.*.*;
deny unknown-clients;
host trusted1 {
hardware ethernet *:*:*:*:*:*;
fixed-address *.*.*.*;
}
}
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.10;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.1;
allow unknown-clients;
}
}
IPtables is Fun!
Suddenly everything is kittens! It's kitten net.
/sbin/iptables -A PREROUTING -s 192.168.0.0/255.255.255.0 -p tcp -j DNAT --to-destination 64.111.96.38
For the uninitiated, this redirects all traffic to kittenwar.
For more fun, we set iptables to forward everything to a transparent squid proxy running on port 80 on the machine.
/sbin/iptables -A PREROUTING -s 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1
That machine runs squid with a trivial redirector that downloads images, uses mogrify to turn them upside down and serves them out of it's local webserver.
The redirection script
#!/usr/bin/perl
$|=1;
$count = 0;
$pid = $$;
while (<>) {
chomp $_;
if ($_ =~ /(.*\.jpg)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/space/WebPages/images/$pid-$count.jpg", "$url");
system("/usr/bin/mogrify", "-flip","/space/WebPages/images/$pid-$count.jpg");
print "http://127.0.0.1/images/$pid-$count.jpg\n";
}
elsif ($_ =~ /(.*\.gif)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/space/WebPages/images/$pid-$count.gif", "$url");
system("/usr/bin/mogrify", "-flip","/space/WebPages/images/$pid-$count.gif");
print "http://127.0.0.1/images/$pid-$count.gif\n";
}
else {
print "$_\n";;
}
$count++;
}
http://www.ex-parrot.com/~pete/upside-down-ternet.html
There is a package called procps. It includes various useful (read as nifty) utilities. One of such utility is skill which is responsible to send a signal to users and process such as:
* Halt user terminal
* Kill user and logout
Also note that these are utilities to browse the /proc filesystem, which is not a real file system but a way for the kernel to provide information about the status of entries in its process table.
Task: How to halt/stop user called didi
Type the skill command as follows:
# skill -STOP -u didi
You muse be root to stop other users.
Task: How to resume already halted user called didi
Send CONT single to user didi, type the following command:
# skill -CONT -u didi
Task: How to kill and logout user called didi
You can send KILL single, type the following command:
# skill -KILL -u didi
Task: Kill and logout all users
The ultimate command to kill and logout all users, type the following command:
# skill -KILL -v /dev/pts/*
Please note that send users warning message or logout notice using wall command to avoid data loss.
(http://www.cyberciti.biz/tips/howto-linux-kill-and-logout-users.html)
ps axww | grep SomeCommand | awk '{ print $1 }' | xargs kill
(http://www.commandlinefu.com/commands/view/1272/kill-all-processes-matching-a-given-name)
# echo 1 > /proc/sys/kernel/modules_disabled
(http://www.outflux.net/blog/archives/2009/07/31/blocking-module-loading/)
Audacity busca la biblioteca libmp3lame.so para poder exportar a mp3.
En Debian se llama libmp3lame.so.0 y está en /usr/lib/
Most modern operating systems are capable of using a file or partition known as a swap or paging file. Most Linux distributions will also install one for you by default. This file is used to extend the amount of available RAM by writing some of it to your hard drive.
There's just one problem: hard drives are slow. We can't fix that problem yet, but we can avoid it. The Linux kernel provides a tweakable setting that controls how often the swap file is used, called swappiness. A swappiness setting of zero means that the disk will be avoided unless absolutely necessary (you run out of memory), while a swappiness setting of 100 means that programs will be swapped to disk almost instantly.
My Ubuntu system comes with a default of 60, meaning that the swap file will be used fairly often if the memory usage is around half of my RAM. You can check your own system's swappiness value by running:
cat /proc/sys/vm/swappiness
My HDD is insanely slow and I have 2 GB of RAM, so I'd like to turn that down to 10 or 15. The swap file will then only be used when my RAM usage is around 80 or 90 percent. To change the system swappiness value, open /etc/sysctl.conf as root. Then, change or add this line to the file:
vm.swappiness = 15
Reboot for the change to take effect. You can also change the value while your system is still running:
sysctl vm.swappiness=15
However, you won't get the full effect of rebooting because there is probably already memory stored in swap that won't instantly be moved out.
Update: Readers have noted that you can clear your swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect.
(http://fosswire.com/2009/02/08/sysctl-swappiness/)
Linux problems with solutions
These are some various linux/unix problems I've encountered over the years, but which I was not able to find a solution for online. Hopefully this will save you the trouble I had.
by Vidar Holen Homepage
Problem:Network interface (or anything else on the pci bus) says "SIOCSIFFLAGS: Resource temporarily unavailable"
Cause: No IRQ assigned to the device, check /proc/pci (irq says 0)
Solution: Enter the bios setup (F1 or Del on boot), disable the option 'Plug n Play OS'. Reason: This will make your bios set up IRQs for you.
Problem:USB mouse using /dev/psaux, the ps/2 mouse device.
Cause: Bios usb legacy support in action, probably because Linux didn't probe for USB devices (which causes the bios to release control of them).
Solution: Compile the kernel with USB support, Input Core and USB HID. Reason: Duh.
Problem:USB mouse still doesn't work on /dev/input/mice, but /dev/psaux, even when USB support is compiled in.
Cause: Legacy USB support again. You might not have compiled in support for your USB chipset (the UHCI parts in USB support).
Solution: Compile UHCI. If not working, try the alternate drivers. Reason: Duh.
Problem:Accidentally cat'ing a binary file causes the all the characters you type next to show up as odd symbols.
Cause:The binary file contained a 016 (so, Shift Out) character.
Solution:Print a 017 (Shift In) character. You can use echo -ne "\\017" to do this. Even better, make it a shell script called 'fix' for easy access.
Reason:Shift Out is canceled by a Shift In.
Problem:You scanned an ext3 file system with fsck.ext2/e2fsck, and now you can't boot. Cause:fsck.ext2 deleted the journaling inode, essentially making it an ext2 fs.
Solution:Either use tune2fs -j device to add the journal node again, or use [c]fdisk to set the partition type to ext2 instead of ext3.
Reason:tune2fs -j will fix the fs back to ext3 journaling mode, cfdisk will have the system use it as unjournaled ext2.
Problem:Some program (especially older ones like RealPlayer, and other multimedia tools/players) hangs when loading, or give a message like "Can't open audio device /dev/dsp: Resource temporarily unavailable." or "No Sound"
Cause:Trying to open /dev/dsp (the sound device), but it's busy already taken so the program waits or fails.
Solution:Kill whatever might be hogging it, like artsd. You can find the specific PID using fuser /dev/dsp.
Reason:The app will now have exclusive sound access, and will load without waiting for the device to be free.
Problem:Lilo doesn't boot your new kernel, giving you odd boot signature messages.
Cause:It can't find the 0xAA55 byte at the end of the boot sector, probably because you didn't run 'lilo' after updating lilo.conf or replacing the kernel file.
Solution:Run lilo. Get a rescue floppy if needed. Reason:Lilo will now store the correct abs disk location for the kernels.
Problem:The localhost loopback address 127.0.0.1 doesn't work, and so some servers stop functioning and you can only connect to yourself through your lan address.
Cause:The lo interface might not be configured right.
Solution:Run "ifconfig lo up 127.0.0.1"
Reason:The loopback interface should now be up and configured with the standard loopback address.
Problem:CUPS printer claim to be ready, but is turned off when you start a job, and deletes the job when you start the printer.
Cause:You've upset the manual gods. Solution:Curse, read the manual, delete all the cups files, read the manual, download and compile cups, read the manual, try again.
Reason:The manual gods will be happy with your sacrifice and will allow you to print (worked for me atleast :)
Problem:When using the disk kupdated hogs the cpu, making the system slow to a crawl. The mouse stops responding for several seconds at a time. Serial comm gives errors like "/dev/ttyS0: 1 input overrun(s)".
Cause:Slow IDE throughput due to unsupported chipset. Run 'hdparm -t /dev/hda' to make sure (it will be really low, around 2-6mb/s) Solution:Compile a kernel that supports your IDE chipset (just enable them all).
Reason: koala_man: Btw, the 'reason' part for the 'kupdated hogs CPU because of disk usage' thing is because the system runs in PIO mode, meaning the main CPU have to manage all reading and writing, rather than letting the chipset use busmastering.
Problem:Konqueror doesn't show gif images.
Cause:No gif support in QT Solution:Edit $QTDIR/src/kernel/qgif.h, define QT_BUILTIN_GIF_READER as 1 (tiny file, plenty of comments). configure with -qt-gif. No need to recompile konqueror.
Reason:The QT library now supports gif, and konqueror can use it.
Problem:GTK apps like gimp and xchat suddenly got disgusting fonts.
Cause:Something changed the settings, possibly an install of another gtk version.
Solution:Make a ~/.gtkrc file: style "user-font"
{
font="-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso8859-1"
}
widget_class "*" style "user-font"
Replace the font if that doesn't suit you. Reason:A new default font is now set, instead of the ugly previous one.
Problem:Konqueror is slow when browsing FTP sites.
Cause:The icon preview feature occupies the connection, forcing a relogin when changing directories.
Solution:Uncheck 'ftp' in the KDE Control Center under Previews in File Manager. Reason:Konqueror will now use the connection it made for browsing, rather than showing icon previews.
Problem:When starting Half-Life in Wine, a message comes up saying "Could not open MCI file for playback: 279: Cannot use 'all' as the device name with the specified command" Cause:Dunno. Solution:Run as "wine hl.exe -- -console"
Reason:No clue.
Problem:Half-Life in Wine has no sound.
Cause:DirectSound errors?
Solution:Try setting voice_enable "0" in config.cfg Reason:No clue, but it worked for me.
Problem:When running Half-Life in Wine, pressing Tab causes the screen to go black (but displays "Half-Life" in the left corners).
Cause:Locked up Alt key perhaps
Solution:Click somewhere, then click the top left corner. Press Escape then Resume Game. Then hit Alt.
Reason:I guess the game didn't get the alt-release keycode.
Problem:Sendmail ignores aliases in /etc/mail/aliases, even after sighups.
Cause:Sendmail reads from a database, not that file.
Solution:Use the -bi option (or even better, run newaliases).
Reason:It'll update the database (/etc/mail/aliases.db).
Problem:KMail's menu bar is missing.
Cause:I dunno, messing with styles and themes possibly.
Solution:Set MenuBar=Disabled in ~/.kde/share/config/kmailrc to, yes, Enabled.
Reason:I didn't see any way of turning it through the gui, so I did it manually.
Problem:Mounting of NFS shares is slow, taking exactly five minutes.
Cause:Not quite sure.
Solution:Install Portmap on both client and server. Reason:I don't know.
Problem:Apache's mod_proxy won't allow CONNECTs on vhosts.
Cause:I think the manual lies. Mod_proxy doesn't seem to like vhosts.
Solution:Make it server wide.
Reason:Cow.
Problem:Can't figure out how to whitelist sites using Apache proxies (but can blacklist with ProxyBlock) Cause:Not pondering long enough. Solution:
Order Deny,Allow
Deny from all
Order Allow,Deny
Allow from all
Reason:That's just the way it is.
Problem:nvtv only gives black/white output (on an old TV using an s-video to scart converter). Cause:Cheap converter Solution:Set the Connector to Convert.
Reason:Quoth the faq, "You have a SVideo (S-VHS) to Composite connector that uses only the luminance (Y) line of the SVideo connection."
Problem:Quick access to the konqueror options for changing browser identification and enabling/disabling Java/plugins/javascript not present in the Tools menu.
Cause:These are additional plugins not present in all default installs.
Solution:Install konq-plugins in debian, or the kde addons module from the source tree. Reason:Duh.
Problem:Can't make KDE display an html web page as desktop background wallpaper. (Redundant wording for google's pleasure)
Solution:kwebdesktop
Problem:Neverwinter Nights crashes [on debian], giving only "Error" as a message. Cause:Running in 16bit mode.
Solution:Run X in 24bit mode.
Reason:I don't know, gdb indicates a libGLU issue.
Problem:Irssi or anything else just hangs, and Ctrl+Q doesn't fix it. And you're using screen. Cause:Screen has an [ES]TX feature too. Perhaps you managed to trigger it.
Solution:Ctrl-A Q
Reason:Makes screen write stuff again.
Problem:The Cisco vpnclient says "Could not attach to driver. Is kernel module loaded?", and yes, the module's loaded.
Cause:Nowhere to route packets.
Solution:Check that your nic is listed in ifconfig (if it's not and it's usb, try [re]loading usb-ohci or ohci-hcd). And up it with dhcpcd or something.
Reason:Now it can connect.
Problem:atitvout says "VBE call failed", esp on Radeon Mobility 7500 (M7 LW). Cause:Something about the card not detecting tv-out by itself.
Solution:Turn the box off. Plug in TV-out. Boot. Start X, and put it in 640x480 (or 800x600). atitvout auto pal; atitvout -f t Reason:The card will sense the TV and allow you to turn on tv output.
Problem:DVD playing using mplayer and TV-out sucks. With mplayer -vo xv, only the top half of the image is shown. With x11 it only occupies a small area, and with -zoom it runs crap slow and the interlacing is just awful.
Cause:Dunno Solution:Set X to 640x480, mplayer -noframedrop -vo x11 -fs file
Reason:Dunno, but it looks really great.
Problem:UXterm doesn't show bold fonts (or xterm with wideChars (-wc))
Solution:Set a wideFont ala "xterm*VT100*wideFont: -efont-biwidth-medium-r-*-*-14-*-*-*-*-*-*-*"
Problem:Compiling irssi says "/bin/sh: 0: not found" (OpenBSD).
Solution:Does your locale exist? Try unsetting all the LC_* variables, configure and make again.
Problem:IMAP (imaps) hangs in kmail.
Cause:kdelibs built without SSL, the imaps kioslave is built but just hangs. Solution:Recompile with ssl.
Problem:Gentoo says "* error scanning /etc" whenever emerge does something. Cause:'find /etc' said modules.conf was there, but wasn't there. An xfs corruption, obviously. Solution:I booted from a rescue cd and did xfs_repair. Everything worked smoothly after that.
Problem:(ok, so this isn't linux) On Solaris on a sun-ray thin client, xlocks locks the screen when you pull out the smart card and I want to change or disable this.
Solution:Kill your existing utaction process, and/or start a new one with the desired action in -d. (/opt/SUNWut/lib/utaction -d command). Also note the -e if you want the action to only run once.
Problem:(Solaris again) While compiling OpenGL applications using GLU on solaris, linking failes with Undefined symbol: __1cG__CrunKpure_error6F_v_ __1cG__CrunMex_rethrow_q6F_v_ c::c(N6, (int0_t)) c::c(N6, (int0_t)), ld: fatal: Symbol referencing errors. No output written to fluffy Cause:GLU requires libCrun which in turn requires libstdc++.
Solution:Link with both these libs, -lCrun -lstdc++
Problem:Cinelerra just hangs with a blank window titled "x".
Solution:Try it in another wm. Or for Ion, use a FloatWS.
Problem:Getting accelerated X-video output on a UniChrome Pro CN700 on Ubuntu 7.04 (Feisty Fawn) on an EPIA EN12000EG for TV-out playback.
Solution:As of 2007-05-11, OpenChrome supports the CN700 in svn (but not in the stable release). Get and compile the driver (requires automake1.9, not the fancy new stuff), replace via_drv.so in /usr/lib/xorg/modules/drivers with the OpenChrome one. Optionally load the 'drm' and 'via' kernel modules. Then configure X to use the 'via' driver. Here's my xorg.conf, for a widescreen PAL TV. Hope you have an easier time than I did.
Problem:irrecord fails on lirc 0.8.2, with kernel 2.6.22.1. It when a button is pressed, it exits immediately but claims "irrecord: no data for 10 secs, aborting, irrecord: gap not found, can't continue"
Solution:lirc 0.8.2 doesn't support this kernel (it's probably fixed in the latest version by the time you read this). Downgrade to 2.6.20 and it works like a charm.
http://jensonsblog.blogspot.com/2007/10/linux-most-frequent-problems-their.html
netstat -nptl
netstat -tlnp
nmap -p 1-65535 """--open localhost"""
sudo lsof -P -i -n -sTCP:LISTEN
You can get what functions at which addresses are inside a dynamic link library by this tool.
nm --dynamic <libfile.so>
(http://www.commandlinefu.com/commands/view/3468/list-symbols-from-a-dynamic-library-.so-file)
netstat -ntauple
http://www.commandlinefu.com/commands/view/2545/list-programs-with-open-ports-and-connections
There is much more to cost equation than the up-front price you pay. Microsoft has done an outstanding job of hiding the true costs of its software from consumers. Linux eliminates these hidden costs from Windows:
* Fewer security and privacy problems
* No loss of support as systems age
* No problems running current software on older computers
* No forced software and hardware upgrades every couple years
* No system slowdown over time (due to Registry bloat, malware, or other causes)
* No forced upgrade of one product due to artificial coupling with another ("Installing this product requires IE 8!")
* No need to re-install the operating system due to software corruption
* No performance costs from built-in digital rights management (Vista Content Management)
* No worry about whether you understand the legalistic license terms
* No buying multiple licenses for desktop and laptop, or for primary and backup systems
* No risk that the software CD you purchased in good faith is counterfeit
* No system outages due to inaccurate license checks by Windows Genuine Advantage
* No errant "piracy pop-ups" when you're running legal software due to Microsoft's Office Genuine Advantage
* No restrictions on computer upgrades (no Windows Product Activation / Windows Genuine Advantage)
* No restrictions on disk image backups (no WPA/WGA or Registry problems)
* No restrictions on moving disks between computers during upgrades (no WPA/WGA or Registry problems)
http://desktoplinux.com/articles/AT7506682379.html
TMLinux
[[Inicio rapido]]
[[Avisos y actualizaciones]]
[[Pendientes TMLinux]]
[[Promoción TMLinux]]
[[Adaptaciones de PCLinux a TMLinux]]
[[Otras distribuciones]]
The key to the fix is to prevent Firefox from checking its version number before it tries to load extensions. To do this, you will need to set a new preference value. Point your browser at the URL "about:config", then right-click on the preferences list to bring up the contextual menu. You should see an option that says "New." Select that, and choose "Boolean." When it asks you for the preference name, type "extensions.checkCompatibility" (without the quotes). You have to enter the name exactly. For the value, choose "false."
Now restart Firefox. When the browser comes back up, it should give you a warning that version checking is disabled. You can double-check under "Tools:Add-Ons" to make sure everything is activated once again.
If the worst case happens and the browser won't start after you add the new preference, you'll need to remove it by hand. Locate the file "prefs.js" within your Firefox profile directory and edit it with any text file editor to delete the line with the preference you just created. (If you're not comfortable doing that, then as I've said, this fix is probably not for you.)
Also, you'll want to remember to delete the preference once the final version of Firefox 3.0 is released, or else you'll never be certain that your installation is stable.
http://www.pcworld.com/article/id,146062-c,plugins/article.html
Cuando deseamos crear un Cd ROM y queremos que este se auto ejecute al introducirlo en la unidad de CD / DVD tenemos que incluir un pequeño archivo en el Directorio del CD. El archivo en cuestión se llamaría AUTORUN.INF . En este manual os daré unos ejemplos de como realizarlo
Este pequeño archivo se crea con el bloc de notas, y una vez creado lo renombramos a AUTORUN.INF el contenido que debemos introducir dentro del archivo es el siguiente:
[autorun]
open=archivo.exe
icon=archivo.ico
Donde pone "archivo.exe" se tiene que poner el nombre del archivo a ejecutar y donde pone "archivo.ico" ponemos el icono del CD-ROM que veremos al mostrar el contenido de "MiPC".
Ejemplo:
CREAR UN AUTORUN PARA PÁGINA WEB
Para crear un Autorun para una página web, es necesario especificar otro archivo de Windows para que pueda abrir la página, es decir, el Explorador de Windows.
Si no lo haces así y grabas el CD, cuando quieras que se inicie el Autorun, te dirá que no es una aplicación Win32 válida. Por tanto, ten en cuenta estas explicaciones, y sigue el ejemplo que hay más abajo:
[autorun]
OPEN=\windows\explorer.exe nombre_página_web.html
ICON=Nombre_archivo_icono.ico
Fíjate que en el comando OPEN, entre explorer, exe y nombre_página_web.html, hay un espacio. nombre_página_web.html = el nombre de la página web que desee que inicie el autorun
Nombre_archivo_icono.ico = debe introducir el nombre el archivo del icono.
Por ejemplo, si quieres hacer un autorun para un CD, y que el Autorun te inicie una página web llamada "index.html", con un icono para el CD, llamado "icoCD.ico". Tendrás que hacer lo siguiente:
[autorun]
OPEN=\windows\explorer.exe index.html
ICON=icoCD.ico
Puede que lo que quieras que se ejecute sea un archivo de una determinada aplicación, como por ejemplo un archivo html (o cualquier otro archivo que quieras), entonces tendrás que crear además un archivo BAT (por lotes) que haga que el archivo de la aplicación se pueda auto ejecutar. Los pasos serán primero crear el archivo bat con el bloc de notas, que por ejemplo lo llamamos auto.bat y estará constituido por las dos líneas siguientes:
@explorer Indice.htm
@exit
Donde "Indice.htm" es el nombre del archivo que tengas (si es un archivo del Word sería por ejemplo :@explorer chistes.doc, se admite cualquier archivo de windows y siempre que el ordenador donde se use el CD tenga el programa que abre dicho archivo).
Luego debes crear el archivo autorun.inf:
[autorun]
open=auto.bat
icon=Dibujo.ico
Ambos archivos irán en el directorio raíz, así como el archivo htm.
Consejo: antes de grabar el CD pon el archivo "auto" y el archivo que quieras que se abra dentro de la misma carpeta de tu disco duro y ejecuta el archivo .bat para comprobar que abre la aplicación con el archivo elegido, si es así cuando grabes el CD y pongas los 3 archivos anteriores en el directorio raíz no fallará, si no se abre comprueba si tu archivo por lotes .bat realmente tiene extensión .bat y no es "auto.bat.txt" y su contenido es correcto.
AÑADIR OPCIONES AL MENÚ CONTEXTUAL
Otra cosa que se puede hacer desde el fichero AUTORUN.INF es añadir opciones al menú de contexto del CD-ROM (el que sale al pulsar con el botón secundario sobre el icono del CD). Puede resultar interesante dar la opción de "Explorar el contenido del CD" o "Iniciar la instalación de... (un programa cualquiera)". Esto también es fácil:
[AUTORUN]
OPEN=SHELEXEC.EXE <fichero>
ICON=<icono>
SHELL\EXPLORAR=Explorar el contenido del CD-ROM
SHELL\EXPLORAR\COMMAND=EXPLORER.EXE /E,\
SHELL\HTML=Ver índice HTML del CD-ROM
SHELL\HTML\COMMAND=SHELEXEC.EXE INDICE.HTM
El truco consiste en crear parejas de líneas "SHELL\<clave>" y "SHELL\<clave>\COMMAND" poniendo en la primera el texto que queremos que aparezca en el menú de contexto, y en la segunda la instrucción que queremos que se ejecute al seleccionar la opción.
La forma más sencilla de lograrlo es utilizando Firestarter
/***
|''Name:''|MediaWikiAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data from MediaWikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#MediaWikiAdaptorPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/MediaWikiAdaptorPlugin.js|
|''Version:''|0.5.3|
|''Date:''|Mar 17, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.2.0|
MediaWiki REST documentation is at:
http://meta.wikimedia.org/w/api.php
http://meta.wikimedia.org/w/query.php
***/
//{{{
if(!version.extensions.MediaWikiAdaptorPlugin) {
version.extensions.MediaWikiAdaptorPlugin = {installed:true};
function MediaWikiAdaptor()
{
this.host = null;
this.workspace = null;
return this;
}
MediaWikiAdaptor.serverType = 'mediawiki';
MediaWikiAdaptor.serverParsingErrorMessage = "Error parsing result from server";
MediaWikiAdaptor.errorInFunctionMessage = "Error in function MediaWikiAdaptor.%0";
MediaWikiAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('GET',uri,data,contentType,username,password,callback,params,headers);
};
MediaWikiAdaptor.prototype.setContext = function(context,userParams,callback)
{
if(!context) context = {};
context.userParams = userParams;
if(callback) context.callback = callback;
context.adaptor = this;
return context;
};
MediaWikiAdaptor.fullHostName = function(host)
{
if(!host)
return '';
if(!host.match(/:\/\//))
host = 'http://' + host;
if(host.substr(-1) != '/')
host = host + '/';
return host;
};
MediaWikiAdaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/\/$/,'') : '';
};
MediaWikiAdaptor.normalizedTitle = function(title)
{
var n = title.charAt(0).toUpperCase() + title.substr(1);
return n.replace(/\s/g,'_');
};
// Convert a MediaWiki timestamp in YYYY-MM-DDThh:mm:ssZ format into a JavaScript Date object
MediaWikiAdaptor.dateFromTimestamp = function(timestamp)
{
var dt = timestamp;
return new Date(Date.UTC(dt.substr(0,4),dt.substr(5,2)-1,dt.substr(8,2),dt.substr(11,2),dt.substr(14,2)));
};
MediaWikiAdaptor.anyChild = function(obj)
{
for(var key in obj) {
return obj[key];
}
return null;
};
MediaWikiAdaptor.prototype.openHost = function(host,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.host = MediaWikiAdaptor.fullHostName(host);
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
MediaWikiAdaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var workspaces = {
"media": -2, "special":-1,
"": 0, "talk":1,"use":2,"use talk":3,"meta":4,"meta talk":5,"image":6,"image talk":7,
"mediawiki":8,"mediawiki talk":9,"template":10,"template talk":11,"help":12,"help talk":13,
"category":14,"category talk":15};
this.workspace = workspace;
if(workspace) {
workspace = workspace.toLowerCase();
this.workspaceId = workspaces[workspace];
}
if(!this.workspaceId)
this.workspaceId = 0;
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
MediaWikiAdaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
if(context.workspace) {
context.status = true;
context.workspace = [{name:"Main",title:"Main"}];
if(context.callback)
window.setTimeout(context.callback,0,context,userParams);
return true;
}
var uriTemplate = '
pi.php?format=json&action=query&meta=siteinfo&siprop=namespaces';
var uri = uriTemplate.format([this.host]);
var req = MediaWikiAdaptor.doHttpGET(uri,MediaWikiAdaptor.getWorkspaceListCallback,context);
return typeof req == 'string' ? req : true;
};
MediaWikiAdaptor.getWorkspaceListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,MediaWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var namespaces = info.query.namespaces;
var list = [];
for(var i in namespaces) {
item = {};
item.title = namespaces[i]['*'];
item.name = item.title;
list.push(item);
}
context.workspaces = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
// get a list of the tiddlers in the current workspace
MediaWikiAdaptor.prototype.getTiddlerList = function(context,userParams,callback,filter)
{
context = this.setContext(context,userParams,callback);
if(!context.tiddlerLimit)
context.tiddlerLimit = filter ? 100 : 50;
var limit = context.tiddlerLimit;
if(filter) {
var re = /\[(\w+)\[([ \w]+)\]\]/;
var match = re.exec(filter);
if(match) {
var filterParams = MediaWikiAdaptor.normalizedTitle(match[2]);
switch(match[1]) {
case 'tags':
context.responseType = 'pages';
var uriTemplate = '%0query.php?format=json&what=category&cpnamespace=0&cptitle=%3';
break;
case 'template':
context.responseType = 'query.embeddedin';
uriTemplate = '
pi.php?format=json&action=query&list=embeddedin&einamespace=0&eilimit=%2&titles=Template:%3';
break;
default:
break;
}
} else {
var list = [];
var params = filter.parseParams('anon',null,false);
for(var i=1; i<params.length; i++) {
var tiddler = new Tiddler(params[i].value);
tiddler.fields.workspaceId = this.workspaceId;
list.push(tiddler);
}
context.tiddlers = list;
context.status = true;
if(context.callback)
window.setTimeout(context.callback,0,context,context.userParams);
return true;
}
} else {
context.responseType = 'query.allpages';
uriTemplate = '
pi.php?format=json&action=query&list=allpages';
if(this.workspaceId != 0)
uriTemplate += '&apnamespace=%1';
if(limit)
uriTemplate += '&aplimit=%2';
}
var host = MediaWikiAdaptor.fullHostName(this.host);
var uri = uriTemplate.format([host,this.workspace,limit,filterParams]);
var req = MediaWikiAdaptor.doHttpGET(uri,MediaWikiAdaptor.getTiddlerListCallback,context);
return typeof req == 'string' ? req : true;
};
MediaWikiAdaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = MediaWikiAdaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
eval('var info=' + responseText);
var pages;
if(context.responseType == 'query.embeddedin')
pages = info.query.embeddedin;
else if(context.responseType == 'query.allpages')
pages = info.query.allpages;
else
pages = info.pages;
var list = [];
for(var i in pages) {
var tiddler = new Tiddler(pages[i].title);
tiddler.fields.workspaceId = pages[i].ns;
list.push(tiddler);
}
context.tiddlers = list;
} catch (ex) {
context.statusText = exceptionText(ex,MediaWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
MediaWikiAdaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var host = this && this.host ? this.host : MediaWikiAdaptor.fullHostName(tiddler.fields['server.host']);
if(host.match(/w\/$/)) {
host = host.replace(/w\/$/,'');
var uriTemplate = '%0wiki/%2';
} else {
uriTemplate = '%0index.php?title=%2';
}
info.uri = uriTemplate.format([host,this.workspace,tiddler.title]);
return info;
};
MediaWikiAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.title = title;
return this.getTiddlerInternal(context,userParams,callback);
};
MediaWikiAdaptor.prototype.getTiddlerRevision = function(title,revision,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.title = title;
context.revision = revision;
return this.getTiddlerInternal(context,userParams,callback);
};
// @internal
MediaWikiAdaptor.prototype.getTiddlerInternal = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var host = MediaWikiAdaptor.fullHostName(this.host);
if(context.revision) {
var uriTemplate = '
pi.php?format=json&action=query&prop=revisions&titles=%1&rvprop=content&rvstartid=%2&rvlimit=1';
} else {
uriTemplate = '
pi.php?format=json&action=query&prop=revisions&titles=%1&rvprop=content';
}
uri = uriTemplate.format([host,MediaWikiAdaptor.normalizedTitle(context.title),context.revision]);
context.tiddler = new Tiddler(context.title);
context.tiddler.fields.wikiformat = 'mediawiki';
context.tiddler.fields['server.host'] = MediaWikiAdaptor.minHostName(this.host);
var req = MediaWikiAdaptor.doHttpGET(uri,MediaWikiAdaptor.getTiddlerCallback,context);
return typeof req == 'string' ? req : true;
};
MediaWikiAdaptor.getTiddlerCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
var page = MediaWikiAdaptor.anyChild(info.query.pages);
var revision = MediaWikiAdaptor.anyChild(page.revisions);
context.tiddler.text = revision['*'];
context.tiddler.fields['server.page.revision'] = String(revision['revid']);
} catch (ex) {
context.statusText = exceptionText(ex,MediaWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
MediaWikiAdaptor.prototype.getTiddlerRevisionList = function(title,limit,context,userParams,callback)
// get a list of the revisions for a tiddler
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '
pi.php?format=json&action=query&prop=revisions&titles=%1&rvlimit=%2&rvprop=timestamp|user|comment';
if(!limit)
limit = 5;
var host = MediaWikiAdaptor.fullHostName(this.host);
var uri = uriTemplate.format([host,MediaWikiAdaptor.normalizedTitle(title),limit]);
var req = MediaWikiAdaptor.doHttpGET(uri,MediaWikiAdaptor.getTiddlerRevisionListCallback,context);
return typeof req == 'string' ? req : true;
};
MediaWikiAdaptor.getTiddlerRevisionListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
var page = MediaWikiAdaptor.anyChild(info.query.pages);
var title = page.title;
var revisions = page.revisions;
var list = [];
for(var i in revisions) {
var tiddler = new Tiddler(title);
tiddler.modified = MediaWikiAdaptor.dateFromTimestamp(revisions[i].timestamp);
tiddler.modifier = revisions[i].user;
tiddler.fields.comment = revisions[i].comment;
tiddler.fields['server.page.id'] = MediaWikiAdaptor.normalizedTitle(title);
tiddler.fields['server.page.name'] = title;
tiddler.fields['server.page.revision'] = String(revisions[i].revid);
list.push(tiddler);
}
context.revisions = list;
} catch (ex) {
context.statusText = exceptionText(ex,MediaWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
// MediaWikiAdaptor.prototype.putTiddler not supported
MediaWikiAdaptor.prototype.close = function()
{
return true;
};
config.adaptors[MediaWikiAdaptor.serverType] = MediaWikiAdaptor;
} // end of 'install only once'
//}}}
/***
|''Name:''|MediaWikiFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[MediaWiki|http://meta.wikimedia.org/wiki/Help:Wikitext]] ([[WikiPedia|http://meta.wikipedia.org/]]) text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#MediaWikiFormatterPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/MediaWikiFormatterPlugin.js|
|''Version:''|0.4.1|
|''Date:''|Mar 20, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.1.0|
|''Display instrumentation''|<<option chkDisplayInstrumentation>>|
|''Display empty template links:''|<<option chkMediaWikiDisplayEmptyTemplateLinks>>|
|''Allow zooming of thumbnail images''|<<option chkMediaWikiDisplayEnableThumbZoom>>|
|''List references''|<<option chkMediaWikiListReferences>>|
|''Display unsupported magic words''|<<option chkDisplayMediaWikiMagicWords>>|
This is the MediaWikiFormatterPlugin, which allows you to insert MediaWiki formated text into a TiddlyWiki.
The aim is not to fully emulate MediaWiki, but to allow you to work with MediaWiki content off-line and then resync the content with your MediaWiki later on, with the expectation that only minor edits will be required.
To use MediaWiki format in a Tiddler, tag the Tiddler with MediaWikiFormat or set the tiddler's {{{wikiformat}}} extended field to {{{mediawiki}}}.
!!!Issues
There are (at least) the following known issues:
# Not all styles from http://meta.wikimedia.org/wiki/MediaWiki:Common.css incorporated
## Styles for tables don't yet match Wikipedia styles.
## Styles for image galleries don't yet match Wikipedia styles.
# Anchors not yet supported.
!!!Not supported
# Template parser functions (also called colon functions) http://meta.wikimedia.org/wiki/ParserFunctions eg {{ #functionname: argument 1 | argument 2 | argument 3... }}
# Magic words and variables http://meta.wikimedia.org/wiki/Help:Magic_words eg {{{__TOC__}}}, {{CURRENTDAY}}, {{PAGENAME}}
# {{{^''}}} (italic at start of line) indents, makes italic and quotes with guilmot quote
!!!No plans to support
# Template substitution on save http://meta.wikimedia.org/wiki/Help:Substitution eg {{ subst: templatename }}
***/
//{{{
// Ensure that the MediaWikiFormatter Plugin is only installed once.
if(!version.extensions.MediaWikiFormatterPlugin) {
version.extensions.MediaWikiFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('MediaWikiFormatterPlugin requires TiddlyWiki 2.1 or later.');}
if(config.options.chkDisplayInstrumentation == undefined)
{config.options.chkDisplayInstrumentation = false;}
if(config.options.chkMediaWikiDisplayEmptyTemplateLinks == undefined)
{config.options.chkMediaWikiDisplayEmptyTemplateLinks = false;}
if(config.options.chkMediaWikiDisplayEnableThumbZoom == undefined)
{config.options.chkMediaWikiDisplayEnableThumbZoom = false;}
if(config.options.chkMediaWikiListReferences == undefined)
{config.options.chkMediaWikiListReferences = false;}
if(config.options.chkDisplayMediaWikiMagicWords == undefined)
{config.options.chkDisplayMediaWikiMagicWords = false;}
MediaWikiFormatter = {}; // 'namespace' for local functions
mwDebug = function(out,str)
{
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement2(out,'br');
};
MediaWikiFormatter.Tiddler_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
if((this.fields.wikiformat==config.parsers.mediaWikiFormatter.format) || this.isTagged(config.parsers.mediaWikiFormatter.formatTag)) {
this.links = [];
var tiddlerLinkRegExp = /\[\[(?::?([A-Za-z]{2,}:)?)(#?)([^\|\]]*?)(?:(\]\])|(\|(.*?)\]\]))/mg;
tiddlerLinkRegExp.lastIndex = 0;
var match = tiddlerLinkRegExp.exec(this.text);
while(match) {
if(!match[1] && !match[2])
this.links.pushUnique(match[3]);
match = tiddlerLinkRegExp.exec(this.text);
}
} else if(!this.isTagged('systemConfig')) {
MediaWikiFormatter.Tiddler_changed.apply(this,arguments);
return;
}
this.linksUpdated = true;
};
TiddlyWiki.prototype.getTemplates = function()
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
if(tiddler.title.substr(0,9)=='Template:')
results.push(tiddler);
});
results.sort(function(a,b) {return a.title < b.title ? -1 : +1;});
return results;
};
TiddlyWiki.prototype.getMediaWikiArticles = function()
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
if(!tiddler.isTagged('excludeLists') && tiddler.title.substr(0,9)!='Template:')
results.push(tiddler);
});
results.sort(function(a,b) {return a.title < b.title ? -1 : +1;});
return results;
};
config.macros.list.templates = {};
config.macros.list.templates.handler = function(params)
{
return store.getTemplates();
};
wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source != '') {
var w = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
w.linkCount = 0;
w.tableDepth = 0;
w.output = tiddler==null ? output : createTiddlyElement2(output,'p');
var time1,time0 = new Date();
w.subWikifyUnterm(w.output);
if(tiddler && config.options.chkDisplayInstrumentation) {
time1 = new Date();
var t = tiddler ? tiddler.title : source.substr(0,10);
displayMessage('Wikify "'+t+'" in ' + (time1-time0) + ' ms');
}
}
};
function createTiddlyElement2(parent,element)
{
var e = document.createElement(element);
parent.appendChild(e);
return e;
}
config.formatterHelpers.createElementAndWikify = function(w)
{
w.subWikifyTerm(createTiddlyElement2(w.output,this.element),this.termRegExp);
};
MediaWikiFormatter.hijackListAll = function ()
{
MediaWikiFormatter.oldListAll = config.macros.list.all.handler;
config.macros.list.all.handler = function(params) {
return store.getMediaWikiArticles();
};
};
MediaWikiFormatter.hijackListAll();
MediaWikiFormatter.normalizedTitle = function(title)
{
title = title.trim();
var n = title.charAt(0).toUpperCase() + title.substr(1);
return n.replace(/\s/g,'_');
};
MediaWikiFormatter.expandVariable = function(w,variable)
{
switch(variable) {
case 'PAGENAME':
createTiddlyText(w.output,w.tiddler.title);
w.nextMatch = lastIndex;
break;
default:
return false;
}
return true;
};
MediaWikiFormatter.getTemplateParams = function(text)
{
var params = {};
text += '|';
var pRegExp = /(?:([^\|]*)=)?([^\|]*)\|/mg;
var match = pRegExp.exec(text);
if(match) {
match = pRegExp.exec(text);
}
var i = 1;
while(match) {
if(match[1]) {
params[match[1]] = match[2];
} else {
params[i] = match[2];
i++;
}
match = pRegExp.exec(text);
}
return params;
};
MediaWikiFormatter.evaluateTemplateParserFunctions = function(text)
{
var fnRegExp = /\{\{#if:([^\|]*?)\|([^\|]*?)(?:\|(.*?))?\}\}/mg;
var t = '';
var fi = 0;
match = fnRegExp.exec(text);
while(match) {
displayMessage("m:"+match);
displayMessage("m0:"+match[0]);
displayMessage("m1:"+match[1]);
displayMessage("m2:"+match[2]);
displayMessage("m3:"+match[3]);
displayMessage("ss:"+text.substring(fi,match.index));
t += text.substring(fi,match.index);
var m = match[1] ? match[1].trim() : null;
if(m)
t += match[2];
else if(match[3])
t += match[3].trim();
fi = fnRegExp.lastIndex;
match = fnRegExp.exec(text);
}
t += text.substring(fi);
text = t == '' ? text : t;
displayMessage("text:"+text);
return text;
};
MediaWikiFormatter.expandTemplate = function(w,templateText,params)
{
var text = templateText;
text = text.replace(/<noinclude>((?:.|\n)*?)<\/noinclude>/mg,'');// remove text between noinclude tags
var includeOnlyRegExp = /<includeonly>((?:.|\n)*?)<\/includeonly>/mg;
var t = '';
var match = includeOnlyRegExp.exec(text);
while(match) {
t += match[1];
match = includeOnlyRegExp.exec(text);
}
text = t == '' ? text : t;
var paramsRegExp = /\{\{\{(.*?)(?:\|(.*?))?\}\}\}/mg;
t = '';
var pi = 0;
match = paramsRegExp.exec(text);
while(match) {
var name = match[1];
var val = params[name];
if(!val) {
val = match[2];
}
if(!val) {
val = '';//val = match[0];
}
t += text.substring(pi,match.index) + val;
pi = paramsRegExp.lastIndex;
match = paramsRegExp.exec(text);
}
return t == '' ? text : t;
/* //displayMessage("ss:"+text.substring(pi));
t += text.substring(pi);
t = MediaWikiFormatter.evaluateTemplateParserFunctions(t);
//{{#if: {{{perihelion|}}} | <tr><th>[[Perihelion|Perihelion distance]]:</th><td>{{{perihelion}}}</td></tr>}}
//{{#if:{{{symbol|}}} | {{{symbol}}} | }}
text = t == '' ? text : t;
displayMessage("t2:"+text);
return text;
*/
};
MediaWikiFormatter.endOfParams = function(w,text)
{
var p = 0;
var i = text.indexOf('|');
if(i==-1) {return -1;}
var n = text.indexOf('\n');
if(n!=-1 && n<i) {return -1;}
var b = text.indexOf('[[');
if(b!=-1 && b<i) {return -1;}
b = text.indexOf('{{');
while(b!=-1 && b<i) {
p += b;
text = text.substr(b);
var c = text.indexOf('}}');
p += c;
text = text.substr(c);
i = text.indexOf('|');
if(i==-1) {return -1;}
n = text.indexOf('\n');
if(n!=-1 && n<i) {return -1;}
b = text.indexOf('{{');
i = -1;
}
return i;
};
MediaWikiFormatter.readToDelim = function(w)
//!!! this is a bit rubish, needs doing properly.
{
var dRegExp = /\|/mg;
var sRegExp = /\[\[/mg;
var tRegExp = /\]\]/mg;
dRegExp.lastIndex = w.startMatch;
var dMatch = dRegExp.exec(w.source);
sRegExp.lastIndex = w.startMatch;
var sMatch = sRegExp.exec(w.source);
tRegExp.lastIndex = w.startMatch;
var tMatch = tRegExp.exec(w.source);
if(!tMatch) {
return false;
}
while(sMatch && sMatch.index<tMatch.index) {
if(dMatch && dMatch.index<sMatch.index) {
w.nextMatch = dRegExp.lastIndex;
w.matchLength = dMatch.index - w.startMatch;
return true;
}
tRegExp.lastIndex = sRegExp.lastIndex;
tMatch = tRegExp.exec(w.source);
w.nextMatch = tRegExp.lastIndex;
dRegExp.lastIndex = w.nextMatch;
dMatch = dRegExp.exec(w.source);
sRegExp.lastIndex = w.nextMatch;
sMatch = sRegExp.exec(w.source);
tRegExp.lastIndex = w.nextMatch;
tMatch = tRegExp.exec(w.source);
}
if(dMatch && dMatch.index<tMatch.index) {
w.nextMatch = dRegExp.lastIndex;
w.matchLength = dMatch.index - w.startMatch;
return true;
}
if(tMatch) {
w.nextMatch = tRegExp.lastIndex;
w.matchLength = tMatch.index - w.startMatch;
return false;
}
w.nextMatch = tRegExp.lastIndex;
w.matchLength = -1;
return false;
};
MediaWikiFormatter.getParams = function(w)
{
var params = [];
var i = 1;
w.startMatch = w.nextMatch;
var read = MediaWikiFormatter.readToDelim(w);
if(w.matchLength!=-1) {
params[i] = w.source.substr(w.startMatch,w.matchLength);
}
while(read) {
i++;
w.startMatch = w.nextMatch;
read = MediaWikiFormatter.readToDelim(w);
if(w.matchLength!=-1) {
params[i] = w.source.substr(w.startMatch,w.matchLength);
}
}
return params;
};
MediaWikiFormatter.setFromParams = function(w,p)
{
var r = {};
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match)
{
var s = match[1].unDash();
if(match[2]) {
r[s] = match[2];
} else if(match[3]) {
r[s] = match[3];
} else {
r[s] = match[4];
}
match = re.exec(p);
}
return r;
};
MediaWikiFormatter.setAttributesFromParams = function(e,p)
{
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match) {
var s = match[1].unDash();
if(s == 'bgcolor') {
s = 'backgroundColor';
}
try {
if(match[2]) {
e.setAttribute(s,match[2]);
} else if(match[3]) {
e.setAttribute(s,match[3]);
} else {
e.setAttribute(s,match[4]);
}
}
catch(ex) {}
match = re.exec(p);
}
};
config.mediawiki = {};
config.mediawiki.formatters = [
{
name: 'mediaWikiHeading',
match: '^={2,6}(?!=)\\n?',
termRegExp: /(={2,6}\n?)/mg,
handler: function(w)
{
var output = w.output;
var e = createTiddlyElement2(output,'h' + w.matchLength);
var a = createTiddlyElement2(e,'a');
var t = w.tiddler ? MediaWikiFormatter.normalizedTitle(w.tiddler.title) + ':' : '';
var len = w.source.substr(w.nextMatch).indexOf('=');
a.setAttribute('name',t+MediaWikiFormatter.normalizedTitle(w.source.substr(w.nextMatch,len)));
w.subWikifyTerm(e,this.termRegExp);
}
},
{
name: 'mediaWikiTable',
match: '^\\{\\|', // ^{|
tableTerm: '\\n\\|\\}', // |}
rowStart: '\\n\\|\\-', // \n|-
cellStart: '\\n!|!!|\\|\\||\\n\\|', //\n! or !! or || or \n|
caption: '\\n\\|\\+',
rowTerm: null,
cellTerm: null,
inCellTerm: null,
tt: 0,
debug: null,
rowTermRegExp: null,
handler: function(w)
{
if(!this.rowTermRegExp) {
this.rowTerm = '(' + this.tableTerm +')|(' + this.rowStart + ')';
this.cellTerm = this.rowTerm + '|(' + this.cellStart + ')';
this.inCellTerm = '(' + this.match + ')|' + this.rowTerm + '|(' + this.cellStart + ')';
this.caption = '(' + this.caption + ')|' + this.cellTerm;
this.rowTermRegExp = new RegExp(this.rowTerm,'mg');
this.cellTermRegExp = new RegExp(this.cellTerm,'mg');
this.inCellTermRegExp = new RegExp(this.inCellTerm,'mg');
this.captionRegExp = new RegExp(this.caption,'mg');
}
this.captionRegExp.lastIndex = w.nextMatch;
var match = this.captionRegExp.exec(w.source);
if(!match) {return;}
var output = w.output;
var table = createTiddlyElement2(output,'table');
var rowContainer = table;
var i = w.source.indexOf('\n',w.nextMatch);
if(i>w.nextMatch) {
MediaWikiFormatter.setAttributesFromParams(table,w.source.substring(w.nextMatch,i));
w.nextMatch = i;
}
var rowCount = 0;
var eot = false;
if(match[1]) {
var caption = createTiddlyElement2(table,'caption');
w.nextMatch = this.captionRegExp.lastIndex;
var captionText = w.source.substring(w.nextMatch);
var n = captionText.indexOf('\n');
captionText = captionText.substr(0,n);
i = MediaWikiFormatter.endOfParams(w,captionText);
if(i!=-1) {
captionText = w.source.substr(w.nextMatch,i);
w.nextMatch += i+1;
}
if(caption != table.firstChild) {
table.insertBefore(caption,table.firstChild);
}
w.subWikify(caption,this.cellTerm);
w.nextMatch -= w.matchLength;
this.cellTermRegExp.lastIndex = w.nextMatch;
var match2 = this.cellTermRegExp.exec(w.source);
if(match2) {
if(match2[3]) {
eot = this.rowHandler(w,createTiddlyElement2(rowContainer,'tr'));
rowCount++;
}
}
} else if(match[3]) {
w.nextMatch = this.captionRegExp.lastIndex-match[3].length;
} else if(match[4]) {
w.nextMatch = this.captionRegExp.lastIndex-match[4].length;
eot = this.rowHandler(w,createTiddlyElement2(rowContainer,'tr'));
rowCount++;
}
this.rowTermRegExp.lastIndex = w.nextMatch;
match = this.rowTermRegExp.exec(w.source);
while(match && eot==false) {
if(match[1]) {
w.nextMatch = this.rowTermRegExp.lastIndex;
if(w.tableDepth==0) {
return;
}
} else if(match[2]) {
var rowElement = createTiddlyElement2(rowContainer,'tr');
w.nextMatch += match[2].length;
i = w.source.indexOf('\n',w.nextMatch);
if(i>w.nextMatch) {
MediaWikiFormatter.setAttributesFromParams(rowElement,w.source.substring(w.nextMatch,i));
w.nextMatch = i;
}
eot = this.rowHandler(w,rowElement);
}
rowCount++;
this.rowTermRegExp.lastIndex = w.nextMatch;
match = this.rowTermRegExp.exec(w.source);
}//# end while
if(w.tableDepth==0) {
w.nextMatch +=3;
}
},//# end handler
rowHandler: function(w,e)
{
var cell;
this.inCellTermRegExp.lastIndex = w.nextMatch;
var match = this.inCellTermRegExp.exec(w.source);
while(match) {
if(match[1]) {
w.tableDepth++;
w.subWikify(cell,this.tableTerm);
w.nextMatch = this.tt;
w.tableDepth--;
return false;
} else if(match[2]) {
this.tt = this.inCellTermRegExp.lastIndex;
return true;
} else if(match[3]) {
return false;
} else if(match[4]) {
var len = match[4].length;
cell = createTiddlyElement2(e,match[4].substr(len-1)=='!'?'th':'td');
w.nextMatch += len;
this.inCellTermRegExp.lastIndex = w.nextMatch;
var lookahead = this.inCellTermRegExp.exec(w.source);
if(!lookahead) {
return false;
}
var cellText = w.source.substr(w.nextMatch,lookahead.index-w.nextMatch);
var oldSource = w.source;
var i = MediaWikiFormatter.endOfParams(w,cellText);//cellText.indexOf('|');
if(i!=-1) {
cellText = cellText.replace(/^\+/mg,''); //!!hack until I fix this properly
MediaWikiFormatter.setAttributesFromParams(cell,cellText.substr(0,i-1));
cellText = cellText.substring(i+1);
}
cellText = cellText.replace(/^\s*/mg,'');
w.source = cellText;
w.nextMatch = 0;
w.subWikifyUnterm(cell);
w.source = oldSource;
w.nextMatch = lookahead.index;
}
this.inCellTermRegExp.lastIndex = w.nextMatch;
match = this.inCellTermRegExp.exec(w.source);
}//# end while
return false;
}//# end rowHandler
},
{
name: 'mediaWikiList',
match: '^[\\*#;:]+',
lookaheadRegExp: /(?:(?:(\*)|(#)|(;)|(:))+)(?: ?)/mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var stack = [w.output];
var currLevel = 0, currType = null;
var listType, itemType;
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
if(lookaheadMatch[1]) {
listType = 'ul';
itemType = 'li';
} else if(lookaheadMatch[2]) {
listType = 'ol';
itemType = 'li';
} else if(lookaheadMatch[3]) {
listType = 'dl';
itemType = 'dt';
} else if(lookaheadMatch[4]) {
listType = 'dl';
itemType = 'dd';
}
var listLevel = lookaheadMatch[0].length;
w.nextMatch += listLevel;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement2(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement2(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement2(stack[stack.length-1],itemType);
var ci = w.source.indexOf(':',w.nextMatch);
var ni = w.source.indexOf('\n',w.nextMatch);
if(itemType=='dt' && (ni==-1 || (ci!=-1 && ci<ni))) {
w.subWikifyTerm(e,/(:)/mg);
w.nextMatch--;
} else {
w.subWikifyTerm(e,this.termRegExp);
}
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'mediaWikiRule',
match: '^----+$\\n?',
handler: function(w)
{
createTiddlyElement2(w.output,'hr');
}
},
{
name: 'mediaWikiLeadingSpaces',
match: '^ ',
lookaheadRegExp: /^ /mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var e = createTiddlyElement2(w.output,'pre');
while(true) {
w.subWikifyTerm(e,this.termRegExp);
createTiddlyElement2(e,'br');
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
w.nextMatch += lookaheadMatch[0].length;
} else {
break;
}
}
}
},
{
name: 'mediaWikiImage',
match: '\\[\\[(?:[Ii]mage|Bild):',
lookaheadRegExp: /\[\[(?:[Ii]mage|Bild):/mg,
defaultPx: 180,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var params = MediaWikiFormatter.getParams(w);
var src = params[1];
src = src.trim().replace(/ /mg,'_');
src = src.substr(0,1).toUpperCase() + src.substring(1);
var palign = null;
var ptitle = null;
var psrc = false;
var px = null;
var pthumb = false;
var pframed = false;
for(var i=2;i<params.length;i++) {
var p = params[i];
if(p=='right'||p=='left'||p=='center'||p=='none') {
palign = p;
} else if(p=='thumbnail'||p=='thumb') {
pthumb = true;
} else if(p=='framed') {
pframed = true;
} else if(/\d{1,4} ?px/.exec(p)) {
px = p.substr(0,p.length-2).trim();
} else {
ptitle = p;
}
}//#end for
if(pthumb) {
var output = w.output;
if(!palign) {
palign = 'right';
}
if(!px) {
px = 180;
}
psrc = px + 'px-' + src;
var t = createTiddlyElement(output,'div',null,'thumb'+(palign?' t'+palign:''));
var s = createTiddlyElement2(t,'div');
s.style['width'] = Number(px) + 2 + 'px';
var a = createTiddlyElement(s,'a',null,'internal');
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
a.href = src;
}
a.title = ptitle;
var img = createTiddlyElement2(a,'img');
img.src = 'images/' + psrc;
img.width = px;
img.longdesc = 'Image:' + src;
img.alt = ptitle;
var tc = createTiddlyElement(s,'div',null,'thumbcaption');
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = ptitle; w.nextMatch = 0;
w.subWikifyUnterm(tc);
w.source = oldSource; w.nextMatch = oldMatch;
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
var tm = createTiddlyElement(tc,'div',null,'magnify');
tm.style['float'] = 'right';
var ta = createTiddlyElement(tm,'a',null,'internal');
ta.title = 'Enlarge';
timg = createTiddlyElement2(ta,'img'); timg.src = 'magnify-clip.png'; timg.alt = 'Enlarge'; timg.width = '15'; timg.height = '11';
ta.href = src;
}
} else {
a = createTiddlyElement(w.output,'a',null,'image');
a.title = ptitle;
img = createTiddlyElement2(a,'img');
if(palign) {img.align = palign;}
img.src = px ? 'images/' + px + 'px-' + src : 'images/' + src;
if(px) {img.width = px;}
img.longdesc = 'Image:' + src;
img.alt = ptitle;
}
}
}//#end image handler
},
{
name: 'mediaWikiExplicitLink',
match: '\\[\\[',
lookaheadRegExp: /\[\[(?:([a-z]{2,3}:)?)(#?)([^\|\]]*?)(?:(\]\](\w*))|(\|(.*?)\]\]))/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
if(!lookaheadMatch[1]) {
var e;
var link = lookaheadMatch[3];
var text = link;
link = link.substr(0,1).toUpperCase() + link.substring(1);
if(lookaheadMatch[4]) {
if(lookaheadMatch[2]) {
var a = createTiddlyElement(w.output,'a');
var t = w.tiddler ? MediaWikiFormatter.normalizedTitle(w.tiddler.title) + ':' : '';
t = '#' + t + MediaWikiFormatter.normalizedTitle(link);
a.setAttribute('href',t);
a.title = '#' + MediaWikiFormatter.normalizedTitle(link);
createTiddlyText(a,'#'+link);
} else {
e = createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
if(lookaheadMatch[5]) {
text += lookaheadMatch[5];
}
createTiddlyText(e,text);
}
} else if(lookaheadMatch[6]) {
if(config.formatterHelpers.isExternalLink(link)) {
e = createExternalLink(w.output,link);
} else {
e = createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
}
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = lookaheadMatch[7].trim(); w.nextMatch = 0;
w.subWikifyUnterm(e);
w.source = oldSource; w.nextMatch = oldMatch;
}
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiTemplate',
match: '\\{\\{[^\\{]',
lookaheadRegExp: /\{\{((?:.|\n)*?)\}\}/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var lastIndex = this.lookaheadRegExp.lastIndex;
var contents = lookaheadMatch[1];
if(MediaWikiFormatter.expandVariable(w,contents)) {
return;
}
var i = contents.indexOf('|');
var title = i==-1 ? contents : contents.substr(0,i);
title = title.trim().replace(/_/mg,' ');
title = 'Template:' + title.substr(0,1).toUpperCase() + title.substring(1);
var tiddler = store.fetchTiddler(title);
var oldSource = w.source;
if(tiddler) {
params = {};
if(i!=-1) {
params = MediaWikiFormatter.getTemplateParams(lookaheadMatch[1]);
}
w.source = MediaWikiFormatter.expandTemplate(w,tiddler.text,params);
w.nextMatch = 0;
w.subWikifyUnterm(w.output);
} else {
if(config.options.chkMediaWikiDisplayEmptyTemplateLinks) {
w.source = '[['+title+']]';
w.nextMatch = 0;
w.subWikifyUnterm(w.output);
}
}
w.source = oldSource;
w.nextMatch = lastIndex;
}
}
},
{
name: 'mediaWikiParagraph',
match: '\\n{2,}',
handler: function(w)
{
w.output = createTiddlyElement2(w.output,'p');
}
},
{
name: 'mediaWikiExplicitLineBreak',
match: '<br ?/?>',
handler: function(w)
{
createTiddlyElement2(w.output,'br');
}
},
{
name: 'mediaWikiExplicitLineBreakWithParams',
match: "<br(?:\\s*(?:(?:.*?)=[\"']?(?:.*?)[\"']?))*?\\s*/?>",
lookaheadRegExp: /<br((?:\s+(?:.*?)=["']?(?:.*?)["']?)*?)?\s*\/?>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e =createTiddlyElement2(w.output,'br');
if(lookaheadMatch[1]) {
MediaWikiFormatter.setAttributesFromParams(e,lookaheadMatch[1]);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;// empty tag
}
}
},
{
name: 'mediaWikiTitledUrlLink',
match: '\\[' + config.textPrimitives.urlPattern + '(?:\\s+[^\\]]+)?' + '\\]',
handler: function(w)
{
var lookaheadRegExp = new RegExp('\\[(' + config.textPrimitives.urlPattern + ')(?:\\s+([^\[]+))?' + '\\]','mg');
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index==w.matchStart) {
var link = lookaheadMatch[1];
var s = createTiddlyElement2(w.output,'sup');
var e = createExternalLink(s,link);
if(lookaheadMatch[2]) {
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = lookaheadMatch[2].trim(); w.nextMatch = 0;
w.subWikifyUnterm(e);
w.source = oldSource; w.nextMatch = oldMatch;
} else {
w.linkCount++;
createTiddlyText(e,'['+w.linkCount+']');
}
w.nextMatch = lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},
{
name: 'mediaWikiBoldItalic',
match: "'''''",
termRegExp: /('''''|(?=\n))/mg,
element: 'strong',
handler: function(w)
{
var e = createTiddlyElement(w.output,this.element);
w.subWikifyTerm(createTiddlyElement(e,'em'),this.termRegExp);
}
},
{
name: 'mediaWikiBold',
match: "'''",
termRegExp: /('''|(?=\n))/mg,
element: 'strong',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiItalic',
match: "''",
termRegExp: /((?:''(?!'))|(?=\n))/mg,
element: 'em',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiUnderline',
match: '<u>',
termRegExp: /(<\/u>|(?=\n))/mg,
element: 'u',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiStrike',
match: '<s>',
termRegExp: /(<\/s>|(?=\n))/mg,
element: 'strike',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiBoldTag',
match: '<b>',
termRegExp: /(<\/b>|(?=\n))/mg,
element: 'b',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiItalicTag',
match: '<i>',
termRegExp: /(<\/i>|(?=\n))/mg,
element: 'i',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'mediaWikiTemplateParam',
match: '\\{\\{\\{',
lookaheadRegExp: /(\{\{\{(?:.|\n)*?\}\}\})/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiInsertReference',
match: '<ref[^/]*>',
lookaheadRegExp: /<ref(\s+(?:.*?)=["']?(?:.*?)["']?)?>([^<]*?)<\/ref>/mg,
handler: function(w)
{
if(config.browser.isIE) {
refRegExp = /<ref[^\/]*>((?:.|\n)*?)<\/ref>/mg;
refRegExp.lastIndex = w.matchStart;
var refMatch = refRegExp.exec(w.source);
if(refMatch && refMatch.index == w.matchStart) {
w.nextMatch = refRegExp.lastIndex;
return;
}
}
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var x = {id:'',value:''};
w.nextMatch = this.lookaheadRegExp.lastIndex;
if(!w.referenceCount) {
w.referenceCount = 0;
w.references = {};
}
var s = createTiddlyElement(w.output,'sup',null,'reference');
var a = createTiddlyElement2(s,'a');
var prefix = w.tiddler ? w.tiddler.title + ':' : '';
var name;
if(lookaheadMatch[1]) {
var r = MediaWikiFormatter.setFromParams(w,lookaheadMatch[1]);
name = r.name ? r.name.trim() : '';
name = name.replace(/ /g,'_');
s.id = prefix + '_ref-' + name;// + '_' + nameCount;(w.referenceCount+1);
if(!w.references[name]) {
w.references[name] = x;
w.references[name].id = w.referenceCount;
w.references[name].value = lookaheadMatch[2].trim();
}
} else {
w.references[w.referenceCount] = x;
w.references[w.referenceCount].id = w.referenceCount;
w.references[w.referenceCount].value = lookaheadMatch[2].trim();
name = w.referenceCount;
s.id = prefix + '_ref-' + w.referenceCount;
}
w.referenceCount++;
a.title = lookaheadMatch[2].trim();//mb, extra to wikipedia
a.href = '#' + prefix + '_note-' + name;
a.innerHTML = '['+w.referenceCount+']';
}
}
},
{
name: 'mediaWikiListReferences',
match: '<references ?/>',
lookaheadRegExp: /<references ?\/>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(config.options.chkMediaWikiListReferences && w.referenceCount) {
var ol = createTiddlyElement(w.output,'ol',null,'references');
var oldSource = w.source;
if(w.referenceCount>0) {
for(var i in w.references) {
var li = createTiddlyElement2(ol,'li');
var prefix = w.tiddler ? w.tiddler.title + ':' : '';
var b = createTiddlyElement2(li,'b');
var a = createTiddlyElement2(b,'a');
li.id = prefix + '_note-' + i;
a.href = '#' + prefix + '_ref-' + i;
a.innerHTML = '^';
w.source = w.references[i].value;
w.nextMatch = 0;
w.subWikifyUnterm(li);
}
}
w.source = oldSource;
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
},
{
name: 'mediaWikiRepeatReference',
match: '<ref[^/]*/>',
lookaheadRegExp: /<ref(\s+(?:.*?)=["'](?:.*?)["'])?\s*\/>/mg,
handler: function(w)
{
if(config.browser.isIE) {
refRegExp = /<ref.*?\/>/mg;
refRegExp.lastIndex = w.matchStart;
var refMatch = refRegExp.exec(w.source);
if(refMatch && refMatch.index == w.matchStart) {
w.nextMatch = refRegExp.lastIndex;
return;
}
}
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var x = {id:'',value:''};
w.nextMatch = this.lookaheadRegExp.lastIndex;
var s = createTiddlyElement(w.output,"sup",null,"reference");
var a = createTiddlyElement2(s,"a");
var prefix = w.tiddler ? w.tiddler.title : '';
if(lookaheadMatch[1]) {
var r = {};
r = MediaWikiFormatter.setFromParams(w,lookaheadMatch[1]);
var name = r.name ? r.name.trim() : '';
name = name.replace(/ /g,'_');
s.id = prefix + '_ref-' + name +'_' + (w.referenceCount+1);
var count = w.references && w.references[name] ? (w.references[name].id+1) : '?';
}
a.href = '#' + prefix + '_note-' + name;
a.innerHTML = '['+count+']';
a.title = name;
}
}//# end handler
},
{
name: 'mediaWikiHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
if(!config.browser.isIE)
createTiddlyElement(w.output,"span").innerHTML = w.matchText;
}
},
{
name: 'mediaWikiComment',
match: '<!\\-\\-',
lookaheadRegExp: /<!\-\-((?:.|\n)*?)\-\->/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiIncludeOnly',
match: '<includeonly>',
lookaheadRegExp: /<includeonly>((?:.|\n)*?)<\/includeonly>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiNoWiki',
match: '<nowiki>',
lookaheadRegExp: /<nowiki>((?:.|\n)*?)<\/nowiki>/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiPreNoWiki',
match: '<pre>\s*<nowiki>',
lookaheadRegExp: /<pre>\s*<nowiki>((?:.|\n)*?)<\/nowiki>\s*<\/pre>/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiPre',
match: '<pre>',
lookaheadRegExp: /<pre>((?:.|\n)*?)<\/pre>/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiMagicWords',
match: '__',
lookaheadRegExp: /__([A-Z]*?)__/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
if(lookaheadMatch[1]=='NOTOC') {
} else if(config.options.chkDisplayMediaWikiMagicWords) {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiGallery',
match: '<gallery>',
lookaheadRegExp: /[Ii]mage:(.*?)\n/mg,
handler: function(w)
{
var table = createTiddlyElement(w.output,'table',null,'gallery');
table.cellspacing = '0';
table.cellpadding = '0';
var rowElem = createTiddlyElement2(table,'tr');
var col = 0;
this.lookaheadRegExp.lastIndex = w.matchStart;
var nM = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
var oldSource = w.source;
while(lookaheadMatch) {
nM += lookaheadMatch[1].length;
w.source = lookaheadMatch[1] +']]';//!! ]] is hack until getParams is working
w.nextMatch = 0;
var params = MediaWikiFormatter.getParams(w);
var src = params[1];
src = src.trim().replace(/ /mg,'_');
src = src.substr(0,1).toUpperCase() + src.substring(1);
var palign = 'right';
var psrc = '120px-'+src;
var px = 120;
var pframed = false;
ptitle = null;
for(var i=2;i<params.length;i++) {
var p = params[i];
if(p=='right'||p=='left'||p=='center'||p=='none') {
palign = p;
} else if(p=='framed') {
pframed = true;
} else if(/\d{1,4}px/.exec(p)) {
px = p.substr(0,p.length-2).trim();
psrc = px + 'px-' + src;
} else {
ptitle = p;
}
}//#end for
var td = createTiddlyElement2(rowElem,'td');
var gb = createTiddlyElement(td,'div',null,'gallerybox');
var t = createTiddlyElement(gb,'div',null,'thumb');
t.style['padding'] = '26px 0';
var a = createTiddlyElement2(t,'a');
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
a.href = src;
}
a.title = ptitle;
var img = createTiddlyElement2(a,'img');
img.src = psrc;
img.width = px;
img.alt = '';
var gt = createTiddlyElement(gb,'div',null,'gallerytext');
p = createTiddlyElement2(gt,'p');
var oldSource2 = w.source; var oldMatch = w.nextMatch;
w.source = ptitle; w.nextMatch = 0;
w.subWikifyUnterm(p);
w.source = oldSource2; w.nextMatch = oldMatch;
col++;
if(col>3) {
rowElem = createTiddlyElement2(table,'tr');
col = 0;
}
w.source = oldSource;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
w.nextMatch = nM + '<gallery>'.length*2+1+'Image:'.length;//!! hack
}
},
{
name: 'mediaWikiHtmlTag',
match: "<[a-zA-Z]{2,}(?:\\s*(?:(?:.*?)=[\"']?(?:.*?)[\"']?))*?>",
lookaheadRegExp: /<([a-zA-Z]{2,})((?:\s+(?:.*?)=["']?(?:.*?)["']?)*?)?\s*(\/)?>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e =createTiddlyElement2(w.output,lookaheadMatch[1]);
if(lookaheadMatch[2]) {
MediaWikiFormatter.setAttributesFromParams(e,lookaheadMatch[2]);
}
if(lookaheadMatch[3]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.subWikify(e,'</'+lookaheadMatch[1]+'>');
}
}
}
}
];
config.parsers.mediaWikiFormatter = new Formatter(config.mediawiki.formatters);
config.parsers.mediaWikiFormatter.format = 'mediawiki';
config.parsers.mediaWikiFormatter.formatTag = 'MediaWikiFormat';
} //# end of 'install only once'
//}}}
Los usuarios de Compiz pueden obtener una considerable mejora del rendimiento de flash en modo de pantalla completa (full screen) desactivando la opción:
Unredirect Fullscreen Windows
via | System >> Preferences >> CompizConfig Settings Manager >> General Options >> General.
(http://phyx.wordpress.com/2009/07/30/mejorar-el-rendimiento-de-flash-en-modo-pantalla-completa-compiz/)
Gnome
gnome-panel
avant-window-navigator
f-spot
gedit
gnome-alsamixer
gksu
evolution
nautilus
gnome-control-center
gnome-media
glabels
gnome-print
nautilus-cd-burner
hal-gnome
totem-gstreamer
openoffice.org-gnome
tomboy
Básicos DVD
krita
skype
pidgin
tightvnc
x11vnc
stellarium
tuxpaint
audacity
recordmydesktop
winff
xara extreme
knotes
timidity
java
frostwire
Educativo
jclic
kdeedu
keduca
kbruch
geogebra
gcompris
childsplay
stellarium
tuxpaint
tuxmath ¿version 2?
tuxtype
ktouch
diccionario en barra de tareas
moodle?
wikipedia, jclic, wikimapia, howjsay como páginas de inicio de firefox
Gráfico
-básico
gimp
scribus
inkscape
krita
xara xtreme
-3D
blender
Pymes
don manolo 2
knotes
kcontact?
pdfEdit
virtualbox
kdebarcode
google earth
Cibercafés
kiosk
gestor de cibercafé / Servidor y clientes
x11vnc
Multimedios
MythTV
audacity
DeVeDe
k9copy
VDR
recordmydesktop
open media editor
timidity
realplayer
mencoder
winff
java
Comunicación
Skype
yahoo messenger
pidgin
Juegos y emuladores
-basicos
Frozen bubble
Enigma
kbattleship?
kmines
mahjhong
supertux
-emuladores
xmame
Efectos 3D
Compiz
compiz icon
emerald
config compiz
compiz-fusion
compiz dock
AWN?
screenlets?
gdesklets?
Bluetooth
bluez?
obexfs?
kandy?
(Publicado originalmente en http://experienciagnu.blogspot.com)
Empecé a utilizar Linux hace un poco más de 3 años, después de que conseguí descargar Knoppix 3.2 con una recientemente contratada conexión de banda ancha.
Al principio usé Knoppix sólo como CD Live para irme familiarizando con su funcionamiento y desde el principio quedé encantado con la facilidad para reconocer los componentes del equipo y su estabilidad. Antes de un mes estaba instalando por primera vez Knoppix en disco duro y utilizando apt-get para tener un Debian actualizado.
Durante todo este tiempo he utilizado variantes de Debian Sid, es decir, la versión supuestamente inestable, que desde el principio ha sido mucho más estable que windows.
Al migrar a Linux eliminé de golpe virus, espías y pantallas azules. Esto me permitió ser más productivo en mi trabajo y me propuse realizar una migración lo más completa posible para no depender de sistemas operativos propietarios. Antes de finales del 2003 ya ocupaba Linux como mi principal sistema operativo y eran raros los casos donde tenía que cambiar a otros SO, principalmente para actualizar programas originalmente desarrollados bajo windows.
Inmediatamente pude usar Knoppix para recuperar datos y reparar instalaciones de Windows. También para poder utilizar una gran cantidad de programas en máquinas de mis clientes sin tener que descargar o instalar ningún archivo.
A principios del 2004 llegué a familiarizarme con el uso de paquetes de oficina de OpenOffice y empecé a usar algunos programas exclusivos de Linux. Cambié a C, Gambas, PHP y MSQL para desarrollar programas y bases de datos. Entre 2004 y 2005 descubrí algunos de los protocolos de Konqueror, como sftp, fish y smb, para editar directamente archivos en servidores remotos. Igualmente pude realizar con mayor facilidad o capacidad tareas como respaldos de información o clonación de discos.
Mientras tanto la funcionalidad y estabilidad de la interfaz gráfica KDE (que uso normalmente) aumentó en forma impresionante del 2003 al 2006, junto con mi productividad. En ese mismo lapso algunos activadores también progresaron una barbaridad, por lo que reconocer dispositivos (memorias USB, cámaras digitales, etc.) y utilizarlos al máximo es ahora mucho más fácil.
Durante 2005 descubrí también la capacidad de Linux para visualizar y procesar de material de audio y video. Igualmente algunos problemas para actualizar mis programas instalando desde Knoppix me llevaron a probar Kanotix. En CD y DVD Knoppix es el rey. Kanotix es la forma más sencilla y confiable de instalar Debian en disco duro.
En ese mismo año inicié con la instalación de Linux para mis clientes que presentaban problemas periódicos de infección o alentamiento de sus computadoras bajo Windows. Esto me ha dado la experiencia de que los jóvenes menores de 25 años pueden adaptarse con sorprendente facilidad al uso de Linux con interfaz gráfica, mientras que quienes aprendieron a usar Windows hace unos 10 años o más prefieren aferrarse a cualquier versión que les resulté familiar de este SO. Esto parece mostrar un patrón de conducta marcado por el hábito de uso y abre la posibilidad de migración a Linux sin mayores problemas para usuarios escolares y en ambientes como bibliotecas y cibercafés.
En el 2006 entré de lleno al manejo de máquinas virtuales, programar tareas mediante cron y automatizar el uso de la línea de comandos con guiones bash. Aumenté el número de instalaciones de Linux y empecé a trabajar con usuarios de Windows con más de 5 años de experiencia. Aquí he podido ver que una capacitación mínima del uso de los programas de entre 2 y 3 horas suele ser suficiente para que los usuarios puedan adaptarse bien
a Linux. Y ellos prefieren pasar por este proceso de adaptación que estar limitados a trabajar a cuentagotas con sistemas impresionantemente lentos o tener que reinstalar windows cada 3-6 meses.
También he usado Linux con el servicio de Cosmopod para tener acceso a servidores remotos en situaciones donde las paredes de fuego me impiden el acceso remoto. Una ayuda invaluable para recuperar información y realizar cambios en configuraciones o publicar páginas.
También preparé un entorno de escritorio similar al de Windows que ha facilitado mucho las migraciones. Basta que la imagen de fondo sea familiar para aliviar la tensión del cambio. Además se incluyen íconos para las aplicaciones mas utilizadas, a fin de que el uso del menú sea mínimo. Tuve que castellanizar el Kanotix para poder ofrecerlo a mis
clientes.
Desde el año pasado he instalado versiones actuales de Linux en máquinas bastante viejas, que ya no aspiraban a instalar ni siquiera Windows XP.
Esta tendencia de instalar Linux en equipos "obsoletos" va a crecer bastante con la introducción de Windows Vista y su voraz apetito por todo tipo de recursos.
Estoy en proceso de realizar una migración para un cibercafé, donde a la fecha ya se hizo una prueba 100% satisfactoria cambiando a Open Office. Ahí esperamos podemos introducir íconos vinculados a archivos de ayuda en forma de presentaciones o videos.
En resumen: Prácticamente todo mi trabajo actualmente lo realizo en Debian instalado desde Kanotix con interfaz gráfica KDE. Desde edición de textos, hasta programación, diseño gráfico, programas educativos para mis hijos, de intercambio de archivos o el manejo remoto de aervidores y archivos. Los programas de código abierto avanzan en forma increíblemente rápida y cada vez encuentro aplicaciones más especializadas y mejores que sus contrapartes comerciales. Ocasionalmente utilizo una máquina virtual con Windows XP para algunos programas que no tienen equivalente en Linux y que no he podido instalar con Wine.
Desde hace algún tiempo he ido recopilando mis notas sobre instalación, operaciones y corrección de errores en Linux Debian en http://tuxpan.sytes.net/linux/ para procurar que mi experiencia con Linux pueda serle útil a otras personas.
Parece que al fin nos acercamos a la visión de tener una computadora en cada hogar y oficina, con equipos cada vez más económicos, sistemas operativos confiables, flexibles y poderosos y una variedad de aplicaciones inimaginable hace algunos años. Todo gracias a una filosofía donde quien obtiene utilidades es quien debe pagar por el uso de programas.
Julio Poisot De María
Recently I had a project in which I needed to allow Microsoft Access MDB files to be uploaded via a web screen and then parse the data in those files and import selected records into another database (MySql). As I began looking into this problem I began to realize that not many people needed to do this on Linux and that far more people were just convinced this was an impossible task. So I decided to try to make it work, hence this post.
You will need the following:
Linux ( I'm running RedHat 9.0)
PHP
Apache
UnixODBC
MDBTools
INSTRUCTIONS
1) Download the UnixODBC RPM, found here. I installed unixODBC version 2.2.5.1.
rpm -ivh unixODBC-2-2.5-1.i386.rpm
2) Download the MDBTools rpm, found here. I installed mdbtools version 0.5.1. Read limitations!
rpm -ivh mdvtools-0.5-1.i386.rpm
3) Download the MDBTools ODBC driver rpm. Again I installed version 0.5-1.i386.rpm. Read limitations!
rpm -ivh mdbtools-odbc-0.5-1.i386.rpm
4) Add the mdbtools driver to your unixODBC config.
Create a new text file. NON-LINUX user: Beware do not do this on windows as you might get werid new lines, use vi.
[MDBToolsODBC]
Description = MDB Tools ODBC drivers
Driver = /usr/lib/libmdbodbc.so.0
Setup =
FileUsage = 1
CPTimeout =
CPReuse =
NOTE: The driver may be in /usr/local/lib/libmdbodbc.so.0. This happens if you build from source and use the make install command. The RPM puts it in /usr/lib.
Now install the driver using the file you created. This is called a template file.
odbcinst -i -d -f template.file
5) Define the datasource name. This is done in the /etc/odbc.ini file. So pull up this file in vi or another text editor and add the following lines.
[Dogs]
Description = Microsoft Access Database of Dogs
Driver = MDBToolsODBC
Database = /var/data/my_dog_db.mdb
Servername = localhost
UserName =
Password =
port = 5432
That's it you should now have an odbc connection available. I will demonstrate using php, this assumes that your php is compiled with UnixODBC support, the version that ships with Redhat 9 does if yours does not then you can learn how here.
So I will write a quick php script to query my dogs database and print out the names and weights of my dogs.
$myDB = odbc_connect("Dogs","","");
$query = "select name, weight from dog_list";
$result = odbc_exec($myDB, $query);
while (odbc_fetch_row($result)) {
print "Name = " . odbc_result($result,"name");
print "
Weight = " . odbc_result($result,"weight");
}
If you get a php error that says odbc_connect is not a function then see if you have php-odbc installed. Do rpm -qa php-odbc. If you see php-odbc returned then you have it if not install it., the rpm is available on the redhat discs.
Limitations:
- As of the time of writing this entry MDBTools did not support write access to the mdb files. This was fine for my purposes as I was reading data in and sticking it into a mysql database.
- There is a bug in MDBTools v0.5 which does not allow you to query tables or columns with an underscore. This was a bug I hit early on, but it has been fixed in new version 0.6 but that has not been released as of the time of writing this article. So I recompiled the 0.5 source code with the fix from the 0.6 CVS repository. I have bundled it into a 0.5 release and have the two rpms mentioned above here:
mdbtools-0.5-1.i386.rpm
mdbtools-odbc-0.5-1.i386.rpm
I would check the official download site before using my hacked version as I'm sure this bug will be fixed in 0.6 (plus rumor has write access will be present as well).
References:
Using UnixODBC from command line
Installing MDBTools
(http://bryanmills.net/archives/2003/11/microsoft-access-database-using-linux-and-php/)
Para una instalación en Debian-Sidux se utilizó
apt-get install unixodbc unixodbc-bin mdbtools libmdbodbc libphp-adodb php5-adodb php5-odbc mysql-server-5.0
Después de usar apt-get install gambas hay que modificar los permisos de /usr/share/gambas2/ para que los usuarios del grupo gambas puedan escribir en los archivos de ejemplo
Para realizar el monitoreo se utiliza ntop -i eth0 (o cualquier otra interfaz que desee usar)
Luego se abre la siguiente página con el navegador
http://localhost:3000
------------------------
Nota: Puede ser necesario instalar rrd, rrdtool y paquetes asociados, además de crear las carpetas para su uso en /var/lib/ntop/rrd
(http://www.susegeek.com/networking/ntop-in-opensuse-to-probe-monitor-network-traffic/)
Primero se instala
apt-get install xosd-bin
y luego se transfiere un programa al osd_cat
top | osd_cat -d 20 -l 15
(retraso de veinte segundos, 15 líneas)
otras opciones se encuentran con man osd_cat
In this posting its back to the computer related stuff. In particular how to use a remote (over the internet) based computer's file system like a local one.
You will be able to use it exactly like you use a normal folder cutting, copying, pasting and creating documents etc.
1. Install ssh on remote server
2. Install sshfs on your computer
sshfs: sshfs is a file system client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there's nothing to do. On the client side mounting the file system is as easy as logging into the server with ssh.
* On Ubuntu and Debian: sudo apt-get install sshfs
* On Suse (as root) : zypper in sshfs
* On Fedora (as root): yum install sshfs
3. Add your normal (unprivileged) user to the fuse group
You will have
sudo adduser localuser fuse
4. Create the folder you want to mount into
mkdir /home/localuser/Desktop/sshfs
5. Mount the remote directory with the syntax below
sshfs youruser@yourcomputer.yourdomain.org:/folder/subfolder /home/localuser/Desktop/sshfs
6. Use the folder like a normal directory!
7. When your finished unmount it
fusermount -u /home/localuser/Desktop/sshfs
More info:
http://fuse.sourceforge.net/sshfs.html
find ~ -mtime +365 -exec mv {} /tmp/mybackup \;
This is sample output - yours may be different.
This example uses the -exec option to move all matching files into a backup directory
(http://www.commandlinefu.com/commands/view/1889/exec-option-in-find)
Con privilegios de superusuario se ejecuta
apt-get update
apt-get install mozilla-locale-es
apt-get install firefox-locale-es-ar mozilla-firefox-locale-es-ar
Puede ser necesario indicar en el menú de Kde la opción -UILocale para especificar el idioma (Esto sucede cuando no se puede especificar es_MX como idioma por defecto)
Menú Kde->Preferencias->Editor de menús
Se abre Internet->Firefox (Navegador) o algo similar
Y se escribe firefox -UILocale es %u como comando para llamar al programa
=======firefox=================
> Hola compañeros, dos preguntas que el super Google no veo,¿hay forma de poner
> el firefox 1.5 en castellano, pues lo tengo en ingles? y por otro lado ¿como
> puedo buscar dentro de las listas si un tema ya ha sido comentado?
> Muchas Gracias.
>
Hola, te comento de lo que acabo de hacer y que me funcionó bárbaro:
1) baje de mozilla.org el firefox-1.5.tar.gz
2) extraigo de dicho tarball dos archivos que están en /firefox/chrome/
es-AR.jar
es-AR.manifest
3) a estos dos archivos los copie como root en /usr/lib/firefox/chrome
4) inicio firefox como usuario normal y por única vez de la siguiente
manera:
firefox -UILocale es-AR
5) con a mi me funciono y en siguientes reinicios de firefox sin
especificarle nada lo sigue haciendo en español
Nota: el es-AR es por el español latino, para el de España es es-ES
http://lists.debian.org/debian-user-spanish/2006/01/msg01202.html
=============================
Needed to get the Mac of various devices on a solaris box, but didn't have root. This command used awk to display the Network device, the IP, and the MAC a line at a time.
ifconfig -a | nawk 'BEGIN {FS=" "}{RS="\n"}{ if($1~ /:/) {printf "%s ", $1}}{ if($1=="inet") {print " -- ",system("arp "$2)}}'|egrep -v "^[0-9]$"
(http://www.commandlinefu.com/commands/view/1322/nics-ips-and-mac)
Como superusuario se actualiza la lista de programas
apt-get update
Y se instalan tor y privoxy
apt-get install tor privoxy
Se ejecuta
tor
Después se modifica /etc/privoxy/config para incluir:
# envia los datos a tor
forward-socks4 / 127.0.0.1:9050 .
Y se llama a privoxy con su configuración correspondiente
privoxy /etc/privoxy/config
Se termina de usar la cuenta de superusuario
Por último, como cualquier otro usuario, se configura el programa (navegador, mensajero) a usar para que utilice proxy = 127.0.0.1:8118 o socks = 127.0.0.1:9050
Con ifconfig se obtiene la dirección Ip de acceso a internet del equipo que se está usando
Y se revisa la dirección IP detectada con cualquiera de estos servicios
junkbusters http://www.junkbusters.com/cgi-bin/privacy
network-tools http://www.network-tools.com/
ipid http://ipid.shat.net/
Si las direcciones IP son diferentes la navegación es anónima, en cuanto a la IP
Si también se quiere ocultar la información sobre el navegador y sistema operativo entonces hay que usar un archivo de acciones en privoxy
Se agrega la siguiente linea en /etc/privoxy/user.action
{ +hide-referrer{block} +hide-forwarded-for-headers +hide-user-agent{Lynx/2.8.5rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d} }
/
Solamente hay que sustituir el texto después de +hide-user-agent, Lynx/2.8.5rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d , con la identificación de programa que se desee
Nota: En ocasiones la red de Tor no funciona, pero puede utilizarse alguno de los servidores proxy que se encuentran listados en www.hidemyass.com
Basta con instalar nss, libnss y libnss-devel para resolverlo
Hay que agregar una entrada de este tipo a /etc/fstab
/dev/cdrom /dvdram auto defaults,user,noauto,iocharset=8859-1 0 0
Por supuesto antes de utilizarlo también hay que crear la carpeta /dvdram
El truco consiste en inlcuir iocharset=8859-1 lo cual especifica la codificación a utilizar sobre el sistema de archivos
Cuando se obtiene un mensaje de error similar a este
Unpacking libxtst6 (from .../libxtst6_4.3.0.dfsg.1-4_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libxtst6_4.3.0.dfsg.1-4_i386.deb (--unpack):
trying to overwrite `/usr/X11R6/lib/libXtst.so.6.1', which is also in package xlibs
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libxtst6_4.3.0.dfsg.1-4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
se usa
dpkg --force overwrite -i /var/cache/apt/archives/<packagename>.deb
y luego
apt-get -f install
Actualización del Filtrado de IP (ipfilter.dat)
En Preferencias -> Seguridad está la opción Actualizar desde URL. Añade un enlace al archivo de filtrado, p.e. http://emulepawcio.sourceforge.net/ipfilter.zip, y pulsa Cargar. Los formatos de filtrado de listas de IP usados en las listas de Methlabs, Bluetack o Lussnig's IP Filter son admitidos por esta función. Enlaces que apuntan a un archivo *.zip también se pueden utilizar si la lista que contienen está en el formato adecuado. Para emplear listas con extensión .rar es necesario disponer del archivo UnRAR.dll, para lo que hay que descargar desde RARLAB este archivo, ejecutarlo y seleccionar como destino la carpeta emule.
En "Preferences" -> "Security" -> "IP Filtering" -> URL hay que escribir
http://utenti.lycos.it/discussions/ipfilter.gz
ó
http://emulepawcio.sourceforge.net/ipfilter.zip
=====================================
http://www.emule-project.net/home/perl/help.cgi?l=17&rm=show_topic&topic_id=572
http://www.amule.org/wiki/index.php/IPFilter
http://gsdefender2.wordpress.com/filtri-ip-per-eamule/
The OGMtools suite contains several utilities to manage Ogg Media Stream (OGM) files. The tools were designed to be used along with video ripping software to encode DVD movies, but they can be used for much more.
ogminfo lets you obtain information about a particular Ogg file. A command like ogminfo -s audio.ogg prints a complete summary of an audio file, including file size, bitrate, number of packets, and the play length, which instantly tells me how much video I need to cut to make the audio match the video clip I am working on. The tool can also provide more information about a particular file if you set the verbosity level using the -v option.
ogmcat is useful for taking short snippets of narration audio and combining them into longer streams, and for looping background audio. For example, the command ogmcat -o audio.ogg track1.ogg track2.ogg track3.ogg combines track1, track2, and track3 end-to-end and writes the resulting stream to audio.ogg.
ogmcat uses a strict matching algorithm to merge audio files to ensure that all of the audio sounds correct when merged. For a full list of what ogmcat checks, refer to the limitations section of the man page. If all of the files were created the same way using the same software there should not be an issue. If there is an issue, ogmcat will throw an error and the merge will fail. You can override some of the lesser checks by using the -n option.
To loop audio files, use a single input file multiple times: ogmcat -o audio.ogg track.ogg track.ogg track.ogg
Merge and split Ogg audio tracks
When I do screencasts I typically use recordmydesktop to record the screen capture, then narrate the actions using Audacity. I then have to get my Ogg Vorbis audio track to visually sync with the Ogg Theora video file. To put the two together, I convert the Theora video to xvid, because OGMtools does not support Ogg Theora, then use ogmmerge to put them together, with a command like ogmmerge -o final.ogm -A video.avi audio.ogg. The -A option tells ogmmerge to not include any audio from the video file.
After creating the merged file I typically use FFmpeg to convert the file to DV Digital Video so that I can use it with Kino. However, if the project I am working on is all screen captures and does not need further editing, I just use ogmcat to pull all of the segments together. I use shell scripts that automate the process and make doing all of the conversions trivial.
The converse of ogmmerge is ogmsplit, which can be used to divide an OGM into smaller chunks based on time or file size. For example, ogmspit -t 300 -o split.ogg video.ogg will divide video.ogg into separate files, one for every 300 seconds of content. The output files will be named split-XXXXX.ogg, where XXXXX is a zero-padded sequential number starting at 1. Similarly, the command ogmspit -s 50MiB -o split.ogg video.ogg will split video.ogg once for every 50 megabytes.
ogmdemux can extract streams in an OGM file. This is handy for separating audio and video streams into separate files. The command ogmdemux -o video -na video.ogm extracts the video stream from video.ogm and writes it to a file named video-v1.avi; the -na (no audio) option tells ogmdemux to extract only the video. The file name is determined by what options are used; specifying the -o option just gives the output file a base name. Similarly, the command ogmdemux -o audio -nv video.ogm extracts only the audio from the full video and writes it to a file called audio-v1.ogg.
http://www.linux.com/feature/136462
Este metodo consiste simple y sencillamente en configurar nuestro teclado con la distribución EEUU Internacional (con teclas muertas), en lugar de las distribuciones EEUU o España (en cualquiera de sus variantes), las cuales suelen ser las mas habituales en las configuraciones por defecto. Para esto debemos seguir los siguientes pasos (en Gnome):
1. Gnome, debemos navegar por los menus: Sistema –> Preferencias –> Teclado.
Linux, Gnome, Preferencias del teclado
2. Una vez abierta la ventana: "Preferencias del teclado", vamos a la pestaña Distribuciones.
3. Allí encontraremos todas las distribuciones de teclado que tengamos instaladas, para añadir una nueva, hacemos clic en el boton añadir
4. Esto nos abre la ventana: "Elija una distribución", en la cual seleccionamos en la casilla distribución el valor "EEUU", y en la casilla variantes el valor: "Internacional (con teclas muertas)". Hacemos clic en Añadir y listo, asi de simple hemos agregado una nueva distribucion de teclado a nuestro entorno Gnome.
Linux, gnome, elegir-distribucion
5. Ahora solo debemos seleccionar esta distribucion como predeterminada, y si lo deseamos podemos eleminar las otras distribuciones presentes
De esta forma hemos agregado soporte para las llamadas "teclas muertas" a nuestro teclado en ingles, ahora cuando deseemos una ñ sera tan simple como presionar la tecla con el simbolo ~, SOLTAR y presionar la tecla n. Lo mismo para las tildes: presionamos la tecla con el simbolo ', SOLTAMOS (no sostenemos), presionamos la vocal deseada … y listo … tildes y eñes en nuestro Sistema GNU/Linux.
(http://www.iguanalinux.com/gnulinux/documentacion/las-tildes-en-linux/)
To work out the available screen resolution you should inspect the output of the xdpyinfo command. Specifically, search for the line containing the string "dimensions:" like so:
[david@dmw ~]$ xdpyinfo | grep 'dimensions:'
Dimensions: 800x480 pixels (283x170 millimetres)
(http://www.itwire.com/content/view/19255/1141/1/1/)
HelloThere
ServerConnectivity
BackstageArea
OtherNewFeatures
DownloadSoftware
[[Howto: Loop Movie, Video, and Display Screensaver as Desktop Wallpaper in Ubuntu Linux]]
[[Convertir video theora a mpeg4 o avi para publicar con youtube]]
[[Clonar imágenes en VirtualBox]]
[[Catalogar archivos, CD y DVD con CDCat]]
[[Determinar pid de un proceso para cerrarlo]]
[[Tunel ssh con computadora intermediaria]]
[[Vnc y tunel inverso para acceder a una computadora detrás de pared de fuego]]
[[Reducir archivos vmdk (VMware)]]
[[Tunel ssh para utilizar vnc]]
Convertir video en formato theora a avi
Sincronizar directorios con servidor remoto y local
Extraer imágenes de archivos PDF
Convertir estructura DVD a imagen ISO
Internet al revés
Generar una lista de reproducción a partir de los archivos en un directorio
Mostrar texto de entrada normal en pantalla
Generar una lista de reproducción aleatoria a partir de los archivos de un directorio
Iniciar sesión gráfica para un nuevo usuario
Navegación anónima en internet
Copiar sobre una red
Copiar una partición
Copiar un disco duro
Iniciar una sesión en modo de texto en una maquina remota utilizando ssh
Reiniciar un programa en sesión gráfica utilizando cron o kcron
Extraer sonido de una pelicula o video y grabarlo en un CD de audio
Convertir DVD a divX
Crear un disco VCD a partir de un arhivo xml
Renombrar archivos
Crear un álbum fotografico en una página html
Crear imagenes jpg en miniatura
Extraer un archivo mpg de un disco VCD
Crear imagen VCD a partir de un archivo mpg
Dividir o unir archivos mpg
Acceder a archivos en maquinas remotas con Konqueror
Abrir el menú y seleccionar programas
Calculadora
Hoja de cálculo
Procesador de textos
Editar archivos de texto
Utilizar un comando de texto
Agenda/Directorio
Navegar por internet
Usar servicios en línea (correo electrónico y otros)
Buscar infromación en internet
Buscar información y archivos locales
Administrar archivos y directorios (copiar, pegar, borrar, etc)
Administrar archivos como superusuario
Presentaciones
Tomar notas
Capturar pantalla
Grabar pantalla
Grabar CD y DVD
Reproducir música
Reproducir videos
Buscar, escuchar y grabar estaciones de radio en internet
Grabar y editar audio
Cambiar el volumen del audio
Ver y editar archivos PDF
Editar imágenes
Intercambio de archivos con otros usuarios
Crear una página de internet
Mensajería instantánea (chat)
Voz sobre IP
Cambiar la resolución de la pantalla
Acceso remoto a otras computadoras (VNC)
Compartir escritorio
Administar archivos de otras computadoras
Organizar el trabajo (GTD)
Detener y eliminar trabajos de impresión
Instalar programas
Cerrar un programa que no responde
Hacer que la computadora lea un texto (Síntesis de voz)
Crear y editar usuarios (como superusuario)
COMO Reinstalar GRUB
Algo tìpico es instalar o reinstalar Windows en otra particiòn (obviamente ) y perder el grub de la MBR (Master Boot Record), por lo cual ya no podemos arrancar Ubuntu. Vamos a ver como recuperar el Grub en nuestra MBR desde un Live-Cd.
Montamos la particiòn raiz en donde tenemos instalado Ubuntu. Supongamos que tenemos 1 disco y Ubuntu en la segunda particiòn:
mkdir /mnt/hda2
mount /dev/hda2 /mnt/hda2
chroot /mnt/hda2
grub-install /dev/hda
(Nota: el cd-en-vivo debe detectar las particiones tal como la instalación en disco duro)
http://www.ubuntu-es.org/node/12633 2007/02/19
InstalaciónyConfiguración
OperacionesBásicas
OperacionesAvanzadas
ResolucióndeProblemas
$ sudo ntpdate mx.pool.ntp.org
ó
$ sudo ntpdate ntp.astrosmo.unam.mx
O también se puede usar el del CENAM que es la instancia nacional de referencia en materia de mediciones, osea la hora oficial.
cronos.cenam.mx
http://petrohs-log.blogspot.com/2009/03/ajustar-fecha.html
Incluir vínculo a http://mobalivecd.mobatek.net/en/ en tmlinux.com para indicar como probar el cdenvivo desde windows
Traducir el como de plasma 4.4 (http://userbase.kde.org/Plasma/HowTo#HowTo) para vincularlo desde tmlinux
Evaluar congelar usuarios con http://my.opera.com/davidtsunamy/blog/2009/12/17/tfreezer-congelador-del-home o borrar y copiar directorio
Página para instalar dropbox, getopenoffice, Opera 10 y jdownloader
--agilizar flash http://tmlinux.posterous.com/flash-10-mas-fluido-en-linux
meta+^ para aumentar escritorio y meta+flecha abajo pra diminuirlo. meta+n para dejarlo normal
ajustar vueltas del ratón para girar el cubo en kde 4
activar efecto del cubo al cambiar de escritorio
resaltar ventana al pasar sobre la miniatura del panel
--[[[Íconos para compiz, kwin+opengl y kwin+xrender
compiz --replace --sm-disable --ignore-desktop-hints ccp &]]]
--Incluir gui para manejo de energía en portátiles
--Evaluar el uso de Nitrogen, decorador de ventanas para KDE 4. (De momento no)
--25/06/2009 una sugerencia es que donde explica el manejo del CD-ROM pusieses lo mismo para DVD para que quede claro que tambien es aplicable a DVD.
--Luego una cosita que se te ha escapado un "The", ahora no me acuerdo el capitulo.
Instalar dropbox, apturl (click2install), kde 4 y firefox 3.5 para la versión 0.6 de TMLinux
--wammu para teléfonos celulares (no hay sufiente compatibilidad de los equipos)
mame para emuladores de juegos
--probar Where Is Application (WIA) para notificar donde se instaló un programa (no funciona bien)
--evaluar plasmoide daisy (http://fedoreando.wordpress.com/2009/05/15/daisy-plasmoide-lanzador-de-aplicaciones-dock-y-controlador-multimedia/)
--agregar kghostview para previsualizar documentos pdf en modo de íconos en konqueror y activar ver->previsualizar->archivos de video y archivos de sonido
Cambiar swapiness para mejorar funcionamiento con poca memoria y cuando no hay partición de intercambio
agregar backintime a DVD
agregar webilder-kde
--agregar vorbis-tools y lame
Instalar conector facebook para pidgin
http://code.google.com/p/pidgin-facebookchat/wiki/How_To_Install
(también hay que instalar libjson-glib)
Actualizar los siguientes archivos en /etc para que incluyan la versión actualizada de TMLinux:
pclinuxos-release
issue
issue.net
version
Incluir configuración personalizada de compiz en /home/visitante/.config/compiz/
si es posible encontrar archivos de configuración iniciales de compiz y modificarlos
Excluir los archivos del tipo /usr/share/icons/Clearlooks/icon-theme.cache al crear Cd y DVD en Vivo
--sustituir los enlaces simbólicos con lanzadores de escritorio para asegurarse de que respete el texto deseado, por ejemplo "Mis documentos" (ya no se aplica a ke4)
http://www.brigadesos.com/2009/03/tip-creando-lanzadores-en-el-escritorio.html
--Agregar activadores nvidia, ati y firmware para adaptadores inalámbricos a DVD. También kdemoreartwork
--Agregar kdemoreartwork-corona y configurar kde para usarlo como decoración de ventana predeterminada
Agregar floola a metapaquete multimedios. christine, songbird y (gnome-do ¿depende de mono?) a gnome, googleearth a metapaquete educativo
--Corregir streamtuner
¿?Completar bootsplash con la imagen para grub
y modificar my $default_theme = 'PCLinuxOS';
en /usr/lib/libDrakX/bootsplash.pm
Modificar /usr/share/userdrake/pixmaps/userdrake.png para que se adapte a TMLinux
Contribuir con archivos del tipo
/usr/share/locale/es/LC_MESSAGES/drakconf.mo
para las traducciones de draklive-install y finish-install
--Incluir confirmación antes de eliminar archivos en konqueror
Agregar smile al metapaquete multimedios
Evaluar el uso de la configuración de conky como se detalla aquí:
http://www.quicktweaks.com/2008/09/27/gmail-weather-beauty-right-on-your-ubuntu-desktop/
¡Importante! Usar la prueba de la pareja para evaluar la facilidad de uso de tmlinux
http://www.techradar.com/news/software/operating-systems/the-linux-girlfriend-test-465968?artc_pg=1
Agregar smplayer al menú multimedios->video
Incluir ksplit en el metapaquete pymes
--Probar excluir /home/visitante/.mozilla/firefox/vr59mu1e.default en livecd.sh
Agregar PlayonLinux a el metapaquete de emuladores de juegos
Considerar si la estructura del sitio http://www.tuxapuntes.com/ puede ser útil para los cursos
--Video de instalación sobre un disco duro donde hay una partición con windows
Incluir http://www.osalt.com/ en sitios sugeridos para encontrar alternativas a programas comerciales
--¿utilizar http://www.widgetbox.com para publicar avisos y noticias?
Se podría hacer una página aparte para tener el rss de vivalinux y algunos otros sitios (mejor usar plasmoides)
Considerar icecast e idjc para metapaquete de audio (radio) por internet
--Verificar si esta disponible la traducción al español de firefox 3 en depósitos (ya está)
--Copiar el initrd "escopeta" desde aquí
http://hack.mypclinuxos.com/initrd/
--Eliminar jnext de las páginas de tmlinux (locales al CD y en internet)
Incluir elementos de LFS para mejorar rendimiento
http://www.linuxfromscratch.org/
--Incluir gtk-recordmydesktop en metapaquete graficos
--Incluir kdenlive en metapaquete multimedios (hasta que se corrijan problemas de sincronización)
--Incluir videos y presentaciones en DVD
--Modificar el metapaquete educativo para que quede de esta forma:
apt-get install jclic kdeedu geogebra gcompris childsplay stellarium tuxpaint tuxmath tuxtype
--En la creación de nuevos usuarios no está activada la barra de ayuda kooldock, los vínculos en Útiles no están en español, la página de inicio de firefox no es la correcta y netapplet no inicia automáticamente. Actualizar los archivos en /etc/skel
[[Borrar cuenta visitante]]
cambiar drak-install para que los mensajes de reinicio sean más explícitos en cuanto hay que reiniciar la computadora después de hacer cambios en las particiones
Incluir suspender e hibernar en metapaquete portatiles
evaluar http://www.videolever.com/ como sitio alterno de publicación de videos demostrativos
y http://polishlinux.org/apps/educational-programs-in-gnulinux/ para ver que aplicaciones añadir al metapaquete educativo
--Instalar uniconvertor e inkscape para abrir archivos .cdr
Incluir animación de fondo de escritorio con xwinwrap
--PDF Editor en pclinux / incluir en metapaquete Pymes
--eliminar carpeta .aMSN de /etc/skel
--Incluir guión de metapaquetes
--Incluir frostwire en los metapaquetes
--cambiar pàgina de ayuda para incluir pláticas-asistencia en línea
--corregir página de ayuda /usr/share/doc/HTML/ayuda.html para que apunte a la dirección correcta del foro de pláticas
--incluir kdesu en el comando de la barra de ayuda para metapaquetes
--Cambiar el botón del menú kde
/usr/share/icons/crystalsvg/*x*/apps/kmenu.png
O utilizar este método
http://wiki.mandriva.com/en/Releases/Mandriva/2007.1/Notes#New_KDE_system_menu_button:_how_to_remove_it
Y este
/var/lib/mandriva/kde-profiles/one/share/apps/kicker/pics/kside_top.png
revisar los cursos
http://www.collegeathome.com/blog/2008/05/22/open-courseware-for-linux-geeks-50-resources/
--Incluir guión de ayuda remota
--Utilizar kooldock para mostrar ayudas u opciones temáticas (Juego, estudio, multimedios, etc.)
Hay que armonizarlo con el contenido de Cursos en video para mayor coherencia
--Presentación TMLinux
--Como instalar TMLinux
(Más adelante) Manual(revisar manual de sidux) ó Como hacer (equivalencia de programas)
Cursos en video
--Metapaquetes
--Asistencia en línea
Explicación detallada para usuarios windows
Qué es Linux
Funcionamiento como CD
Compatibillidad de programas
modificar los vinculos .desktop para incluir lineas de idioma
Name[es]=
instalar JMF para agregar audio a Jclic y presentaciones Impress (falta configurar para OpenOffice)
Habilitar firefox para abrir carpetas en Konqueror:
http://zerlinna.blogweb.de/archives/103-Firefox-Extension-Open-link-in-Konqueror.html
En esta dirección esta el programa para usar una camara y una pluma para manejar un escritorio al usar un proyector. Similar al proyecto con el wiimote.
http://kde-apps.org/content/show.php/kmando?content=47105
En http://www.distromania.com/distro_info.php?distro=1139 puedo tomar ideas para TMLinux_edu
--Hay que preparar el sitio de internet tmlinux.com e inscribir la distribución en la comunidad de PCLinuxOs, distrowatch y distromania
Falta instalar tracker como buscador de escritorio. Parece ser que PCLinux no lo incluye.
Strigi funciona, pero no es muy intuitivo.
--Definitivamente hay que cambiar el fondo de escritorio y los temas del manejador de ventanas
PCLinux usa un grub modificado con gfxboot para cargar el menu de inicio. Se puede encontrar el directorio buscando archivos *.pcx en /usr
el procedimiento para crear imágenes para esta versión de grub lo encontramos en:
http://ubuntuforums.org/showthread.php?t=208855
y se resume como sigue:
mkdir /home/name/whatever
cpio -i < /boot/grub/message.suse # replace it by the name of you message
editar las imágenes (con Krita porque con GIMP ya no se muestran al arranque)
sudo ls . |cpio -o > /boot/grub/message.new
para cambiar pantalla de inicio usar draksplash o en el panel de control->arranque->select a graphical theme to use during boot
para encontrar las imágenes que se usan actualmente hay que buscar en /usr/share/bootsplash
Auí se explican algunas herramientas que pueden ser útiles
http://mandrivausers.org/index.php?showtopic=677
para cambiar la pantalla anunciadora se usa el centro de control de kde. En un principio podría ser bueno usar el más sencillo
para cambiar el fondo en la pantalla de registro de kde también se hace en el centro de control kde->administración del sistema->gestor de acceso
para cambiar el tema de kdm en el centro de control kde->administración del sistema->manejador del tema de kdm
Agregar http://thetechnologyteacher.wordpress.com/vncthumbnailviewer/ a metapaquete educativo
--Modificar la barra de marcadores de firefox
Vínculos para agregar extensiones de firefox con confirmación de aceptación de licencia
Se puede usar CLEO para empaquetar las extensiones
http://customsoftwareconsult.com/extensions/cleo/cleo.html
--Y se complementa con apt-get install mplayerplugin vlcplugin para ver videos de stage6 con mplayer
--Vinculo o guión para instalar skype
--Configurar streamtuner para usar amarok en lugar de xmms
--cambiar color a TMLinux 2008
--borrar el cache de firefox en cuenta visitante
--para que la instalación sea en español hay que modificar el archivo draklive-install
--copiar archivos de visitante a skeleton
eliminar de desktop el vínculo de instalación de TMLinux para que no aparezca en cada cuenta
--Y también la carpeta TMLinux que debo reubicar con los docs
--Dejar preparada la instalación de impresoras
--En versión DVD incluir compiz-fusion
modificar girar cubo->activar mover al alcanzar borde
activar expo
activar window previews
activar splash
desactivar amplir escritorio y activar enhanced zoom
activar shift switcher para todas las ventanas
modificar escalar y conmutador de aplicaciones para que funcionen con todas las aplicaciones
--Hay que instalar KIM para KDE (operaciones con imágenes a través de imagemagick)
--Falta instalar un programa para extraer canciones de CD (kaudiocreator, porque grip no funciona bien)
--Y dejar funcionando Netapplet al iniciar
burjans
Equipo de TMLinux, me agrada mucho saber que alguien ha encontrado el camino, asi mismo lo dejaré saber en mi sitio web www.com-sl.org en una pronta publicación, ya estaba perdiendo las esperanzas de encontrar una distro como PCLinuxOS para el usuario de habla hispana, trataré (y siempre véanlo asi) de hacer críticas constructivas en aras de que se puedan solucionar problemas que sean de ayuda para todo aquel que se decida a usar Linux, es bueno que Linux piense en el usuario, mientras no sea asi Windows siempre será el primero como lo ha demostrado.
He encontrado esta dirección de email en este sitio http://tmlinux.posterous.com/
Bueno me gustaria sugerir algunas cositas por el momento:
- cambiar Pidgin y aMSN por Empathy
hasta tanto Pidgin incorpore como seguro lo hará en un futuro mas soporte de Webcam para otros protocolos, hay un artículo en mi sitio web
- crear un LiveCD ademas de un LiveDVD
en países como Cuba no todas las computadoras tienen lector de DVD y el ancho de banda no es óptimo como para descargar un DVD
- crear Wallpaper a la altura de la distribución
pueden crear concursos de diseño de Wallpaper para la distribución
les deseo éxitos
salu2
==============
nmap -sP -T Insane 192.168.1.1-254
(http://www.commandlinefu.com/commands/view/1386/ping-a-range-of-addresses)
Versión 0
Ayuda de entrada
Sitio internet / traducción de wiki
Instalación de metapaquetes básicos: juegos, aplicaciones educativas
--------DVD
Videos demostrativos básicos
Paquete interactivo (proyector, control remoto)
Versión 1
Elementos gráficos de arranque
Selección de fondos de escritorio
Traducción de instaladores
Ayuda remota
Cuentas para aplicaciones educativas
--------DVD
Videos demostrativos intermedios
Versión 2
Servidor educativo
Clientes ligeros
Versión 3
Metapaquete cibercafés
--------DVD
Videos demostrativos avanzados
Versión 4
Metapaquete pymes
Versión 5
Metapaquete Centro Multimedios
Cuando se usa Dolphin en KDE 4.3 para navegar por carpetas con muchos videos se generan procesos kio_thumbnail que consumen una gran cantidad de memoria, aproximadamente 20MB por cada archivo de video.
Para prevenir que esto suceda es necesario desactivar en Dolphin las vistas previas de videos (preferencias->general->previsualizaciones) y cerrar el panel de información que aparece a la derecha de la ventana de Dolphin (también se puede activar y desactivar con F11) .
(http://www.pclinuxos.com/forum/index.php/topic,65075.0.html)
Davox nos reporta un problema con Evolution al tratar de instalarlo en TMLinux 0.4. El programa no alcanza a iniciar y manda un mensaje de error al no encontrar un archivo de libnss3.
Para corregir este problema se instalan libnss3 y libnspr4
Evolution funciona bien probando con una instalación hecha desde TMLinux 0.3.1 y completamente actualizada.
Han aparecido problemas de desconexión de dispositivos USB 2.0 al usarlos con TMLinux 0.4.1, y el nuevo initrd "escopeta". Probablemente el problema sólo se presente al instalar algunos metapaquetes.
Probablemente estén relacionados con lo que se menciona aquí:
http://hack.mypclinuxos.com/index.php?action=printpage;topic=602.0
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/88746
Se pueden usar los dispositivos desactivando USB 2.0 con el comando
modprobe -r ehci_hcd
El problema es que al usar UBS 1.x la velocidad de transmisión de datos se hace muuuuuuuy lenta.
Otra solución es cambiar el orden de carga del módulo ehci_hcd modificando la siguiente línea en /etc/modprobe.conf:
install usb-interface /sbin/modprobe uhci_hcd; /sbin/modprobe ehci_hcd; /bin/true
para que quede así:
install usb-interface /sbin/modprobe ehci_hcd; /sbin/modprobe uhci_hcd; /bin/true
Aunque todavía parece haber fallas eventuales al usar este método y falta probar si no hay efectos adversos en dispositivos USB 1.0
El programa de instalación de impresoras de TMLinux 0.4.1 no puede descargar automáticamente el firmware para la impresora.HP LaserJet 1020
Como solución temporal se puede usar la publicada en
http://foo2zjs.rkkda.com/INSTALL
TMLinux aparece en los siguientes sitios de PCLinux:
http://www.mypclinuxos.com/doku.php/tmlinux
http://www.pclinuxos.com/index.php?option=com_content&task=view&id=37&Itemid=89 (esperando autorización)
Para llegar al mayor número de usuarios de Linux posible se envían noticias a los siguientes sitios:
cofradia.org
http://www.capotanet.com/
http://www.linuxparatodos.net
http://www.codigolibre.org/
http://glo.org.mx
http://gulco.org/
http://usoli.org/
http://gul-reynosa.sie-group.net/
vivalinux.com.ar
http://pclinuxos.es/foro/
y la lista de grupos de usuarios en México
http://www.gultab.org/wiki/doku.php?id=guls_mexico
y algunos más
http://www.linux-magazine.es/Readers/Usergroups
http://www.linux.org/groups/
linuxmexico.org.mx
http://mx.planetalinux.org/
linuxman
http://www.pinguinos.org.mx/
Para tener difusión con usuarios de computación en general se envían noticias o boletines a:
www.enchilame.com
for name in larry moe schemp; do useradd $name; echo 'password' | passwd --stdin $name; chage -d 0 $name; done
(http://www.commandlinefu.com/commands/view/1490/quickly-add-user-accounts-to-the-system-and-force-a-password-change-on-first-login)
gunzip -c /var/log/auth.log.*.gz | cat - /var/log/auth.log /var/log/auth.log.0 | grep "Invalid user" | awk '{print $8;}' | sort | uniq -c | less
(http://www.commandlinefu.com/commands/view/1328/quickly-find-a-count-of-how-many-times-invalid-users-have-attempted-to-access-your-system)
En ocasiones una actualización de ciertos paquetes o del núcleo deja sin funcionar la función de deslizamiento (scrolling) del sensor táctil (touchpad) de una computadora portátil.
Para solucionar esto hay que introducir lo siguiente en la sección correspondiente del xorg.conf, normalmente mouse2 o synapticsmouse
Driver "synaptics"
Option "SHMConfig" "on"
y comentar los datos anteriores para que queden así
# Driver "evdev"
# Option "product" "0x0006"
# Option "vendor" "0x0002"
# Option "HWheelRelativeAxisButtons" "7 6"
En caso de que no funcione el sensor táctil hay que renombrar la copia de respaldo del archivo xorg.conf para restablecer su funcionamiento
Mencoder makes it easy to trim the end or the beginning of a file, or split it in several parts.
Start from...
mencoder -ss 01:30:24 -oac copy -ovc copy in.avi -o out.avi
Replace 01:30:24 (1 hour, 30 minutes, 24 seconds) with the desired start time position.
End at...
mencoder -endpos hh:mm:ss -ovc copy -oac copy in.avi -o out.avi
Replace 00:45:00 (45 minutes) with the desired end position.
Split the movie
With the two commands above, you can for example split a movie in two bits:
mencoder -endpos 01:00:00 -ovc copy -oac copy movie.avi -o first_half.avi
mencoder -ss 01:00:00 -oac copy -ovc copy movie.avi -o second_half.avi
Replace 01:00:00 (1 hour) with the time when you want the split to occur.
===============
También se puede extraer una parte de un video especificando el inicio y el final. Por ejemplo:
mencoder -ss 01:00:00 -endpos 01:10:00 -oac copy -ovc copy video.avi -o parte_del_video.avi
La orden anterior extrae diez minutos del archivo video.avi a partir de 1 hora 0 minutos, hasta 1 hora 10 minutos.
(http://www.misterhowto.com/index.php?category=Computers&subcategory=Video&article=trim_or_split_with_mencoder)
1) Inserta un CDenVivo de Linux y arranca la máquina con el GRUB perdido.
2) Abre una terminal.
3) Ahora para recuperar el grub tenemos que proceder a escribir los siguentes comandos en el terminal.
sudo grub (Para entrar en modo grub.)
find /boot/grub/stage1 (Esto buscará la partición de arranque. Nos dará un resultado el cual tenemos que copiar para el siguiente comando.)
root (hd0,0) (Reemplaza hd0,0 por el valor obtenido en el comando anterior.)
setup (hd0) (Esto instalará el grub.)
quit (Para salir.)
Con esto, la próxima vez que reiniciemos, tendremos nuestro querido grub y podremos accesar a nuestro Linux de nuevo.
(http://gabuntu.wordpress.com/2008/12/30/recuperando-el-grub-despues-de-instalar-windows/)
Hay que utilizar esta dirección para ed2k:
http://www.gruk.org/server.met.gz
y esta otra para kad:
http://download.tuxfamily.org/technosalad/utils/nodes.dat
VMware® disk types are files with the extension .vmdk (dot vmdk). Shrinking vmdk files (shrink vmdk) can be accomplished with VMware's built-in VMware Tools. VMware Tools has a shrink facility built-in which can be used on a dynamically expanding disk type (disk space is not pre-allocated for this virtual disk type and can be reclaimed). To do so go to the Windows Control Panel, open VMware Tools then click the Shrink tab.
Shrinking is a two-step procedure.
Step 1: When you click "Prepare to shrink" the tools utility launches a program which fills the free-space on the entire disk with zero filled files named wiper0, wiper1, wiper2, etc, until the entire disk is filled. These "wiper" files are then deleted at the conclusion of the process and the free-space is reclaimed.
Step 2: At the conclusion of shrink preparation you will be presented with a dialog which asks if you would like to shrink your disk(s). If you answer yes to this prompt VMware Tools essentially creates a new disk with the same partition characteristics as the existing disk and simply writes contents of the existing disk into the new disk and at the conclusion of the process it deletes the old disk, renames the new disk and makes it current.
http://www.invirtus.com/content/view/65/1/
Algunos programas pueden consumir excesivos recursos si se dejan funcionando en forma contínua, o pueden ser tan inestables que se cierren espontáneamente.
Para poderlos utilizar durante largos períodos de tiempo es necesario reiniciarlos.
En este caso utilizo un guión para reiniciar amule:
--------------------- aquí empieza mulita.sh
#!/bin/bash
job_cnt=`ps -e -o pid,args |grep amule |grep -v grep|wc -l`
# job_cnt almacena el número de procesos con el nombre 'amule'
if [ ${job_cnt} -eq 0 ] ; then
# no se está ejecutando, iniciar amule
env DISPLAY=:0.0 /usr/bin/amule
# env DISPLAY=:0.0 permite arrancar una aplicación gráfica desde un guión
else
# se está ejecutando, detener y reiniciar amule
killall -9 amule
# envía la señal 'kill' a cada proceso de nombre 'amule'
sleep 10
env DISPLAY=:0.0 /usr/bin/amule
fi
exit
---------------------- Aquí termina mulita.sh
Se puede usar con cron para reiniciar cada hora con el siguiente archivo:
------------ El crontab inicia aquí
# /etc/cron.d/mulita: datos de crontab para el guión mulita.sh
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 * * * * usuario /trayectoria/mulita.sh > /dev/null
------------ El crontab termina aquí
Si no se usa knoppix/debian se debe quitar el usuario
0 * * * * /trayectoria/mulita.sh > /dev/null
Si un programa es inestable podemos reiniciarlo tan pronto se cierra utilizando lo siguiente en un guión bash:
while true; do nombre_del_programa; done
Reinstalar GRUB en el MBR
A veces cuando uno toca lo que no debe o bien porque instala sistemas operativos que no respetan para nada el actual MBR (Master Boot Record) y el resultado es que intentas arrancar y es imposible, o bien te arranca Windows :-P Últimamente he tenido que reinstalar GRUB en el arranque de varias máquinas (incluido mi portátil ayer), nunca me acuerdo y siempre tengo que acudir a GOOGLE a mirarlo, así que lo comento aquí como breve apunte (por si además le sirve a alguien):
Arrancar con una Live-CD que disponga de GRUB.
Ejecutar grub y en el intérprete de comandos de GRUB:
root (hd0,1) # en mi caso /dev/hda2
setup (hd0) # /dev/hda
quit
Y listos, ya podemos reiniciar (sacando el Lice CD :-P) y tendremos el menú de GRUB tal cual lo teníamos antes de liarla.
http://bloc.balearweb.net/post/18/3443
Si tenemos una computadora con una nueva instalación de Knoppix/Debian y queremos agregar los programas que tenemos en otro equipo hay que comparar el /var/lib/dpckg/status de la nueva computadora con el /var/lib/dpckg/status-old de la computadora donde están instalados los programas que deseamos utilizar
diff status status-old | grep Package: > diferencias
De esta forma en el archivo diferencias tenemos un listado de los programas que deseamos instalar
A partir de este punto podemos usar apt-get install
==================================================
Si la versión de Knoppix es la misma se puede exportar la lista de programas de dpkg de una computadora e importarla en la otra con los comandos
dpkg --get-selections > package.list (en la maquina fuente)
y
dpkg --set-selections < package.list (en la maquina destino)
apt-get dselect-upgrade
Si tenemos una computadora con una nueva instalación de Knoppix/Debian y queremos agregar los programas que tenemos en otro equipo hay que comparar el /var/lib/dpckg/status de la nueva computadora con el /var/lib/dpckg/status-old de la computadora donde están instalados los programas que deseamos utilizar
diff status status-old | grep Package: > diferencias
De esta forma en el archivo diferencias tenemos un listado de los programas que deseamos instalar
A partir de este punto podemos usar apt-get install
Si al instalar vmware-player sobre un kernel mayor a 2.6.20 marca un error, entonces se utiliza la actualización más reciente de vmware-any-any-updatexxx.tar.gz, donde xxx es el mayor número disponible.
Al 29/08/2007 se podía descargar la 113 desde http://knihovny.cvut.cz/ftp/pub/vmware/
Una vez descargada se descomprime y como superusuario se ejecuta runme.pl
mencoder -ovc copy -nosound input.avi -o output.avi
Remove sound from input video file, output video stream is copied from input video stream, with no audio.
(http://www.commandlinefu.com/commands/view/3490/remove-sound-from-video-file-using-mencoder)
Find all files named dsc000* and rename them to c2004* and make the new filename all lowercase
find . -name "dsc000*" | sed -e "s/\(dsc000\)\(.*\)/\1\2 c2004\2/" | awk ' { print $1" "tolower($2) } ' | xargs -n2 mv
Se usa el comando
dosfsck /dev/hda1
donde hda1 se sustituye por la partición que se quiera reparar
In this short how-to I will show how to easily replace the default KMenu from KDE 4.2 using some other icons, from kde-look.org for example.
First of all, the KMenu icons can be found under the name start-here-kde.png and are located by default in the following directories (for the Oxygen theme):
$ find /usr -name *start-here-kde*
/usr/share/icons/oxygen/128x128/places/start-here-kde.png
/usr/share/icons/oxygen/64x64/places/start-here-kde.png
/usr/share/icons/oxygen/48x48/places/start-here-kde.png
/usr/share/icons/oxygen/22x22/places/start-here-kde.png
/usr/share/icons/oxygen/16x16/places/start-here-kde.png
/usr/share/icons/oxygen/32x32/places/start-here-kde.png
If you have some other theme selected, replace oxygen with it. Next, download a set of KMenu icons, for example you can try with this one from kde-look.org.
Then, replace all the start-here-kde.png icons inside those directories I mentioned above.
Next, open System Settings, go to Appearance and select the Icons tab. Change the icon theme to something else, then change it back. The KMenu should be now replaced.
(http://tuxarena.blogspot.com/2009/04/tip-of-day-replace-kmenu-icon-in-kde-42.html)
Buena sorpresa me llevé tratando de ver un DVD de Disney en TMLinux. Estos discos cuentan con una configuración especial que supuestamente dificulta su reproducción ilegal.
Tan buen trabajo hicieron con esta "protección" que en muchos casos tampoco se pueden reproducir de forma legal. Inclusive hay documentados algunos casos de reproductores DVD de marca Disney que no pueden reproducir los DVD Disney.
Afortunadamente hay una forma de reproducir estos discos en Linux e inclusive crear copias de respaldo.
Para verlos se puede utilizar VLC con menúes de navegación de DVD. Y con la opción reproducción del menú principal para ver cual es el título que se está reproduciendo. En ocasiones hay que instalar por separado el conector de VLC para usar el menú de los DVD
Esto nos servirá para crear un respaldo de la película ejecutando la siguiente orden en una terminal:
mplayer dvd://<título> -sb 4000000 -dumpstream -dumpfile nombre.vob
también se puede usar -ss hh:mm:ss para comenzar a respaldar a partir del tiempo especificado. Esto es útil para comenzar a respaldar después de un error.
Por supuesto hay que sustituir <título> con el número que encontramos gracias al menú de VLC.
El archivo nombre.vob puede reproducirse utilizando mplayer, VLC u otros programas multimedios. Además puede utilizarse la aplicación DeVede para grabar este archivo de respaldo en formato DVD, para utilizarse con reproductores caseros y mantener los DVD originales a salvo de rayaduras.
Otra opción es respaldar a un archivo mp4 con el comando
mencoder dvd://<titulo> -sb 4000000 -aid 130 -oac mp3lame -lameopts abr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=1750 -vf pp=de -o "nombre.avi"
[[How to reinstall GRUB on PCLinuxOS Share]]
[[Cómo utilizar archivos .docx con OpenOffice]]
[[Cómo copiar discos dañados con PCLinuxOS (y TMLinux)]]
[[Configurar el conector de Mplayer para Mozilla cuando los videos no cargan]]
[[Corregir hora de México en versiones viejas de Sidux]]
[[Activar usb bluetooth CSR en TMLinux]]
[[kinit no reconoce partición de intercambio]]
[[VirtualBox manda error al cambiar de kernel y utilizar las configuraciones anteriores]]
[[Utilizar Palm Zire con Sidux]]
[[Reinstalar vmware-player en Sidux con kernel > 2.6.20]]
[[Agregar sonido a Pidgin en Debian]]
[[Otra forma de reinstalar GRUB en el MBR]]
[[Error al usar kde su en Knoppix 5.1.1]]
[[Automontar correctamente memorias USB en Knoppix 5.0.x]]
[[No terminan de descargarse archivos en amule (uso de filtros)]]
[[Habilitar sonido con JFM en OpenOffice Impress]]
[[Apt-get no encuentra la clave pública]]
[[Reinstalar GRUB en el MBR]]
[[Bloquear MSN Messenger]]
[[Reinstalar programas después de haber instalado una nueva distribución]]
[[No se pueden copiar archivos con acentos a DVDRAM]]
[[Cambiar el apuntador del ratón]]
[[Reiniciar un programa que se cierra inesperadamente]]
[[Abrir aplicación gráfica desde línea de comandos como un usuario diferente]]
[[Abrir aplicación gráfica desde un guión]]
[[No se pueden sobreescribir archivos al usar apt-get]]
mencoder dvd://<título> -alang es -ovc lavc -oac lavc -o output_file.avi
En algunos casos puede requerir la instalación de paquetes de codificación
apt-get update
apt-get install libavifile0.7 libaviplayavcodec0.7
Thank you very much for your help, I made the reverse connection of FreeNX with reverse ssh tunnel: FreeNX Server (Firewalled):
root@venus # ssh -l user_mars -R 2222:localhost:22 -f -N mars_domain.org
PC-Mars must have ssh server open and accesible, then in PC-Mars we can connect with a NX client to localhost port 2222 and "magic", reverse connection made.
(http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_ReverseConnections)
curl -u username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if /<name>/; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
or
curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p"
(http://www.commandlinefu.com/commands/view/3386/check-your-unread-gmail-from-the-command-line)
El robot ligero XMPP puede tenerte al tanto de como se actualizan las olas (waves) de un proyecto. Para usarlo, agrega el robot a tus contactos (su identificación es wave-xmpp@appspot.com), y luego añade el mismo contacto a tu lista del mensajero instantáneo. Incluye el robot en cualquier ola de la que quieras recibir notificaciones, y oprime el botón Suscribirse.
bash -x script.sh 2> log
(http://www.commandlinefu.com/commands/view/2384/run-a-bash-script-in-debug-mode-show-output-and-save-it-on-a-file)
while read server; do ssh -n user@$server "command"; done < servers.txt
(http://www.commandlinefu.com/commands/view/3242/how-to-run-a-command-on-a-list-of-remote-servers-read-from-a-file)
./my-really-long-job.sh && notify-send "Job finished"
You will need libnotify-bin for this to work:
$ sudo aptitude install libnotify-bin
(http://www.commandlinefu.com/commands/view/2119/run-a-long-job-and-notify-me-when-its-finished)
php -r 'echo strtotime("2009/02/13 15:31:30")."\n";'
(http://www.commandlinefu.com/commands/view/1639/run-php-code-inline-from-the-command-line)
espeak -ves -p10 ?hola,amigo,Soy,Tu,Computadora,y,Puedo,Hablar
Es necesario escribir una coma después de cada palabra, esto es para que el sistema entienda que tiene que separar las palabras.
También puedes cambiar el idioma modificando -ves, por ejemplo si quieres que hable en ingles escribe "-ven"
También podemos escribir un archivo".txt" y cargarlo en el programa:
así:
espeak -ves-la -f /home/usuario/carpetaX/archivo.txt
asi es para grabar lo que dice en formato wav
espeak -ves-la -w nombredelarchivo.wav "texto a leer con comillas"
para la velocidad modifica el valor de -s
así:
espeak -ves-la -s125 "texto a leer con todo y comillas"
(http://tecnoubuntu.wordpress.com/2010/01/16/linux-habla/)
"Save Markings" in the File menu of Synaptic creates a file that notes all the package names—everything—you have installed in your current setup, and can be loaded easily into Synaptic on your next install for automated re-installation. It's a nifty time saver, but it likely works best on re-installations of the same OS version—package names can sometimes change across upgrades, though the worst that would likely happen would be an error message and some manual searching/downloading after that.
(http://lifehacker.com/5146028/save-synaptic-markings-to-speed-up-ubuntu-reinstallatoin)
Reader Blake writes in with his method for quickly making a copy of the last flash video you watched in your browser.
Whenever you watch a flash video in your browser, the entire video is buffered to your hard drive, and stored in a temporary folder. You can then make a copy of the flash video by browsing through your temp folder manually, but Blake has automated this with a shell script that prompts you for a friendly name, and then automatically saves the video to your ~/Videos folder.
To re-create this for yourself, create a new shell script and paste in the following:
#!/bin/bash
name=$(/usr/bin/zenity --entry --title="Name your Video" --height=100 --width=300 --text="Please name your video ")
cp /tmp/Fla* ~/Videos/"$name"
Then you'll need to set the script as executable with the chmod command, adjusting for the name of your script:
sudo chmod 755 SaveFlashVideo.sh
Once you've completed these steps, just create a new launcher for your Gnome panel—and clicking it should display the dialog in the screenshot. Great job, Blake!
Update: You should make sure that the video is 100% loaded in your browser before attempting to make a copy, and this only works for a single video at a time.
(http://lifehacker.com/5206354/save-the-last-flash-movie-you-watched)
echo "foo" > /dev/tcp/192.168.1.2/25
this command will send a message to the socket 25 on host 192.168.1.2 in tcp.
works on udp and icmp
understand only IP address, not hostname.
on the other side (192.168.1.2), you can listen to this socket and test if you receive the message.
easy to diagnose a firewall problem or not.
http://www.commandlinefu.com/commands/view/3464/send-echo-to-socket-network
lsof -P -i -n
http://www.commandlinefu.com/commands/view/3542/show-apps-that-use-internet-connection-at-the-moment.-multi-language
alias myip='curl -s www.wieistmeineip.de | egrep -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"'
(http://www.commandlinefu.com/commands/view/1646/shows-your-wan-ip-when-youre-sitting-behind-a-router)
The solution? A simple-but-brilliant python script, posted in the Arch Linux forums. So we're absolutely clear on this, it's not written by me :) The author is Markus "Fightright" Verweyen, who also wrote a nice volume management script. He explains things rather nicely in his post, but I'll repeat the most important stuff:
* You need to have sudo and python installed
* You need to unpack the files available here. Personally, I just dumped them in my /home
* You need something like this in your /etc/sudoers file:
yourUserName ALL=(ALL) NOPASSWD:/sbin/shutdown
After that, it gets easy. On my system, I have linked a keyboard shortcut to /path/to/shutdown.py , and I also added an entry in the openbox menu. It looks very nice (it follows your gtk-theme), and very professional.
http://celettu.wordpress.com/2008/06/01/howto-graphical-logoutshutdownreboot-in-any-window-manager/
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD/MM/YYYY">><<mtslogin>> <<saveChanges>> <<mtsdownload>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
echo "You can simulate on-screen typing just like in the movies" | pv -qL 10
(http://www.commandlinefu.com/commands/view/4941/simulate-typing)
rsync -avz usuario@servidor.com.mx:trayectoria /trayectoria_destino
Por ejemplo
rsync -avz xxx@yyy.com.mx:public_html /media/hdd7/remoto
Tan sencillo o tan completo como lo quieras hacer
http://tm.com.mx/wikis/linux.php
/***
|''Name:''|SocialtextAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data to and from Socialtext Wikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com) and JeremyRuston (jeremy (at) osmosoft (dot) com)|
|''Source:''|http://www.martinswiki.com/#SocialtextAdaptorPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/SocialtextAdaptorPlugin.js|
|''Version:''|0.5.1|
|''Date:''|Feb 25, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.2.0|
Socialtext REST documentation is at:
http://www.eu.socialtext.net/st-rest-docs/index.cgi?socialtext_rest_documentation
***/
//{{{
if(!version.extensions.SocialtextAdaptorPlugin) {
version.extensions.SocialtextAdaptorPlugin = {installed:true};
function SocialtextAdaptor()
{
this.host = null;
this.workspace = null;
return this;
}
SocialtextAdaptor.mimeType = 'text/x.socialtext-wiki';
SocialtextAdaptor.serverType = 'socialtext';
SocialtextAdaptor.serverParsingErrorMessage = "Error parsing result from server";
SocialtextAdaptor.errorInFunctionMessage = "Error in function SocialtextAdaptor.%0";
SocialtextAdaptor.prototype.setContext = function(context,userParams,callback)
{
if(!context) context = {};
context.userParams = userParams;
if(callback) context.callback = callback;
context.adaptor = this;
return context;
};
SocialtextAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('GET',uri,data,contentType,username,password,callback,params,headers);
};
SocialtextAdaptor.doHttpPOST = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('POST',uri,data,contentType,username,password,callback,params,headers);
};
SocialtextAdaptor.fullHostName = function(host)
{
if(!host)
return '';
if(!host.match(/:\/\//))
host = 'http://' + host;
if(host.substr(-1) != '/')
host = host + '/';
return host;
};
SocialtextAdaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/\/$/,'') : '';
};
// Convert a page title to the normalized form used in uris
SocialtextAdaptor.normalizedTitle = function(title)
{
var n = title.toLowerCase();
n = n.replace(/\s/g,'_').replace(/\//g,'_').replace(/\./g,'_').replace(/:/g,'').replace(/\?/g,'');
if(n.charAt(0)=='_')
n = n.substr(1);
return String(n);
};
// Convert a Socialtext date in YYYY-MM-DD hh:mm format into a JavaScript Date object
SocialtextAdaptor.dateFromEditTime = function(editTime)
{
var dt = editTime;
return new Date(Date.UTC(dt.substr(0,4),dt.substr(5,2)-1,dt.substr(8,2),dt.substr(11,2),dt.substr(14,2)));
};
SocialtextAdaptor.prototype.openHost = function(host,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.host = SocialtextAdaptor.fullHostName(host);
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
SocialtextAdaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.workspace = workspace;
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
SocialtextAdaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '
ata/workspaces';
var uri = uriTemplate.format([this.host]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getWorkspaceListCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getWorkspaceListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getWorkspaceListCallback']);
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var list = [];
for(var i=0; i<info.length; i++) {
var item = {
title:info[i].title,
name:info[i].name,
modified:SocialtextAdaptor.dateFromEditTime(info[i].modified_time)
};
list.push(item);
}
context.workspaces = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.getTiddlerList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '
ata/workspaces/%1/pages?order=newest';//!! ? or ;
var uri = uriTemplate.format([this.host,this.workspace]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerListCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var list = [];
for(var i=0; i<info.length; i++) {
var tiddler = new Tiddler(info[i].name);
tiddler.modified = SocialtextAdaptor.dateFromEditTime(info[i].last_edit_time);
tiddler.modifier = info[i].last_editor;
tiddler.tags = info[i].tags;
tiddler.fields['server.page.id'] = info[i].page_id;
tiddler.fields['server.page.name'] = info[i].name;
tiddler.fields['server.page.revision'] = String(info[i].revision_id);
list.push(tiddler);
}
context.tiddlers = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var host = this && this.host ? this.host : SocialtextAdaptor.fullHostName(tiddler.fields['server.host']);
var workspace = this && this.workspace ? this.workspace : tiddler.fields['server.workspace'];
uriTemplate = '%0%1/index.cgi?%2';
info.uri = uriTemplate.format([host,workspace,SocialtextAdaptor.normalizedTitle(tiddler.title)]);
return info;
};
SocialtextAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
return this.getTiddlerRevision(title,null,context,userParams,callback);
};
SocialtextAdaptor.prototype.getTiddlerRevision = function(title,revision,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
// request the page in json format to get the page attributes
if(revision) {
var uriTemplate = '
ata/workspaces/%1/pages/%2/revisions/%3';
context.revision = revision;
} else {
uriTemplate = '
ata/workspaces/%1/pages/%2';
context.revision = null;
}
uri = uriTemplate.format([this.host,this.workspace,SocialtextAdaptor.normalizedTitle(title),revision]);
context.tiddler = new Tiddler(title);
context.tiddler.fields.wikiformat = 'socialtext';
context.tiddler.fields['server.host'] = SocialtextAdaptor.minHostName(this.host);
context.tiddler.fields['server.workspace'] = this.workspace;
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getTiddlerCallback']);
if(status) {
try {
eval('var info=' + responseText);
context.tiddler.tags = info.tags;
context.tiddler.fields['server.page.id'] = info.page_id;
context.tiddler.fields['server.page.name'] = info.name;
context.tiddler.fields['server.page.revision'] = String(info.revision_id);
context.tiddler.modifier = info.last_editor;
context.tiddler.modified = SocialtextAdaptor.dateFromEditTime(info.last_edit_time);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
return;
}
var uriTemplate = context.revision ? '
ata/workspaces/%1/pages/%2/revisions/%3' : '
ata/workspaces/%1/pages/%2';
var host = SocialtextAdaptor.fullHostName(context.tiddler.fields['server.host']);
var workspace = this && this.workspace ? this.workspace : context.tiddler.fields['server.workspace'];
uri = uriTemplate.format([host,workspace,SocialtextAdaptor.normalizedTitle(context.tiddler.title),context.revision]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerCallback2,context,{'accept':SocialtextAdaptor.mimeType});
};
SocialtextAdaptor.getTiddlerCallback2 = function(status,context,responseText,uri,xhr)
{
context.tiddler.text = responseText;
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.getTiddlerRevisionList = function(title,limit,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '
ata/workspaces/%1/pages/%2/revisions?accept=application/json';
if(!limit)
limit = 5;
var uri = uriTemplate.format([this.host,this.workspace,SocialtextAdaptor.normalizedTitle(title),limit]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerRevisionListCallback,context);
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerRevisionListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
list = [];
for(var i=0; i<info.length; i++) {
var tiddler = new Tiddler(info[i].name);
tiddler.modified = SocialtextAdaptor.dateFromEditTime(info[i].last_edit_time);
tiddler.modifier = info[i].last_editor;
tiddler.tags = info[i].tags;
tiddler.fields['server.page.id'] = info[i].page_id;
tiddler.fields['server.page.name'] = info[i].name;
tiddler.fields['server.page.revision'] = info[i].revision_id;
list.push(tiddler);
}
var sortField = 'server.page.revision';
list.sort(function(a,b) {return a.fields[sortField] < b.fields[sortField] ? +1 : (a.fields[sortField] == b.fields[sortField] ? 0 : -1);});
context.revisions = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.putTiddler = function(tiddler,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '
ata/workspaces/%1/pages/%2';
var host = this && this.host ? this.host : SocialtextAdaptor.fullHostName(tiddler.fields['server.host']);
var workspace = this && this.workspace ? this.workspace : tiddler.fields['server.workspace'];
var uri = uriTemplate.format([host,workspace,tiddler.title,tiddler.text]);
//var req = doHttp('POST',uri,tiddler.text,SocialtextAdaptor.mimeType,null,null,SocialtextAdaptor.putTiddlerCallback,context,{"X-Http-Method": "PUT"});
var req = SocialtextAdaptor.doHttpPOST(uri,SocialtextAdaptor.putTiddlerCallback,context,{"X-Http-Method": "PUT"},tiddler.text,SocialtextAdaptor.mimeType);
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.putTiddlerCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.close = function()
{
return true;
};
config.adaptors[SocialtextAdaptor.serverType] = SocialtextAdaptor;
} //# end of 'install only once'
//}}}
/***
|''Name:''|SocialtextFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[Socialtext|http://www.socialtext.com/]] text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#SocialtextFormatterPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/SocialtextFormatterPlugin.js|
|''Version:''|0.9.4|
|''Date:''|Jan 21, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.1.0|
This is the SocialtextFormatterPlugin, which allows you to insert Socialtext formated text into a TiddlyWiki.
The aim is not to fully emulate Socialtext, but to allow you to work with Socialtext content off-line and then resync the content with your Socialtext wiki later on, with the expectation that only minor edits will be required.
To use Socialtext format in a Tiddler, tag the Tiddler with SocialtextFormat or set the tiddler's {{{wikiformat}}} extended field to {{{socialtext}}}
Please report any defects you find at http://groups.google.co.uk/group/TiddlyWikiDev
***/
//{{{
// Ensure that the SocialtextFormatter Plugin is only installed once.
if(!version.extensions.SocialtextFormatterPlugin) {
version.extensions.SocialtextFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('SocialtextFormatterPlugin requires TiddlyWiki 2.1 or later.');}
SocialtextFormatter = {}; // 'namespace' for local functions
wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source != '') {
var w = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
var out = output;
if(tiddler && (tiddler.isTagged(config.parsers.socialtextFormatter.formatTag) || (tiddler.fields.wikiformat==config.parsers.socialtextFormatter.format)) ) {
var d1 = createTiddlyElement(output,'div','content-display-body','content-section-visible');
var d2 = createTiddlyElement(d1,'div','wikipage');
out = createTiddlyElement(d2,'div',null,'wiki');
}
var time1,time0 = new Date();
w.subWikifyUnterm(out);
if(tiddler && config.options.chkDisplayInstrumentation) {
time1 = new Date();
var t = tiddler ? tiddler.title : source.substr(0,10);
displayMessage("Wikify '"+t+"' in " + (time1-time0) + " ms");
}
}
};
stDebug = function(out,str)
{
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement(out,'br');
};
SocialtextFormatter.Tiddler_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
if((this.fields.wikiformat==config.parsers.socialtextFormatter.format) || this.isTagged(config.parsers.socialtextFormatter.formatTag)) {
// update the links array, by checking for Socialtext format links
this.links = [];
var tiddlerLinkRegExp = /(?:\"(.*?)\" ?)?\[([^\]]*?)\]/mg;
tiddlerLinkRegExp.lastIndex = 0;
var match = tiddlerLinkRegExp.exec(this.text);
while(match) {
var link = match[2];
this.links.pushUnique(link);
match = tiddlerLinkRegExp.exec(this.text);
}
}/* else {
return SocialtextFormatter.Tiddler_changed.apply(this,arguments);
}*/
this.linksUpdated = true;
};
SocialtextFormatter.wafl = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var lm2 = lookaheadMatch[2];
switch(lookaheadMatch[1]) {
case 'image':
var img = createTiddlyElement(w.output,'img');
img.src = w.tiddler.title + '/' + lm2;
createTiddlyText(img,lm2);
break;
case 'file':
var s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var a = createTiddlyElement(s,'a');
a.href = w.tiddler.title + '/' + lm2;
createTiddlyText(a,lm2);
break;
case 'link':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createTiddlyElement(s,'a');
var t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('href','#' + t + lm2);
a.title = 'section link';
createTiddlyText(a,lm2);
break;
case 'weblog':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var text = lm2;
var link = 'Weblog: ' + lm2;
createTiddlyText(createTiddlyLink(s,link,false,null,w.isStatic),text);
break;
case 'section':
a = createTiddlyElement(w.output,'a');// drop anchor
t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('name',t + lm2);
break;
case 'date':
createTiddlyText(w.output,lm2);
break;
case 'user':
var oldSource = w.source;
w.source = lm2;
w.nextMatch = 0;
w.subWikifyUnterm(w.output);
w.source = oldSource;
break;
// Shortcut expansions - not strictly syntax
case 'google':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://www.google.com/search?q='+lm2);
createTiddlyText(a,lm2);
break;
case 'fedex':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://www.fedex.com/Tracking?tracknumbers='+lm2);
createTiddlyText(a,lm2);
break;
case 'map':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://maps.google.com/maps?q='+lm2);
createTiddlyText(a,lm2);
break;
case 'wikipedia':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://en.wikipedia.org/wiki/'+lm2);
createTiddlyText(a,lm2);
break;
case 'rt':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://rt.socialtext.net/Ticket/Display.html?id='+lm2);
createTiddlyText(a,lm2);
break;
case 'stcal':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'https://calendar.socialtext.net:445/view_t.php?timeb=1&id=3&date='+lm2);
createTiddlyText(a,lm2);
break;
case 'svn':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'https://repo.socialtext.net/listing.php?rev='+lm2+'sc=1');
createTiddlyText(a,lm2);
break;
default:
w.outputText(w.output,w.matchStart,w.nextMatch);
return;
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
SocialtextFormatter.presence = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var p = lookaheadMatch[1];
var text = lookaheadMatch[2];
var link;
var src;
if(p=='aim') {
link = 'aim:goim?screenname=' + text + '&message=hello';
src = 'http://big.oscar.aol.com/sleepleft?on_url=http://www.aim.com/remote/gr/MNB_online.gif&off_url=http://www.aim.com/remote/gr/MNB_offline.gif';
} else if(p=='yahoo'||p=='ymsgr') {
link = 'ymsgr:sendIM?'+text;
src = 'http://opi.yahoo.com/online?u=chrislondonbridge&f=.gif';
} else if(p=='skype'||p=='callto') {
link = 'callto:'+text;
src = 'http://goodies.skype.com/graphics/skypeme_btn_small_green.gif';
} else if(p=='asap') {
link = 'http://asap2.convoq.com/AsapLinks/Meet.aspx?l='+text;
src = 'http://asap2.convoq.com/AsapLinks/Presence.aspx?l='+text;
}
var s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var a = createExternalLink(s,link);
var img = createTiddlyElement(a,'img');
createTiddlyText(a,text);
img.src = src;
img.border='0';
img.alt = '(' + lookaheadMatch[1] + ')';
if(p=='aim') {
img.width='11'; img.height='13';
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
};
config.formatterHelpers.singleCharFormat = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[0].substr(lookaheadMatch[0].length-2,1) != ' ') {
w.subWikifyTerm(createTiddlyElement(w.output,this.element),this.termRegExp);
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
config.socialtext = {};
config.socialtext.formatters = [
{
name: 'socialtextHeading',
match: '^\\^{1,6} ?',
termRegExp: /(\n+)/mg,
handler: function(w)
{
var len = w.matchText.trim().length;
var e = createTiddlyElement(w.output,'h' + len);
var a = createTiddlyElement(e,'a');// drop anchor
var t = w.tiddler ? w.tiddler.title + ':' : '';
len = w.source.substr(w.nextMatch).indexOf('\n');
a.setAttribute('name',t+w.source.substr(w.nextMatch,len));
w.subWikifyTerm(e,this.termRegExp);
}
},
{
name: 'socialtextTable',
match: '^\\|(?:(?:.|\n)*)\\|$',
lookaheadRegExp: /^\|(?:(?:.|\n)*)\|$/mg,
cellRegExp: /(?:\|(?:[^\|]*)\|)(\n|$)?/mg,
cellTermRegExp: /((?:\x20*)\|)/mg,
handler: function(w)
{
var table = createTiddlyElement(w.output,'table');
var rowContainer = createTiddlyElement(table,'tbody');
var prevColumns = [];
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
var r = this.rowHandler(w,createTiddlyElement(rowContainer,'tr'),prevColumns);
if(!r) {
w.nextMatch++;
break;
}
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
},
rowHandler: function(w,e,prevColumns)
{
this.cellRegExp.lastIndex = w.nextMatch;
var cellMatch = this.cellRegExp.exec(w.source);
while(cellMatch && cellMatch.index == w.nextMatch) {
w.nextMatch++;
var cell = createTiddlyElement(e,'td');
w.subWikifyTerm(cell,this.cellTermRegExp);
if(cellMatch[1]) {
// End of row
w.nextMatch = this.cellRegExp.lastIndex;
return true;
}
// Cell
w.nextMatch--;
this.cellRegExp.lastIndex = w.nextMatch;
cellMatch = this.cellRegExp.exec(w.source);
}
return false;
}
},
{
name: 'socialtextList',
match: '^[\\*#]+ ',
lookaheadRegExp: /^([\*#])+ /mg,
termRegExp: /(\n+)/mg,
handler: function(w)
{
var stack = [w.output];
var currLevel = 0, currType = null;
var itemType = 'li';
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
var listType = lookaheadMatch[1] == '*' ? 'ul' : 'ol';
var listLevel = lookaheadMatch[0].length;
w.nextMatch += listLevel;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement(stack[stack.length-1],itemType);
w.subWikifyTerm(e,this.termRegExp);
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'socialtextQuoteByLine',
match: '^>+',
lookaheadRegExp: /^>+/mg,
termRegExp: /(\n)/mg,
element: 'blockquote',
handler: function(w)
{
var stack = [w.output];
var currLevel = 0;
var newLevel = w.matchLength;
var i;
do {
if(newLevel > currLevel) {
for(i=currLevel; i<newLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],this.element));
}
} else if(newLevel < currLevel) {
for(i=currLevel; i>newLevel; i--) {
stack.pop();
}
}
currLevel = newLevel;
w.subWikifyTerm(stack[stack.length-1],this.termRegExp);
createTiddlyElement(stack[stack.length-1],'br');
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
var matched = lookaheadMatch && lookaheadMatch.index == w.nextMatch;
if(matched) {
newLevel = lookaheadMatch[0].length;
w.nextMatch += newLevel;
}
} while(matched);
}
},
{
name: 'socialtextRule',
match: '^----+$\\n+',
handler: function(w)
{
createTiddlyElement(w.output,'hr');
}
},
{
name: 'socialtextPreformatted',
match: '^\\.pre\\s*\\n',
lookaheadRegExp: /^.pre\s*\n((?:.|\n)*?)\n.pre\s*\n/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'socialtextHtml',
match: '^\\.html',
lookaheadRegExp: /\.html((?:.|\n)*?)\.html/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
createTiddlyElement(w.output,'span').innerHTML = lookaheadMatch[1];
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'macro',
match: '<<',
lookaheadRegExp: /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*)>>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[1]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
invokeMacro(w.output,lookaheadMatch[1],lookaheadMatch[2],w,w.tiddler);
}
}
},
{
name: 'socialtextExplicitLink',
match: '(?:".*?" ?)?\\[',
lookaheadRegExp: /(?:\"(.*?)\" ?)?\[([^\]]*?)\]/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var link = lookaheadMatch[2];
var text = lookaheadMatch[1] ? lookaheadMatch[1] : link;
createTiddlyText(createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler),text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextExternalLink',
match: '(?:".*?" ?)?<[a-z]{2,8}:',
lookaheadRegExp: /(?:\"(.*?)\" ?)?<([a-z]{2,8}:.*?)>/mg,
imgRegExp: /\.(?:gif|ico|jpg|png)/g,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var link = lookaheadMatch[2];
var text = lookaheadMatch[1] ? lookaheadMatch[1] : link;
this.imgRegExp.lastIndex = 0;
if(this.imgRegExp.exec(link)) {
var img = createTiddlyElement(w.output,'img');
if(lookaheadMatch[1]) {
img.title = text;
}
img.alt = text;
img.src = link;
} else {
createTiddlyText(createExternalLink(w.output,link),text);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},
{
name: 'socialtextBold',
match: '\\*(?![\\s\\*])',
lookaheadRegExp: /\*(?!\s)(?:.*?)(?!\s)\*(?=[$\s\|\._\-,])/mg,
termRegExp: /((?!\s)\*(?=[$\s\|\.\-_,]))/mg,
element: 'strong',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextItalic',
match: '_(?![\\s_])',
lookaheadRegExp: /_(?!\s)(?:.*?)(?!\s)_(?=[$\s\|\.\*\-,])/mg,
termRegExp: /((?!\s)_(?=[$\s\|\.\*\-,]))/mg,
element: 'em',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextStrike',
match: '-(?![\\s\\-])',
lookaheadRegExp: /-(?!\s)(?:.*?)(?!\s)-(?=[$\s\|\.\*_,])/mg,
termRegExp: /((?!\s)-(?=[$\s\|\.\*_,]))/mg,
element: 'del',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextMonoSpaced',
match: '`(?![\\s`])',
lookaheadRegExp: /`(?!\s)(?:.*?)(?!\s)`(?=[$\s\.\*\-_,])/mg,
termRegExp: /((?!\s)`(?=[$\s\.\*\-_,]))/mg,
element: 'tt',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextParagraph',
match: '\\n{2,}',
handler: function(w)
{
createTiddlyElement(w.output,'p');
}
},
{
name: 'socialtextLineBreak',
match: '\\n',
handler: function(w)
{
createTiddlyElement(w.output,'br');
}
},
{
name: 'socialtextNoWiki',
match: '\\{\\{',
lookaheadRegExp: /\{\{((?:.|\n)*?)\}\}/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'socialtextTrademark',
match: '\\{tm\\}',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = '™';
}
},
{
name: 'socialtextWafl',
match: '\\{(?:[a-z]{2,16}): ?.*?\\}',
lookaheadRegExp: /\{([a-z]{2,16}): ?(.*?)\}/mg,
handler: SocialtextFormatter.wafl
},
{
name: 'socialtextPresence',
match: '(?:aim|yahoo|ymsgr|skype|callto|asap):\\w+',
lookaheadRegExp: /(aim|yahoo|ymsgr|skype|callto|asap):(\w+)/mg,
handler: SocialtextFormatter.presence
},
{
name: 'socialtextMailTo',
match: '[\\w\.]+@[\\w]+\.[\\w\.]+',
lookaheadRegExp: /([\w\.]+@[\w]+\.[\w\.]+)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
createTiddlyText(createExternalLink(w.output,'mailto:'+text),text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = w.matchText;
}
}
];
config.parsers.socialtextFormatter = new Formatter(config.socialtext.formatters);
config.parsers.socialtextFormatter.format = 'socialtext';
config.parsers.socialtextFormatter.formatTag = 'SocialtextFormat';
} // end of 'install only once'
//}}}
Shotgun initrd images are published here
http://hack.mypclinuxos.com/initrd/
all that is needed is to rename the original image file in the hard drive installation's /boot directory, as root, by adding .org to the end of the name, then copy the appropriate "Shotgun" image to the /boot directory. This can all be done from the PCLOS/MiniMe (o TMLinux) live CD, logged in as root.
These images only work on a / partition formatted as ext3, as that is what was in use when the images were created.
(http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=46754.0;topicseen)
config.macros.allTags.noTags = "No hay tiddlers con etiquetas";
config.macros.allTags.tooltip = "Abrir tiddlers con la etiqueta ";
config.macros.closeAll.label = "cerrar todos";
config.macros.closeAll.prompt = "Cerrar todos los tiddlers que están abiertos (pero no los que están siendo redactados)";
config.macros.list.all.prompt = "Todos los tiddlers en orden alfabético";
config.macros.list.missing.prompt = "Tiddlers que tienen enlaces a ellos pero no existen";
config.macros.list.orphans.prompt = "Tiddlers que no tienen enlaces de ningún otro tiddler";
config.macros.newJournal.label = "nuevo diario";
config.macros.newJournal.months = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre","Diciembre"];
config.macros.newJournal.prompt = "Crear un nuevo tema con la fecha y hora actual";
config.macros.newTiddler.label = "nuevo tema";
config.macros.newTiddler.prompt = "Crear un nuevo tema";
config.macros.permaview.label = "permavista";
config.macros.permaview.prompt = "Enlace a un URL que muestra todos los temas que están abiertos";
config.macros.saveChanges.label = "guardar cambios";
config.macros.saveChanges.prompt = "Guardar todos los cambios a un archivo";
config.macros.search.label = "buscar";
config.macros.search.prompt = "buscar en este TiddlyWiki";
config.macros.search.successMsg = " tiddlers encontrados que tienen: ";
config.macros.search.failureMsg = "Ningún tiddler encontrado que tuviera: ";
config.macros.timeline.dateFormat = "DD MMM YYYY";
config.messages.backupFailed = "Falló al guardar el archivo de respaldo";
config.messages.backupSaved = "Archivo de respaldo guardado";
config.messages.cantSaveError = "No es posible guardar cambios con este navegador. Usa FireFox si puedes";
config.messages.customConfigError = "Error en customConfig - '%0' ";
config.messages.emptyFailed = "Falló al guardar una plantilla vacía";
config.messages.emptySaved = "Plantilla vacía guardada";
config.messages.externalLinkTooltip = "Enlace externo a %0 ";
config.messages.invalidFileError = "El archivo original no parece ser un TiddlyWiki: ";
config.messages.macroError = "Error ejecutando macro ";
config.messages.mainFailed = "Falló al guardar el archivo principal de TiddlyWiki. Tus cambios no han sido guardados";
config.messages.mainSaved = "Archivo principal de TiddlyWiki se guardó ";
config.messages.noTags = "No hay tiddlers etiquetados";
config.messages.notFileUrlError = "Necesitas guardar este TiddlyWiki a un archivo antes de que puedas guardar cambios";
config.messages.overwriteWarning = "Un tiddler llamado '%0' ya existe. Presiona OK para sobreescribirlo";
config.messages.rssFailed = "Falló al guardar archivo RSS";
config.messages.rssSaved = "Archivo RSS guardado";
config.messages.savedSnapshotError = "Parece que este TiddlyWiki ha sido guardado incorrectamente. Por favor vea el sitio TiddlyWiki para más detalles";
config.messages.subtitleUnknown = "(desconocido )";
config.messages.undefinedTiddlerToolTip = "'%0' aún no existe";
config.messages.unsavedChangesWarning = "¡ADVERTENCIA! Hay cambios que aún no han sido guardados\n\nPresiona OK para guardarlos\nPresiona CANCEL para perder los cambios";
config.messages.dates.months = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre","Diciembre"];
config.messages.dates.days = ["Domingo", "Lunes","Martes", "Miércoles", "Jueves", "Viernes", "Sábado"];
config.shadowTiddlers.OptionsPanel = "'Estas opciones para personalizar TiddlyWiki están guardadas en tu navegador'\n\n'Tu nombre de usuario para firmar tus textos. Escríbelo como una PalabraWiki (por ej., JuanBloggs)'\n<<option txtUserName>>\n<<option chkSaveBackups>> GuardaRespaldos\n<<option chkAutoSave>> AutoGuardar\n<<option chkGenerateAnRssFeed>> GenerarUnArchivoRSS\n<<option chkRegExpSearch>> BuscaRegExp\n<<option chkCaseSensitiveSearch>> BuscaSensitivoMayúscula\n<<option chkAnimate>> ActivarAnimaciones\n\n Vea las OpcionesAvanzadas";
config.shadowTiddlers.SideBarOptions = "<<gradient vert #ffffff #cc9900>><<search>><<closeAll>><<newJournal 'DD MMM YYYY'>><<newTiddler>><<permaview>><<mtslogin>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel opciones 'Contiene opciones que cambian la apariencia del TiddlyWiki'>>>>";
config.shadowTiddlers.SideBarTabs = "<<tabs txtMainTab Fecha 'Tiddlers cronológicamente' TabTimeline Título 'Tiddlers por título' TabAll 'Etiquetas' 'Tiddlers que estén etiquetados' TabTags 'Más' 'Más opciones' TabMore>>";
config.shadowTiddlers.TabMore = "<<tabs txtMoreTab 'Perdido' 'Tiddlers que no existen' TabMoreMissing 'Huérfanos' 'Tiddlers que no han sido enlazados por ningún otro tiddler' TabMoreOrphans>>";
config.shadowTiddlers.OpcionesAvanzadas = "<<option chkOpenInNewWindow>> AbreEnlacesEnVentanaNueva\n<<option chkSaveEmptyTemplate>> CreaPlantillaNueva\n<<option chkToggleLinks>> Hacer clic en enlaces a tiddlers que ya están abiertos, los cierran.\n^^(desactívalo con Control u otra tecla modificadora)^^\n<<option chkHttpReadOnly>> EscondaRedactando cuando abierto por HTTP\n<<option chkForceMinorUpdate>> Trata redactos como CambiosMinores y preserva la fecha y tiempo\n^^(desactívalo com la tecla Shift al hacer clik con el boton 'guardar' o por usando las teclas Ctrl-Shift-Enter^^";
config.views.editor.defaultText = "Escribe el texto para '%0'.";
config.views.editor.tagChooser.popupNone = "No hay etiquetas definidas";
config.views.editor.tagChooser.tagTooltip = "Agregar la etiqueta ";
config.views.editor.tagChooser.text = "etiquetas";
config.views.editor.tagChooser.tooltip = "Escoje etiquetas existente para añadir a este tiddler";
config.views.editor.tagPrompt = "Escribe etiquetas separadas con espacios, [[usa doble paréntesis cuadrado]] si es necesario, o escoje una existente ";
config.views.wikified.defaultText = "El tiddler '%0' no existe. Haz doble clic para crearlo.";
config.views.wikified.tag.labelTags = "Etiquetas: ";
config.views.wikified.tag.labelNoTags = "Sin etiquetas.";
config.views.wikified.tag.openAllText = "Abrir todos los tiddlers marcados con ";
config.views.wikified.tag.openAllTooltip = "Abrir todos estos tiddlers";
config.views.wikified.tag.popupNone = "No hay otro tiddlers marcado con '%0'";
config.views.wikified.tag.tooltip = "Abrir tiddlers marcados con ";
Para usar autentificación sin tener que escribir la contraseña
- Create a public key-pair for whichever user you are using on the local PC -
ssh-keygen -t rsa
- Give the user's public key to admin1@myServer -
ssh-copy-id -i .ssh/id_rsa.pub admin1@myServer
- ... admin1@myserver's password:XXXXXX # You must know admin1's password -
- The user can now automatically connect as admin1
ssh admin1@myServer
http://ubuntuforums.org/showthread.php?t=430312
ssh -f user@remote.ip DISPLAY=:0.0 smplayer movie.avi
Launch a gui app remotely. In this example smplayer is installed on the remote machine, and movie.avi is in the remote user's home dir. Note that stdout/stderr is still local, so you'll have feedback locally, add '&>/dev/null' to suppress. This is surprisingly not well known (compared to running an X app locally via ssh -X). (NB. if your distro requires ~/.Xauthority file present, then try -fX if you have problems)
Resubmitted (and trimmed, thanks sitaram) due to ridiculous voting on previous submission. Fingers crossed, it gets a better rating this time.
(http://www.commandlinefu.com/commands/view/3465/start-an-x-app-remotely)
mencoder -ovc copy -audiofile input.mp3 -oac copy input.avi -o output.avi
Creates a new video file with video stream copied from input file and a different audio stream
http://www.commandlinefu.com/commands/view/3491/substitute-audio-track-of-video-file-using-mencoder
Si ya sabes que es TMLinux y quieres empezar a utilizarlo de inmediato ve directamente a la seccion [[Inicio rapido]]
TMLinux es una distribución basada en PCLinuxOS, en español y con algunas de las aplicaciones más comunes de escritorio, oficina y multimedios.
Las diferencias principales de TMLinux con respecto a PCLinuxOS son la barra de ayuda, los metapaquetes, la ayuda remota, más activadores inalámbricos instalados, uniconvert para poder usar archivos de corel, el wiki incluido, escritorio openbox para usarlo con computadoras con poca memoria, los cambios estéticos y además en el DVD se incluyen más activadores de video y multimedios, escritorio Gnome, una buena cantidad de aplicaciones instaladas para efectos 3d, multimedios, juegos, programas educativos y fondos de escritorio adicionales.
El objetivo es contar con un Linux fácil de usar y que funcione para la mayoría de las aplicaciones cotidianas sin necesidad de hacer instalaciones o modificaciones complicadas
Esta disponible para su descarga en la siguiente dirección:
http://tmlinux.com/descargas.html
La idea es poder crear una distribución adecuada a las necesidades de la mayor parte de los usuarios de cómputo en países de habla hispana y que haga fácil migrar desde otros sistemas operativos mediante el uso de videos demostrativos de las principales aplicaciones y operaciones.
También está abierta la invitación a sumarse a este proyecto de desarrollo, que actualmente se encuentra en fase beta de la versión 0 y que espero poder llevar pronto al diseño de la versión 1, donde se definiría aspecto gráfico y metapaquetes, es decir, colecciones de aplicaciones para poder convertir a TMLinux en una instalación especializada.
Los planes incluyen [[Metapaquetes]] para los siguientes entornos:
Educativo
Pequeñas empresas
Cibercafés
Centro multimedios
Gráfico
Juegos y emuladores
También está en desarrollo un paquete interactivo de bajo costo que incluiría equipo de cómputo, TMLinux configurado con compiz, proyector y control remoto. Esta destinado como alternativa a las "aulas inteligentes" con pizarrones interactivos.
También esta pensado como un proyecto comercial de programación libre, donde los profesionales del ramo puedan sumarse en franquicias o esquemas similares y ofrecer servicios para Linux, especialmente en migraciones, capacitaciones, asesorías y desarrollos especializados.
Si deseas unirte a TMLinux o necesitas mayor información puedes escribir a tmlinux(arroba)tm.com.mx o en México hablar al 045 783 1173322 con Julio Poisot De María.
/***
|''Name:''|TWikiAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data to and from TWikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#TWikiAdaptorPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/TWikiAdaptorPlugin.js|
|''Version:''|0.5.1|
|''Date:''|Feb 25, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.2.0|
TWiki REST documentation is at:
http://twiki.org/cgi-bin/view/TWiki04/TWikiScripts
''For debug:''
|''Default TWiki Server''|<<option txttwikiDefaultServer>>|
|''Default TWiki Web(workspace)''|<<option txttwikiDefaultWorkspace>>|
|''Default TWiki username''|<<option txttwikiUsername>>|
|''Default TWiki password''|<<option txttwikiPassword>>|
***/
//{{{
if(!config.options.txttwikiDefaultServer)
{config.options.txttwikiDefaultServer = 'twiki.org';}
if(!config.options.txttwikiDefaultWorkspace)
{config.options.txttwikiDefaultWorkspace = 'Main';}
if(!config.options.txttwikiUsername)
{config.options.txttwikiUsername = '';}
if(!config.options.txttwikiPassword)
{config.options.txttwikiPassword = '';}
//}}}
//{{{
// Ensure that the plugin is only installed once.
if(!version.extensions.TWikiAdaptorPlugin) {
version.extensions.TWikiAdaptorPlugin = {installed:true};
function TWikiAdaptor()
{
this.host = null;
this.workspace = null;
// for debug
this.username = config.options.txttwikiUsername;
this.password = config.options.txttwikiPassword;
return this;
}
TWikiAdaptor.serverType = 'twiki';
TWikiAdaptor.serverParsingErrorMessage = "Error parsing result from server";
TWikiAdaptor.errorInFunctionMessage = "Error in function TWikiAdaptor.%0";
TWikiAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('GET',uri,data,contentType,username,password,callback,params,headers);
};
TWikiAdaptor.prototype.setContext = function(context,userParams,callback)
{
if(!context) context = {};
context.userParams = userParams;
if(callback) context.callback = callback;
context.adaptor = this;
return context;
};
TWikiAdaptor.fullHostName = function(host)
{
if(!host)
return '';
if(!host.match(/:\/\//))
host = 'http://' + host;
if(!host.match(/\/bin/) && !host.match(/\/cgi-bin/))
host = host.replace(/\/$/,'') + '/cgi-bin/';
if(host.substr(-1) != '/')
host = host + '/';
return host;
};
TWikiAdaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/cgi-bin\/$/,'').replace(/\/$/,'') : '';
};
TWikiAdaptor.normalizedTitle = function(title)
{
return title;
};
TWikiAdaptor.prototype.openHost = function(host,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.host = TWikiAdaptor.fullHostName(host);
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
TWikiAdaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
if(workspace)
this.workspace = workspace;
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
TWikiAdaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
if(context.workspace) {
context.status = true;
context.workspace = [{name:context.workspace,title:context.workspace}];
if(context.callback)
window.setTimeout(context.callback,0,context,userParams);
return true;
}
var list = [];
list.push({title:"Main",name:"Main"});
list.push({title:"Sandbox",name:"Sandbox"});
context.workspaces = list;
context.status = true;
if(context && callback) {
window.setTimeout(callback,0,context,userParams);
}
return true;
};
TWikiAdaptor.getWorkspaceListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,TWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var list = [];
for(var i=0; i<info.length; i++) {
list.push({title:info[i].title});
}
context.workspaces = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
TWikiAdaptor.prototype.getTiddlerList = function(context,userParams,callback,filter)
{
context = this.setContext(context,userParams,callback);
var limit = context.tiddlerLimit ? context.tiddlerLimit : 50;
if(filter) {
var list = [];
var params = filter.parseParams('anon',null,false);
for(var i=1; i<params.length; i++) {
var tiddler = new Tiddler(params[i].value);
list.push(tiddler);
}
context.tiddlers = list;
context.status = true;
if(context.callback)
window.setTimeout(context.callback,0,context,context.userParams);
return true;
}
return "getTiddlerList not supported";
/*var uriTemplate = '';
var uri = uriTemplate.format([this.host,this.workspace]);
var req = TWikiAdaptor.doHttpGET(uri,TWikiAdaptor.getTiddlerListCallback);
return typeof req == 'string' ? req : true;*/
};
TWikiAdaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = TWikiAdaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
list = [];
context.tiddlers = list;
} catch (ex) {
context.statusText = exceptionText(ex,TWikiAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
TWikiAdaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var uriTemplate = '%0view/%1/%2';
info.uri = uriTemplate.format([this.host,this.workspace,tiddler.title]);
return info;
};
/*TWikiAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
return this.getTiddlerRevision(title,null,context,userParams,callback);
};*/
TWikiAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var host = TWikiAdaptor.fullHostName(this.host);
var uriTemplate = '%0view/%1/%2?raw=text';
var uri = uriTemplate.format([host,this.workspace,title]);
context.tiddler = new Tiddler(title);
context.tiddler.fields.wikiformat = 'twiki';
context.tiddler.fields['server.host'] = TWikiAdaptor.minHostName(host);
context.tiddler.fields['server.workspace'] = this.workspace;
var req = TWikiAdaptor.doHttpGET(uri,TWikiAdaptor.getTiddlerCallback,context);
return typeof req == 'string' ? req : true;
};
TWikiAdaptor.getTiddlerCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = responseText;
//<form><textarea readonly="readonly" wrap="virtual" rows="50" cols="80">
var contentRegExp = /<textarea.*?>((?:.|\n)*?)<\/textarea>/mg;
contentRegExp.lastIndex = 0;
var match = contentRegExp.exec(responseText);
if(match) {
content = match[1].htmlDecode();
}
context.tiddler.text = content;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
TWikiAdaptor.prototype.putTiddler = function(tiddler,context,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0save/%1/%2?text=%3';
var host = this.host ? this.host : TWikiApaptor.fullHostName(tiddler.fields['server.host']);
var workspace = this.workspace ? this.workspace : tiddler.fields['server.workspace'];
var uri = uriTemplate.format([host,workspace,tiddler.title,tiddler.text]);
context.tiddler = tiddler;
context.tiddler.fields.wikiformat = 'twiki';
context.tiddler.fields['server.host'] = TWikiAdaptor.minHostName(this.host);
context.tiddler.fields['server.workspace'] = workspace;
var req = TWikiAdaptor.doHttpGET(uri,TWikiAdaptor.putTiddlerCallback,context,null,null,null,this.username,this.password);
return typeof req == 'string' ? req : true;
};
TWikiAdaptor.putTiddlerCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
TWikiAdaptor.prototype.close = function()
{
return true;
};
config.adaptors[TWikiAdaptor.serverType] = TWikiAdaptor;
} //# end of 'install only once'
//}}}
/***
|''Name:''|TWikiFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[TWiki|http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules]] text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#TWikiFormatterPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/TWikiFormatterPlugin.js|
|''Version:''|0.2.3|
|''Date:''|Nov 5, 2006|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.1.3|
|''Display unsupported TWiki variables''|<<option chkDisplayTWikiVariables>>|
This the TWikiFormatterPlugin, which allows you to insert TWiki formated text into a TiddlyWiki.
The aim is not to fully emulate TWiki, but to allow you to work with TWiki content off-line and then resync the content with your TWiki later on, with the expectation that only minor edits will be required.
To use TWiki format in a Tiddler, tag the Tiddler with TWikiFormat or set the tiddler's {{{wikiformat}}} extended field to {{{twiki}}}.
Please report any defects you find at http://groups.google.co.uk/group/TiddlyWikiDev
!!!Issues
There are (at least) the following known issues:
# Table code is incomplete.
## Table headings not yet supported.
# Anchors not yet supported.
# TWiki variables not supported
***/
//{{{
// Ensure that the TWikiFormatter Plugin is only installed once.
if(!version.extensions.TWikiFormatterPlugin) {
version.extensions.TWikiFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('TWikiFormatterPlugin requires TiddlyWiki 2.1 or later.');}
if(config.options.chkDisplayTWikiVariables == undefined)
{config.options.chkDisplayTWikiVariables = false;}
TWikiFormatter = {}; // 'namespace' for local functions
twDebug = function(out,str)
{
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement(out,'br');
};
TWikiFormatter.Tiddler_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
if((this.fields.wikiformat==config.parsers.twikiFormatter.format) || this.isTagged(config.parsers.twikiFormatter.formatTag)) {
this.links = [];
var tiddlerLinkRegExp = /\[\[(.*?)(?:\]\[(?:.*?))?\]\]/mg;
tiddlerLinkRegExp.lastIndex = 0;
var match = tiddlerLinkRegExp.exec(this.text);
while(match) {
this.links.pushUnique(match[1]);
match = tiddlerLinkRegExp.exec(this.text);
}
} else if(!this.isTagged('systemConfig')) {
TWikiFormatter.Tiddler_changed.apply(this,arguments);
return;
}
this.linksUpdated = true;
};
Tiddler.prototype.escapeLineBreaks = function()
{
var r = this.text.escapeLineBreaks();
if(this.isTagged(config.parsers.twikiFormatter.formatTag)) {
r = r.replace(/\x20\x20\x20/mg,'\\b \\b');
r = r.replace(/\x20\x20/mg,'\\b ');
}
return r;
};
config.textPrimitives.twikiLink = '(?:' +
config.textPrimitives.upperLetter + '+' + config.textPrimitives.lowerLetter + '+' +
config.textPrimitives.upperLetter + config.textPrimitives.anyLetter + '*)';
TWikiFormatter.setAttributesFromParams = function(e,p)
{
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match) {
var s = match[1].unDash();
if(s == 'bgcolor') {
s = 'backgroundColor';
}
try {
if(match[2]) {
e.setAttribute(s,match[2]);
} else if(match[3]) {
e.setAttribute(s,match[3]);
} else {
e.setAttribute(s,match[4]);
}
}
catch(ex) {}
match = re.exec(p);
}
};
config.formatterHelpers.singleCharFormat = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[0].substr(lookaheadMatch[0].length-2,1) != ' ') {
w.subWikifyTerm(createTiddlyElement(w.output,this.element),this.termRegExp);
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
config.formatterHelpers.doubleCharFormat = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
//twDebug(w.output,'dcmt:'+w.matchText);
//twDebug(w.output,'lm:'+lookaheadMatch);
//twDebug(w.output,'lm0:'+lookaheadMatch[0]+' lm:'+lookaheadMatch[0].length);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart &&
lookaheadMatch[0].substr(lookaheadMatch[0].length-3,1) != ' ') {
var e = createTiddlyElement(w.output,this.element);
w.subWikifyTerm(createTiddlyElement(e,this.element2),this.termRegExp);
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
config.twikiFormatters = [
{
name: 'twikiTable',
match: '^\\|(?:[^\\n]*)\\|$',
lookaheadRegExp: /^\|([^\n]*)\|$/mg,
rowTermRegExp: /(\|$\n?)/mg,
cellRegExp: /(?:\|([^\n\|]*)\|)|(\|$\n?)/mg,
cellTermRegExp: /((?:\x20*)\|)/mg,
handler: function(w)
{
var table = createTiddlyElement(w.output,'table');
var rowContainer = table;//createTiddlyElement(table,'tbody');
var prevColumns = [];
var rowCount = 0;
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
var rowClass = (rowCount&1) ? 'TD.odd' : 'TD.even';
if(rowCount==1) rowClass = 'TD.heading';
if(rowCount==3) rowClass = 'TD.third';
this.rowHandler(w,createTiddlyElement(rowContainer,'tr',null,rowClass),prevColumns);
rowCount++;
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
},
rowHandler: function(w,e,prevColumns)
{
var col = 0;
var colSpanCount = 1;
var prevCell = null;
this.cellRegExp.lastIndex = w.nextMatch;
var cellMatch = this.cellRegExp.exec(w.source);
while(cellMatch && cellMatch.index == w.nextMatch) {
if(cellMatch[1] == '^') {
// Rowspan
var last = prevColumns[col];
if(last) {
last.rowSpanCount++;
last.element.setAttribute('rowspan',last.rowSpanCount);
last.element.setAttribute('rowSpan',last.rowSpanCount); // Needed for IE
last.element.valign = 'center';
}
w.nextMatch = this.cellRegExp.lastIndex-1;
} else if(cellMatch[1] === '') {
// Colspan
colSpanCount++;
w.nextMatch = this.cellRegExp.lastIndex-1;
} else if(cellMatch[2]) {
// End of row
if(prevCell && colSpanCount > 1) {
prevCell.setAttribute('colspan',colSpanCount);
prevCell.setAttribute('colSpan',colSpanCount); // Needed for IE
}
w.nextMatch = this.cellRegExp.lastIndex;
break;
} else {
// Cell
w.nextMatch++;
var spaceLeft = false;
var chr = w.source.substr(w.nextMatch,1);
while(chr == ' ') {
spaceLeft = true;
w.nextMatch++;
chr = w.source.substr(w.nextMatch,1);
}
var cell = createTiddlyElement(e,'td');
prevCell = cell;
prevColumns[col] = {rowSpanCount:1, element:cell};
if(colSpanCount > 1) {
cell.setAttribute('colspan',colSpanCount);
cell.setAttribute('colSpan',colSpanCount); // Needed for IE
colSpanCount = 1;
}
w.subWikifyTerm(cell,this.cellTermRegExp);
if(w.matchText.substr(w.matchText.length-2,1) == ' ') {
// spaceRight
cell.align = spaceLeft ? 'center' : 'left';
} else if(spaceLeft) {
cell.align = 'right';
}
w.nextMatch--;
}
col++;
this.cellRegExp.lastIndex = w.nextMatch;
cellMatch = this.cellRegExp.exec(w.source);
}
}
},
{
name: 'twikiRule',
match: '^---+$\\n?',
handler: function(w)
{
createTiddlyElement(w.output,'hr');
}
},
{
//<h1><a name='TWiki_Text_Formatting'></a> TWiki Text Formatting </h1>
name: 'twikiHeading',
match: '^---[\\+#]{0,5}',
lookaheadRegExp: /^---[\+#]{0,5}(?:!!)? ?(.*?)\n/mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var h = createTiddlyElement(w.output,'h' + (w.matchLength-2));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var a = createTiddlyElement(w.output,'a');
var prefix = w.tiddler ? w.tiddler.title : '';
var name = '#'+ prefix + lookaheadMatch[1];
name = name.replace(/ /g,'_');
a.name = name;
w.nextMatch = this.lookaheadRegExp.lastIndex - lookaheadMatch[1].length - 1;
w.subWikifyTerm(h,this.termRegExp);
}
}
},
{
name: 'twikiAnchor',
match: '^#' + config.textPrimitives.wikiLink + '\\s',
lookaheadRegExp: /^#(.*?)\s/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var a = createTiddlyElement(w.output,'a');
var prefix = w.tiddler ? w.tiddler.title : '';
var name = '#'+ prefix + lookaheadMatch[1];
name = name.replace(/ /g,'_');
a.name = name;
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiDefinitionList',
match: '^ \\$ .+?:.+?\\n',
lookaheadRegExp: /^ \$ (.+?):(.+?)\n/mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var li = createTiddlyElement(w.output,'dl');
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
w.nextMatch += 5;
w.subWikifyTerm(createTiddlyElement(li,'dt'),/(:)/mg);
w.subWikifyTerm(createTiddlyElement(li,'dd'),this.termRegExp);
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'twikiList',
match: '^(?: )+(?:(?:\\*)|(?:[1AaIi](?:\\.)?)) ',
lookaheadRegExp: /^(?: )+(?:(\*)|(?:([1AaIi])(\.)?)) /mg,
//termRegExp: /(\n\n|\n(?=(?: )+[\\*1AaIi]))/mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
//twDebug(w.output,'mt:'+w.matchText);
var stack = [w.output];
var currLevel = 0;
var currType = null;
var listLevel, listType;
var itemType = 'li';
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
//twDebug(w.output,'lm0:'+lookaheadMatch[0]);
listType = 'ol';
listLevel = (lookaheadMatch[0].length-(lookaheadMatch[3]?3:2))/3;
var style = null;
if(lookaheadMatch[1]=='*') {
listType = 'ul';
} else if(lookaheadMatch[2]=='1') {
style = 'decimal';
} else if(lookaheadMatch[2]=='A') {
style = 'upper-alpha';
} else if(lookaheadMatch[2]=='a') {
style = 'lower-alpha';
} else if(lookaheadMatch[2]=='I') {
style = 'upper-roman';
} else if(lookaheadMatch[2]=='i') {
style = 'lower-roman';
}
w.nextMatch += lookaheadMatch[0].length;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement(stack[stack.length-1],itemType);
e.style[config.browser.isIE ? 'list-style-type' : 'listStyleType'] = style;
w.subWikifyTerm(e,this.termRegExp);
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'twikiNoAutoLink',
match: '^\\s*<noautolink>',
lookaheadRegExp: /\s*<noautolink>((?:.|\n)*?)<\/noautolink>/mg,
termRegExp: /(<\/noautolink>)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var autoLinkWikiWords = w.autoLinkWikiWords;
w.autoLinkWikiWords = false;
w.subWikifyTerm(w.output,this.termRegExp);
w.autoLinkWikiWords = autoLinkWikiWords;
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
}
},
{
name: 'macro',
match: '<<',
lookaheadRegExp: /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*)>>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[1]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
invokeMacro(w.output,lookaheadMatch[1],lookaheadMatch[2],w,w.tiddler);
}
}
},
{
name: 'twikiNotExplicitLink',
match: '!\\[\\[',
handler: function(w)
{
w.outputText(w.output,w.matchStart+1,w.nextMatch);
}
},
//[[WikiWord#NotThere]]
//[[#MyAnchor][Jump]]
//<a href='/cgi-bin/view/Sandbox/WebHome#Sandbox_Web_Site_Tools'> Sandbox Web Site Tools </a>
//<a href='/cgi-bin/view/Sandbox/MeetingMinutes' class='twikiLink'>MeetingMinutes</a>
{
name: 'twikiAnchorLink',
match: '\\[\\[(?:'+ config.textPrimitives.twikiLink +')?#',
lookaheadRegExp: /\[\[(.*?)?#(.*?)(?:\]\[(.*?))?\]\]/mg,
handler: function(w)
{
//twDebug(w.output,'al:'+w.matchText);
//twDebug(w.output,'lm:'+lookaheadMatch);
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
//twDebug(w.output,'lm0:'+lookaheadMatch[0]);
var a = createTiddlyElement(w.output,'a');
var prefix = w.tiddler ? w.tiddler.title : '';
var href = lookaheadMatch[1] ? lookaheadMatch[1] : '';
href += '#' + prefix + lookaheadMatch[2];
href = href.replace(/ /g,'_');
//twDebug(w.output,'hr:'+href);
a.href = href;
a.innerHTML = lookaheadMatch[3] ? lookaheadMatch[3] : lookaheadMatch[2];
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiExplicitLink',
match: '\\[\\[',
lookaheadRegExp: /\[\[(.*?)(?:\]\[(.*?))?\]\]/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e = null;
var link = lookaheadMatch[1];
if (lookaheadMatch[2]) {
// titled bracketted link
var text = lookaheadMatch[2];
e = config.formatterHelpers.isExternalLink(link) ? createExternalLink(w.output,link) : createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
} else {
// simple bracketted link
text = link;
var s = text.indexOf(' ');
if(s!=-1) {
link = text.substring(0,s).trim();
if(config.formatterHelpers.isExternalLink(link)) {
e = createExternalLink(w.output,link);
text = text.substring(s+1).trim();
} else {
e = createTiddlyLink(w.output,text,false,null,w.isStatic,w.tiddler);
}
} else {
e = createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
}
}
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiNotWikiLink',
match: '(?:!|<nop>)' + config.textPrimitives.wikiLink,
handler: function(w)
{
w.outputText(w.output,w.matchStart+(w.matchText.substr(0,1)=='!'?1:5),w.nextMatch);
}
},
{
name: 'twikiWikiLink',
match: config.textPrimitives.twikiLink,
handler: function(w)
{
if(w.matchStart > 0) {
var preRegExp = new RegExp(config.textPrimitives.anyLetter,'mg');
preRegExp.lastIndex = w.matchStart-1;
var preMatch = preRegExp.exec(w.source);
if(preMatch.index == w.matchStart-1) {
w.outputText(w.output,w.matchStart,w.nextMatch);
return;
}
}
if(w.autoLinkWikiWords == true || store.isShadowTiddler(w.matchText)) {
var link = createTiddlyLink(w.output,w.matchText,false,null,w.isStatic,w.tiddler);
w.outputText(link,w.matchStart,w.nextMatch);
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
}
},
{
name: 'twikiUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},
{
name: 'twikiBoldByChar',
match: '\\*(?!\\s)',
lookaheadRegExp: /\*(?!\s)(?:.*?)(?!\s)\*(?=\W)/mg,
termRegExp: /((?!\s)\*(?=\W))/mg,
element: 'strong',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'twikiBoldTag',
match: '<b>',
termRegExp: /(<\/b>)/mg,
element: 'b',
handler: config.formatterHelpers.createElementAndWikify
},
{
name: 'twikiBoldItalicByChar',
match: '__(?!\\s)',
lookaheadRegExp: /__(?!\s)(?:.*?)(?!\s)__(?=\W)/mg,
termRegExp: /((?!\s)__(?=\W))/mg,
element: 'strong',
element2: 'em',
handler: config.formatterHelpers.doubleCharFormat
},
{
name: 'twikiItalicByChar',
match: '_(?![\\s|_])',
lookaheadRegExp: /_(?!\s)(?:.*?)(?!\s)_(?=\W)/mg,
termRegExp: /((?!\s)_(?=\W))/mg,
element: 'em',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'twikiBoldMonoSpacedByChar',
match: '==(?!\\s)',
lookaheadRegExp: /==(?!\s)(?:.*?)(?!\s)==(?=\W)/mg,
termRegExp: /((?!\s)==(?=\W))/mg,
element: 'strong',
element2: 'code',
handler: config.formatterHelpers.doubleCharFormat
},
{
name: 'twikiMonoSpacedByChar',
match: '=(?![\\s=])',
lookaheadRegExp: /=(?!\s)(?:.*?)(?!\s)=(?!\w|\'|\")/mg,
termRegExp: /((?!\s)=(?!\w|\'|\"))/mg,
element: 'code',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'twikiPreByChar',
match: '<pre>',
lookaheadRegExp: /<pre>((?:.|\n)*?)<\/pre>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
createTiddlyElement(w.output,'pre',null,null,lookaheadMatch[1]);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiVerbatimByChar',
match: '<verbatim>',
lookaheadRegExp: /\<verbatim>((?:.|\n)*?)<\/verbatim>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
createTiddlyElement(w.output,'span',null,null,lookaheadMatch[1]);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiParagraph',
match: '\\n{2,}',
handler: function(w)
{
createTiddlyElement(w.output,'p');
}
},
{
name: 'twikiNop',
match: '<nop>',
handler: function(w)
{
w.outputText(w.output,w.matchStart+5,w.nextMatch);
}
},
{
name: 'twikiExplicitLineBreak',
match: '%BR%|<br ?/?>|<BR ?/?>',
handler: function(w)
{
createTiddlyElement(w.output,'br');
}
},
{
name: 'twikiColorByChar',
match: '%(?:YELLOW|ORANGE|RED|PINK|PURPLE|TEAL|NAVY|BLUE|AQUA|LIME|GREEN|OLIVE|MAROON|BROWN|BLACK|GRAY|SILVER|WHITE)%',
lookaheadRegExp: /%(YELLOW|ORANGE|RED|PINK|PURPLE|TEAL|NAVY|BLUE|AQUA|LIME|GREEN|OLIVE|MAROON|BROWN|BLACK|GRAY|SILVER|WHITE)/mg,
termRegExp: /(%ENDCOLOR%)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e = createTiddlyElement(w.output,'span');
e.style.color = lookaheadMatch[1];
w.subWikifyTerm(e,this.termRegExp);
}
}
},
{
name: 'twikiVariable',
match: '(?:!)?%(?:<nop>)?[A-Z]+(?:\\{.*?\\})?%',
lookaheadRegExp: /(!)?%(<nop>)?([A-Z]+)(?:\{(.*?)\})?%/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
if(lookaheadMatch[1]) {
// ! - escape variable
w.outputText(w.output,w.matchStart+1,w.nextMatch);
} else if(lookaheadMatch[2]) {
//nop
var text = w.matchText.replace(/<nop>/g,'');
createTiddlyText(w.output,text);
} else {
// deal with variables by name here
if(lookaheadMatch[3]=='BB') {
createTiddlyElement(w.output,'br');
createTiddlyElement(w.output,'span').innerHTML = '•';
} else if(config.options.chkDisplayTWikiVariables) {
// just output the text of any variables that are not understood
w.outputText(w.output,w.matchStart,w.nextMatch);
}
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = w.matchText;
}
},
{
name: 'twikiComment',
match: '<!\\-\\-',
lookaheadRegExp: /<!\-\-((?:.|\n)*?)\-\->/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'twikiHtmlTag',
match: "<(?:[a-zA-Z]{2,}|a)(?:\\s*(?:[a-zA-Z]*?=[\"']?[^>]*?[\"']?))*?>",
lookaheadRegExp: /<([a-zA-Z]+)((?:\s+[a-zA-Z]*?=["']?[^>\/\"\']*?["']?)*?)?\s*(\/)?>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e =createTiddlyElement(w.output,lookaheadMatch[1]);
if(lookaheadMatch[2]) {
TWikiFormatter.setAttributesFromParams(e,lookaheadMatch[2]);
}
if(lookaheadMatch[3]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;// empty tag
} else {
w.subWikify(e,'</'+lookaheadMatch[1]+'>');
}
}
}
}
];
config.parsers.twikiFormatter = new Formatter(config.twikiFormatters);
config.parsers.twikiFormatter.format = 'twiki';
config.parsers.twikiFormatter.formatTag = 'TWikiFormat';
} // end of 'install only once'
//}}}
If you have moved on to use Firefox 3 Beta 5 (as I recommended) then you know how much speed was left untapped with previous versions of the browser. There are still a quite a few popular extensions that are not compatible however, Tab Mix Plus, being perhaps one of the most general purpose and useful out there.
But worry no more. If you don’t mind the beta-over-beta code you will be running, there is an experimental version of the add-on available for Firefox 3 Beta 5 that seems to be working just fine. This still has not been posted to the official Mozilla add-ons site, so it’s a little gem I had to share. Enjoy.
http://tmp.garyr.net/tab_mix_plus-dev-build.xpi
http://74.55.96.66/blog/158/tab-mix-plux-extension-for-firefox-3-beta/
List the size (in human readable form) of all sub folders from the current location
du -sch ./*
(http://www.commandlinefu.com/commands/view/4334/list-the-size-in-human-readable-form-of-all-sub-folders-from-the-current-location)
Una de las cosas que faltaban por poner a funcionar luego de la instalación de Debian en la Toshiba Satellite A215-S7407 eran las teclas multimedia.
Decidí usar una tecla para abrir el navegador Konqueror, porque era lo mismo que hacía Ubuntu con esa tecla. Otra tecla sería para abrir el reproductor de vídeo Kaffeine, las demás teclas las usaría para controlar la reproducción de música con Amarok.
También planeaba usar las teclas de funciones que trae la computadora (la tecla Fn + teclas normales) y por último poner a funcionar la rueda que controla el volumen.
Básicamente los pasos son:
* conseguir los códigos que manda el teclado para las teclas especiales,
* hacer un mapa entre los códigos del teclado y los que reconoce X,
* cargar el mapa automáticamente al hacer login,
* usar en KDE.
Para ponerlo a funcionar con KDE no hace falta ser root y el procedimiento es el siguiente:
Buscar los códigos de las teclas.
Abrir una consola y ejecutar el programa xev, este abrirá una pantallita y comenzará a mostrar códigos de todas las teclas que se pulsen, en mi caso al pulsar la tecla multimedia que se usa para detener la música me arroja lo siguiente:
KeyRelease event, serial 31, synthetic NO, window 0x3c00001,
root 0x4b, subw 0x0, time 1744593, (1223,-197), root:(1227,374),
state 0x0, keycode 164 (keysym 0x1008ff15, XF86AudioStop), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Lo importante de todo esto es la parte que dice 'keycode 164′, significa que la tecla genera el código 164. Hay que pulsar todas las teclas especiales que queramos capturar y anotar sus códigos correspondientes. Lo mismo se hace para la rueda del volumen, porque en esta computadora esa rueda genera códigos como si se pulsara una tecla en el teclado, genera un código para subir volumen y otro distinto para bajar volumen.
Una vez que tenga todos los códigos cierra el programa xev.
Crear el mapa entre los codigos del teclado y los de X
Ahora se crea un archivo con un mapa entre los códigos de las teclas que anotamos previamente con la ayuda de xev y los nombres o códigos que reconoce X (el gestor gráfico), y lo guardamos en nuestro directorio como ~/.Xmodmap con un contenido similar a:
! Teclas para Toshiba Satellite A215-S7407
keycode 178 = XF86Explorer
keycode 164 = XF86AudioStop
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
Los keycode son los que nos retornó xev. Los nombres a la derecha son los que reconoce X y para ver una lista de todos los que pueden ser usados mire el archivo /usr/share/X11/XKeysymDB que allí están todos los que soporta X para una instalación determinada.
Cargar le mapa automáticamente al hacer login
Luego, en KDE vamos a crear un archivo de comandos ejecutable dentro de nuestro directorio home, sin necesidad de ser root, para poner a funcionar las teclas: crear el archivo ~/.kde/Autostart/teclas_multimedia y editarlo. Aquí se va a cargar el mapa de teclas y se vana configurar esas teclas para que no tengan repetición y de esa forma cada tecla enviará solo una señal a la vez aunque se deje pulsada unos instantes:
#!/bin/bash
/usr/bin/xmodmap ~/.Xmodmap
/usr/bin/xset -r 178 -r 164 -r 162 -r 144 -r 153 -r 176 -r 174 -r 160
Luego hay que darle permiso de ejecución al archivo, porque es un programa: chmod +x ~/.kde/Autostart/teclas_multimedia.
Listo, cierre la sesión y vuelva a entrar o hacer login. En mi caso KDE tomó automáticamente algunas teclas de funciones, como la tecla de enmudecer el volumen y también tomó automáticamente la rueda del control de volumen.
Usar las teclas en KDE
Para poner a funcionar la tecla que abre el navegador Konqueror entré en el menú K -> Preferencias ->Regional y Accesibilidad -> Accesos Rápidos del Teclado. En la pestaña Atajos de Ordenes busqué Konqueror y le configuré la tecla especial, es muy fácil hacerlo.
Para las demaś teclas multimedia entré en Amarok directamente, menú Preferencias -> Configurar accesos rápidos globales y allí se pueden configurar muy fácilmente.
Como se ve es fácil y todo el trabajo puede tomar quizás unos 20 minutos o media hora.
Reto pendiente
Lo único que me queda pendiente es una tecla de función que serviría para abrir el reproductor de películas Kaffeine. Esta tecla no me arrojó ningún código con xev, lo que puede significar una de dos cosas: o la tecla no sirve, o X no la reconoce (por ahora…).
Referencias
Me guié por esta wiki de Gentoo:
http://en.gentoo-wiki.com/wiki/Multimedia_Keys
(http://hojalibre.wordpress.com/2009/01/17/teclas-multimedia-en-debian-con-toshiba-satellite-a215-s7407/)
Un tema que puede servir para quienes añoran viejos vicios se encuentra en
http://ubuntu.online02.com/node/14
|''URL:''|http://www.tiddlywiki.com/|
The current, non-Beta version of TiddlyWiki is at http://www.tiddlywiki.com
What if you need to make a tunnel to two computers behind firewalls or NAT's by having an intemediary server? If we take the example this time of running vnc over ssh so we want something like this:
VNC-server (5901) <-- ssh --> (5901) In-between-system (5901) <-- ssh --> (5901) VNC-client
How do we do it? Firstly, startup the vnc server on the VNC-server. Then startup the reverse tunnel from the VNC-server to the In-between-system like this:
ssh -ngfNT -R 5901:localhost:5901 ruser@in.between.system
Note: For the above process to background itself correctly as the “-f” command implies you would need your keys setup between these systems (i.e. the public key of the VNC-server copied to the authorized_keys file of “ruser” on the In-between-system).
Then on your VNC client start a local tunnel to the In-between-system as follows:
ssh -f -N -L 5901:localhost:5901 ruser@in.between.system
Then to view your remote desktop run vncviewer localhost:1 (:1 representing port 5901) which will route your data via the In-between-system and tunnel it over ssh.
http://www.digitalnative.net/2007/09/25/ssh-tunnel-via-a-middle-system/
Probablemente la forma mas segura de utilizar un acceso remoto sea con vnc a través de un tunel ssh.
En primero lugar hay que arrancar un servidor vnc en la máquina remota
podemos hacerlo utilizando
ssh usuario@nombre.dominio.com command vncserver -geometry 1024x768 -depth 16
el mismo comando nos notificará que pantalla (display) está usando
despues abrimos el tunel con la instrucción (suponiendo que display = :0)
ssh -L 5901:servidor.dominio.net:5900 usuario@servidor.dominio.com
y por último abrimos el vnc usando el extremo local del tunel
xvncviewer localhost:1 (ó localhost:5901)
==============================================
En ocasiones puede suceder que otro servidor vnc o algúnotro programa ya esté utilizando un puerto :5xxx
Para este caso utilizamos
lsof -i :5xxx
que nos dirá que proceso está usando ese puerto y ya con el nombre podemos cerrarlo usando kill ó killall.
===============================================
Si necesitamos usar un puerto diferente a los que se asignan por defecto (:500x) enlazamos un servidor x11vnc al vncserver (Xrealvnc) que abrimos anteriormente
x11vnc -rfbport xxxx -display :1 -passwd **********
Por supuesto hay que sustituir las xxxx con el número de puerto que vamos a usar.
Estando en el centro de redes aparece la conexion de la tarjeta 3G
Si aparece como Telcel hay que darle en configurar
En el nombre del punto de acceso va: internet.itelcel.com
Usuario de Cuenta: webgprs
Contraseña: webgprs2002
Y listo ¡ A navegar !
(Gracias al Davos por su aportación 8-)
mplayer -dumpstream -dumpfile "yourfile" -playlist "URL"
(http://www.commandlinefu.com/commands/view/1277/use-mplayer-to-save-video-streams-to-a-file)
If you've used bash for a while you probably know that the commands you enter are saved in the file ~/.bash_history when you log out. Next time you log in, bash automatically loads these history commands from the saved file and you can then use the up and down arrow keys to browse your command history and find the command you want rather than re-entering it.
However, there are more effective ways to use bash's history: you can use Ctrl+R (Control key held down at the same time as the R key). This will display the following in your shell:
(reverse-i-search)`':
If you know type some substring found in the command you're searching for, for example "ls", bash will search for matching commands. For example, it might show:
(reverse-i-search)`ls': lsof -nP -p 3930
What it actually shows is going to be dependent on the commands you've previously entered.
When you do this, bash looks for the last command that you entered that contains the substring "ls", in my case that was "lsof ...". If the command that bash finds is what you're looking for, just hit Enter to execute it. You can also edit the command to suit your current needs before executing it (use the left and right arrow keys to move through it). If you're looking for a different command, hit Ctrl+R again to find a matching command further back in the command history. You can also continue to type a longer substring to refine the search, since searching is incremental.
Note that the substring you enter is searched for throughout the command, not just at the beginning of the command.
(http://www.linuxjournal.com/content/using-bash-history-more-efficiently)
KDE also has invented their own screen saver framework instead of simply using xscreensaver. To replace the KDE screen saver with xscreensaver, do the following:
1: Turn off KDE's screen saver.
Open the ``Control Center'' and select the ``Appearance & Themes / Screensaver'' page. Un-check ``Start Automatically''.
2: Find your Autostart directory.
Open the ``System Administration -> Paths'' page, and see what your ``Autostart path'' is set to: it will probably be ~/.kde/Autostart/ or something similar.
3: Make xscreensaver be an Autostart program.
Create a .desktop file in your autostart directory called xscreensaver.desktop that contains the following five lines:
[Desktop Entry]
Exec=xscreensaver
Name=XScreenSaver
Type=Application
X-KDE-StartupNotify=false
4: Make the various "lock session" buttons call xscreensaver.
Replace the file kdesktop_lock or krunner_lock in /usr/bin/ (or possibly /usr/kde/3.5/bin/ or /usr/lib/kde4/libexec/) with these two lines:
#!/bin/sh
xscreensaver-command -lock
Make sure the file is executable (chmod a+x).
Now use xscreensaver normally, controlling it via the usual xscreensaver-demo (1) and xscreensaver-command (1) mechanisms.
(http://www.jwz.org/xscreensaver/man1.html)
En alguna de las actualizaciones de Debian-Sidux se incluye un programa que desactiva el modulo visor necesario para sincronizar algunos modelos de dispositivos Palm con aplicaciones como jpilot.
Para poder volver a utilizar este módulo se agrega a /etc/modules
visor
Y se comenta en /etc/modprobe.d/libpisock9
#blacklist visor
en preferencias de jpilot se conecta a /dev/ttyUSB1
The third item is a bit more technical. Go to the Open DNS website – http://www.opendns.com – and read the info.
Navigate to the network connection settings in your operating system. There are screen shots at this site on how to do this.
In the DNS settings, substitute these Open DNS numbers. (Note: You don't need to sign up to use the Open DNS system, plus all these settings are reversible if you don't like the result).
Primary DNS; 208.67.222.222
Secondary DNS; 208.67.220.220
This will also give every operating system broadband connection a speed boost.
http://www.thedaily.com.au/blogs/techno-file/2008/jan/15/broadbrand/
La versión más reciente de este wiki la encuentras en http://tm.com.mx/wikis/linux.php
El sitio lo encuentras en http://tmlinux.com
En este caso si se obtiene un error 102 (archivo no encontrado) lo más sencillo es crear una nueva configuración de máquina virtual, pero con las mismas características, y asignarle el mismo disco duro virtual.
En la computadora remota se abre un servidor vnc y un tunel inverso desde el puerto del servidor vnc hasta el puerto de la computadora local donde se va a conectar el cliente vnc
usuario@remota:~$ x11vnc -display :0 -bg -forever
usuario@remota:~$ ssh -f -N -R 5909:localhost:5900 usuario@local.dominio.net
En la computadora local se abre el cliente vnc en el puerto correspondiente
xvncviewer :5909
========================================
Para que el servidor vnc y el tunel inverso se inicien automáticamente se puede crear un archivo en /etc/init.d y agregarlo a las rutinas de arranque con update-rc.
es conveniente que la línea del tunel inverso sea de la forma
while true ; do ssh -f -N -R 5909:localhost:5900 ; sleep 60 ; done
Por supuesto se puede usar [[Ssh sin contraseña]] para realizar las conexiones de forma automática
Para aplicar cambios de configuración en plasma se puede utilizar
kquitapp plasma-desktop && sleep 15s && plasma-desktop &
o también
kquitapp plasma-desktop
kstart plasma-desktop >/dev/null 2>&1
para reiniciar kwin se usa lo siguiente
kwin --replace &
dd if=/dev/urandom of=file.img bs=4KB& pid=$!
This is sample output - yours may be different.
Running this code will execute dd in the background, and you'll grab the process ID with '$!' and assign it to the 'pid' variable. Now, you can watch the progress with the following:
$ while true; do kill -USR1 $pid && sleep 1 && clear; done
The important thing to grasp here isn't the filename or location of your input or output, or even the block size for that matter, but the fact that you can keep an eye on 'dd' as it's running to see where you are at during its execution.
flatcap @ 2009-04-08 09:09:31
Alternatively, if you have 'pv' installed:
$ pv /dev/urandom | dd of=file.img bs=4KB count=1234
This will display a progress bar for fixed-size input, or just a throughput speed for unlimited things like urandom.
oernii @ 2009-04-08 13:20:58
dd if=/dev/urandom |cpipe -vt| dd of=file.img
bwoodacre @ 2009-04-08 22:37:07
pv: http://ivarch.com/programs/pv.shtml
cpipe: http://cpipe.berlios.de/
(for the less observant) The trick here is that sending 'dd' the USR1 signal causes it to print the latest transfer statistics.
(http://www.commandlinefu.com/commands/view/1868/watch-the-progress-of-dd)
Recently i had to migrate a LVM based domU from machine 1 to machine 2 with only ssh port being available between the two hosts. Of course dd comes to the rescue for that but i admit that having some informations about transfer rate would be interesting. And then i remembered a Sébastien's blog post talking about about a nice tool called PV. Of course PV has nothing to do with PV as in Physical Volume for LVM but it's a 'pipe viewer' . A pv rpm is available in the RPMForge repo. Example (assuming that you've already created a domU2migrate lv on the target system) :
[root@machine2 ~]# ssh machine1 "dd if=/dev/VolGroup00/domU2migrate"|pv -s 8G -petr|dd of=/dev/xen02vg/domU2migrate
0:00:30 [11.2MB/s] [====> ] 4% ETA :10:13
I hope you'll find that useful if you never heard of such tool ..
(http://www.arrfab.net/blog/?p=110)
Over the years I think I helped to influence few people here and there to actually start experimenting with linux. I count that as a personal success. I’m sure I was not the primary influence in most cases, but I’m glad I could help people to start tinker with the new OS. Note that I didn’t say switch. I do have an issue with this whole switch mentality. People say “I have switched to Linux” or “I have switched to Mac” and I can’t help but roll my eyes.
I just want to put out there this novel idea: you are not marrying you OS. Regardless of what Microsoft may want you to think, there is no rule anywhere that says you can use only one OS. Personally I think a well rounded human being should be able to use several operating systems. Hell, you can have several OS’s installed on the same computer, and simply boot into the one that you need when necessary.
When people ask me how to go about switching to Linux I tell them not to. I tell them, to try using it along side Windows (cause it’s usually Windows folks who ask it) for a while, play and explore. Whenever it gets scary or overwhelming you just go back to comfy windows zone. Whenever you need that crucial windows application that has no Linux equivalent it will be right there for you. Don’t switch - just start playing. Have fun with it and learn. Then if you one day realize that you haven’t touched the Windows box in months, you can say you have switched. However, most of us never reach the point where they can honestly say they use linux exclusively. I don’t see it as a honor badge or anything. Most of us are perfectly content having a windows box (for gaming) sitting in the corner, a MacBook laptop, and a linux workstation all working together.
But the question does have merit. Starting with linux is usually a little bit different than starting with windows, or Apple. Why? Because this is the only OS that most people have to install by themselves. When people start messing around with Linux and BSD they usually tend to install it on a system that originally came preloaded with Windows. And this is where many issues crop up. Here are the few tips I usually pass down to the newbies. I figured that I might as well record them here and just point people to this post from now on.
Consider buying a system that comes Linux installed
Best advice I can give to total newbs is to consider purchasing a system that already comes preloaded with Linux. This is naturally the most expensive option you can pick but it does solve two main problems a lot of people run into:
First, you side-step the whole installation process. Your machine will be equipped with hardware that works well with linux, and will ship with all the right drivers. Your drive will be partitioned for you and the OS will be right there. All you need to do is go through few easy initial steps such as creating a new user and you will be ready to go. The biggest linux adoption hurdle for many people is the issue with hardware that doesn’t play well with linux. If you buy a linux machine you circumvent this whole problem.
Second, you are getting a brand new computer. This means that if you for some weird reason hose the linux installation you still have your old Windows machine to fall back on. People are often scared to try linux because they don’t want to get stuck with a botched installation and a PC that can neither boot windows or linux. You will be working on a dedicated Linux machine so even if you hose it you are still fine. You can still go online and research your issues, and try to get help.
Where do you get a machine with linux on it though? You don’t have to go to some shady online company that promises to ship you linux powered PC. You can get one from Dell. Yup, dell sells machines preloaded with everyone’s favorite distro (Ubuntu). You can say what you want about dell, but at least they are trustworthy, and usually make good on their warranties.
If you feel more adventurous, or you hate dell/large corporate behemoths you can try something like System 76 which sells laptops, desktops and mini boxen all running Ubuntu out of the box.
Consider Using A Spare Computer
If you can’t afford a brand new PC at the moment. If you are like me, you probably don’t like to throw out old computers. I usually stash them in the attic planning to one day turn them into some low powered server or something like that. I also inherit hardware from relatives and sometime even co-workers who bring me their old PC to dispose of (”here, maybe you can do something with it or scrap it for parts… If not just throw it out”). Old machines are perfect candidates for Linux test boxen for all the reasons I listed in the previous section. If you mess around with your primary PC you will be nervous, and you will worry about hosing your windows partition. If you are working with a spare junker that you really don’t care about you will be in the care-free tinkerer mode.
If you mess up, just start over. Wipe the drive and start again. That is the mindset you want to get yourself into. You are messing around and experimenting on some random machine while your data and most importantly your internet connection is safe and secure on your windows box.
Of course when you are using old hardware you may run into problems. Some of it might not be compatible, some might actually be really broken, and naturally it will be really slow. Then again, older hardware may actually be a blessing - having been around for years, the correct drivers may have made their way directly into the currently used kernel.
Use a Live CD First
This is less of a concern now since most of major distros ship with a Live CD installer these days. It wasn’t like that when I was starting. Still, probably a good first step for anyone is to download and burn yourself a Knoppix CD and stick it into the machine you plan to use for Linux. If Knoppix has major problems identifying your hardware and getting to work, then you may need to reconsider your choice. Chances are that any distro will have simillar issues, if not worse. If Knoppix just works, it doesn’t necessarily mean your distro of choice will but it is a sign that your hardware can and will work with Linux.
A lot of distros ship a Live CD installer (I know Ubuntu does) which lets you try out the system before you install it. I highly recommend burning yourself several such Live CD’s of different distributions and messing around with them. See how they interact with your hardware, how they handle driver installation and etc. Pick one that gets everything right out of the box, or has the best, most intuitive system for loading the needed drivers and applications.
Most of them will be very simillar but different people tend to be comfortable with different types of interfaces or ways of doing things. Some distros are more n00b friendly than others. Some will require you to drop down to CLI while some other ones will have nice GUI menus to do these things. You just need to find one that you feel comfortable with.
Avoid Dual Booting if Possible
Having your machine set up with both Linux and Windows is great. Dual booting is an awesome feature and you should definitely try it at one point, but it is a lousy way to start your Linux experience. It’s not that it’s hard - it’s just that it’s not trivial. In most cases it will require you to resize your windows partition (which may hose your system), then format that partition (if you choose the wrong one you may hose your system) and then make sure that the bootloader works correctly. This process has many points of failure and you don’t really want to be dealing with all this stress and uncertainty.
Most distros come with a nice “wipe the drive and let me set up the file system my way” option and that’s the one you should be using your first time around. You can fuck around with custom partition on your third or fourth installation. The first time around though your mission is to get linux onto your box with as few steps, and in it’s most default form. It’s much easier to troubleshoot a system that was installed with the default configuration rather than with a meticulously tweaked one.
Know what you want
Before you start messing around with linux you should do some research and get to know the vocabulary we all use. At he very least you should be able to differentiate between different package management systems. You want to know whether you want a Deb based system or an RPM based one. You should also look into desktop managers - look at screenshots and reviews of KDE and Gnome and see which one you like better. Try live CD’s which ship with both of them. Your first linux experience will be largely depend on whether you like or hate the desktop manager. So it’s a good idea to try both Gnome and KDE beforehand. If you hate one of them, it will narrow down the list of distros you have to choose from.
Pick the right distro
Finally, do some research into different linux distributions. You want to pick one that is newbie friendly - so probably probably not Gentoo in which you compile everything from scratch. You probably don’t want slackware either which hails itself as the most unix-like linux out there. You want something like Ubuntu, or Fedora or SuSE. You want something with a graphical installer, shipping with either Gnome or KDE out of the box and providing a nice package management front end (ideally a GUI one).
You should also pick a distro that has a large community. This helps immensely - a large community means lots of backports, frequent patches and active forums and discussion groups where you can finds answers and solutions to many of your problems. At some point a distro reaches a critical mass where nearly every problem you run into is already well documented and resolved by the community.
How do you know if a distro is popular? You will likely know it by reputation - people on technology blogs will mention it and talk about it. If you are at a loss, you can try Distrowatch which tracks the trends on Linux distribution market. Just be careful with their data - you want to pick something that is consistently popular over a long period of time, not the flavor of the month.
If you follow these few suggestions, your first steps with linux will be a positive, rewarding experience even if you mess up. You will learn a lot, you will gain new perspective on things and most importantly you will have fun.
http://www.terminally-incoherent.com/blog/2008/01/30/your-first-steps-with-linux/
Dans centre de configuration de kde=>bureau=>comportement des fenêtres=>avancé cocher "toujours activé". (y un retardo de unos 150ms)
http://www.commentcamarche.net/forum/affich-2506113-brightside-sous-kde 20070131
Se corrige al instalar pyxdg
/***
|''Name:''|ccTiddlyAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data to and from ccTiddly wikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#ccTiddlyAdaptorPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/ccTiddlyAdaptorPlugin.js|
|''Version:''|0.5.1|
|''Date:''|Feb 25, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.2.0|
''For debug:''
|''Default ccTiddly username''|<<option txtccTiddlyUsername>>|
|''Default ccTiddly password''|<<option txtccTiddlyPassword>>|
***/
//{{{
if(!config.options.txtccTiddlyUsername)
{config.options.txtccTiddlyUsername = '';}
if(!config.options.txtccTiddlyPassword)
{config.options.txtccTiddlyPassword = '';}
//}}}
// Ensure that the plugin is only installed once.
if(!version.extensions.ccTiddlyAdaptorPlugin) {
version.extensions.ccTiddlyAdaptorPlugin = {installed:true};
function ccTiddlyAdaptor()
{
this.host = null;
this.workspace = null;
// for debug
this.username = config.options.txtccTiddlyUsername;
this.password = config.options.txtccTiddlyPassword;
return this;
}
ccTiddlyAdaptor.serverType = 'cctiddly';
ccTiddlyAdaptor.serverParsingErrorMessage = "Error parsing result from server";
ccTiddlyAdaptor.errorInFunctionMessage = "Error in function ccTiddlyAdaptor.%0";
ccTiddlyAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('GET',uri,data,contentType,username,password,callback,params,headers);
};
ccTiddlyAdaptor.prototype.setContext = function(context,userParams,callback)
{
if(!context) context = {};
context.userParams = userParams;
if(callback) context.callback = callback;
context.adaptor = this;
return context;
};
ccTiddlyAdaptor.fullHostName = function(host)
{
if(!host)
return '';
if(!host.match(/:\/\//))
host = 'http://' + host;
if(host.substr(-1) != '/')
host = host + '/';
return host;
};
ccTiddlyAdaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/\/$/,'') : '';
};
ccTiddlyAdaptor.prototype.openHost = function(host,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.host = ccTiddlyAdaptor.fullHostName(host);
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
ccTiddlyAdaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
this.workspace = workspace;
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
ccTiddlyAdaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var list = [];
list.push({title:"Main",name:"Main"});
context.workspaces = list;
if(context.callback) {
context.status = true;
window.setTimeout(context.callback,0,context,userParams);
}
return true;
};
ccTiddlyAdaptor.prototype.getTiddlerList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0msghandle.php?action=content';
var host = ccTiddlyAdaptor.fullHostName(this.host);
var uri = uriTemplate.format([host,this.workspace]);
var req = ccTiddlyAdaptor.doHttpGET(uri,ccTiddlyAdaptor.getTiddlerListCallback,context);
return typeof req == 'string' ? req : true;
};
ccTiddlyAdaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = ccTiddlyAdaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
list = [];
/*var titles = responseText.split('\n');
for(var i=0; i<titles.length; i++) {
var tiddler = new Tiddler(titles[i]);
list.push(tiddler);
}*/
if(list.length==0) {
list.push(new Tiddler('About')); //kludge until get support for listTiddlers in ccTiddly
}
context.tiddlers = list;
} catch (ex) {
context.statusText = exceptionText(ex,ccTiddlyAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
ccTiddlyAdaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var uriTemplate = '%0#%2';
var host = ccTiddlyAdaptor.fullHostName(this.host);
info.uri = uriTemplate.format([this.host,this.workspace,tiddler.title]);
return info;
};
ccTiddlyAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
return this.getTiddlerRevision(title,null,context,userParams,callback);
};
ccTiddlyAdaptor.prototype.getTiddlerRevision = function(title,revision,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
//title = encodeURIComponent(title);
var host = ccTiddlyAdaptor.fullHostName(this.host);
context.tiddler = new Tiddler(title);
context.tiddler.fields['server.host'] = ccTiddlyAdaptor.minHostName(host);
context.tiddler.fields['server.type'] = ccTiddlyAdaptor.serverType;
if(revision) {
var uriTemplate = '%0msghandle.php?action=revisionDisplay&title=%1&revision=%2';
var uri = uriTemplate.format([host,title,revision]);
var req = ccTiddlyAdaptor.doHttpGET(uri,ccTiddlyAdaptor.getTiddlerCallback2,context);
} else {
// first get the revision list
uriTemplate = '%0msghandle.php?action=revisionList&title=%1';
uri = uriTemplate.format([host,title]);
req = ccTiddlyAdaptor.doHttpGET(uri,ccTiddlyAdaptor.getTiddlerCallback1,context);
}
return typeof req == 'string' ? req : true;
};
ccTiddlyAdaptor.getTiddlerCallback1 = function(status,context,responseText,xhr)
{
context.status = false;
context.statusText = ccTiddlyAdaptor.errorInFunctionMessage.format(['getTiddlerCallback']);
if(status) {
var revs = responseText.split('\n');
var parts = revs[0].split(' ');
var tiddlerRevision = parts[1];
// now get the latest revision
var uriTemplate = '%0msghandle.php?action=revisionDisplay&title=%1&revision=%2';
var host = ccTiddlyAdaptor.fullHostName(context.adaptor.host);
var uri = uriTemplate.format([host,context.tiddler.title,tiddlerRevision]);
var req = ccTiddlyAdaptor.doHttpGET(uri,ccTiddlyAdaptor.getTiddlerCallback2,context);
} else {
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
}
};
ccTiddlyAdaptor.getTiddlerCallback2 = function(status,context,responseText,xhr)
{
context.status = false;
if(status) {
var x = responseText.split('\n');
try {
context.tiddler.text = x[2] ? x[2].unescapeLineBreaks().htmlDecode() : '';
context.tiddler.modifier = x[3];
if(x[4])
context.tiddler.created = Date.convertFromYYYYMMDDHHMM(x[4]);
if(x[5])
context.tiddler.modified = Date.convertFromYYYYMMDDHHMM(x[5]);
//context.tiddler.tags = x[6].join(' ');
} catch(ex) {
context.statusText = exceptionText(ex,ccTiddlyAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
ccTiddlyAdaptor.prototype.getTiddlerRevisionList = function(title,context,userParams,callback)
// get a list of the revisions for a page
{
context = this.setContext(context,userParams,callback);
title = encodeURIComponent(title);
var uriTemplate = '%0msghandle.php?action=revisionList&title=%1';
var host = ccTiddlyAdaptor.fullHostName(this.host);
var uri = uriTemplate.format([host,title]);
context.tiddler = new Tiddler(title);
context.tiddler.fields['server.host'] = ccTiddlyAdaptor.minHostName(host);
context.tiddler.fields['server.type'] = ccTiddlyAdaptor.serverType;
var req = ccTiddlyAdaptor.doHttpGET(uri,ccTiddlyAdaptor.getTiddlerRevisionListCallback,context);
};
ccTiddlyAdaptor.getTiddlerRevisionListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
list = [];
var r = responseText;
if(r != '-') {
var revs = r.split('\n');
var list = [];
for(var i=0; i<revs.length; i++) {
var parts = revs[i].split(' ');
if(parts.length>1) {
var tiddler = new Tiddler(context.tiddler.title);
tiddler.modified = Date.convertFromYYYYMMDDHHMM(parts[0]);
tiddler.fields['server.page.revision'] = String(parts[1]);
tiddler.fields['server.page.version'] = tiddler.fields['server.page.revision'];//!! here temporarily for compatibility
list.push(tiddler);
}
}
}
context.revisions = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
ccTiddlyAdaptor.prototype.putTiddler = function(tiddler,context,callback)
{
context = this.setContext(context,userParams,callback);
var title = encodeURIComponent(tiddler.title);
var host = this && this.host ? this.host : ccTiddlyAdaptor.fullHostName(tiddler.fields['server.host']);
var uriTemplate = '%0RPC2/';
var uri = uriTemplate.format([host,title]);
context.tiddler = tiddler;
context.tiddler.fields['server.host'] = ccTiddlyAdaptor.minHostName(host);
context.tiddler.fields['server.type'] = ccTiddlyAdaptor.serverType;
var req =doHttp('POST',uri,payload,null,this.username,this.password,ccTiddlyAdaptor.putTiddlerCallback,tiddler.text);
return typeof req == 'string' ? req : true;
};
ccTiddlyAdaptor.putTiddlerCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
ccTiddlyAdaptor.prototype.close = function() {return true;};
config.adaptors[ccTiddlyAdaptor.serverType] = ccTiddlyAdaptor;
} // end of 'install only once'
//}}}
Después de utilizar smxi para actualizar Sidux aparece el siguiente mensaje:
Starting up...
Loading, please wait...
kinit: name_to_dev_t(/dev/disk/by-uuid/5e3234bd-e136-49b5-b97c-663caddc0481) = sda2(8,2)
kinit: trying to resume from /dev/disk/by-uuid/5e3234bd-e136-49b5-b97c-663caddc0481
kinit: no resume image, doing normal boot...
resume: libgcrypt version: 1.2.3
resume: could not stat the resume device file
please type in the file name to try again or press ENTER to boot the system:
La solución es volver a generar la partición de intercambio de acuerdo a initramfs
$ sudo swapoff /dev/hdc5
donde /dev/hdc5 es la partición de intercambio
$ sudo mkswap /dev/hdc5
$ sudo update-initramfs -u
https://bugs.launchpad.net/ubuntu/+bug/103148
En algunos casos puede cambiar la notación de hdx a sdx y también puede ser necesario corregir /etc/fstab
find $HOME -type f -print | perl -wnlaF'/' -e 'BEGIN{ print "#EXTM3U"; } /.+\.wmv$|.+\.mpg$|.+\.vob$/i and print "#EXTINF:$F[-1]\nfile://$&";' > movies.m3u
(http://www.commandlinefu.com/commands/view/1270/make-a-list-of-movies.m3u.)
On the server side
nc -l -p 2000 < song.mp3
The client must write:
$ nc server.example.org 2000 | madplay -
(http://www.commandlinefu.com/commands/view/1308/mp3-streaming)
hace unas semanas me cambiaron el modem 2wire que me habia dado telmex hace algunos anios por el nuevo Thomson ST585.
La verad es que me gusto mucho el cambio ya que es mas facil hacer cambios en las configuraciones. Por ejemplo en este modem es muy sencillo configurar el ip dinamico con dyndns.
En esta ocacion les voy a mostrar como cambiar los dns que vienen por default en el modem de telmex y no se puede cambiar desde la interfase grafica.
para cambiar los dns hay que entrar al router por medio de telnet
para eso hay que "telnetear"
telnet 192.168.1.254
el username es Administrator y no tiene password.
dns server route list
y eso te dara una lista de los dns que tienes.
dns server route add dns=208.67.222.222 metric=5 intf=Internet
dns server route add dns=208.67.220.220 metric=5 intf=Internet
con eso pones los nuevos parametros.
dns server route list
y eso te dara la nueva lista con los nuevos dns
si todo sale bien hay que guardar los parametros con esto
saveall
(http://elcanibal.com/opendns-y-el-nuevo-router-de-telmex/)
grep -rl oldstring . |xargs sed -i -e 's/oldstring/newstring/'
(http://www.commandlinefu.com/commands/view/1334/recursive-search-and-replace-old-with-new-string-inside-files)
you can use the scp command to copy files and directories securely between remote hosts without starting an FTP session or logging into the remote systems explicitly. The scp command uses SSH to transfer data, so it requires a password or passphrase for authentication. Unlike rcp or FTP, scp encrypts both the file and any passwords exchanged so that anyone snooping on the network can't view them.
Warning: Be careful when copying between hosts files that have the same names; you may accidently overwrite them.
The syntax for the scp command is:
scp [options] [[user@]host1:]filename1 ... [[user@]host2:]filename2
For example, if user dvader is on a computer called empire.gov, and wants to copy a file called file1.txt to a directory called somedir in his account on a computer called deathstar.com, he would enter:
scp file1.txt dvader@deathstar.com:somedir
Likewise, if he wanted to copy the entire contents of the somedir directory on deathstar.com back to his empire.gov account, he would enter:
scp -r dvader@deathstar.com:somedir somedir
Similarly, if he is working on another computer, but wanted to copy a file called file1.txt from his home directory on empire.gov to a directory called somedir in his account on deathstar.com, he would enter:
scp dvader@empire.gov:file1.txt dvader@deathstar.com:somedir
When using wildcards (e.g., * and ? ) to copy multiple files from a remote system, be sure to enclose the filenames in quotes. This is because the Unix shell, not the scp command, expands unquoted wildcards.
(http://kb.iu.edu/data/agye.html)
startx > startx.log 2>&1
startx |tee startx.log works aswell
Redirection redundancy.
$ startx &> startx.log
(http://www.commandlinefu.com/commands/view/1516/startx-output-to-log-file)