Index: uspace/app/gfxdemo/gfxdemo.c
===================================================================
--- uspace/app/gfxdemo/gfxdemo.c	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/app/gfxdemo/gfxdemo.c	(revision bef51cf393627fd60142c6b98424b35660187cd1)
@@ -36,4 +36,5 @@
 #include <congfx/console.h>
 #include <draw/surface.h>
+#include <display.h>
 #include <fibril.h>
 #include <guigfx/canvas.h>
@@ -117,5 +118,4 @@
 static errno_t demo_canvas(void)
 {
-	console_ctrl_t *con = NULL;
 	canvas_gc_t *cgc = NULL;
 	gfx_context_t *gc;
@@ -128,7 +128,4 @@
 
 	printf("Init canvas..\n");
-	con = console_init(stdin, stdout);
-	if (con == NULL)
-		return EIO;
 
 	window = window_open("comp:0/winreg", NULL,
@@ -145,5 +142,5 @@
 	if (pixbuf == NULL) {
 		printf("Error allocating memory for pixel buffer.\n");
-		return -1;
+		return ENOMEM;
 	}
 
@@ -151,5 +148,5 @@
 	if (surface == NULL) {
 		printf("Error creating surface.\n");
-		return -1;
+		return EIO;
 	}
 
@@ -158,5 +155,5 @@
 	if (canvas == NULL) {
 		printf("Error creating canvas.\n");
-		return -1;
+		return EIO;
 	}
 
@@ -182,7 +179,45 @@
 }
 
+/** Run demo on display server. */
+static errno_t demo_display(void)
+{
+	display_t *display = NULL;
+	gfx_context_t *gc;
+	display_window_t *window = NULL;
+	errno_t rc;
+
+	printf("Init display..\n");
+
+	rc = display_open(NULL, &display);
+	if (rc != EOK) {
+		printf("Error opening display.\n");
+		return rc;
+	}
+
+	rc = display_window_create(display, &window);
+	if (rc != EOK) {
+		printf("Error creating window.\n");
+		return rc;
+	}
+
+	rc = display_window_get_gc(window, &gc);
+	if (rc != EOK) {
+		printf("Error getting graphics context.\n");
+	}
+
+	rc = demo_rects(gc, 400, 300);
+	if (rc != EOK)
+		return rc;
+
+	rc = gfx_context_delete(gc);
+	if (rc != EOK)
+		return rc;
+
+	return EOK;
+}
+
 static void print_syntax(void)
 {
-	printf("syntax: gfxdemo {canvas|console}\n");
+	printf("syntax: gfxdemo {canvas|console|display}\n");
 }
 
@@ -202,4 +237,8 @@
 	} else if (str_cmp(argv[1], "canvas") == 0) {
 		rc = demo_canvas();
+		if (rc != EOK)
+			return 1;
+	} else if (str_cmp(argv[1], "display") == 0) {
+		rc = demo_display();
 		if (rc != EOK)
 			return 1;
Index: uspace/app/gfxdemo/meson.build
===================================================================
--- uspace/app/gfxdemo/meson.build	(revision aac506977cd4c2bd4f4d8d877a8e9b457321b790)
+++ uspace/app/gfxdemo/meson.build	(revision bef51cf393627fd60142c6b98424b35660187cd1)
@@ -27,5 +27,5 @@
 #
 
-deps = [ 'gfx', 'guigfx', 'congfx', 'ipcgfx' ]
+deps = [ 'gfx', 'guigfx', 'congfx', 'ipcgfx', 'display' ]
 src = files(
 	'gfxdemo.c',
