Skip to content

Instantly share code, notes, and snippets.

<- copy/pasted from xterm/vim into Chrome. FAIL.
<- copy/pasted from one Chrome tab to another. PASS.
<- copy/pasted from gedit to Chrome. PASS.
<- copy/pasted from gnome-terminal/vim into Chrome. FAIL.
<- copy/pasted from gvim into Chrome. PASS.
From 1fd701bfddafe631cc0f36155beb33277c7513e2 Mon Sep 17 00:00:00 2001
From: Joel Martin <github@martintribe.org>
Date: Fri, 27 Aug 2010 15:14:51 -0500
Subject: [PATCH] Allow ver 75 and fix header response.
Detect if client is version 75 or 76 and respond appropriately. Also,
parse the path from the request and return the correct Location field
using the host and path.
Also fix some i386 compile errors:
<html>
<!--
noVNC example: simple example using default controls
Copyright (C) 2010 Joel Martin
Licensed under LGPL-3 (see LICENSE.txt)
-->
<head>
<title>VNC Client</title>
<link rel="stylesheet" href="include/plain.css">
<link rel="alternate stylesheet" href="include/black.css" TITLE="Black">
@kanaka
kanaka / qemu-ws-fixes
Created November 6, 2010 17:49
Patch to aliguori's start of WebSockets support in QEMU
Patch on http://repo.or.cz/w/qemu/aliguori-queue.git/shortlog/refs/heads/vncws
Allow ver 75 and fix header response.
Detect if client is version 75 or 76 and respond appropriately. Also,
parse the path from the request and return the correct Location field
using the host and path.
Also fix some i386 compile errors:
- Hide ivshmem.c under kvm
@kanaka
kanaka / u2x11-2010-11-21.patch
Created January 3, 2011 18:29
Original noVNC keyboard layout patch from Colin Dean
diff --git a/include/canvas.js b/include/canvas.js
index e3a2e23..51afa65 100644
--- a/include/canvas.js
+++ b/include/canvas.js
@@ -8,7 +8,7 @@
"use strict";
/*jslint browser: true, white: false, bitwise: false */
-/*global window, Util, Base64 */
+/*global window, Util, Base64, X11 */
@kanaka
kanaka / websockify_path_port
Created April 19, 2011 15:05
Patch websockify to allow port request in WebSockets path
diff --git a/include/rfb.js b/include/rfb.js
index 3c65a5c..0021318 100644
--- a/include/rfb.js
+++ b/include/rfb.js
@@ -124,6 +124,8 @@ var that = {}, // Public API interface
function cdef(v, type, defval, desc) {
Util.conf_default(conf, that, v, type, defval, desc); }
+cdef('path', 'str', "", 'path to request on connect');
+
@kanaka
kanaka / scale_ui.patch
Created April 29, 2011 19:09
noVNC scale option to include/ui.js
This is buggy so not yet committed. It nominally works, but the
alignment of the canvas element relative to the status bar can be
funky.
diff --git a/include/ui.js b/include/ui.js
index 3e30420..0f93404 100644
--- a/include/ui.js
+++ b/include/ui.js
@@ -16,7 +16,7 @@ settingsOpen : false,
@kanaka
kanaka / python3.patch
Created May 17, 2011 17:53
websockify python 3.X support
diff --git a/websocket.py b/websocket.py
index 09e7ee4..760070f 100755
--- a/websocket.py
+++ b/websocket.py
@@ -16,23 +16,34 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
'''
-import sys, socket, ssl, struct, traceback, select
+import sys, socket, struct, traceback, select
@kanaka
kanaka / gist:1052210
Created June 28, 2011 21:09
XHTML compatible version of vnc_auto
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
noVNC Example: Automatically connect on page load.
Copyright (C) 2011 Joel Martin
Licensed under LGPL-3 (see LICENSE.txt)
Connect parameters are provided in query string:
@kanaka
kanaka / gist:1052212
Created June 28, 2011 21:10
XHTML compatible version of vnc page
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
noVNC example: simple example using default UI
Copyright (C) 2011 Joel Martin
Licensed under LGPL-3 (see LICENSE.txt)
-->
<head>