BTS

Issue877

Title automatically vnc connection to a listening vnc client (like vnc ... --connect ip:port)
Priority feature Status resolved
Superseder Nosy List formorer, mika, technikfreak
Assigned To mika Topics grml-autoconfig, release-stopper

Created on 2010-07-03.11:20:11 by technikfreak, last changed 2010-11-08.10:31:24 by mika.

Messages
msg3449 (view) Author: mika Date: 2010-11-08.10:31:23
We believe that your issue has been closed by the upload of
Version 0.9.16 of grml-autoconfig from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 08 Nov 2010 11:17:51 +0100
Source: grml-autoconfig
Binary: grml-autoconfig
Architecture: source all
Version: 0.9.16
Distribution: unstable
Urgency: low
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description: 
 grml-autoconfig - main bootup process of a Grml (based) system
Changes: 
 grml-autoconfig (0.9.16) unstable; urgency=low
 .
   [ Michael Prokop ]
   * [2e857cb] Replace depends on console-tools to 'kbd | console-
     utilities'. [Closes: issue818]
   * [b64ae9e] Drop powernowd from Recommends and adjust naming of cpu
     frequency.
 .
   [ Alexander Wirt ]
   * [863744b] Add support for vnc_connect feature. [Closes: issue877]
Checksums-Sha1: 
 1618dc2ebdfdc2a589f547bb30fe83443a745b41 958 grml-autoconfig_0.9.16.dsc
 d6bd6c2bf236a863f02be35bb973fc992c026f18 71627 grml-autoconfig_0.9.16.tar.gz
 84edd093a936a98292580f9af607a3f232229be1 90452 grml-autoconfig_0.9.16_all.deb
Checksums-Sha256: 
 b6eaa7172982a7676bb1f8db346d64748823d6852e4ca792db8cfe627794855c 958 grml-autoconfig_0.9.16.dsc
 be703c7c5e6f64a4bb21c37878089d743d00b15fc88279445dd49266d86b8b08 71627 grml-autoconfig_0.9.16.tar.gz
 73d9b1c27f8391e4651dda29bc0d1a384696525e1c3a5670a624156e38d9ed70 90452 grml-autoconfig_0.9.16_all.deb
Files: 
 3858ab6118e6c0ac689d1f3635d88aca 958 grml optional grml-autoconfig_0.9.16.dsc
 823aa49959e8e9b7a242d28f4b19aa93 71627 grml optional grml-autoconfig_0.9.16.tar.gz
 a1532379a5ff6b8b6fb056d10aaccd64 90452 grml optional grml-autoconfig_0.9.16_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzXzuoACgkQ2N9T+zficuiS3wCggEU21LMgcZRLtxQ1HSaedl2s
VSgAnjC+tZeS4ws9RUwpVcqLNEhffnpP
=1fhI
-----END PGP SIGNATURE-----
msg3445 (view) Author: formorer Date: 2010-11-07.19:45:59
I tested the changes and they works. I pushed my patch to formorer/vnc_connect 
into grml-etc and grml-autoconfig. Please review them and apply them afterwards 
if you are fine with it.
msg3261 (view) Author: formorer Date: 2010-07-03.11:22:56
Here is a first patch from me (untested) against grml-autoconfig and grml-etc 

diff --git a/autoconfig.functions b/autoconfig.functions
index 0b9d51d..fb45924 100755
--- a/autoconfig.functions
+++ b/autoconfig.functions
@@ -1506,6 +1506,7 @@ if checkbootparam 'vnc' ; then
    fi
    eoutdent
 
+
    # finally check if we have a password we can use:
    if [ -n "$VNC_PASSWD" ] ; then
 
@@ -1520,6 +1521,15 @@ if checkbootparam 'vnc' ; then
          /bin/chown -R "$USER": "$VNCDIR"
       fi
    fi
+   if checkbootparam 'vnc_connect' ; then
+      VNC_CONNECT=''
+      VNC_CONNECT="$(getbootparam 'vnc_connect' 2>>$DEBUG)"
+      einfo "Bootoption vnc_connect found, will start vnc with connect to
$VNC_CONNECT."
+      #store the options in a file
+      VNCDIR="/home/${USER}/.vnc"
+      [ -d "$VNCDIR" ] || mkdir "$VNCDIR"
+      echo " --connect $VNC_CONNECT " >> $VNCDIR/options 
+   fi
 fi
 }
 # }}}


diff --git a/etc/skel/.xinitrc.d/grml_vnc b/etc/skel/.xinitrc.d/grml_vnc
index eff5a40..2606020 100755
--- a/etc/skel/.xinitrc.d/grml_vnc
+++ b/etc/skel/.xinitrc.d/grml_vnc
@@ -12,8 +12,10 @@ fi
 
 # if the vnc bootoption sets up the password let's start the vnc server
 if [ -e $HOME/.vnc/passwd ]; then
+   test -f $HOME/.vnc/options && OPTIONS=$(cat $HOME/.vnc/options) 
+
    /usr/bin/x11vnc -bg -forever -noxdamage -o $HOME/.vnc/x11vnc.log -rfbauth \
-                   $HOME/.vnc/passwd -auth $HOME/.Xauthority -display $DISPLAY
+                   $HOME/.vnc/passwd -auth $HOME/.Xauthority -display $DISPLAY
$OPTIONS
 fi
 
 ## END OF FILE #################################################################
History
Date User Action Args
2010-11-08 10:31:24mikasetstatus: needs-progress -> resolved
nosy: formorer, mika, technikfreak
messages: + msg3449
2010-11-07 19:45:59formorersetstatus: chatting -> needs-progress
assignedto: formorer -> mika
messages: + msg3445
nosy: formorer, mika, technikfreak
2010-07-08 13:45:13mikasettopic: + release-stopper
nosy: + mika
2010-07-03 11:22:57formorersettopic: + grml-autoconfig, - grml-live
assignedto: formorer
status: unread -> chatting
messages: + msg3261
nosy: + formorer
2010-07-03 11:20:11technikfreakcreate