diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index cc4999e..229da61 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -853,6 +853,12 @@ pdf_document_get_backend_info (EvDocument *document, EvDocumentBackendInfo *info
 	return TRUE;
 }
 
+static gboolean
+pdf_document_synctex_enabled (EvDocument *doc)
+{
+	return TRUE;
+}
+
 static void
 pdf_document_class_init (PdfDocumentClass *klass)
 {
@@ -870,6 +876,7 @@ pdf_document_class_init (PdfDocumentClass *klass)
 	ev_document_class->render = pdf_document_render;
 	ev_document_class->get_info = pdf_document_get_info;
 	ev_document_class->get_backend_info = pdf_document_get_backend_info;
+	ev_document_class->synctex_enabled = pdf_document_synctex_enabled;
 }
 
 /* EvDocumentSecurity */
diff --git a/libdocument/Makefile.am b/libdocument/Makefile.am
index b9a3362..6476e86 100644
--- a/libdocument/Makefile.am
+++ b/libdocument/Makefile.am
@@ -1,4 +1,5 @@
 lib_LTLIBRARIES = libevdocument.la
+INCLUDES =  -I$(top_srcdir)/cut-n-paste/synctex
 
 NOINST_H_FILES =				\
 	ev-debug.h				\
@@ -106,7 +107,9 @@ libevdocument_la_LDFLAGS = \
 	-export-symbols-regex "^ev_*"	\
 	$(AM_LDFLAGS)
 
-libevdocument_la_LIBADD = $(LIBDOCUMENT_LIBS)
+libevdocument_la_LIBADD = $(LIBDOCUMENT_LIBS)		  \
+	$(top_builddir)/cut-n-paste/synctex/libsynctex.la
+
 
 BUILT_SOURCES = 			\
 	ev-document-type-builtins.c	\
diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c
index d99a596..26dd18b 100644
--- a/libdocument/ev-document.c
+++ b/libdocument/ev-document.c
@@ -25,6 +25,7 @@
 #include <string.h>
 
 #include "ev-document.h"
+#include "synctex_parser.h"
 
 #define EV_DOCUMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_DOCUMENT, EvDocumentPrivate))
 
@@ -51,6 +52,8 @@ struct _EvDocumentPrivate
 	gchar         **page_labels;
 	EvPageSize     *page_sizes;
 	EvDocumentInfo *info;
+
+	synctex_scanner_t synctex_scanner;
 };
 
 static gint            _ev_document_get_n_pages   (EvDocument  *document);
@@ -119,6 +122,9 @@ ev_document_finalize (GObject *object)
 		ev_document_info_free (document->priv->info);
 		document->priv->info = NULL;
 	}
+	if (document->priv->synctex_scanner) {
+		synctex_scanner_free (document->priv->synctex_scanner);
+	}
 
 	G_OBJECT_CLASS (ev_document_parent_class)->finalize (object);
 }
@@ -306,6 +312,15 @@ ev_document_load (EvDocument  *document,
 		}
 
 		priv->info = _ev_document_get_info (document);
+		if (klass->synctex_enabled(document)) {
+			gchar *filename;
+			GError **err = NULL;
+
+			filename = g_filename_from_uri (uri, NULL, err);
+			if (err == NULL && filename != NULL)
+				priv->synctex_scanner =
+					synctex_scanner_new_with_output_file (filename, NULL, 1);
+		}
 	}
 
 	return retval;
@@ -340,6 +355,92 @@ ev_document_get_page (EvDocument *document,
 	return klass->get_page (document, index);
 }
 
