diff --git a/xterm/config b/xterm/config index a14fe8590..b151cf868 100644 --- a/xterm/config +++ b/xterm/config @@ -1 +1,3 @@ base_port=555 +cols=80 +rows=24 diff --git a/xterm/config.info b/xterm/config.info index fc8c3d9c2..1f6de73af 100644 --- a/xterm/config.info +++ b/xterm/config.info @@ -1 +1,3 @@ -base_port=Base port number for Websockets connections,0 +base_port=Base port number for Websockets connections,0,5 +cols=Terminal width in characters,0,5 +rows=Terminal height in characters,0,5 diff --git a/xterm/index.cgi b/xterm/index.cgi index a5169ec31..62d6351ce 100644 --- a/xterm/index.cgi +++ b/xterm/index.cgi @@ -1,11 +1,12 @@ #!/usr/local/bin/perl # Show a terminal that is connected to a Websockets server via Webmin proxying # XXX clean up old proxy ports +# XXX permissions page +# XXX don't grant to new users +# XXX ACL to run as remote user +# XXX Virtualmin integration? -BEGIN { push(@INC, ".."); }; -use WebminCore; -&init_config(); -my %access = &get_module_acl(); +require './xterm-lib.pl'; &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0, undef, "\n". @@ -48,14 +49,23 @@ my $user = $access{'user'}; my $tmpdir = &tempname_dir(); $ENV{'SESSION_ID'} = $main::session_id; &system_logged("$shellserver_cmd $port $user >$tmpdir/ws-$port.out 2>&1 \n"; +print &ui_table_start(undef, undef, 2); +print &ui_table_row(undef, "
", 2); +print &ui_table_end(); +print "\n"; my $url = "wss://".$ENV{'HTTP_HOST'}.$wspath; +my $rows = $config{'rows'} || 24; +my $cols = $config{'cols'} || 80; print <