diff --git a/config.h b/config.h
index 1458ee4..7f0db3b 100644
--- a/config.h
+++ b/config.h
@@ -138,7 +138,7 @@
#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
-#define VCS_REVISION "176"
+#define VCS_REVISION "178"
/* Version number of package */
#define VERSION "2.9"
diff --git a/configure b/configure
index 7b658cf..71163f6 100755
--- a/configure
+++ b/configure
@@ -2319,7 +2319,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-VCS_REVISION=176
+VCS_REVISION=178
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index b58e842..0e5c78f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ(2.57)
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.9, markus@shellinabox.com)
-VCS_REVISION=176
+VCS_REVISION=178
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])
diff --git a/debian/rules b/debian/rules
index a082552..c724ed9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -101,7 +101,7 @@ binary-arch: build install
dh_installchangelogs ChangeLog
dh_installdocs --exclude COPYING --exclude INSTALL --exclude ChangeLog
dh_installexamples
- dh_install
+ dh_install --sourcedir=debian/tmp
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
diff --git a/demo/print-styles.css b/demo/print-styles.css
index ffb97af..187dc3f 100644
--- a/demo/print-styles.css
+++ b/demo/print-styles.css
@@ -1,9 +1,11 @@
/* Set styles used when opening the printer window */
#print {
- margin: 4ex 0px 0px 0px;
+ margin: 0.5ex 0px 0px 0px;
}
-#options {
+#options, #spacer {
+ font-family: sans;
+ font-size: smaller;
position: fixed;
top: 0px;
left: 0px;
@@ -16,6 +18,11 @@
border-bottom: 1px solid black;
}
+#spacer {
+ position: static;
+ visibility: hidden;
+}
+
@media print {
body {
margin: 0px;
diff --git a/demo/vt100.js b/demo/vt100.js
index b745502..54aef0d 100644
--- a/demo/vt100.js
+++ b/demo/vt100.js
@@ -1901,7 +1901,7 @@ VT100.prototype.toggleBell = function() {
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.9 (revision 176)" +
+ alert("VT100 Terminal Emulator " + "2.9 (revision 178)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};
@@ -2853,6 +2853,7 @@ VT100.prototype.openPrinterWindow = function() {
(this.autoprint ? ' checked' : '') + '>' +
'Automatically, print page(s) when job is ready' +
'\n' +
+ '
' +
'\n';
var autoprint = this.printWin.document.getElementById('autoprint');
this.addListener(autoprint, 'click',
diff --git a/shellinabox/print-styles.css b/shellinabox/print-styles.css
index ffb97af..187dc3f 100644
--- a/shellinabox/print-styles.css
+++ b/shellinabox/print-styles.css
@@ -1,9 +1,11 @@
/* Set styles used when opening the printer window */
#print {
- margin: 4ex 0px 0px 0px;
+ margin: 0.5ex 0px 0px 0px;
}
-#options {
+#options, #spacer {
+ font-family: sans;
+ font-size: smaller;
position: fixed;
top: 0px;
left: 0px;
@@ -16,6 +18,11 @@
border-bottom: 1px solid black;
}
+#spacer {
+ position: static;
+ visibility: hidden;
+}
+
@media print {
body {
margin: 0px;
diff --git a/shellinabox/shell_in_a_box.js b/shellinabox/shell_in_a_box.js
index 8e810bf..af87ad8 100644
--- a/shellinabox/shell_in_a_box.js
+++ b/shellinabox/shell_in_a_box.js
@@ -91,8 +91,10 @@ function extend(subClass, baseClass) {
function ShellInABox(url, container) {
if (url == undefined) {
+ this.rooturl = document.location.href;
this.url = document.location.href.replace(/[?#].*/, '');
} else {
+ this.rooturl = url;
this.url = url;
}
if (document.location.hash != '') {
@@ -168,7 +170,8 @@ ShellInABox.prototype.sendRequest = function(request) {
var content = 'width=' + this.terminalWidth +
'&height=' + this.terminalHeight +
(this.session ? '&session=' +
- encodeURIComponent(this.session) : '');
+ encodeURIComponent(this.session) : '&rooturl='+
+ encodeURIComponent(this.rooturl));
request.setRequestHeader('Content-Length', content.length);
request.onreadystatechange = function(shellInABox) {
@@ -355,7 +358,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
};
ShellInABox.prototype.about = function() {
- alert("Shell In A Box version " + "2.9 (revision 176)" +
+ alert("Shell In A Box version " + "2.9 (revision 178)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com" +
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
diff --git a/shellinabox/shell_in_a_box.jspp b/shellinabox/shell_in_a_box.jspp
index 11b91d5..f862880 100644
--- a/shellinabox/shell_in_a_box.jspp
+++ b/shellinabox/shell_in_a_box.jspp
@@ -91,8 +91,10 @@ function extend(subClass, baseClass) {
function ShellInABox(url, container) {
if (url == undefined) {
+ this.rooturl = document.location.href;
this.url = document.location.href.replace(/[?#].*/, '');
} else {
+ this.rooturl = url;
this.url = url;
}
if (document.location.hash != '') {
@@ -168,7 +170,8 @@ ShellInABox.prototype.sendRequest = function(request) {
var content = 'width=' + this.terminalWidth +
'&height=' + this.terminalHeight +
(this.session ? '&session=' +
- encodeURIComponent(this.session) : '');
+ encodeURIComponent(this.session) : '&rooturl='+
+ encodeURIComponent(this.rooturl));
request.setRequestHeader('Content-Length', content.length);
request.onreadystatechange = function(shellInABox) {
diff --git a/shellinabox/shellinaboxd.c b/shellinabox/shellinaboxd.c
index 054d741..dcf05ff 100644
--- a/shellinabox/shellinaboxd.c
+++ b/shellinabox/shellinaboxd.c
@@ -778,6 +778,7 @@ static void usage(void) {
" ${lines} - number of rows\n"
" ${peer} - name of remote peer\n"
" ${uid} - user id\n"
+ " ${url} - the URL that serves the terminal session\n"
" ${user} - user name\n"
"\n"
"One or more --user-css arguments define optional user-selectable "
diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js
index b745502..54aef0d 100644
--- a/shellinabox/vt100.js
+++ b/shellinabox/vt100.js
@@ -1901,7 +1901,7 @@ VT100.prototype.toggleBell = function() {
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.9 (revision 176)" +
+ alert("VT100 Terminal Emulator " + "2.9 (revision 178)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};
@@ -2853,6 +2853,7 @@ VT100.prototype.openPrinterWindow = function() {
(this.autoprint ? ' checked' : '') + '>' +
'Automatically, print page(s) when job is ready' +
'\n' +
+ '
' +
'\n';
var autoprint = this.printWin.document.getElementById('autoprint');
this.addListener(autoprint, 'click',
diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp
index 3170b1e..5567aff 100644
--- a/shellinabox/vt100.jspp
+++ b/shellinabox/vt100.jspp
@@ -2853,6 +2853,7 @@ VT100.prototype.openPrinterWindow = function() {
(this.autoprint ? ' checked' : '') + '>' +
'Automatically, print page(s) when job is ready' +
'\n' +
+ '
' +
'\n';
var autoprint = this.printWin.document.getElementById('autoprint');
this.addListener(autoprint, 'click',