← Back to team overview

elementaryart team mailing list archive

[Merge] lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu into lp:lightdm-webkit-greeter

 

Fabian Thoma has proposed merging lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu into lp:lightdm-webkit-greeter.

Requested reviews:
  LightDM Development Team (lightdm-team)
Related bugs:
  Bug #825878 in LightDM Webkit Greeter: "Webkit Greeter is not in Ubuntu Oneiric repos"
  https://bugs.launchpad.net/lightdm-webkit-greeter/+bug/825878

For more details, see:
https://code.launchpad.net/~elementaryart/lightdm-webkit-greeter/fixes-ubuntu/+merge/75399

Changed the packaging to reflect dependency changes
-- 
https://code.launchpad.net/~elementaryart/lightdm-webkit-greeter/fixes-ubuntu/+merge/75399
Your team elementary desktop team is subscribed to branch lp:~elementaryart/lightdm-webkit-greeter/fixes-ubuntu.
=== modified file 'Makefile.am'
--- Makefile.am	2011-02-12 00:33:07 +0000
+++ Makefile.am	2011-09-14 18:39:30 +0000
@@ -18,3 +18,6 @@
 	omf.make \
 	xmldocs.make \
 	po/Makefile.in.in
+
+etcdir = /etc/lightdm/
+etc_DATA = lightdm-webkit-greeter.conf

=== modified file 'configure.ac'
--- configure.ac	2011-05-20 05:03:42 +0000
+++ configure.ac	2011-09-14 18:39:30 +0000
@@ -2,6 +2,7 @@
 
 AC_INIT(lightdm-webkit-greeter, 0.1.0)
 AC_CONFIG_MACRO_DIR(m4)
+AC_SUBST(THEME_DIR)
 AC_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE
 AM_PROG_CC_C_O