+gboolean
+ev_document_has_synctex (EvDocument *document)
+{
+	return (document != NULL) || (document->priv->synctex_scanner != NULL);
+}
+
+/**
+ * ev_document_sync_to_source:
+ * @document:
+ * @page: the target page
+ * @x:
+ * @y:
+ * Compute the SourceLink corresponding to position (@x,@y) (in 72dpi coordinates) at @page of the 
+ * @document.
+ *
+ * Returns: A GList of EvSourceLink that correspond to the given position. @NULL if synctex 
+ * is not enabled for the document.
+ */
+GList *
+ev_document_sync_to_source (EvDocument *document,
+			    gint        page,
+			    gfloat	x,
+			    gfloat	y)
+{
+	g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
+
+	GList *ret = NULL;
+	
+	if (!document->priv->synctex_scanner)
+		return NULL;
+
+	if (synctex_edit_query (document->priv->synctex_scanner, page + 1, x, y) > 0) {
+		synctex_node_t node;
+		EvSourceLink *source;
+
+		while ((node = synctex_next_result (document->priv->synctex_scanner))) {
+			source = g_new (EvSourceLink, 1);
+			source->uri = g_strdup (synctex_scanner_get_name (document->priv->synctex_scanner,
+									 synctex_node_tag (node)));
+			source->line = synctex_node_line (node);
+			source->col  = synctex_node_column (node);
+			ret = g_list_prepend (ret, source);
+		}
+	}
+
+	return g_list_reverse (ret);
+}
+
+GList **
+ev_document_sync_to_view (EvDocument *document,
+			  const gchar *file,
+			  gint line,
+			  gint col)
+{
+	g_return_val_if_fail (EV_IS_DOCUMENT (document), NULL);
+
+	EvRectangle	*rec = NULL;
+	GList		**result;
+	gint		n_pages, page;
+	synctex_scanner_t scanner = document->priv->synctex_scanner;
+	if (!scanner)
+		return NULL;
+
+	n_pages = ev_document_get_n_pages (document);
+	result = g_new0 (GList *, n_pages);
+
+	if (synctex_display_query (scanner, file , line, col) > 0) {
+		synctex_node_t node;
+		while ((node = synctex_next_result (scanner))) {
+			rec = g_new (EvRectangle, 1);
+			page = synctex_node_page (node);
+			rec->x1 = synctex_node_box_visible_h (node);
+			rec->y1 = synctex_node_box_visible_v (node) -
+						synctex_node_box_visible_height (node);
+
+			rec->x2 = synctex_node_box_visible_width (node) + rec->x1;
+			rec->y2 = synctex_node_box_visible_depth (node)  +
+						synctex_node_box_visible_height (node) + rec->y1;
+			result[page] = g_list_prepend (result[page], rec);
+		}
+	}
+
+	return result;
+} 
+
+
 static gint
 _ev_document_get_n_pages (EvDocument  *document)
 {
diff --git a/libdocument/ev-document.h b/libdocument/ev-document.h
index 09c97aa..0b9c313 100644
--- a/libdocument/ev-document.h
+++ b/libdocument/ev-document.h
@@ -73,6 +73,12 @@ struct _EvDocumentBackendInfo
 	const gchar *version;
 };
 
+typedef struct {
+	gchar *uri;
+	int   line;
+	int   col;
+} EvSourceLink;
+
 struct _EvDocument
 {
 	GObject base;
@@ -105,6 +111,7 @@ struct _EvDocumentClass
         EvDocumentInfo  * (* get_info)        (EvDocument      *document);
         gboolean          (* get_backend_info)(EvDocument      *document,
                                                EvDocumentBackendInfo *info);
+        gboolean	  (* synctex_enabled) (EvDocument      *document);
 };
 
 GType            ev_document_get_type             (void) G_GNUC_CONST;
@@ -154,6 +161,16 @@ gboolean         ev_document_has_text_page_labels (EvDocument      *document);
 gboolean         ev_document_find_page_by_label   (EvDocument      *document,
 						   const gchar     *page_label,
 						   gint            *page_index);
+gboolean	 ev_document_has_synctex 	  (EvDocument *document);
+GList *		 ev_document_sync_to_source	  (EvDocument	   *document,
+						   gint		    page,
+						   gfloat	    h,
+						   gfloat	    v);
+
+GList **	 ev_document_sync_to_view 	  (EvDocument *document,
+			  			   const gchar *file,
+			  			   gint line,
+			  			   gint col);
 
 gint             ev_rect_cmp                      (EvRectangle     *a,
 					           EvRectangle     *b);
