Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


HVM capability enhancement: asynchronous upcalls to ROS userspace
[palacios.git] / linux_usr / v3_vncserver
1 #!/usr/bin/perl -w
2
3 use Getopt::Long;
4
5 $port = 5951;
6 $password = "";
7
8 &GetOptions("port=i"=>\$port, "password=s"=>\$password);
9
10 if (!on_path("v3_x0vncserver")) { 
11   print "You do not have v3_x0vncserver available on your PATH.\n";
12   print "v3_vncserver requires this functionality.\n";
13   print "You probably need to add .../palacios/linux_usr to your path\n";
14   print "Or you need to build v3_x0vncserver.\n";
15   exit -1;
16 }
17
18 $#ARGV==0 or die "usage: v3_vncserver [--port=port] [--password=password] /dev/v3-vmN\n";
19
20
21 $vm=shift;
22
23
24
25 system "echo \"$password\" | vncpasswd -f > ./.vncpasswd";
26
27 system "v3_x0vncserver --PasswordFile=./.vncpasswd -rfbport $port $vm >/dev/null 2>&1 & echo \$! > ./.vncpid";
28  
29 print STDERR "pid of server is stored in ./.vncpid\n";
30 print "You can now connect to port $port with password \"$password\"\n";
31
32 sub on_path {
33   my $x = `which $_[0] 2>&1`;
34   if (!defined($x) || $x=~/no $_[0] in/) {
35     return 0;
36   } else {
37     return 1;
38   }
39 }
40