@@ -15,7 +16,7 @@
 dnl ###########################################################################
 
 PKG_CHECK_MODULES(GREETER, [
-    liblightdm-gobject-0
+    liblightdm-gobject-1
     gtk+-2.0
     webkit-1.0
     dbus-glib-1
@@ -24,10 +25,10 @@
 dnl ###########################################################################
 dnl Configurable values
 dnl ###########################################################################
-THEME_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=themedir liblightdm-gobject-0`
+THEME_DIR=`pkg-config --define-variable=prefix=$prefix --variable=themedir liblightdm-gobject-0`
 AC_SUBST(THEME_DIR)
 
-GREETER_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=greeterdir liblightdm-gobject-0`
+GREETER_DIR=`pkg-config --define-variable=prefix=$prefix --variable=greeterdir liblightdm-gobject-0`
 AC_SUBST(GREETER_DIR)
 
 dnl ###########################################################################

=== added directory 'debian'
=== added file 'debian/changelog'
--- debian/changelog	1970-01-01 00:00:00 +0000
+++ debian/changelog	2011-09-14 18:39:30 +0000
@@ -0,0 +1,18 @@
+lightdm-webkit-greeter (0.1.0-0ubuntu3) oneiric; urgency=low
+
+  * Fixed the ugly thing
+
+ -- Sergey "Shnatsel" Davidoff <shnatsel@xxxxxxxxx>  Sun, 11 Sep 2011 06:25:14 +0400
+
+lightdm-webkit-greeter (0.1.0-0ubuntu2) natty; urgency=low
+
+  * debian/control:
+    - Add build-depends on gnome-common
+
+ -- Robert Ancell <robert.ancell@xxxxxxxxxxxxx>  Fri, 20 May 2011 16:24:26 +1000
+
+lightdm-webkit-greeter (0.1.0-0ubuntu1) natty; urgency=low
+
+  * New upstream release
+
+ -- Robert Ancell <robert.ancell@xxxxxxxxxxxxx>  Fri, 20 May 2011 14:10:34 +1000

=== added file 'debian/compat'
--- debian/compat	1970-01-01 00:00:00 +0000
+++ debian/compat	2011-09-14 18:39:30 +0000
@@ -0,0 +1,1 @@
+7

=== added file 'debian/control'
--- debian/control	1970-01-01 00:00:00 +0000
+++ debian/control	2011-09-14 18:39:30 +0000
@@ -0,0 +1,20 @@
+Source: lightdm-webkit-greeter
+Section: x11
+Priority: optional
+Maintainer: Robert Ancell <robert.ancell@xxxxxxxxxx>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7.0.50~),
+               gnome-common,
+               liblightdm-gobject-1-dev,
+               libwebkit-dev
+Homepage: https://launchpad.net/lightdm
+Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/lightdm-webkit-greeter/ubuntu
+
+Package: lightdm-greeter-webkit
+Architecture: any
+Depends: ${misc:Depends},
+         ${shlibs:Depends}
+Recommends: lightdm
+Provides: lightdm-greeter
+Description: LightDM Webkit Greeter
+ A LightDM greeter that uses WebKit (HTML/CSS).

=== added file 'debian/copyright'
--- debian/copyright	1970-01-01 00:00:00 +0000
+++ debian/copyright	2011-09-14 18:39:30 +0000
@@ -0,0 +1,24 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
+Name: LightDM Webkit Greeter
+Maintainer: Robert Ancell <robert.ancell@xxxxxxxxx>
+Source: https://launchpad.net/lightdm
+
+Files: *
+Copyright: 2010-2011, Robert Ancell <robert.ancell@xxxxxxxxx>
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program 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 General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+X-Comment: On Debian systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-3’.

=== added file 'debian/rules'
--- debian/rules	1970-01-01 00:00:00 +0000
+++ debian/rules	2011-09-14 18:39:30 +0000
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f 
+
+LDFLAGS+=-Wl,--as-needed
+
+%:
+	dh $@
+
+override_dh_auto_configure:
+	./autogen.sh --prefix=/usr

=== added file 'debian/watch'
--- debian/watch	1970-01-01 00:00:00 +0000
+++ debian/watch	2011-09-14 18:39:30 +0000
@@ -0,0 +1,2 @@
+version=3
+http://people.ubuntu.com/~robert-ancell/lightdm/releases/lightdm-webkit-greeter-(.*)\.tar\.gz

=== added file 'lightdm-webkit-greeter.conf'
--- lightdm-webkit-greeter.conf	1970-01-01 00:00:00 +0000
+++ lightdm-webkit-greeter.conf	2011-09-14 18:39:30 +0000
@@ -0,0 +1,18 @@
+#
+# background = Background file to use, either an image path or a color (e.g. #772953)
+# theme-name = GTK+ theme to use
+# font-name = Font to use
+# xft-antialias = Whether to antialias Xft fonts (true or false)
+# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
+# xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
+# xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
+#
+[greeter]
+background=/usr/share/backgrounds/warty-final-ubuntu.png
+theme-name=Ambiance
+webkit-theme=elementary
+font-name=Ubuntu 11
+xft-antialias=true
+xft-dpi=96
+xft-hintstyle=slight
+xft-rgba=rgb

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2011-05-20 05:03:42 +0000
+++ src/Makefile.am	2011-09-14 18:39:30 +0000
@@ -1,5 +1,5 @@
 greeter_PROGRAMS = lightdm-webkit-greeter
-greeterdir = $(GREETER_DIR)
+greeterdir = $(bindir)
 
 lightdm_webkit_greeter_SOURCES = \
 	lightdm-webkit-greeter.c

=== modified file 'src/lightdm-webkit-greeter.c'
--- src/lightdm-webkit-greeter.c	2011-05-20 05:28:00 +0000
+++ src/lightdm-webkit-greeter.c	2011-09-14 18:39:30 +0000
@@ -15,25 +15,28 @@
 #include <JavaScriptCore/JavaScript.h>
 #include <glib/gi18n.h>
 
-#include <lightdm/greeter.h>
+#include <lightdm.h>
 
-static JSClassRef gettext_class, ldm_greeter_class, ldm_user_class, ldm_language_class, ldm_layout_class, ldm_session_class;
+static JSClassRef gettext_class, lightdm_greeter_class, lightdm_user_class, lightdm_language_class, lightdm_layout_class, lightdm_session_class;
 
 static GtkWidget *web_view, *window;
 
 static void
-show_prompt_cb (LdmGreeter *greeter, const gchar *text, WebKitWebView *view)
+show_prompt_cb (LightDMGreeter *greeter, const gchar *text, WebKitWebView *view)
 {
     gchar *command;
 
+    g_debug("Show prompt %s", text);
+
     command = g_strdup_printf ("show_prompt('%s')", text); // FIXME: Escape text
-    webkit_web_view_execute_script (view, command);
+    webkit_web_view_execute_script (web_view, command);
     g_free (command);
 }
 
 static void
-show_message_cb (LdmGreeter *greeter, const gchar *text, WebKitWebView *view)
+show_message_cb (LightDMGreeter *greeter, const gchar *text, WebKitWebView *view)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     gchar *command;
 
     command = g_strdup_printf ("show_message('%s')", text); // FIXME: Escape text
@@ -42,13 +45,14 @@
 }
 
 static void
-authentication_complete_cb (LdmGreeter *greeter, WebKitWebView *view)
+authentication_complete_cb (LightDMGreeter *greeter, WebKitWebView *view)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     webkit_web_view_execute_script (view, "authentication_complete()");
 }
 
 static void
-timed_login_cb (LdmGreeter *greeter, const gchar *username, WebKitWebView *view)
+timed_login_cb (LightDMGreeter *greeter, const gchar *username, WebKitWebView *view)
 {
     gchar *command;
 
@@ -60,6 +64,7 @@
 static gboolean
 fade_timer_cb (gpointer data)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     gdouble opacity;
 
     opacity = gtk_window_get_opacity (GTK_WINDOW (window));
@@ -75,7 +80,7 @@
 }
 
 static void
-quit_cb (LdmGreeter *greeter, const gchar *username)
+quit_cb (LightDMGreeter *greeter, const gchar *username)
 {
     /* Fade out the greeter */
     g_timeout_add (40, (GSourceFunc) fade_timer_cb, NULL);
@@ -87,10 +92,10 @@
                   JSStringRef propertyName,
                   JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_user_get_name (user));
+    string = JSStringCreateWithUTF8CString (lightdm_user_get_name (user));
     return JSValueMakeString (context, string);
 }
 