diff --git a/libview/ev-view-marshal.list b/libview/ev-view-marshal.list
index d7b0e75..1d85802 100644
--- a/libview/ev-view-marshal.list
+++ b/libview/ev-view-marshal.list
@@ -1,2 +1,3 @@
 VOID:ENUM,BOOLEAN
 VOID:INT,INT
+VOID:STRING,INT,INT
diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index f16264c..c5f6cd3 100644
--- a/libview/ev-view-private.h
+++ b/libview/ev-view-private.h
@@ -179,6 +179,10 @@ struct _EvView {
 	/* Annotations */
 	GList             *window_children;
 	EvViewWindowChild *window_child_focus;
+	
+	/* Synctex */
+	GList	      **sync_rects;
+	gboolean	has_synctex;
 };
 
 struct _EvViewClass {
@@ -194,6 +198,9 @@ struct _EvViewClass {
 	void    (*popup_menu)		  (EvView         *view,
 					   GList          *items);
 	void    (*selection_changed)      (EvView         *view);
+	void	(*sync_source)		  (EvView	  *view,
+					   gint		  src_line,
+					   gint	          src_col);
 };
 
 void _get_page_size_for_scale_and_rotation (EvDocument *document,
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 244f19b..dd49cf6 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -53,6 +53,7 @@ enum {
 	SIGNAL_EXTERNAL_LINK,
 	SIGNAL_POPUP_MENU,
 	SIGNAL_SELECTION_CHANGED,
+	SIGNAL_SYNC_SOURCE,
 	N_SIGNALS
 };
 
@@ -196,6 +197,10 @@ static void	  draw_loading_text 			     (EvView             *view,
 static void       ev_view_reload_page                        (EvView             *view,
 							      gint                page,
 							      GdkRegion          *region);
+static void 	  highlight_sync_rects 			     (EvView 		 *view,
+							      GList 		**page_rects,
+							      int 		  page,
+							      guchar 		  alpha);
 
 /*** Callbacks ***/
 static void       ev_view_change_page                        (EvView             *view,
@@ -1718,6 +1723,25 @@ ev_view_handle_link (EvView *view, EvLink *link)
 	}
 }
 
+static void
+ev_view_sync_source (EvView *view, gint x, gint y)
+{
+	int page;
+	gint ox =   0, oy   = 0;
+	gint docx = 0, docy = 0;
+
+	GList *list_source = NULL;
+
+	find_page_at_location (view, x, y, &page, &ox, &oy);
+	if (page == -1)
+		return;
+	get_doc_point_from_offset (view, page, ox, oy, &docx, &docy);
+	list_source = ev_document_sync_to_source (view->document, page, docx, docy);
+	if (list_source)
+		g_signal_emit (view, signals[SIGNAL_SYNC_SOURCE], 0, list_source);
+
+}
+
 static char *
 tip_from_action_named (EvLinkAction *action)
 {
@@ -3082,6 +3106,9 @@ ev_view_expose_event (GtkWidget      *widget,
 
 		if (page_ready && view->find_pages && view->highlight_find_results)
 			highlight_find_results (view, i);
+		if (page_ready && view->sync_rects)
+			highlight_sync_rects (view, view->sync_rects,i, 0x20);
+
 		if (page_ready && EV_IS_DOCUMENT_ANNOTATIONS (view->document))
 			show_annotation_windows (view, i);
 	}
@@ -3280,7 +3307,9 @@ ev_view_button_press_event (GtkWidget      *widget,
 			EvAnnotation *annot;
 			EvFormField *field;
 
-			if (EV_IS_SELECTION (view->document) && view->selection_info.selections) {
+			if (view->has_synctex &&  (event->state & GDK_CONTROL_MASK) != 0) {
+				ev_view_sync_source (view, event->x + view->scroll_x, event->y + view->scroll_y);
+			} else if (EV_IS_SELECTION (view->document) && view->selection_info.selections) {
 				if (event->type == GDK_3BUTTON_PRESS) {
 					start_selection_for_event (view, event);
 				} else if (location_in_selected_text (view,
@@ -3915,6 +3944,23 @@ highlight_find_results (EvView *view, int page)
 }
 
 static void
+highlight_sync_rects (EvView *view, GList **page_rects, int page, guchar alpha)
+{
+	GList *rects;
+	if (!page_rects)
+		return;
+	/*FIXME WE need to ensure that if page_rects is not NULL, then it's a proper pointer array, maybe we should use 
+  		GPtrArray instead since the page_rects can be I don't know what... */
+	rects = page_rects[page];
+	while (rects) {
+		GdkRectangle view_rectangle;
+		doc_rect_to_view_rect (view, page, (EvRectangle *) rects->data, &view_rectangle);
+		draw_rubberband (GTK_WIDGET (view), view->layout.bin_window, &view_rectangle, 0x20);
+		rects = g_list_next (rects);
+	}
+}
+
+static void
 draw_loading_text (EvView       *view,
 		   GdkRectangle *page_area,
 		   GdkRectangle *expose_area)
@@ -4276,6 +4322,14 @@ ev_view_class_init (EvViewClass *class)
 			 g_cclosure_marshal_VOID__VOID,
                          G_TYPE_NONE, 0,
                          G_TYPE_NONE);
+	signals[SIGNAL_SYNC_SOURCE] = g_signal_new ("sync-source",
+	  	         G_TYPE_FROM_CLASS (object_class),
+		         G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		         G_STRUCT_OFFSET (EvViewClass, sync_source),
+		         NULL, NULL,
+		         g_cclosure_marshal_VOID__POINTER,
+		         G_TYPE_NONE, 1,
+		         G_TYPE_POINTER);
 
 	binding_set = gtk_binding_set_by_class (class);
 
@@ -4324,6 +4378,8 @@ ev_view_init (EvView *view)
 	view->jump_to_find_result = TRUE;
 	view->highlight_find_results = FALSE;
 
+	view->has_synctex = FALSE;
+
 	gtk_layout_set_hadjustment (GTK_LAYOUT (view), NULL);
 	gtk_layout_set_vadjustment (GTK_LAYOUT (view), NULL);
 }
@@ -4585,6 +4641,7 @@ ev_view_document_changed_cb (EvDocumentModel *model,
 			view->pending_scroll = SCROLL_TO_KEEP_POSITION;
 			gtk_widget_queue_resize (GTK_WIDGET (view));
 		}
+		view->has_synctex = ev_document_has_synctex (view->document);
 	}
 }
 
@@ -5086,6 +5143,12 @@ jump_to_find_page (EvView *view, EvViewFindDirection direction, gint shift)
 }
 
 void
+ev_view_set_sync_rects (EvView *view, GList **rects)
+{
+	view->sync_rects = rects;
+}
+
+void
 ev_view_find_changed (EvView *view, GList **results, gint page)
 {
 	view->find_pages = results;
@@ -5743,4 +5806,4 @@ ev_view_previous_page (EvView *view)
 		return FALSE;
 	}
 }
-		
+
diff --git a/libview/ev-view.h b/libview/ev-view.h
index a6d14eb..079ee55 100644
--- a/libview/ev-view.h
+++ b/libview/ev-view.h
@@ -101,6 +101,9 @@ gboolean       ev_view_previous_page	  (EvView         *view);
 void	       ev_view_autoscroll_start   (EvView *view);
 void           ev_view_autoscroll_stop    (EvView *view);
 
+/* Synctex */
+void	       ev_view_set_sync_rects 	  (EvView *view, GList **rects);
+
 G_END_DECLS
 
 #endif /* __EV_VIEW_H__ */
diff --git a/shell/Makefile.am b/shell/Makefile.am
index b2bc86d..291b3f3 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -32,7 +32,9 @@ endif
 
 EV_MEDIA_PLAYER_KEYS_SOURCES = ev-media-player-keys.c ev-media-player-keys.h
 if ENABLE_DBUS
-DBUS_SOURCES = $(EV_MEDIA_PLAYER_KEYS_SOURCES)
+DBUS_SOURCES = $(EV_MEDIA_PLAYER_KEYS_SOURCES) \
+	ev-window-dbus.c		\
+	ev-window-dbus.h
 else
 DBUS_SOURCES = $(null)
 endif
@@ -119,7 +121,7 @@ endif
 BUILT_SOURCES = ev-marshal.h ev-marshal.c
 
 if ENABLE_DBUS
-BUILT_SOURCES += ev-application-service.h
+BUILT_SOURCES += ev-application-service.h ev-window-service.h
 endif
 
 evince_convert_metadata_SOURCES=	\
@@ -151,6 +153,7 @@ endif
 
 EXTRA_DIST = ev-marshal.list		\
 	ev-application-service.xml	\
+	ev-window-service.xml		\
 	ev-daemon-service.xml		\
 	evince-icon.rc			\
 	$(EV_MEDIA_PLAYER_KEYS_SOURCES)
@@ -165,7 +168,8 @@ ev-marshal.c: $(srcdir)/ev-marshal.list
 
 DISTCLEANFILES= 			\
 	ev-application-service.h	\
-	ev-daemon-service.h
+	ev-daemon-service.h		\
+	ev-window-service.h	
 
 ev-application-service.h: $(srcdir)/ev-application-service.xml
 	$(AM_V_GEN)dbus-binding-tool --prefix=ev_application --mode=glib-server --output=ev-application-service.h $(srcdir)/ev-application-service.xml
@@ -173,4 +177,7 @@ ev-application-service.h: $(srcdir)/ev-application-service.xml
 ev-daemon-service.h: $(srcdir)/ev-daemon-service.xml
 	$(AM_V_GEN)dbus-binding-tool --prefix=ev_daemon --mode=glib-server --output=ev-daemon-service.h $(srcdir)/ev-daemon-service.xml
 
+ev-window-service.h: $(srcdir)/ev-window-service.xml
+	$(AM_V_GEN)dbus-binding-tool --prefix=ev_window --mode=glib-server --output=ev-window-service.h $(srcdir)/ev-window-service.xml
+
 -include $(top_srcdir)/git.mk
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 0719ded..426f66f 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -680,12 +680,17 @@ ev_application_open_uri_at_dest (EvApplication  *application,
 		ret = ev_application_register_uri (application, uri, args, timestamp);
 		g_hash_table_destroy (args);
 		if (!ret)
-			return;
+			return;	
 #endif /* ENABLE_DBUS */
 
 		ev_window = ev_application_get_empty_window (application, screen);
-		if (!ev_window)
+		if (!ev_window) {
+#ifdef ENABLE_DBUS 
+			ev_window = EV_WINDOW (ev_window_dbus_new ());
+#else
 			ev_window = EV_WINDOW (ev_window_new ());
+#endif
+		}
 	}
 
 	application->uri = g_strdup (uri);
@@ -708,7 +713,11 @@ ev_application_open_window (EvApplication *application,
 			    GdkScreen     *screen,
 			    guint32        timestamp)
 {
+#ifdef ENABLE_DBUS
+	GtkWidget *new_window = ev_window_dbus_new ();
+#else
 	GtkWidget *new_window = ev_window_new ();
+#endif
 #ifdef GDK_WINDOWING_X11
 	GdkWindow *gdk_window;
 #endif
diff --git a/shell/ev-application.h b/shell/ev-application.h
index ff8d88d..506f37a 100644
--- a/shell/ev-application.h
+++ b/shell/ev-application.h
@@ -30,8 +30,11 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#include "ev-window.h"
 
+#include "ev-window.h"
+#ifdef ENABLE_DBUS
+#include "ev-window-dbus.h"
+#endif
 G_BEGIN_DECLS
 
 typedef struct _EvApplication EvApplication;
diff --git a/shell/ev-daemon-service.xml b/shell/ev-daemon-service.xml
index 5c90b69..521051a 100644
--- a/shell/ev-daemon-service.xml
+++ b/shell/ev-daemon-service.xml
@@ -4,7 +4,7 @@
 
   <interface name="org.gnome.evince.Daemon">
     <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="ev_daemon"/>
-
+    
     <method name="RegisterDocument">
        <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
        <arg type="s" name="uri" direction="in"/>
@@ -15,7 +15,12 @@
       <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
       <arg type="s" name="uri" direction="in"/>
     </method>
-
+    
+    <method name="FindDocument">
+    	<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+    	<arg type="s" name="uri" direction="in"/> 
+    	<arg type="s" name="bus_name" direction="out"/>
+    </method>
   </interface>
 
 </node>
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index 8844027..d79b68c 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -65,6 +65,10 @@ static gboolean ev_daemon_register_document   (EvDaemon              *ev_daemon,
 static gboolean ev_daemon_unregister_document (EvDaemon              *ev_daemon,
 					       const gchar           *uri,
 					       DBusGMethodInvocation *context);
+static gboolean ev_daemon_find_document  (EvDaemon		     *ev_daemon,
+					       const gchar           *uri,
+					       DBusGMethodInvocation *context);
+
 #include "ev-daemon-service.h"
 
 static EvDaemon *ev_daemon = NULL;
@@ -322,6 +326,24 @@ ev_daemon_unregister_document (EvDaemon              *ev_daemon,
 	return TRUE;
 }
 
+static gboolean
+ev_daemon_find_document      (EvDaemon			*ev_daemon,
+			      const gchar		*uri,
+			      DBusGMethodInvocation	*method)
+{
+	EvDoc *doc;
+	
+	doc = ev_daemon_find_doc (ev_daemon, uri);
+	if (!doc) {
+		dbus_g_method_return (method, NULL);
+		return TRUE;
+	}
+	
+        dbus_g_method_return (method, doc->dbus_name);
+
+	return TRUE;
+}
+
 static void
 do_exit (GMainLoop *loop,
 	 GObject   *object)
diff --git a/shell/ev-marshal.list b/shell/ev-marshal.list
index 72f9937..766a689 100644
--- a/shell/ev-marshal.list
+++ b/shell/ev-marshal.list
@@ -1 +1,2 @@
 VOID:STRING,STRING
+VOID:STRING,INT,INT
diff --git a/shell/ev-window-dbus.c b/shell/ev-window-dbus.c
new file mode 100644
index 0000000..04b2405
--- /dev/null
+++ b/shell/ev-window-dbus.c
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2010 Jose Aliste 
+ *
+ *  Author:
+ *    Jose Aliste <jose.aliste@gmail.com>
+ *
+ * Evince 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <glib/gstdio.h>
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+#include <gtk/gtk.h>
+
+#include "ev-window.h"
+#include "ev-window-dbus.h"
+
+void ev_window_dbus_sync_view (EvWindow *window, gchar *file, gint line, gint col);
+#include "ev-window-service.h"
+#include "ev-marshal.h"
+
+enum {
+	SIGNAL_SYNC_SOURCE,
+	N_SIGNALS,
+};
+
+static guint signals[N_SIGNALS];
+
+G_DEFINE_TYPE (EvWindowDBus, ev_window_dbus, EV_TYPE_WINDOW)
+
+#define WINDOW_DBUS_OBJECT_PATH "/org/gnome/evince/Window"
+#define WINDOW_DBUS_INTERFACE   "org.gnome.evince.Window"
+#define DBUS_TYPE_SOURCE_LINK (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_INVALID))
+#define DBUS_TYPE_SOURCE_LINK_ARRAY (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_SOURCE_LINK))
+
+
+static void
+view_sync_source_cb (EvView   *view, gpointer data,
+		    EvWindowDBus *ev_window)
+{
+	GList *list_source = (GList *) data;
+	GList *list = list_source;
+	GPtrArray * array = g_ptr_array_new();
+
+	while (list_source != NULL) {
+		GValue *value;
+		EvSourceLink 	*source;
+
+		source = (EvSourceLink *) list_source->data;
+		value = g_new0 (GValue, 1);
+		g_value_init (value, DBUS_TYPE_SOURCE_LINK);
+		g_value_take_boxed (value, dbus_g_type_specialized_construct (DBUS_TYPE_SOURCE_LINK));
+      		dbus_g_type_struct_set (value, 0, source->uri, 1, source->line, 2, source->col, G_MAXUINT);
+      		g_ptr_array_add (array, g_value_get_boxed (value));
+
+		g_free (source->uri);
+		g_free (source);
+		g_free (value);
+
+		list_source = g_list_next (list_source);
+	}
+
+	g_signal_emit (ev_window, signals[SIGNAL_SYNC_SOURCE], 0, array);
+	g_list_free (list);
+	g_ptr_array_free (array, TRUE);
+}
+
+static void
+ev_window_dbus_finalize (GObject *object)
+{
+	G_OBJECT_CLASS (ev_window_dbus_parent_class)->finalize (object);
+}
+static void
+ev_window_dbus_dispose (GObject *object)
+{
+	G_OBJECT_CLASS (ev_window_dbus_parent_class)->dispose (object);
+}
+
+static void
+ev_window_dbus_class_init (EvWindowDBusClass *ev_window_class)
+{
+	GObjectClass *g_object_class = G_OBJECT_CLASS (ev_window_class);
+	
+	signals[SIGNAL_SYNC_SOURCE] = g_signal_new ("sync-source",
+	  	         G_TYPE_FROM_CLASS (g_object_class),
+		         G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		         0,
+		         NULL, NULL,
+		         g_cclosure_marshal_VOID__POINTER,
+		         G_TYPE_NONE, 1,
+		         DBUS_TYPE_SOURCE_LINK_ARRAY);
+	dbus_g_object_type_install_info (EV_TYPE_WINDOW_DBUS,
+					 &dbus_glib_ev_window_object_info);
+	g_object_class->dispose = ev_window_dbus_dispose;
+	g_object_class->finalize = ev_window_dbus_finalize;
+
+}
+
+static void
+ev_window_dbus_init (EvWindowDBus *ev_window)
+{
+	EvWindow *window = EV_WINDOW (ev_window);
+	EvView 	 *view   = EV_VIEW (ev_window_get_view (window));
+	g_signal_connect_object (view, "sync-source",
+			         G_CALLBACK (view_sync_source_cb),
+			         ev_window, 0);
+	static int count = 1;
+	DBusGConnection *connection;
+	gchar path[100];
+	GError *error = NULL;
+	connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error);
+	g_sprintf (path, "%s/%d", WINDOW_DBUS_OBJECT_PATH, count);
+	if (connection) {
+		dbus_g_connection_register_g_object (connection, path, G_OBJECT (ev_window));
+		count++;
+	}
+}
+
+/**
+ * ev_window_dbus_new:
+ *
+ * Creates a #GtkWidget that represents the window. This window is controllable through DBUS.
+ *
+ * Returns: the #GtkWidget that represents the window.
+ */
+GtkWidget *
+ev_window_dbus_new (void)
+{
+	GtkWidget *ev_window_dbus;
+
+	ev_window_dbus = GTK_WIDGET (g_object_new (EV_TYPE_WINDOW_DBUS,
+					      "type", GTK_WINDOW_TOPLEVEL,
+					      NULL));
+
+	return ev_window_dbus;
+}
+
+void 
+ev_window_dbus_sync_view (EvWindow *window, gchar *file, gint line, gint col)
+{
+	gint n_pages;
+	GList **results;
+	EvDocument *document = ev_window_get_document (window);
+	if (!document)
+		return;
+	results = ev_document_sync_to_view (document, file, line, col);
+	n_pages = ev_document_get_n_pages (document);
+	ev_view_set_sync_rects ( ev_window_get_view (window), results);
+	
+	gtk_window_present (GTK_WINDOW (window));
+}
diff --git a/shell/ev-window-dbus.h b/shell/ev-window-dbus.h
new file mode 100644
index 0000000..8beb96a
--- /dev/null
+++ b/shell/ev-window-dbus.h
@@ -0,0 +1,59 @@
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2010 Jose Aliste
+ *
+ *  Author:
+ *    Jose Aliste <jose.aliste@gmail.com>
+ *
+ * Evince 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef EV_WINDOW_DBUS_H
+#define EV_WINDOW_DBUS_H
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "ev-link.h"
+
+G_BEGIN_DECLS
+
+
+typedef struct _EvWindowDBus EvWindowDBus;
+typedef struct _EvWindowDBusClass EvWindowDBusClass;
+typedef struct _EvWindowDBusPrivate EvWindowDBusPrivate;
+
+#define EV_TYPE_WINDOW_DBUS			(ev_window_dbus_get_type())
+#define EV_WINDOW_DBUS(object)			(G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_WINDOW_DBUS, EvWindowDBus))
+#define EV_WINDOW_DBUS_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_WINDOW_DBUS, EvWindowDBusClass))
+#define EV_IS_WINDOW_DBUS(object)		(G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_WINDOW_DBUS))
+#define EV_IS_WINDOW_DBUS_CLASS(klass)		(G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_WINDOW_DBUS))
+#define EV_WINDOW_DBUS_GET_CLASS(object)	(G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_WINDOW_DBUS, EvWindowDBusClass))
+
+
+struct _EvWindowDBus {
+	EvWindow		base_instance;
+};
+
+struct _EvWindowDBusClass {
+	EvWindowClass		base_class;
+};
+
+GType		ev_window_dbus_get_type	(void) G_GNUC_CONST;
+GtkWidget      *ev_window_dbus_new           (void);
+
+G_END_DECLS
+
+#endif /* !EV_WINDOW_DBUS_H */
diff --git a/shell/ev-window-service.xml b/shell/ev-window-service.xml
new file mode 100644
index 0000000..0b18a01
--- /dev/null
+++ b/shell/ev-window-service.xml
@@ -0,0 +1,14 @@
+<node>
+	<interface name="org.gnome.evince.Window">
+		<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="ev_window_dbus"/>
+		<signal name="sync_source">
+			<arg type="a(sii)" name="source_links" direction="out"/>
+		</signal>
+		<method name="sync_view">
+			<arg type="s" name="input_file" direction="in"/>
+			<arg type="i" name="line" direction="in"/>
+			<arg type="i" name="col"  direction="in"/>
+		</method>
+	</interface>
+</node>
+
diff --git a/shell/ev-window.c b/shell/ev-window.c
index b78c317..f930ac7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -6424,3 +6424,15 @@ ev_window_new (void)
 
 	return ev_window;
 }
+
+EvView *
+ev_window_get_view (EvWindow *window)
+{
+	return EV_VIEW (window->priv->view);
+}
+
+EvDocument *
+ev_window_get_document (EvWindow *window)
+{
+	return window->priv->document;
+}
diff --git a/shell/ev-window.h b/shell/ev-window.h
index 09055da..594f820 100644
--- a/shell/ev-window.h
+++ b/shell/ev-window.h
@@ -27,6 +27,8 @@
 #include <gtk/gtk.h>
 
 #include "ev-link.h"
+#include "ev-view.h"
+#include "ev-document.h"
 
 G_BEGIN_DECLS
 
@@ -84,7 +86,10 @@ void		ev_window_open_document (EvWindow       *ev_window,
 gboolean	ev_window_is_empty	(const EvWindow *ev_window);
 void		ev_window_print_range   (EvWindow       *ev_window,
 					 int             first_page,
-					 int		 last_page);
+					 int		 last_page);					 
+EvView	       *ev_window_get_view	(EvWindow	*ev_window);
+EvDocument     *ev_window_get_document	(EvWindow	*ev_window);
+
 
 G_END_DECLS
 
