Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

-d command line option does nothing #10

Closed
grillsky opened this Issue Nov 23, 2012 · 3 comments

Comments

Projects
None yet
2 participants

it seems that the -d command line flag for setting the display does nothing.
tested on commit 1882303
the following snippet would integrate it into the current parsing logic by overriding the explicit port declaration.

diff --git a/vncdotool/command.py b/vncdotool/command.py
index 7318d6a..446e6c9 100644
--- a/vncdotool/command.py
+++ b/vncdotool/command.py
@@ -226,6 +226,9 @@ def parse_host(options):
     else:
         options.port = 5900

+    if options.display:
+       options.port = options.display + 5900
+
     return options
Owner

sibson commented Nov 24, 2012

You caught me! I was half way though doing away with -d all together and replacing it with the host:display and host::port syntax that other tools are using, eg vncdo -s somehost:49 rather than vncdo -s somehost -d 49. Is there a use case for -d that the host:display syntax doesn't cover?

hehe :) - i suspected that.
i just didn't know if you wanted both or just one method.

i would say the IP:PORT syntax is perfectly fine. but please bear in mind that everyone is used to IP:PORT. if you want to distinguish between IP:PORT/DISPLAY i would use IP:PORT and IP::DISPLAY.

Owner

sibson commented Nov 25, 2012

I agree IP:PORT would make sense but most other VNC viewers are using the IP::PORT syntax. I've choose to be consistent with them.

@sibson sibson closed this in 145b653 Nov 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment