h1

Variables anidadas: El contenido del contenido de una variable en bash

Junio 22, 2009

Casi me vuelvo loco, pero en fin, este script nos podrá indicar como conseguir tal cosa (sobran unas cuantas lineas, que he estado utilizando hasta que he dado con la solución):

sl01="/var/www";
var=$sl01;
echo $var;
servidor="sl01";
echo servidor = $servidor;
echo $`echo $servidor`;
dato=$`echo $servidor`;
echo dato = $dato;
comando='echo '`echo $dato`;
echo "comando= $comando";
echo `test dato`;
$comando;

valor=`eval echo '$'${servidor}`;
echo el contenido de la variable $servidor es $valor;
h1

montar un ftp dentro de tu sistema de archivos

Junio 10, 2009

Lo transcribo tal cual lo encontré en la web “http://blog.mypapit.net/2007/05/how-to-use-ftp-filesystem-on-ubuntu-using-curlftpfs.html”. Cuando tenga tiempo ya lo traduciré.

Some web hosting company do not offer shell access (SSH or Telnet) to your shared hosting account for security reasons, making it a bit harder for you to do regular file maintenance for your web account. Although the use of regular FTP client is adequate for most cases, some people still prefer to manipulate files directly using standard Unix tools (probably because of old habits).

Fortunately, there’s CurlFtpFS which allow you to mount remote ftp account as a standard filesystem on your Linux operating system.

Using CurlFtpFS
First of all you need to install CurlFtpFS, which in case of Ubuntu or Debian based operating system is to run ’sudo apt-get install curlftpfs’.

Alternatively, you can use Synaptic to install CurlFtpFS.

Assuming you’ve successfully installed curlftpfs, all you need to do in order to mount ftp locally is to to run these commands.

mkdir hostr

sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com hostr

user:pass is the username and password to log into ftp account.

After that, you can change your working directory to the mount-point and use the regular unix utilities to work on the files that normally accessible on the FTP protocol. After you’re done, you can unmount it by running the usual “sudo umount [mountpoint]” command

Using CurlFtpFS in fstab
You can add curlftpfs to fstab for automatic mounting by using this line :

curlftpfs#user:pass@ftp.example.com /mnt/host fuse rw,uid=500,user,noauto 0 0

Note: Please refer to CurlFtpFS website for further reference.

Thanks for reading this post, hopefully this will get you started to use curlftpfs FTP based filesystem in your Linux operating system.

Some web hosting company do not offer shell access (SSH or Telnet) to your shared hosting account for security reasons, making it a bit harder for you to do regular file maintenance for your web account. Although the use of regular FTP client is adequate for most cases, some people still prefer to manipulate files directly using standard Unix tools (probably because of old habits).

Fortunately, there’s CurlFtpFS which allow you to mount remote ftp account as a standard filesystem on your Linux operating system.

Using CurlFtpFS
First of all you need to install CurlFtpFS, which in case of Ubuntu or Debian based operating system is to run ‘sudo apt-get install curlftpfs‘.

Alternatively, you can use Synaptic to install CurlFtpFS.

Assuming you’ve successfully installed curlftpfs, all you need to do in order to mount ftp locally is to to run these commands.

mkdir hostr
sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com host

user:pass is the username and password to log into ftp account.

After that, you can change your working directory to the mount-point and use the regular unix utilities to work on the files that normally accessible on the FTP protocol. After you’re done, you can unmount it by running the usual “sudo umount [mountpoint]” command

Using CurlFtpFS in fstab
You can add curlftpfs to fstab for automatic mounting by using this line :

curlftpfs#user:pass@ftp.example.com /mnt/host fuse rw,uid=500,user,noauto 0 0

Note: Please refer to CurlFtpFS website for further reference.

Thanks for reading this post, hopefully this will get you started to use curlftpfs FTP based filesystem in your Linux operating system.

h1

Instalar programas de windows en GNU-Linux / instalar programas de GNU-Linux en windows

Mayo 27, 2009

Para instalar programas de windows en tu GNU/Linux tienes estas opciones (libres):

- instalar wine (desde apt-get) y luego ejecutar winecfg (para configurar wine). Esto te generará las librerías necesarias para poder instalar y ejecutar programas para windows.

- Usar wine-doors (Que es un sistema que permite instalar ciertos programas de windows de una forma parecida a Synaptic) http://wddb.wine-doors.org/

- PlayOnLinux (Otro sistema parecido) http://www.playonlinux.com/es/