@@ -100,10 +105,10 @@
                        JSStringRef propertyName,
                        JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_user_get_real_name (user));
+    string = JSStringCreateWithUTF8CString (lightdm_user_get_real_name (user));
     return JSValueMakeString (context, string);
 }
 
@@ -113,10 +118,10 @@
                           JSStringRef propertyName,
                           JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_user_get_display_name (user));
+    string = JSStringCreateWithUTF8CString (lightdm_user_get_display_name (user));
     return JSValueMakeString (context, string);
 }
 
@@ -126,10 +131,10 @@
                    JSStringRef propertyName,
                    JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_user_get_image (user));
+    string = JSStringCreateWithUTF8CString (lightdm_user_get_image (user));
     return JSValueMakeString (context, string);
 }
 
@@ -139,8 +144,8 @@
                       JSStringRef propertyName,
                       JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
-    const gchar *language = ldm_user_get_language (user);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
+    const gchar *language = lightdm_user_get_language (user);
     JSStringRef string;
 
     if (!language)
@@ -156,8 +161,8 @@
                     JSStringRef propertyName,
                     JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
-    const gchar *layout = ldm_user_get_layout (user);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
+    const gchar *layout = lightdm_user_get_layout (user);
     JSStringRef string;
 
     if (!layout)
@@ -173,8 +178,9 @@
                      JSStringRef propertyName,
                      JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
-    const gchar *session = ldm_user_get_session (user);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
+    const gchar *session = lightdm_user_get_session (user);
     JSStringRef string;
 
     if (!session)
@@ -190,8 +196,8 @@
                        JSStringRef propertyName,
                        JSValueRef *exception)
 {
-    LdmUser *user = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_user_get_logged_in (user));
+    LightDMUser *user = JSObjectGetPrivate (thisObject);
+    return JSValueMakeBoolean (context, lightdm_user_get_logged_in (user));
 }
 
 static JSValueRef
@@ -200,10 +206,10 @@
                       JSStringRef propertyName,
                       JSValueRef *exception)
 {
-    LdmLanguage *language = JSObjectGetPrivate (thisObject);
+    LightDMLanguage *language = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_language_get_code (language));
+    string = JSStringCreateWithUTF8CString (lightdm_language_get_code (language));
     return JSValueMakeString (context, string);
 }
 
@@ -213,10 +219,10 @@
                       JSStringRef propertyName,
                       JSValueRef *exception)
 {
-    LdmLanguage *language = JSObjectGetPrivate (thisObject);
+    LightDMLanguage *language = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_language_get_name (language));
+    string = JSStringCreateWithUTF8CString (lightdm_language_get_name (language));
     return JSValueMakeString (context, string);
 }
 
@@ -226,10 +232,10 @@
                            JSStringRef propertyName,
                            JSValueRef *exception)
 {
-    LdmLanguage *language = JSObjectGetPrivate (thisObject);
+    LightDMLanguage *language = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_language_get_territory (language));
+    string = JSStringCreateWithUTF8CString (lightdm_language_get_territory (language));
     return JSValueMakeString (context, string);
 }
 
@@ -239,10 +245,10 @@
                     JSStringRef propertyName,
                     JSValueRef *exception)
 {
-    LdmLayout *layout = JSObjectGetPrivate (thisObject);
+    LightDMLayout *layout = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_layout_get_name (layout));
+    string = JSStringCreateWithUTF8CString (lightdm_layout_get_name (layout));
     return JSValueMakeString (context, string);
 }
 
@@ -252,10 +258,11 @@
                                  JSStringRef propertyName,
                                  JSValueRef *exception)
 {
-    LdmLayout *layout = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMLayout *layout = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_layout_get_short_description (layout));
+    string = JSStringCreateWithUTF8CString (lightdm_layout_get_short_description (layout));
     return JSValueMakeString (context, string);
 }
 
@@ -265,10 +272,11 @@
                            JSStringRef propertyName,
                            JSValueRef *exception)
 {
-    LdmLayout *layout = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMLayout *layout = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_layout_get_description (layout));
+    string = JSStringCreateWithUTF8CString (lightdm_layout_get_description (layout));
     return JSValueMakeString (context, string);
 }
 
@@ -278,10 +286,10 @@
                     JSStringRef propertyName,
                     JSValueRef *exception)
 {
-    LdmSession *session = JSObjectGetPrivate (thisObject);
+    LightDMSession *session = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_session_get_key (session));
+    string = JSStringCreateWithUTF8CString (lightdm_session_get_key (session));
     return JSValueMakeString (context, string);
 
 }
@@ -291,10 +299,10 @@
                      JSStringRef propertyName,
                      JSValueRef *exception)
 {
-    LdmSession *session = JSObjectGetPrivate (thisObject);
+    LightDMSession *session = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_session_get_name (session));
+    string = JSStringCreateWithUTF8CString (lightdm_session_get_name (session));
     return JSValueMakeString (context, string);
 }
 
@@ -304,10 +312,10 @@
                         JSStringRef propertyName,
                         JSValueRef *exception)
 {
-    LdmSession *session = JSObjectGetPrivate (thisObject);
+    LightDMSession *session = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_session_get_comment (session));
+    string = JSStringCreateWithUTF8CString (lightdm_session_get_comment (session));
     return JSValueMakeString (context, string);
 }
 
