diff --git a/project/jni/application/xserver/gfx.c b/project/jni/application/xserver/gfx.c index b8824e5ee..163a05383 100644 --- a/project/jni/application/xserver/gfx.c +++ b/project/jni/application/xserver/gfx.c @@ -760,6 +760,7 @@ void XSDL_generateBackground(const char * port, int showHelp, int resolutionW, i SDL_Surface * surf; int y = resolutionH * 1 / 6; char msg[128]; + char clipboard[8192] = ""; if (resolutionH > resolutionW) resolutionH = resolutionW; @@ -807,12 +808,15 @@ void XSDL_generateBackground(const char * port, int showHelp, int resolutionW, i continue; sprintf (msg, "export DISPLAY=%s%s", saddr, port); renderStringScaled(msg, 12 * resolutionH / VID_Y, resolutionW/2, y, 255, 255, 255, surf); + strcat(clipboard, msg); strcat(clipboard, "\n"); y += resolutionH * 15 / VID_Y; sprintf (msg, "export PULSE_SERVER=tcp:%s:4712", saddr); renderStringScaled(msg, 12 * resolutionH / VID_Y, resolutionW/2, y, 255, 255, 255, surf); + strcat(clipboard, msg); strcat(clipboard, "\n"); y += resolutionH * 15 / VID_Y; - sprintf (msg, "x-window-manager & gimp"); + sprintf (msg, "x-window-manager & firefox"); renderStringScaled(msg, 12 * resolutionH / VID_Y, resolutionW/2, y, 255, 255, 255, surf); + strcat(clipboard, msg); strcat(clipboard, "\n"); y += resolutionH * 20 / VID_Y; } } @@ -820,6 +824,8 @@ void XSDL_generateBackground(const char * port, int showHelp, int resolutionW, i close(sd); } + SDL_SetClipboardText(clipboard); + y += resolutionH * 10 / VID_Y; sprintf (msg, "To tunnel X over SSH, forward port %d", atoi(port+1) + 6000); renderStringScaled(msg, 12 * resolutionH / VID_Y, resolutionW/2, y, 255, 255, 255, surf); diff --git a/todo.txt b/todo.txt index 910de76bf..86572533d 100644 --- a/todo.txt +++ b/todo.txt @@ -45,8 +45,6 @@ TODO, which will get actually done - Debian: distribute Debian image inside .obb file along with the app. -- XSDL: copy DISPLAY=... to clipboard on screen tap. - - XSDL: use pixel size instead of video mode size. - XSDL: fix hardware keyboards with non-English layouts sending wrong keycodes.