diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am
index c279952..33ec06e 100644
--- a/stickynotes/Makefile.am
+++ b/stickynotes/Makefile.am
@@ -35,6 +35,7 @@ stickynotes_applet_SOURCES = \
 stickynotes_applet_LDADD =	\
 	$(GNOME_APPLETS3_LIBS)	\
 	$(LIBWNCK_LIBS)		\
+	$(X_LIBS)		\
 	$(XML2_LIBS)
 
 builder_DATA = $(builder_files)
diff --git a/trashapplet/src/Makefile.am b/trashapplet/src/Makefile.am
index 52da653..f37f3d5 100644
--- a/trashapplet/src/Makefile.am
+++ b/trashapplet/src/Makefile.am
@@ -14,6 +14,7 @@ trashapplet_SOURCES = \
 
 trashapplet_LDADD = 		\
 	$(GNOME_APPLETS3_LIBS) 	\
-	$(GIO_LIBS)
+	$(GIO_LIBS)		\
+	$(X_LIBS)
 
 -include $(top_srcdir)/git.mk