@@ -317,10 +325,10 @@
                  JSStringRef propertyName,
                  JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_hostname (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_get_hostname ());
 
     return JSValueMakeString (context, string);
 }
@@ -331,10 +339,10 @@
                   JSStringRef propertyName,
                   JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     gint num_users;
 
-    num_users = ldm_greeter_get_num_users (greeter);
+    num_users = g_list_length(lightdm_user_list_get_users (lightdm_user_list_get_instance()));
     return JSValueMakeNumber (context, num_users);
 }
 
@@ -344,20 +352,20 @@
               JSStringRef propertyName,
               JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSObjectRef array;
     const GList *users, *link;
     guint i, n_users = 0;
     JSValueRef *args;
 
-    users = ldm_greeter_get_users (greeter);
+    users = lightdm_user_list_get_users( lightdm_user_list_get_instance() );
     n_users = g_list_length ((GList *)users);
     args = g_malloc (sizeof (JSValueRef) * (n_users + 1));
     for (i = 0, link = users; link; i++, link = link->next)
     {
-        LdmUser *user = link->data;
+        LightDMUser *user = link->data;
         g_object_ref (user);
-        args[i] = JSObjectMake (context, ldm_user_class, user);
+        args[i] = JSObjectMake (context, lightdm_user_class, user);
     }
 
     array = JSObjectMakeArray (context, n_users, args, NULL);
@@ -371,20 +379,19 @@
                   JSStringRef propertyName,
                   JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSObjectRef array;
     const GList *languages, *link;
     guint i, n_languages = 0;
     JSValueRef *args;
 
-    languages = ldm_greeter_get_languages (greeter);
+    languages = lightdm_get_languages ();
     n_languages = g_list_length ((GList *)languages);
     args = g_malloc (sizeof (JSValueRef) * (n_languages + 1));
     for (i = 0, link = languages; link; i++, link = link->next)
     {
-        LdmLanguage *language = link->data;
+        LightDMLanguage *language = link->data;
         g_object_ref (language);
-        args[i] = JSObjectMake (context, ldm_language_class, language);
+        args[i] = JSObjectMake (context, lightdm_language_class, language);
     }
 
     array = JSObjectMakeArray (context, n_languages, args, NULL);
@@ -398,10 +405,10 @@
                          JSStringRef propertyName,
                          JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_default_language (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_language_get_name((LightDMLanguage *)lightdm_get_language ()));
 
     return JSValueMakeString (context, string);
 }
@@ -412,10 +419,9 @@
                        JSStringRef propertyName,
                        JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_default_layout (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_layout_get_name(lightdm_get_layout ()));
 
     return JSValueMakeString (context, string);
 }
@@ -426,20 +432,19 @@
                 JSStringRef propertyName,
                 JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSObjectRef array;
     const GList *layouts, *link;
     guint i, n_layouts = 0;
     JSValueRef *args;
 
-    layouts = ldm_greeter_get_layouts (greeter);
+    layouts = lightdm_get_layouts ();
     n_layouts = g_list_length ((GList *)layouts);
     args = g_malloc (sizeof (JSValueRef) * (n_layouts + 1));
     for (i = 0, link = layouts; link; i++, link = link->next)
     {
-        LdmLayout *layout = link->data;
+        LightDMLayout *layout = link->data;
         g_object_ref (layout);
-        args[i] = JSObjectMake (context, ldm_layout_class, layout);
+        args[i] = JSObjectMake (context, lightdm_layout_class, layout);
     }
 
     array = JSObjectMakeArray (context, n_layouts, args, NULL);
@@ -453,10 +458,10 @@
                JSStringRef propertyName,
                JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_layout (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_layout_get_name(lightdm_get_layout ()));
 
     return JSValueMakeString (context, string);
 }
@@ -468,7 +473,6 @@
                JSValueRef value,
                JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef layout_arg;
     char layout[1024];
 
@@ -480,7 +484,7 @@
     JSStringGetUTF8CString (layout_arg, layout, 1024);
     JSStringRelease (layout_arg);
 
-    ldm_greeter_set_layout (greeter, layout);
+    //lightdm_set_layout (layout);
 
     return true;
 }
@@ -491,20 +495,19 @@
                  JSStringRef propertyName,
                  JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSObjectRef array;
     const GList *sessions, *link;
     guint i, n_sessions = 0;
     JSValueRef *args;
 
-    sessions = ldm_greeter_get_sessions (greeter);
+    sessions = lightdm_get_sessions ();
     n_sessions = g_list_length ((GList *)sessions);
     args = g_malloc (sizeof (JSValueRef) * (n_sessions + 1));
     for (i = 0, link = sessions; link; i++, link = link->next)
     {
-        LdmSession *session = link->data;
+        LightDMSession *session = link->data;
         g_object_ref (session);
-        args[i] = JSObjectMake (context, ldm_session_class, session);
+        args[i] = JSObjectMake (context, lightdm_session_class, session);
     }
 
     array = JSObjectMakeArray (context, n_sessions, args, NULL);