Para instalar programas de GNU/Linux en tu windows:

Te recomiendo que entonces formatees tu windows y te instales una distribución de GNU/Linux, pero si no quieres hacer esto, puedes navegar a http://portableubuntu.demonccc.cloudius.com.ar/ y descargarte portable ubuntu.

Esto te generará una instalación de un sistema linux básico con gnome integrado en tu escritorio de windows.

h1

Instalar un rpm en tu Debian (o en tu Ubuntu)

Abril 15, 2009

Lo primero que debes saber, es que no es recomendable mezclar rpm y deb. El sistema de paquetes de las distribuciones basadas en debian tienen la extensión .deb.

Si quieres instalar un software que viene en formato rpm (red hat), debes convertirlo mediante el comando alien.

A continuación tendrás un paquete en formato .deb mediante el cual podrás instalar tu software.

h1

cliente Ares en mi Linux

Julio 10, 2008

He seguido básicamente dos tutoriales:

1) Instalación

http://www.elblogdemaverick.com/?p=309

2) Configuración

http://www.ubuntu-es.org/index.php?q=node/45882&page=1

———————————————-

sudo apt-get install gift giftcurs giftd giftui libgift0 libgiftproto0 libgnutella-gift libopenft-gift
sudo aptitude install build-essential libgift-dev zlib-bin zlibc zlib1g-dev libgiftproto-dev

Tienes que tener también:
gift-ares-0.3.0

tar xzvf gift-ares-0.3.0.tar.gz
cd gift-ares-0.3.0
./configure
make
sudo make install

Para gnome:
sudo apt-get install giftoxic

Configurar:
gift-setup

setup = 1
hosts_allow = ALL
client_port = 1213
follow_symlinks = 1
plugins = Ares
incoming = ~/.giFT/incoming
completed =
max_peruser_uploads = 3
hide_dot_files = 1
root =
max_uploads = 5
shares_hidden = 0
auto_resync_interval = 86400
share_completed = 1
ignore_incoming = 1
downstream = 0
upstream = 0
host [127.0.0.1] =
port [1213] =
class [1] =
port [1443] =
http_port [2301] =
# Aqui empieza la configuración de Gnutella
alias [] = Ingresa algun alias
max_active [-1] =
lan_mode [0] =
hosts_allow [LOCAL] =
port [3677] =
proxy [] =
port [59049] =
# Aqui comienza la configuración de Ares
username [] = Ingresa algún alias
sessions [4] = 15

timeout [300] =
h1

enviar y recibir por bluetooth

Diciembre 4, 2007

Extraído de la guia ubuntu

Para el envío de archivos desde Nautilus, basta hacer clic con el botón derecho en el archivo que queremos enviar, elegir Enviar a… y después escoger Bluetooth como método de envío y el dispositivo al que queremos enviar el archivo.

Para recibir archivos, necesitamos instalar el paquete gnome-bluetooth. Elegimos la aplicación AplicacionesAccesoriosCompartición de archivos por Bluetooth. Ahora ya podremos buscar Ubuntu desde cualquier dispositivo y enviarle archivos.

h1

Un terminal en el fondo de tu escritorio

Diciembre 2, 2007

Para aquellos que sigamos usando la terminal incluso en sistemas Xwindow.

Enlace

h1

reinstalar grub

Noviembre 29, 2007

Al principio me daba miedo, pero luego no fué para tanto:

  • 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
h1

tu touch pad va demasiado lento?

Noviembre 23, 2007

No os imaginais lo que me maldigo al haber conseguido resolver este problema. Llevo casi un año peleándome con este touchpad que siempre iba demasiado lento.

Solo hay que comentar la siguiente linea del fichero /etc/X11/xorg.conf

# InputDevice “Synaptics Touchpad”

Dioooossss, como no se me ocurrió antes una cosa tan sencillaaaaaaaaaaaaa

h1

Un acuario en tu ordenador

Junio 10, 2007

Es necesario tener instalado el paquete xscreensaver

apt-get install xscreensaver

instalamos el paquete del aquarium

apt-get install shermans-aquarium

Editar el fichero ~/.xscreensaver (si no existe, ejecutar el programa xscreensaver-demo. Este programa generará un fichero por ti.)

Buscar la linea:

programs:

Insertar una linea como esta:


“Sherman’s aquarium” shermans -root \n\

Graba los cambios.

Para configurar los salvapantallas yo lo hago desde gnome en el menú Escritorio/preferencias/salvapantallas