Change-Id: I90a544e5e75f1d91b403b45efda27583c40e7512
struct wl_display *display = NULL;
struct wl_event_loop *loop = NULL;
struct wl_event_source *sigint = NULL;
+ int tty;
+ const char *tty_str;
{ /* for gdb attach */
char cc;
init_signals();
- if (!pepper_virtual_terminal_setup(0/*FIXME*/))
+ tty_str = getenv("PEPPER_DRM_TTY");
+
+ if (!tty_str)
+ tty = 0;
+ else
+ tty = atoi(tty_str);
+
+ if (!pepper_virtual_terminal_setup(tty))
goto cleanup;
compositor = pepper_compositor_create("wayland-0");