@@ -518,10 +521,10 @@
                         JSStringRef propertyName,
                         JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_default_session (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_greeter_get_default_session_hint (greeter));
 
     return JSValueMakeString (context, string);
 }
@@ -532,10 +535,10 @@
                          JSStringRef propertyName,
                          JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef string;
 
-    string = JSStringCreateWithUTF8CString (ldm_greeter_get_timed_login_user (greeter));
+    string = JSStringCreateWithUTF8CString (lightdm_greeter_get_autologin_user_hint (greeter));
 
     return JSValueMakeString (context, string);
 }
@@ -546,91 +549,13 @@
                           JSStringRef propertyName,
                           JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     gint delay;
 
-    delay = ldm_greeter_get_timed_login_delay (greeter);
+    delay = lightdm_greeter_get_autologin_timeout_hint (greeter);
     return JSValueMakeNumber (context, delay);
 }
-
-static JSValueRef
-get_string_property_cb (JSContextRef context,
-                        JSObjectRef function,
-                        JSObjectRef thisObject,
-                        size_t argumentCount,
-                        const JSValueRef arguments[],
-                        JSValueRef *exception)
-{
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    JSStringRef name_arg;
-    char name[1024];
-    gchar *value;
-    JSStringRef string;
-
-    // FIXME: Throw exception
-    if (argumentCount != 1)
-        return JSValueMakeNull (context);
-
-    name_arg = JSValueToStringCopy (context, arguments[0], NULL);
-    JSStringGetUTF8CString (name_arg, name, 1024);
-    JSStringRelease (name_arg);
-
-    value = ldm_greeter_get_string_property (greeter, name);
-
-    if (!value)
-        return JSValueMakeNull (context);
-
-    string = JSStringCreateWithUTF8CString (value);
-    g_free (value);
-    return JSValueMakeString (context, string);
-}
-
-static JSValueRef
-get_integer_property_cb (JSContextRef context,
-                         JSObjectRef function,
-                         JSObjectRef thisObject,
-                         size_t argumentCount,
-                         const JSValueRef arguments[],
-                         JSValueRef *exception)
-{
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    JSStringRef name_arg;
-    char name[1024];
-
-    // FIXME: Throw exception
-    if (argumentCount != 1)
-        return JSValueMakeNull (context);
-
-    name_arg = JSValueToStringCopy (context, arguments[0], NULL);
-    JSStringGetUTF8CString (name_arg, name, 1024);
-    JSStringRelease (name_arg);
-
-    return JSValueMakeNumber (context, ldm_greeter_get_integer_property (greeter, name));
-}
-
-static JSValueRef
-get_boolean_property_cb (JSContextRef context,
-                         JSObjectRef function,
-                         JSObjectRef thisObject,
-                         size_t argumentCount,
-                         const JSValueRef arguments[],
-                         JSValueRef *exception)
-{
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    JSStringRef name_arg;
-    char name[1024];
-
-    // FIXME: Throw exception
-    if (argumentCount != 1)
-        return JSValueMakeNull (context);
-
-    name_arg = JSValueToStringCopy (context, arguments[0], NULL);
-    JSStringGetUTF8CString (name_arg, name, 1024);
-    JSStringRelease (name_arg);
-
-    return JSValueMakeBoolean (context, ldm_greeter_get_boolean_property (greeter, name));
-}
-
 static JSValueRef
 cancel_timed_login_cb (JSContextRef context,
                        JSObjectRef function,
@@ -639,13 +564,14 @@
                        const JSValueRef arguments[],
                        JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
 
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_cancel_timed_login (greeter);
+    lightdm_greeter_cancel_autologin (greeter);
     return JSValueMakeNull (context);
 }
 
@@ -657,7 +583,8 @@
                          const JSValueRef arguments[],
                          JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef name_arg;
     char name[1024];
 
@@ -669,7 +596,7 @@
     JSStringGetUTF8CString (name_arg, name, 1024);
     JSStringRelease (name_arg);
 
-    ldm_greeter_start_authentication (greeter, name);
+    lightdm_greeter_authenticate (greeter, name);
     return JSValueMakeNull (context);
 }
 
@@ -681,11 +608,13 @@
                    const JSValueRef arguments[],
                    JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef secret_arg;
     char secret[1024];
 
     // FIXME: Throw exception
+    g_debug("%d %d %d\n", argumentCount,  argumentCount == 1, JSValueGetType (context, arguments[0])); 
     if (!(argumentCount == 1 && JSValueGetType (context, arguments[0]) == kJSTypeString))
         return JSValueMakeNull (context);
 
@@ -693,7 +622,9 @@
     JSStringGetUTF8CString (secret_arg, secret, 1024);
     JSStringRelease (secret_arg);
 
-    ldm_greeter_provide_secret (greeter, secret);
+    g_debug(secret);
+    // TODO
+    lightdm_greeter_respond (greeter, secret); 
     return JSValueMakeNull (context);
 }
 
@@ -705,13 +636,13 @@
                           const JSValueRef arguments[],
                           JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
 
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_cancel_authentication (greeter);
+    lightdm_greeter_cancel_authentication (greeter);
     return JSValueMakeNull (context);
 }
 
