Publicado el 2 comentarios

Ubuntu 16.04 no muestra barra de menú, ni lanzador, ni bordes de ventanas, ni menú superior.

El día de hoy amanecí con este problema, en la última sesión se había actualizado mi sistema el cual instaló un paquete actualizado del compiz y al parecer esa era la causa de la desaparición de manús, lanzador y demás.

Después de buscar un buen tiempo alguna solución en internet les comento que, de todas las soluciones posibles, la que describo a continuación fue la que me funcionó.

Abrimos una terminal donde clic derecho sobre el escritorio y seleccionando “Abrir Terminal”, ya que, en mi caso, no responde la combinación de teclas Ctrl-Alt-T.

Y escribimos los siguientes comandos:

mv ~/.cache/compizconfig-1 ~/.cache/compizconfig-1_old

Estamos renombrando, para no borrar (por si la solución no funciona para ti y puedas recuperar dicha carpeta más tarde), la carpeta .cache/compizconfig-1 que se encuentra en la carpeta inicial del usuario.

Una vez hecho esto reiniciamos el sistema.

sudo reboot

Y ¡vuala! los menús y lanzador volvieron a funcionar normalmente.

Aquí la solución original.

¡Espero y también les sirva, saludos!

Publicado el Dejar un comentario

Vagrant 1.8.5: “default: Warning: Authentication failure. Retrying…”

Al intentar ejecutar un máquina virtual con Vagrant (vagrant up), mandaba los siguientes mensajes:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

Levantaba la máquina virtual pero arrojaba errores al querer entrar a ella a través de ssh (vagrant ssh). No podía acceder a la máquina virtual.

La versión 1.8.5 de vagrant trae este bug. Para solucionarlo es necesario acceder a la máquina virtual a través de VirtualBox y cambiar los permisos del archivo /home/vagrant/.ssh/authorized_keys ejecutando el siguiente comando:

chmod 0600 /home/vagrant/.ssh/authorized_keys

Una vez hecho esto recargamos la máquina virtual (vagrant reload) y la máquina virtual debe arrancar sin ningún problema y ya podremos acceder a ella a través del ssh (vagrant ssh).

¡Saludos!

Publicado el Dejar un comentario

Obtener año, mes o día de un campo fecha en Oracle con EXTRACT.

A veces es necesario obtener sólo una parte de una fecha de un campo tipo datetime en sentencias SQL en Oracle. En un post pasado se explicó como obtener sólo el año, mes o día con la función to_char(). Ahora vamos a ver cómo obtener los mismos datos pero con la función extract().

En el ejemplo siguiente vamos a ver como obtener el día, mes o año de la fecha actual de la base de datos oracle:

-- Obtiene el día 
SELECT EXTRACT(DAY FROM sysdate) FROM dual;

--Obtiene el mes
SELECT EXTRACT(MONTH FROM sysdate) FROM dual;

--Obtiene el año 
SELECT EXTRACT(YEAR FROM sysdate) FROM dual;

A diferencia de la función to_char() que regresa un tipo caracter o alfanumérico, la función extract() regresa el resultado de tipo numérico.

La función extract() también puede extraer la hora, minuto y segundo de un dato tipo datetime:

-- Obtiene la hora 
SELECT EXTRACT(HOUR FROM systimestamp) FROM dual;

--Obtiene el minuto
SELECT EXTRACT(MINUTE FROM systimestamp) FROM dual;

--Obtiene el segundo 
SELECT EXTRACT(SECOND FROM systimestamp) FROM dual;

¡Espero y les sea útil!