rename 9login into 9dm
author"Luc Saillard <luc@saillard.org>"
Wed Sep 10 16:14:06 2008 +0200 (3 months ago)
changeset 74a534459253bc
parent 73c912aba9de2f
child 7562ab8bf0addf
rename 9login into 9dm
.hgignore
src/9dm.c
src/9dm.h
src/9dm_startx
src/9login.c
src/9login.h
src/9login_startx
src/Makefile.am
src/bio_functions.c
src/desktop.c
src/users.c
src/window_bio_mess_init.c
src/window_bio_mess_misc.c
src/window_login.c
src/window_password.c
--- a/src/Makefile.am Fri Sep 05 12:35:17 2008 +0200
+++ b/src/Makefile.am Wed Sep 10 16:14:06 2008 +0200
@@ -1,12 +1,12 @@
-sbin_PROGRAMS = 9login
-sbin_SCRIPTS = 9login_startx
-EXTRA_DIST = 9login_startx
+sbin_PROGRAMS = 9dm
+sbin_SCRIPTS = 9dm_startx
+EXTRA_DIST = 9dm_startx
-9login_SOURCES= \
- 9login.c \
- 9login.h \
+9dm_SOURCES= \
+ 9dm.c \
+ 9dm.h \
bio_functions.c \
bio_functions.h \
desktop.c \
@@ -29,11 +29,11 @@ 9login_SOURCES= \
window_password.c \
window_password.h
-9login_LDADD=$(GTK2_LIBS) $(CRYPT_LIBS) $(LIBINTL) $(THINKFINGER_LIBS) $(CRYPTO_LIBS)
-9login_CFLAGS=$(GTK2_CFLAGS)
-9login_CPPFLAGS = \
+9dm_LDADD=$(GTK2_LIBS) $(CRYPT_LIBS) $(LIBINTL) $(THINKFINGER_LIBS) $(CRYPTO_LIBS)
+9dm_CFLAGS=$(GTK2_CFLAGS)
+9dm_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
- -DPIXMAPS_DIR=\"$(_9loginpixmapsdir)\" \
+ -DPIXMAPS_DIR=\"$(_9dmpixmapsdir)\" \
-DDATADIR=\"$(datadir)\"
--- a/src/bio_functions.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/bio_functions.c Wed Sep 10 16:14:06 2008 +0200
@@ -18,7 +18,7 @@
#include "window_login.h"
#include "bio_functions.h"
#include "window_bio_mess_misc.h"
-#include "9login.h"
+#include "9dm.h"
static gint bio_welcome_timeout_cb(const gpointer data);
--- a/src/desktop.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/desktop.c Wed Sep 10 16:14:06 2008 +0200
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include <string.h>
--- a/src/users.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/users.c Wed Sep 10 16:14:06 2008 +0200
@@ -31,7 +31,7 @@
#include <shadow.h>
#include <crypt.h>
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include "effects.h"
#include "users.h"
--- a/src/window_bio_mess_init.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/window_bio_mess_init.c Wed Sep 10 16:14:06 2008 +0200
@@ -6,7 +6,7 @@
#include <gdk/gdkx.h>
#include <stdlib.h>
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include "window_bio_mess_init.h"
--- a/src/window_bio_mess_misc.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/window_bio_mess_misc.c Wed Sep 10 16:14:06 2008 +0200
@@ -26,7 +26,7 @@
#include <gdk/gdkx.h>
#include <time.h>
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include "window_password.h"
#include "window_bio_mess_misc.h"
--- a/src/window_login.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/window_login.c Wed Sep 10 16:14:06 2008 +0200
@@ -26,7 +26,7 @@
#include <string.h>
#include <stdlib.h>
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include "effects.h"
#include "users.h"
--- a/src/window_password.c Fri Sep 05 12:35:17 2008 +0200
+++ b/src/window_password.c Wed Sep 10 16:14:06 2008 +0200
@@ -26,7 +26,7 @@
#include <gdk/gdkx.h>
#include <string.h>
-#include "9login.h"
+#include "9dm.h"
#include "desktop.h"
#include "window_password.h"
#include "bio_functions.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Wed Sep 10 16:14:06 2008 +0200
@@ -0,0 +1,61 @@
+syntax: glob
+
+.deps
+.libs
+*~
+*.o
+*.swp
+*.lo
+*.la
+*.gmo
+Makefile.in
+Makefile
+autom4te.cache
+ABOUT-NLS
+COPYING
+INSTALL
+aclocal.m4
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+po/POTFILES
+po/remove-potcdate.sed
+src/easycockpit
+stamp-h1
+m4/codeset.m4
+m4/glibc2.m4
+m4/glibc21.m4
+m4/intdiv0.m4
+m4/intl.m4
+m4/intldir.m4
+m4/intmax.m4
+m4/inttypes-pri.m4
+m4/inttypes_h.m4
+m4/lcmessage.m4
+m4/lock.m4
+m4/longdouble.m4
+m4/longlong.m4
+m4/printf-posix.m4
+m4/size_max.m4
+m4/stdint_h.m4
+m4/uintmax_t.m4
+m4/ulonglong.m4
+m4/visibility.m4
+m4/wchar_t.m4
+m4/wint_t.m4
+m4/xsize.m4
+m4/inttypes-h.m4
+po/Makevars.template
+libtool
+ltmain.sh
+po/stamp-po
+src/9dm
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/9dm.c Wed Sep 10 16:14:06 2008 +0200
@@ -0,0 +1,320 @@
+/*
+ * Little GTK Application that display the list of available user
+ * without using a heavy gdm/kdm program. It's a drop in remplacement of
+ * /bin/login.
+ * If the DISPLAY command line is not set, we use the non graphical version.
+ * If only one account is present, don't ask for password and login
+ * automaticaly
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <time.h>
+
+#include "9dm.h"
+#include "minidesk_network.h"
+#include "desktop.h"
+#include "users.h"
+#include "window_login.h"
+#include "window_password.h"
+#include "window_bio_mess_init.h"
+#include "window_bio_mess_misc.h"
+#include "bio_functions.h"
+
+/* static functions */
+static void usage(const char *programname);
+
+#if HAVE_THINKFINGER
+static gint bio_sensor_message_timeout_cb(const gpointer data);
+static gint bio_sensor_timeout_cb(const gpointer data);
+static GtkWidget *biomess_window;
+static int verification_in_progress = 0;
+#endif
+
+/* Global variables */
+int screen_width, screen_height;
+
+static int debug_mode;
+static char *login_file;
+
+static int verbose_level;
+static const char *short_options = "df:hvV";
+#ifdef HAVE_GETOPT_LONG
+static const struct option long_options[] =
+{
+ {"file", 1, 0, 'f'},
+ {"debug", 0, 0, 'd'},
+ {"version", 0, 0, 'V'},
+ {"verbose", 0, 0, 'v'},
+ {"help", 0, 0, 'h'},
+ {0, 0, 0, 0}
+};
+#endif
+
+
+/**
+ *
+ *
+ *
+ */
+int main(int argc, char **argv)
+{
+ GdkScreen *screen;
+ GList *users_list;
+ GtkWidget *main_window;
+ GdkCursor *cursor;
+ GdkDisplay *display;
+ int main_window_height;
+#ifdef HAVE_GETOPT_LONG
+ int option_index = 0;
+#endif
+ int opt;
+
+#ifdef HAVE_GETOPT_LONG
+ while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != EOF)
+#else
+ while ((opt = getopt(argc, argv, short_options)) != EOF)
+#endif
+ {
+ switch (opt)
+ {
+ case 'd': /* --debug */
+ debug_mode = 1;
+ trace("option debug: %d\n", debug_mode);
+ break;
+
+ case 'f': /* --file */
+ login_file = optarg;
+ trace("option file: %s\n", login_file);
+ break;
+
+ case 'v': /* --verbose */
+ verbose_level++;
+ break;
+
+ case 'V': /* --version */
+ fprintf(stderr,"9login (r___Revision___)\n");
+ fprintf(stderr,"Copyright (C) 2006 Luc Saillard and Neuf Cegetel\n"
+ "9login comes with NO WARRANTY,\n"
+ "to the extent permitted by law.\n"
+ "You may redistribute copies of Stonage\n"
+ "under the terms of the GNU General Public License.\n"
+ "For more information about these matters,\n"
+ "see the files named COPYING.\n");
+ exit(0);
+ case 'h':
+ usage(argv[0]);
+ exit(0);
+ default:
+ usage(argv[0]);
+ exit(1);
+ }
+ }
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ /* manage minihal events for power button */
+ minidesk_socket_init();
+
+ /* configure the keyboard using an helper */
+ g_spawn_command_line_sync("/sbin/configure_x11_keyboard", NULL, NULL, NULL, NULL);
+ g_spawn_command_line_async("/usr/bin/xscreensaver -nosplash", NULL);
+
+ /* initialize gtk */
+ gtk_init(&argc, &argv);
+
+ screen = gdk_screen_get_default();
+ screen_width = gdk_screen_get_width(screen);
+ screen_height = gdk_screen_get_height(screen);
+
+ /* Reset the default font size */
+ GtkSettings *settings = gtk_settings_get_default();
+
+ gtk_settings_set_string_property(settings, "gtk-font-name", "Sans 10", PACKAGE_NAME);
+
+ /* Set the busy cursor */
+ display = gdk_display_get_default();
+ cursor = gdk_cursor_new_for_display(display, GDK_WATCH);
+ gdk_window_set_cursor(gdk_get_default_root_window(), cursor);
+ gdk_cursor_unref(cursor);
+
+ users_list = users_get_from_pwdb();
+ desktop_init();
+
+ main_window = window_login_init(users_list,&main_window_height);
+ if (main_window == NULL)
+ return 1;
+
+#if HAVE_THINKFINGER
+ g_timeout_add(TIMEOUT_1*1000, bio_sensor_message_timeout_cb,(gpointer)main_window_height);
+#endif
+
+ gtk_widget_show(main_window);
+
+ cursor = gdk_cursor_new_for_display(display, GDK_LEFT_PTR);
+ gdk_window_set_cursor(gdk_get_default_root_window(), cursor);
+ gdk_cursor_unref(cursor);
+
+ gtk_main();
+
+ trace("leaving main()\n");
+ return 0;
+}
+
+
+static void
+usage(const char *programname)
+{
+ fprintf(stderr, "Usage: %s [options]\n", programname);
+ fprintf(stderr, "Version: r___Revision___\n");
+ fprintf(stderr, "\n"
+ "Report bugs to luc@saillard.org\n"
+ "Options:\n"
+ " -v --verbose\n"
+ " -h --help\n"
+ " -f --file FILE Write the user login in this file.\n"
+ " -d --debug Activate the debug mode.\n"
+ " -V --version Print the current version of the program.\n"
+ );
+}
+
+
+
+/*
+ *
+ * Some usefull functions to load images
+ *
+ */
+
+static const char *lookup_datadir[] = {
+ PIXMAPS_DIR,
+ "/usr/share/easyneuf/backgrounds",
+ "",
+ "../icons/",
+ "/usr/share/icons",
+ "/usr/share/pixmaps",
+ "/usr/share/easy3d/background",
+ NULL
+};
+
+/**
+ *
+ *
+ */
+GdkPixbuf *
+gdk_pixbuf_new_from_path(const char *filename, int icon_size)
+{
+ GdkPixbuf *pixbuf, *pixbuf_scaled;
+ char temp_filename[PATH_MAX];
+ const char **dir = lookup_datadir;
+
+ if (filename[0] == '/')
+ {
+ pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+ if (pixbuf)
+ goto exit_found;
+ return NULL;
+ }
+ while (*dir)
+ {
+ snprintf(temp_filename, sizeof(temp_filename), "%s/%s", *dir, filename);
+ pixbuf = gdk_pixbuf_new_from_file(temp_filename, NULL);
+ if (pixbuf)
+ goto exit_found;
+ dir++;
+ }
+
+ return NULL;
+
+exit_found :
+ /* Scale the picture if needed */
+ if (!icon_size)
+ return pixbuf;
+ pixbuf_scaled = gdk_pixbuf_scale_simple(pixbuf,
+ icon_size,
+ icon_size,
+ GDK_INTERP_BILINEAR);
+ g_object_unref(pixbuf);
+ return (pixbuf_scaled);
+
+}
+
+void
+login_set_login_user(const char *login)
+{
+ FILE *f;
+
+ if (login_file == NULL)
+ {
+ fprintf(stderr, "%s", login);
+ return;
+ }
+
+ f = fopen(login_file, "w");
+ if (f == NULL)
+ return;
+ fprintf(f, "%s", login);
+ fclose(f);
+}
+
+#if HAVE_THINKFINGER
+static gint bio_sensor_message_timeout_cb(const gpointer data)
+{
+ int height_to_submit = (int)data;
+
+ // si le capteur d'empreinte usb est detecté, alors on affiche le message correspondant
+ if(usb_device_found() != 0)
+ {
+ if(biomess_window == NULL)
+ {
+ biomess_window = window_biomessage_init(height_to_submit);
+ gtk_widget_show(biomess_window);
+ }
+ if((verification_in_progress == 0) && (is_window_biomess()==FALSE) && (is_window_password()==FALSE))
+ {
+ g_timeout_add(TIMEOUT_30*1000, bio_sensor_timeout_cb,NULL);
+ verification_in_progress = 1;
+ verify_all_slot();
+ }
+ }
+ // si le capteur d'empreinte usb n'est plus detecté, ...
+ else if (usb_device_found() == 0)
+ {
+ if(biomess_window != NULL)
+ {
+ gtk_widget_destroy(GTK_WIDGET(biomess_window));
+ biomess_window = NULL;
+ }
+ if(verification_in_progress == 1)
+ {
+ abort_sensor_action(2);
+ }
+ }
+ return TRUE;
+}
+
+void end_of_bio_verification()
+{
+ verification_in_progress = 0;
+}
+
+static gint bio_sensor_timeout_cb(const gpointer data)
+{
+ abort_sensor_action(2);
+ return FALSE;
+}
+#endif
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/9dm.h Wed Sep 10 16:14:06 2008 +0200
@@ -0,0 +1,25 @@
+
+
+#ifndef __9LOGIN_H
+#define __9LOGIN_H
+
+#include "gettext.h"
+#include "utils.h"
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+struct GtkWidget;
+
+extern int screen_width, screen_height;
+
+
+GdkPixbuf *gdk_pixbuf_new_from_path(const char *filename, int icon_size);
+void login_set_login_user(const char *login);
+void end_of_bio_verification();
+
+#define TIMEOUT_1 1
+#define TIMEOUT_10 10
+#define TIMEOUT_30 30
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/9dm_startx Wed Sep 10 16:14:06 2008 +0200
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ -e /etc/default/locale ]; then
+ source /etc/default/locale
+fi
+
+client="/usr/sbin/9login"
+client_args="$*"
+default_server="/usr/bin/Xorg"
+default_server_args="-nolisten tcp -br"
+display=:1
+
+
+if [ x"$XAUTHORITY" = x ]; then
+ XAUTHORITY=$HOME/.Xauthority
+ export XAUTHORITY
+fi
+
+/usr/bin/killall -9 3ddeskd 2>/dev/null
+if [ $? -eq 0 ]; then sleep 1; fi
+
+/usr/bin/xinit $client $client_args -- $default_server $display $default_server_args >/dev/null 2>&1
+
+/usr/bin/deallocvt
+
--- a/src/9login.c Fri Sep 05 12:35:17 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
- * Little GTK Application that display the list of available user
- * without using a heavy gdm/kdm program. It's a drop in remplacement of
- * /bin/login.
- * If the DISPLAY command line is not set, we use the non graphical version.
- * If only one account is present, don't ask for password and login
- * automaticaly
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <locale.h>
-#include <time.h>
-
-#include "9login.h"
-#include "minidesk_network.h"
-#include "desktop.h"
-#include "users.h"
-#include "window_login.h"
-#include "window_password.h"
-#include "window_bio_mess_init.h"
-#include "window_bio_mess_misc.h"
-#include "bio_functions.h"
-
-/* static functions */
-static void usage(const char *programname);
-
-#if HAVE_THINKFINGER
-static gint bio_sensor_message_timeout_cb(const gpointer data);
-static gint bio_sensor_timeout_cb(const gpointer data);
-static GtkWidget *biomess_window;
-static int verification_in_progress = 0;
-#endif
-
-/* Global variables */
-int screen_width, screen_height;
-
-static int debug_mode;
-static char *login_file;
-
-static int verbose_level;
-static const char *short_options = "df:hvV";
-#ifdef HAVE_GETOPT_LONG
-static const struct option long_options[] =
-{
- {"file", 1, 0, 'f'},
- {"debug", 0, 0, 'd'},
- {"version", 0, 0, 'V'},
- {"verbose", 0, 0, 'v'},
- {"help", 0, 0, 'h'},
- {0, 0, 0, 0}
-};
-#endif
-
-
-/**
- *
- *
- *
- */
-int main(int argc, char **argv)
-{
- GdkScreen *screen;
- GList *users_list;
- GtkWidget *main_window;
- GdkCursor *cursor;
- GdkDisplay *display;
- int main_window_height;
-#ifdef HAVE_GETOPT_LONG
- int option_index = 0;
-#endif
- int opt;
-
-#ifdef HAVE_GETOPT_LONG
- while ((opt = getopt_long(argc, argv, short_options, long_options, &option_index)) != EOF)
-#else
- while ((opt = getopt(argc, argv, short_options)) != EOF)
-#endif
- {
- switch (opt)
- {
- case 'd': /* --debug */
- debug_mode = 1;
- trace("option debug: %d\n", debug_mode);
- break;
-
- case 'f': /* --file */
- login_file = optarg;
- trace("option file: %s\n", login_file);
- break;
-
- case 'v': /* --verbose */
- verbose_level++;
- break;
-
- case 'V': /* --version */
- fprintf(stderr,"9login (r___Revision___)\n");
- fprintf(stderr,"Copyright (C) 2006 Luc Saillard and Neuf Cegetel\n"
- "9login comes with NO WARRANTY,\n"
- "to the extent permitted by law.\n"
- "You may redistribute copies of Stonage\n"
- "under the terms of the GNU General Public License.\n"
- "For more information about these matters,\n"
- "see the files named COPYING.\n");
- exit(0);
- case 'h':
- usage(argv[0]);
- exit(0);
- default:
- usage(argv[0]);
- exit(1);
- }
- }
-
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-
- /* manage minihal events for power button */
- minidesk_socket_init();
-
- /* configure the keyboard using an helper */
- g_spawn_command_line_sync("/sbin/configure_x11_keyboard", NULL, NULL, NULL, NULL);
- g_spawn_command_line_async("/usr/bin/xscreensaver -nosplash", NULL);
-
- /* initialize gtk */
- gtk_init(&argc, &argv);
-
- screen = gdk_screen_get_default();
- screen_width = gdk_screen_get_width(screen);
- screen_height = gdk_screen_get_height(screen);
-
- /* Reset the default font size */
- GtkSettings *settings = gtk_settings_get_default();
-
- gtk_settings_set_string_property(settings, "gtk-font-name", "Sans 10", PACKAGE_NAME);
-
- /* Set the busy cursor */
- display = gdk_display_get_default();
- cursor = gdk_cursor_new_for_display(display, GDK_WATCH);
- gdk_window_set_cursor(gdk_get_default_root_window(), cursor);
- gdk_cursor_unref(cursor);
-
- users_list = users_get_from_pwdb();
- desktop_init();
-
- main_window = window_login_init(users_list,&main_window_height);
- if (main_window == NULL)
- return 1;
-
-#if HAVE_THINKFINGER
- g_timeout_add(TIMEOUT_1*1000, bio_sensor_message_timeout_cb,(gpointer)main_window_height);
-#endif
-
- gtk_widget_show(main_window);
-
- cursor = gdk_cursor_new_for_display(display, GDK_LEFT_PTR);
- gdk_window_set_cursor(gdk_get_default_root_window(), cursor);
- gdk_cursor_unref(cursor);
-
- gtk_main();
-
- trace("leaving main()\n");
- return 0;
-}
-
-
-static void
-usage(const char *programname)
-{
- fprintf(stderr, "Usage: %s [options]\n", programname);
- fprintf(stderr, "Version: r___Revision___\n");
- fprintf(stderr, "\n"
- "Report bugs to luc@saillard.org\n"
- "Options:\n"
- " -v --verbose\n"
- " -h --help\n"
- " -f --file FILE Write the user login in this file.\n"
- " -d --debug Activate the debug mode.\n"
- " -V --version Print the current version of the program.\n"
- );
-}
-
-
-
-/*
- *
- * Some usefull functions to load images
- *
- */
-
-static const char *lookup_datadir[] = {
- PIXMAPS_DIR,
- "/usr/share/easyneuf/backgrounds",
- "",
- "../icons/",
- "/usr/share/icons",
- "/usr/share/pixmaps",
- "/usr/share/easy3d/background",
- NULL
-};
-
-/**
- *
- *
- */
-GdkPixbuf *
-gdk_pixbuf_new_from_path(const char *filename, int icon_size)
-{
- GdkPixbuf *pixbuf, *pixbuf_scaled;
- char temp_filename[PATH_MAX];
- const char **dir = lookup_datadir;
-
- if (filename[0] == '/')
- {
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- if (pixbuf)
- goto exit_found;
- return NULL;
- }
- while (*dir)
- {
- snprintf(temp_filename, sizeof(temp_filename), "%s/%s", *dir, filename);
- pixbuf = gdk_pixbuf_new_from_file(temp_filename, NULL);
- if (pixbuf)
- goto exit_found;
- dir++;
- }
-
- return NULL;
-
-exit_found :
- /* Scale the picture if needed */
- if (!icon_size)
- return pixbuf;
- pixbuf_scaled = gdk_pixbuf_scale_simple(pixbuf,
- icon_size,
- icon_size,
- GDK_INTERP_BILINEAR);
- g_object_unref(pixbuf);
- return (pixbuf_scaled);
-
-}
-
-void
-login_set_login_user(const char *login)
-{
- FILE *f;
-
- if (login_file == NULL)
- {
- fprintf(stderr, "%s", login);
- return;
- }
-
- f = fopen(login_file, "w");
- if (f == NULL)
- return;
- fprintf(f, "%s", login);
- fclose(f);
-}
-
-#if HAVE_THINKFINGER
-static gint bio_sensor_message_timeout_cb(const gpointer data)
-{
- int height_to_submit = (int)data;
-
- // si le capteur d'empreinte usb est detecté, alors on affiche le message correspondant
- if(usb_device_found() != 0)
- {
- if(biomess_window == NULL)
- {
- biomess_window = window_biomessage_init(height_to_submit);
- gtk_widget_show(biomess_window);
- }
- if((verification_in_progress == 0) && (is_window_biomess()==FALSE) && (is_window_password()==FALSE))
- {
- g_timeout_add(TIMEOUT_30*1000, bio_sensor_timeout_cb,NULL);
- verification_in_progress = 1;
- verify_all_slot();
- }
- }
- // si le capteur d'empreinte usb n'est plus detecté, ...
- else if (usb_device_found() == 0)
- {
- if(biomess_window != NULL)
- {
- gtk_widget_destroy(GTK_WIDGET(biomess_window));
- biomess_window = NULL;
- }
- if(verification_in_progress == 1)
- {
- abort_sensor_action(2);
- }
- }
- return TRUE;
-}
-
-void end_of_bio_verification()
-{
- verification_in_progress = 0;
-}
-
-static gint bio_sensor_timeout_cb(const gpointer data)
-{
- abort_sensor_action(2);
- return FALSE;
-}
-#endif
-
-
-
--- a/src/9login.h Fri Sep 05 12:35:17 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-
-
-#ifndef __9LOGIN_H
-#define __9LOGIN_H
-
-#include "gettext.h"
-#include "utils.h"
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-struct GtkWidget;
-
-extern int screen_width, screen_height;
-
-
-GdkPixbuf *gdk_pixbuf_new_from_path(const char *filename, int icon_size);
-void login_set_login_user(const char *login);
-void end_of_bio_verification();
-
-#define TIMEOUT_1 1
-#define TIMEOUT_10 10
-#define TIMEOUT_30 30
-
-#endif
-
--- a/src/9login_startx Fri Sep 05 12:35:17 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-if [ -e /etc/default/locale ]; then
- source /etc/default/locale
-fi
-
-client="/usr/sbin/9login"
-client_args="$*"
-default_server="/usr/bin/Xorg"
-default_server_args="-nolisten tcp -br"
-display=:1
-
-
-if [ x"$XAUTHORITY" = x ]; then
- XAUTHORITY=$HOME/.Xauthority
- export XAUTHORITY
-fi
-
-/usr/bin/killall -9 3ddeskd 2>/dev/null
-if [ $? -eq 0 ]; then sleep 1; fi
-
-/usr/bin/xinit $client $client_args -- $default_server $display $default_server_args >/dev/null 2>&1
-
-/usr/bin/deallocvt
-