@@ -721,8 +652,8 @@
                             JSStringRef propertyName,
                             JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeString (context, JSStringCreateWithUTF8CString (ldm_greeter_get_authentication_user (greeter)));
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
+    return JSValueMakeString (context, JSStringCreateWithUTF8CString (lightdm_greeter_get_authentication_user (greeter)));
 }
 
 static JSValueRef
@@ -731,8 +662,8 @@
                          JSStringRef propertyName,
                          JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_greeter_get_is_authenticated (greeter));
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
+    return JSValueMakeBoolean (context, lightdm_greeter_get_is_authenticated (greeter));
 }
 
 static JSValueRef
@@ -741,8 +672,7 @@
                     JSStringRef propertyName,
                     JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_greeter_get_can_suspend (greeter));
+    return JSValueMakeBoolean (context, lightdm_get_can_suspend ());
 }
 
 static JSValueRef
@@ -753,13 +683,12 @@
             const JSValueRef arguments[],
             JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_suspend (greeter);
+    lightdm_suspend(NULL);
     return JSValueMakeNull (context);
 }
 
@@ -769,8 +698,8 @@
                       JSStringRef propertyName,
                       JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_greeter_get_can_hibernate (greeter));
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    return JSValueMakeBoolean (context, lightdm_get_can_hibernate ());
 }
 
 static JSValueRef
@@ -781,13 +710,12 @@
               const JSValueRef arguments[],
               JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_hibernate (greeter);
+    lightdm_hibernate (NULL);
     return JSValueMakeNull (context);
 }
 
@@ -797,8 +725,8 @@
                     JSStringRef propertyName,
                     JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_greeter_get_can_restart (greeter));
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    return JSValueMakeBoolean (context, lightdm_get_can_restart ());
 }
 
 static JSValueRef
@@ -809,13 +737,11 @@
             const JSValueRef arguments[],
             JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_restart (greeter);
+    lightdm_restart (NULL);
     return JSValueMakeNull (context);
 }
 
@@ -825,8 +751,7 @@
                      JSStringRef propertyName,
                      JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-    return JSValueMakeBoolean (context, ldm_greeter_get_can_shutdown (greeter));
+    return JSValueMakeBoolean (context, lightdm_get_can_shutdown ());
 }
 
 static JSValueRef
@@ -837,13 +762,11 @@
              const JSValueRef arguments[],
              JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
-
     // FIXME: Throw exception
     if (argumentCount != 0)
         return JSValueMakeNull (context);
 
-    ldm_greeter_shutdown (greeter);
+    lightdm_shutdown (NULL);
     return JSValueMakeNull (context);
 }
 
@@ -855,13 +778,12 @@
           const JSValueRef arguments[],
           JSValueRef *exception)
 {
-    LdmGreeter *greeter = JSObjectGetPrivate (thisObject);
+    g_debug("%s", __FUNCTION__);
+    LightDMGreeter *greeter = JSObjectGetPrivate (thisObject);
     JSStringRef arg;
     char username[1024], *session = NULL, *language = NULL;
 
     // FIXME: Throw exception
-    if (argumentCount < 1 || argumentCount > 3)
-        return JSValueMakeNull (context);
 
     arg = JSValueToStringCopy (context, arguments[0], NULL);
     JSStringGetUTF8CString (arg, username, 1024);
@@ -883,7 +805,7 @@
         JSStringRelease (arg);
     }
 
-    ldm_greeter_login (greeter, username, session, language);
+    lightdm_greeter_start_session_sync (greeter, NULL, NULL);
     g_free (session);
     g_free (language);
 
@@ -898,6 +820,7 @@
             const JSValueRef arguments[],
             JSValueRef *exception)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     JSStringRef string_arg, result;
     char string[1024];
 
@@ -921,6 +844,7 @@
              const JSValueRef arguments[],
              JSValueRef *exception)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     JSStringRef string_arg, plural_string_arg, result;
     char string[1024], plural_string[1024];
     unsigned int n;
@@ -943,7 +867,7 @@
     return JSValueMakeString (context, result);
 }
 
-static const JSStaticValue ldm_user_values[] =
+static const JSStaticValue lightdm_user_values[] =
 {
     { "name", get_user_name_cb, NULL, kJSPropertyAttributeReadOnly },
     { "real_name", get_user_real_name_cb, NULL, kJSPropertyAttributeReadOnly },
@@ -956,7 +880,7 @@
     { NULL, NULL, NULL, 0 }
 };
 
-static const JSStaticValue ldm_language_values[] =
+static const JSStaticValue lightdm_language_values[] =
 {
     { "code", get_language_code_cb, NULL, kJSPropertyAttributeReadOnly },
     { "name", get_language_name_cb, NULL, kJSPropertyAttributeReadOnly },
@@ -964,7 +888,7 @@
     { NULL, NULL, NULL, 0 }
 };
 
-static const JSStaticValue ldm_layout_values[] =
+static const JSStaticValue lightdm_layout_values[] =
 {
     { "name", get_layout_name_cb, NULL, kJSPropertyAttributeReadOnly },
     { "short_description", get_layout_short_description_cb, NULL, kJSPropertyAttributeReadOnly },
@@ -972,7 +896,7 @@
     { NULL, NULL, NULL, 0 }
 };
 
