lib/vnctools/server.rb in vnctools-0.0.3 vs lib/vnctools/server.rb in vnctools-0.0.4

- old
+ new

@@ -28,21 +28,25 @@ @display = display end def start if display - server display + server(display, *launch_arguments) else - output = server + output = server(*launch_arguments) @display = output[/desktop is #{host}(\S+)/, 1] end end def stop server "-kill", display.to_s end private + + def launch_arguments + [] # can be overriden by subclasses + end def server(*args) cmd = [self.class.executable, args, '2>&1'].flatten.compact out = `#{cmd.join ' '}`