Imagenes de instalación de las versiones estables para Mageia y OpenMandriva.
OpenMandriva: Mageia (Mageia 9) 20/Agosto/2023 - Anuncio, Descargas.
Blogdrake recomienda descargar las imágenes de instalación (iso) vía torrent para evitar corrupción de datos, aprovechar mejor su ancho de banda y mejorar la difusión de las distribuciones.
Rotar fondo de pantalla en Gnome cada cierto tiempo
Enviado por pacho el 5 Marzo, 2007 - 22:40
En este manual se explica lo necesario para conseguir rotar los fondos de pantalla de Gnome.
Hay que compilar un pequeño programita:
Descargar
Quizás lo mejor sea descargar el .c de:
change-bg.c
El contenido es:
/*
Compile with:
gcc -Wall -o change-bg `pkg-config --cflags --libs gnome-vfs-2.0 gconf-2.0` change-bg.c
Copyright (C) 2005, Christian Kellner
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include
#include
#include
#include
#include
GConfClient *gcc = NULL;
char *text_uri = NULL;
GnomeVFSURI *uri;
GList *files = NULL;
GList *iter = NULL;
static gboolean
change_picture (gpointer data)
{
GnomeVFSURI *nuri;
gboolean result;
char *path;
if (gcc == NULL) {
gcc = gconf_client_get_default ();
}
path = (char *) iter->data;
nuri = gnome_vfs_uri_append_string (uri, path);
path = gnome_vfs_uri_to_string (nuri, GNOME_VFS_URI_HIDE_USER_NAME |
GNOME_VFS_URI_HIDE_PASSWORD |
GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD |
GNOME_VFS_URI_HIDE_FRAGMENT_IDENTIFIER |
GNOME_VFS_URI_HIDE_HOST_PORT |
GNOME_VFS_URI_HIDE_HOST_NAME);
fprintf (stdout, "Setting bg to %s\n", path);
result = gconf_client_set_string (gcc,
"/desktop/gnome/background/picture_filename",
path,
NULL);
g_free (path);
if (result == FALSE) {
fprintf (stderr, "Error setting %s as bg\n", path);
}
if (iter->next != NULL) {
iter = iter->next;
} else {
iter = files;
}
return TRUE;
}
static gboolean
visit_files (const gchar *rel_path,
GnomeVFSFileInfo *info,
gboolean recursing_will_loop,
gpointer data,
gboolean *recurse)
{
GList **files = (GList **) data;
*recurse = TRUE;
if (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE &&
(g_str_equal (info->mime_type, "image/png") ||
g_str_equal (info->mime_type, "image/jpeg"))) {
*files = g_list_prepend (*files, g_strdup (rel_path));
fprintf (stdout, "Adding %s\n", rel_path);
}
return !recursing_will_loop;
}
int
main (int argc, char **argv)
{
GnomeVFSResult result;
GMainLoop *ml;
int mins;
if (argc != 3) {
fprintf (stderr, "Usage: %s \n", argv[0]);
return 1;
}
if (! gnome_vfs_init ()) {
fprintf (stderr, "Cannot initialize gnome-vfs.\n");
return 1;
}
text_uri = gnome_vfs_make_uri_from_shell_arg (argv[2]);
mins = atoi (argv[1]);
if (text_uri == NULL || mins == 0) {
fprintf (stderr, "Usage: %s 0> \n", argv[0]);
return 1;
}
fprintf (stdout, "Generating file list ...\n");
files = NULL;
result = gnome_vfs_directory_visit (text_uri,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE,
GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK |
GNOME_VFS_DIRECTORY_VISIT_SAMEFS,
visit_files,
&files);
if (result != GNOME_VFS_OK) {
fprintf (stderr, "Error: %s\n",
gnome_vfs_result_to_string (result));
return 1;
}
uri = gnome_vfs_uri_new (text_uri);
iter = files;
g_timeout_add (1000 * mins, change_picture, NULL);
ml = g_main_loop_new (NULL, FALSE);
fprintf (stdout, "Going into main loop (timeout: %d seconds)\n", mins);
g_main_loop_run (ml);
return 0;
}
Compilándolo
No hay más que ejecutar (es posible que tengáis que instalar los paquetes "-devel" de gconf y gnome-vfs en caso de que os falle al compilar):
gcc -Wall -o change-bg `pkg-config --cflags --libs gnome-vfs-2.0 gconf-2.0` change-bg.c
Uso
./change-bg
Si no tuviese permisos de ejecución, bastaría con ejecutar:
chmod +x change-bg
Haciendo que se arranque al inicio de Gnome
Básicamente tenemos que escoger qué queremos que haga el comando, por ejemplo, yo quiero que rote las imágenes que tengo en /home/pacho/fondos cada 30 segundos, así que "mi" comando sería:
./change-bg 30 /home/pacho/fondos
Este es el comando a ejecutar al inicio, para ejecutar comandos al inicio de Gnome, no hay más que consultar este otro manual
Saludos