-static const JSStaticValue ldm_session_values[] =
+static const JSStaticValue lightdm_session_values[] =
 {
     { "key", get_session_key_cb, NULL, kJSPropertyAttributeReadOnly },
     { "name", get_session_name_cb, NULL, kJSPropertyAttributeReadOnly },
@@ -980,7 +904,7 @@
     { NULL, NULL, NULL, 0 }
 };
 
-static const JSStaticValue ldm_greeter_values[] =
+static const JSStaticValue lightdm_greeter_values[] =
 {
     { "hostname", get_hostname_cb, NULL, kJSPropertyAttributeReadOnly },
     { "users", get_users_cb, NULL, kJSPropertyAttributeReadOnly },
@@ -1003,11 +927,8 @@
     { NULL, NULL, NULL, 0 }
 };
 
-static const JSStaticFunction ldm_greeter_functions[] =
+static const JSStaticFunction lightdm_greeter_functions[] =
 {
-    { "get_string_property", get_string_property_cb, kJSPropertyAttributeReadOnly },
-    { "get_integer_property", get_integer_property_cb, kJSPropertyAttributeReadOnly },
-    { "get_boolean_property", get_boolean_property_cb, kJSPropertyAttributeReadOnly },
     { "cancel_timed_login", cancel_timed_login_cb, kJSPropertyAttributeReadOnly },
     { "start_authentication", start_authentication_cb, kJSPropertyAttributeReadOnly },
     { "provide_secret", provide_secret_cb, kJSPropertyAttributeReadOnly },
@@ -1027,50 +948,50 @@
     { NULL, NULL, 0 }
 };
 
-static const JSClassDefinition ldm_user_definition =
-{
-    0,                     /* Version */
-    kJSClassAttributeNone, /* Attributes */
-    "LdmUser",             /* Class name */
-    NULL,                  /* Parent class */
-    ldm_user_values,       /* Static values */
-};
-
-static const JSClassDefinition ldm_language_definition =
-{
-    0,                     /* Version */
-    kJSClassAttributeNone, /* Attributes */
-    "LdmLanguage",         /* Class name */
-    NULL,                  /* Parent class */
-    ldm_language_values,   /* Static values */
-};
-
-static const JSClassDefinition ldm_layout_definition =
-{
-    0,                     /* Version */
-    kJSClassAttributeNone, /* Attributes */
-    "LdmLayout",           /* Class name */
-    NULL,                  /* Parent class */
-    ldm_layout_values,     /* Static values */
-};
-
-static const JSClassDefinition ldm_session_definition =
-{
-    0,                     /* Version */
-    kJSClassAttributeNone, /* Attributes */
-    "LdmSession",          /* Class name */
-    NULL,                  /* Parent class */
-    ldm_session_values,    /* Static values */
-};
-
-static const JSClassDefinition ldm_greeter_definition =
-{
-    0,                     /* Version */
-    kJSClassAttributeNone, /* Attributes */
-    "LdmGreeter",          /* Class name */
-    NULL,                  /* Parent class */
-    ldm_greeter_values,    /* Static values */
-    ldm_greeter_functions, /* Static functions */
+static const JSClassDefinition lightdm_user_definition =
+{
+    0,                     /* Version */
+    kJSClassAttributeNone, /* Attributes */
+    "LightDMUser",             /* Class name */
+    NULL,                  /* Parent class */
+    lightdm_user_values,       /* Static values */
+};
+
+static const JSClassDefinition lightdm_language_definition =
+{
+    0,                     /* Version */
+    kJSClassAttributeNone, /* Attributes */
+    "LightDMLanguage",         /* Class name */
+    NULL,                  /* Parent class */
+    lightdm_language_values,   /* Static values */
+};
+
+static const JSClassDefinition lightdm_layout_definition =
+{
+    0,                     /* Version */
+    kJSClassAttributeNone, /* Attributes */
+    "LightDMLayout",           /* Class name */
+    NULL,                  /* Parent class */
+    lightdm_layout_values,     /* Static values */
+};
+
+static const JSClassDefinition lightdm_session_definition =
+{
+    0,                     /* Version */
+    kJSClassAttributeNone, /* Attributes */
+    "LightDMSession",          /* Class name */
+    NULL,                  /* Parent class */
+    lightdm_session_values,    /* Static values */
+};
+
+static const JSClassDefinition lightdm_greeter_definition =
+{
+    0,                     /* Version */
+    kJSClassAttributeNone, /* Attributes */
+    "LightDMGreeter",          /* Class name */
+    NULL,                  /* Parent class */
+    lightdm_greeter_values,    /* Static values */
+    lightdm_greeter_functions, /* Static functions */
 };
 
 static const JSClassDefinition gettext_definition =
@@ -1088,16 +1009,17 @@
                           WebKitWebFrame *frame,
                           JSGlobalContextRef context,
                           JSObjectRef window_object,
-                          LdmGreeter *greeter)
+                          LightDMGreeter *greeter)
 {
-    JSObjectRef gettext_object, ldm_greeter_object;
+    g_debug("%s %d", __FUNCTION__, __LINE__);
+    JSObjectRef gettext_object, lightdm_greeter_object;
 
     gettext_class = JSClassCreate (&gettext_definition);
-    ldm_greeter_class = JSClassCreate (&ldm_greeter_definition);
-    ldm_user_class = JSClassCreate (&ldm_user_definition);
-    ldm_language_class = JSClassCreate (&ldm_language_definition);
-    ldm_layout_class = JSClassCreate (&ldm_layout_definition);
-    ldm_session_class = JSClassCreate (&ldm_session_definition);
+    lightdm_greeter_class = JSClassCreate (&lightdm_greeter_definition);
+    lightdm_user_class = JSClassCreate (&lightdm_user_definition);
+    lightdm_language_class = JSClassCreate (&lightdm_language_definition);
+    lightdm_layout_class = JSClassCreate (&lightdm_layout_definition);
+    lightdm_session_class = JSClassCreate (&lightdm_session_definition);
 
     gettext_object = JSObjectMake (context, gettext_class, NULL);
     JSObjectSetProperty (context,
@@ -1105,11 +1027,11 @@
                          JSStringCreateWithUTF8CString ("gettext"),
                          gettext_object, kJSPropertyAttributeNone, NULL);
 
-    ldm_greeter_object = JSObjectMake (context, ldm_greeter_class, greeter);
+    lightdm_greeter_object = JSObjectMake (context, lightdm_greeter_class, greeter);
     JSObjectSetProperty (context,
                          JSContextGetGlobalObject (context),
                          JSStringCreateWithUTF8CString ("lightdm"),
-                         ldm_greeter_object, kJSPropertyAttributeNone, NULL);
+                         lightdm_greeter_object, kJSPropertyAttributeNone, NULL);
 }
 
 static void
