Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TigerVNC viewer should be able to open *.tigervnc files as an argument [$50 awarded] #38

Closed
simula67 opened this issue Sep 24, 2014 · 22 comments
Labels
bounty There is a bounty for this issue enhancement New feature or request

Comments

@simula67
Copy link

simula67 commented Sep 24, 2014

Symptom

TigerVNC viewer says

"unable to resolve host by name: No such host is known. (11001)" 

while trying to open a *.tigervnc file with ServerName given in : format.

Specifying this directly in TigerVNC viewer works as expected.

How to reproduce

Save a *.tigervnc file with port name. Example with specifics removed follows :

TigerVNC Configuration file Version 1.0



ServerName=example.com:5901
x509ca=
x509crl=
SecurityTypes=X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None
DotWhenNoCursor=0
AutoSelect=1
FullColor=1
LowColorLevel=2
PreferredEncoding=Tight
CustomCompressLevel=0
CompressLevel=2
NoJPEG=0
QualityLevel=8
FullScreen=0
FullScreenAllMonitors=1
DesktopSize=
geometry=
RemoteResize=1
ViewOnly=0
Shared=0
AcceptClipboard=1
SendClipboard=1
SendPrimary=1
MenuKey=F8
FullscreenSystemKeys=1

Now, use Windows to associate *.tigervnc files to be opened by vncviewer executable.
Try opening the file, it shows the error :

"unable to resolve host by name: No such host is known. (11001)"

OS

Windows

Expected behaviour

When *.tigervnc file contains ServerName key in the format :, vncviewer should attempt to connect to at .


The $50 bounty on this issue has been claimed at Bountysource.

@CendioOssman CendioOssman added the bug Something isn't working label Sep 25, 2014
@ghost
Copy link

ghost commented Jan 30, 2015

Same behavior here when using IP-addresses and port like "ServerName=192.168.0.10:1".
As far as I looked through the code it seems to be located within tigervnc/vncviewer/parameters.cxx, here lines 574 and following.
I cannot see any code splitting the string after "ServerName=" at the ":" if present into hostname/IP-address and port.

@CendioOssman
Copy link
Member

It supports this just fine. What it doesn't support is being given configuration files as a command line argument. It will then use the filename as the host to connect to.

So this is really a feature request for opening configuration files on the command line.

@CendioOssman CendioOssman changed the title TigerVNC viewer should open *.tigervnc files with "ServerName" field configured with a port TigerVNC viewer should be able to open *.tigervnc files as an argument Feb 16, 2015
@CendioOssman CendioOssman added enhancement New feature or request and removed bug Something isn't working labels Feb 16, 2015
@ghost
Copy link

ghost commented Feb 16, 2015

Thanks for clarification. So: When windows-double-clicking on (the associated) .tigervnc file the filename gets handed over to TigerVNC, but the content of the config file itself is not being processed. Your change of the subject is correct then.

@CendioOssman
Copy link
Member

Correct. Besides options the viewer only supports a server name as a command line argument.

@TaylorSMarks
Copy link

Handling the files that your program generates isn't a feature or enhancement. That's the expected behavior. To not do that is a bug.

