After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643116 - Better support for application/vnc content type configurations
Better support for application/vnc content type configurations
Status: RESOLVED OBSOLETE
Product: vinagre
Classification: Applications
Component: VNC
2.31.x
Other Linux
: Normal enhancement
: ---
Assigned To: Ana
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-23 20:01 UTC by Joe Julian
Modified: 2021-05-26 09:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
.vnc file (filetype application/vnc) (346 bytes, application/x-vnc)
2011-02-23 20:01 UTC, Joe Julian
  Details
Proposed patch (2.62 KB, patch)
2011-10-27 20:43 UTC, Ana
reviewed Details | Review
Group name change (1.47 KB, patch)
2011-10-27 20:59 UTC, Ana
none Details | Review
Additional changes to group names (3.55 KB, patch)
2011-10-27 21:25 UTC, Ana
committed Details | Review

Description Joe Julian 2011-02-23 20:01:11 UTC
Created attachment 181747 [details]
.vnc file (filetype application/vnc)

I have a system where my windows clients have a single page where they can connect to all our hosts via links that send application/vnc files. Can you support those? The files look like the attached.
Comment 1 David King 2011-04-16 18:29:25 UTC
Supporting those files should be relatively straightforward, as they appear to be .ini files (parseable with GKeyFile, with certain caveats). Setting milestone to 3.4, but this could be in 3.2 depending on progress with other features.
Comment 2 David King 2011-04-17 14:16:59 UTC
On closer investigation, Vinagre partially supports .vnc files already (the ‘host’, ‘port’, ‘username’ and ‘password’ fields are supported), but only if the key and group names are lower case. The parser in Vinagre should be changed to read and write the RealVNC-formatted options (which begin with an uppercase letter), and also support the extended options available in RealVNC .vnc files, described on the RealVNC website:

http://www.realvnc.com/products/free/4.1/winvncviewer.html#ColorEncoding

I tried the file that you provided, after converting the key and group names to lower-case, and it worked when opened in Vinagre and when passed as a command-line argument. You could use this as a workaround until the parsing is fixed.
Comment 3 Ana 2011-10-01 16:04:43 UTC
(In reply to comment #2)
> 
> I tried the file that you provided, after converting the key and group names to
> lower-case, and it worked when opened in Vinagre and when passed as a
> command-line argument. You could use this as a workaround until the parsing is
> fixed.

Regarding this workaround, one possible solution is to convert the key and group names to lower-case before the parser gets to read or write them. This way, it is not important in what format they are sent, they will always be acceptable. 
If there are some restrictions on the names, there can always be a check before the conversion.
Comment 4 David King 2011-10-04 06:45:02 UTC
(In reply to comment #3)
> Regarding this workaround, one possible solution is to convert the key and
> group names to lower-case before the parser gets to read or write them. This
> way, it is not important in what format they are sent, they will always be
> acceptable.

Sounds like a good solution. GKeyFile can already read and write the file contents to memory, and can also query all the group and key names from the file, so it should be possible to do the conversion in memory quite simply. I think that a patch to convert the parser to use the RealVNC names by default (actually CamelCase, I made a mistake above and wrote lower-case) should be the first step, as it should be trivial, and makes files exported frm Vinagre compatible with RealVNC (and potentially other viewers). Then, another patch can be written to do the case conversion. A patch to add the extra fields from RealVNC can be added later.

> If there are some restrictions on the names, there can always be a check before
> the conversion.

GKeyFiles are always encoded in UTF-8 (although this may not be the case for the RealVNC equivalent), so as long as the GLib Unicode Manipulation utilities are used, there should be no problems:

http://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html
Comment 5 Ana 2011-10-27 20:43:15 UTC
Created attachment 200134 [details] [review]
Proposed patch
Comment 6 David King 2011-10-27 20:48:10 UTC
Review of attachment 200134 [details] [review]:

Looks good in general, you just need to update the translatable strings as well.

::: plugins/vnc/vinagre-vnc-plugin.c
@@ -151,2 +151,2 @@
     {
       /* Translators: Do not translate "connection". It's the name of a group in the .vnc (.ini like) file. */

Update this comment and the string below.

@@ -158,2 +158,2 @@
     {
       /* Translators: Do not translate "host". It's the name of a key in the .vnc (.ini like) file. */

Update this comment and the string below.
Comment 7 David King 2011-10-27 20:48:39 UTC
Review of attachment 200134 [details] [review]:

Looks good in general, you just need to update the translatable strings as well.

::: plugins/vnc/vinagre-vnc-plugin.c
@@ -151,2 +151,2 @@
     {
       /* Translators: Do not translate "connection". It's the name of a group in the .vnc (.ini like) file. */

Update this comment and the string below.

@@ -158,2 +158,2 @@
     {
       /* Translators: Do not translate "host". It's the name of a key in the .vnc (.ini like) file. */

Update this comment and the string below.
Comment 8 David King 2011-10-27 20:48:39 UTC
Review of attachment 200134 [details] [review]:

Looks good in general, you just need to update the translatable strings as well.

::: plugins/vnc/vinagre-vnc-plugin.c
@@ -151,2 +151,2 @@
     {
       /* Translators: Do not translate "connection". It's the name of a group in the .vnc (.ini like) file. */

Update this comment and the string below.

@@ -158,2 +158,2 @@
     {
       /* Translators: Do not translate "host". It's the name of a key in the .vnc (.ini like) file. */

Update this comment and the string below.
Comment 9 David King 2011-10-27 20:48:39 UTC
Review of attachment 200134 [details] [review]:

Looks good in general, you just need to update the translatable strings as well.

::: plugins/vnc/vinagre-vnc-plugin.c
@@ -151,2 +151,2 @@
     {
       /* Translators: Do not translate "connection". It's the name of a group in the .vnc (.ini like) file. */

Update this comment and the string below.

@@ -158,2 +158,2 @@
     {
       /* Translators: Do not translate "host". It's the name of a key in the .vnc (.ini like) file. */

Update this comment and the string below.
Comment 10 Ana 2011-10-27 20:59:04 UTC
Created attachment 200138 [details] [review]
Group name change

This patch changes the group names from GKeyFile from lowercase to CamelCase
Comment 11 Ana 2011-10-27 21:25:05 UTC
Created attachment 200143 [details] [review]
Additional changes to group names
Comment 12 David King 2011-10-27 21:33:20 UTC
Comment on attachment 200143 [details] [review]
Additional changes to group names

Pushed to master as commit bf967770391ae5d70ef4aabf883f1c84e1f699bf, thanks! The next task is doing the conversion from the lowercase names to the CamelCase ones, to keep the parser compatible.
Comment 13 Schorsch 2012-01-23 19:50:31 UTC
In addition to the previous changes, i would suggest to read DES-encrypted passwords from .vnc files instead of clear passwords, as TightVNC und UltraVNC clients do.
Comment 14 André Klapper 2021-05-26 09:24:51 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Vinagre, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/vinagre/-/issues/

Thank you for your understanding and your help.