@@ -1119,23 +1041,23 @@
 }
 
 static void
-connected_cb (LdmGreeter *greeter)
+connected_cb (LightDMGreeter *greeter)
 {
+    g_debug("%s %d", __FUNCTION__, __LINE__);
     gchar *url;
 
-    url = ldm_greeter_get_string_property (greeter, "url");
+    url = "index.html";
     if (url)
     {
         gchar *theme_dir, *rel_url;
 
-        theme_dir = g_path_get_dirname (ldm_greeter_get_theme (greeter));
+        theme_dir = g_path_get_dirname ("/usr/share/lightdm/elementary/");
         rel_url = url;
         url = g_strdup_printf ("file://%s/%s", theme_dir, rel_url);
         g_free (theme_dir);
         g_free (rel_url);
 
         g_debug ("Showing URL %s", url);
-        webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), url);
         g_free (url);
     }
     else
@@ -1147,7 +1069,7 @@
 int
 main (int argc, char **argv)
 {
-    LdmGreeter *greeter;
+    LightDMGreeter *greeter;
     GdkDisplay *display;
     GdkScreen *screen;
     gint screen_width, screen_height;
@@ -1155,8 +1077,13 @@
     signal (SIGTERM, sigterm_cb);
 
     gtk_init (&argc, &argv);
+    gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new (GDK_LEFT_PTR));
+    greeter = lightdm_greeter_new ();
 
-    greeter = ldm_greeter_new ();
+    /* settings */
+    GKeyFile* keyfile = g_key_file_new();
+    g_key_file_load_from_file(keyfile, "/etc/lightdm/lightdm-webkit-greeter.conf", G_KEY_FILE_NONE, NULL);
+    gchar* theme = g_key_file_get_string(keyfile, "greeter", "webkit-theme", NULL);
 
     display = gdk_display_get_default ();
     screen = gdk_display_get_default_screen (display);
@@ -1171,16 +1098,20 @@
     g_signal_connect (G_OBJECT (web_view), "window-object-cleared", G_CALLBACK (window_object_cleared_cb), greeter);
     gtk_container_add (GTK_CONTAINER (window), web_view);
 
-    g_signal_connect (G_OBJECT (greeter), "connected", G_CALLBACK (connected_cb), web_view);  
+    //g_signal_connect (G_OBJECT (greeter), "connected", G_CALLBACK (connected_cb), web_view);  
     g_signal_connect (G_OBJECT (greeter), "show-prompt", G_CALLBACK (show_prompt_cb), web_view);
     g_signal_connect (G_OBJECT (greeter), "show-message", G_CALLBACK (show_message_cb), web_view);
     g_signal_connect (G_OBJECT (greeter), "show-error", G_CALLBACK (show_message_cb), web_view);
     g_signal_connect (G_OBJECT (greeter), "authentication-complete", G_CALLBACK (authentication_complete_cb), web_view);
-    g_signal_connect (G_OBJECT (greeter), "timed-login", G_CALLBACK (timed_login_cb), web_view);
+    //g_signal_connect (G_OBJECT (greeter), "timed-login", G_CALLBACK (timed_login_cb), web_view);
     g_signal_connect (G_OBJECT (greeter), "quit", G_CALLBACK (quit_cb), web_view);
 
-    ldm_greeter_connect_to_server (greeter);
-
+    //lightdm_greeter_connect_to_server (greeter);
+
+    webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), g_strdup_printf("file:///usr/share/lightdm/%s/index.html", theme));
+
+    gtk_widget_show_all (window);
+lightdm_greeter_connect_sync (greeter, NULL);
     gtk_main ();
 
     return 0;


Follow ups