Instead, I have to completely ignore your partially-implemented file format (because it's worthless) and write a shortcut file that passes the proper arguments to the program.

If you'd actually finished implementing your file format, I could have a cross platform solution. Instead I'l have to write Windows shortcuts and .sh files that do the same thing.

@grinderx
Copy link

grinderx commented Feb 9, 2017

Any progress with this? I have an application that can generate .tigervnc files and which then I 'd like to open with TigerVNC in order to connect to hosts. It's not possible right now. All other VNC clients I have tried can do this, but not TigerVNC. Thanks.

@CendioOssman
Copy link
Member

No one is working on this as far as I know.

@bphinz
Copy link
Member

bphinz commented Feb 9, 2017

Not sure if it helps your use case, but the latest (1.7.80) version of the TigerVNC Java viewer has a '-config' option that can be used to specify a .tigervnc file at startup.

@grinderx
Copy link

grinderx commented Feb 9, 2017

@CendioOssman If that's the case that's a shame :(

@bphinz Thanks for the suggestion. Unfortunately there are two issues:

  1. The ServerName option doesn't get parsed to the client at all
  2. The Fullscreen mode doesn't work when using all the monitors

@bphinz
Copy link
Member

bphinz commented Feb 9, 2017

Would you mind submitting a ticket for that. The ServerName issue I'm aware of (it's a quirk that exists because of applet mode), but I didn't know about Fullscreen. Thanks

bphinz added a commit to bphinz/tigervnc that referenced this issue Feb 20, 2017
bphinz added a commit that referenced this issue Feb 20, 2017
@javabrett
Copy link

javabrett commented Nov 9, 2017

This is now my favourite issue/enhancement. Being able to pass a configuration-file for the viewer launch binary is a fundamental behaviour - the alternative is wasted time loading the config file each time through a UI.

The issue summary should be updated to make it clear that the request is for command-line argument support for the config file.

Please vote for this issue.

@jgeorgeson
Copy link

Another voice for what @javabrett said. Clicking through the GUI to load the file is functional but clunky. Being able to double-click the config file to connect would be great, but a "bookmarks" style drop menu instead of a file chooser would work too I think.

@co0kiee
Copy link

co0kiee commented Feb 7, 2018

I'd love for this to get done.

@CendioOssman CendioOssman changed the title TigerVNC viewer should be able to open *.tigervnc files as an argument TigerVNC viewer should be able to open *.tigervnc files as an argument [$50] Mar 5, 2018
@CendioOssman CendioOssman added the bounty There is a bounty for this issue label Mar 5, 2018
Kypert added a commit to Kypert/tigervnc that referenced this issue Apr 22, 2018
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.

Fixes issue TigerVNC#38.
Kypert added a commit to Kypert/tigervnc that referenced this issue May 13, 2018
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.

Fixes issue TigerVNC#38.

<<amendment 1>>
The given file must use a path separator, to make sure no security issue.
Make sure to catch and prompt proper permission denied errors etc.
(thanks CendioOssman)
Kypert added a commit to Kypert/tigervnc that referenced this issue May 13, 2018
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.

Fixes issue TigerVNC#38.

<<amendment 1>>
The given file must use a path separator, to make sure no security issue.
Make sure to catch and prompt proper permission denied errors etc.
(Thanks CendioOssman)
Kypert added a commit to Kypert/tigervnc that referenced this issue May 18, 2018
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.

Fixes issue TigerVNC#38.

<<amendment 1>>
The given file must use a path separator, to make sure no security issue.
Make sure to catch and prompt proper permission denied errors etc.
(Thanks CendioOssman)

<<amendment 2>>
Look for any path separator as a first pass to classify if we are
dealing with a file name or not.
(Thanks CendioOssman)
Kypert added a commit to Kypert/tigervnc that referenced this issue May 22, 2018
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.

Fixes issue TigerVNC#38.
@ghost
Copy link

ghost commented Jul 15, 2018

Is this still needing to be done? I saw the bounty on bountysource.

@Kypert
Copy link
Contributor

Kypert commented Jul 16, 2018 via email

@grinderx
Copy link

Could you please point to the related commit for this as I can't find it? Thanks

@CendioOssman
Copy link
Member

Ah. The syntax was slightly off on the PR so github didn't automatically close this. I can do it manually.

@Kypert, let me know if there are any issues claiming the bounty.

@CendioOssman
Copy link
Member

Could you please point to the related commit for this as I can't find it? Thanks

It's PR #632 and commit 50439d7.

@grinderx
Copy link

grinderx commented Jul 16, 2018

It's PR #632 and commit 50439d7.

Thanks. My understanding is that this patch has been applied to the latest beta. However, it doesn't seem to be working for me. I tried by double clicking a .tigervnc file as well as by reverting to the CLI

C:\>vncviewer64-1.8.90.exe vncserver.tigervnc

In both cases I get the same error:

unable to resolve host by name: No such host is known.

@CendioOssman
Copy link
Member

Double clicking or dragging works fine for me. However the command line needs to include a \ for the viewer to be able to tell the difference between it and a hostname.

Are you sure your config file just doesn't have an invalid ServerName in it?

@grinderx
Copy link

OK, I checked again and CLI works the way you instructed by adding the \. Double-clicking also worked, I had to fix my windoze settings by editing the registry and cleaning up the "Open with" apps configured previously.

All good now. Thanks for fixing this issue 👍 Hopefully, the next stable version which will include this patch won't take long to get released :)

@CendioOssman
Copy link
Member

This is included in the just released 1.9.0.

@CendioOssman CendioOssman changed the title TigerVNC viewer should be able to open *.tigervnc files as an argument [$50] TigerVNC viewer should be able to open *.tigervnc files as an argument [$50 awarded] May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty There is a bounty for this issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants