Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

About chunkvnc's customization.

Simple, Free, Open Source UltraVNC Wrapper Supporting Windows and Mac OSX
Post Reply
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

About chunkvnc's customization.

Post by addison »

Hello everyone.

Thank you for your great work!
Chunk is very interesting, as well as autoit.
Well, I'm a green hand and want to ask you guys three questions.

As coded in the file InstantSupport.au3 :
///////////////////////////////////////////////////////////////
; Generate a random ID number
$LowerLimit = 200000
$UpperLimit = 999999
$RandomNumber = 'chunk_' + Random( $LowerLimit,$UpperLimit,1 )

; TODO: Check if ID is already in use.
This area is blank.
///////////////////////////////////////////////////////////////

Is that possible to add some pre string to the RandomNumber?
Like 'chunk_' or whatever.


Dose chunk have the function to prevent duplicate ID?

Can ChunkViewer and InstantSupport both behind Nat router,
but still able to connected to Repeater across the internet?


Thanks in advance.
addison
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: About chunkvnc's customization.

Post by B »

You could probably add a number, but from what I understand ALL the VNC repeaters, clients, and servers expect repeater IDs to be numeric. Which kind of stinks, so supercoe is trying to write around that limitation in the next version.

That answers your first question. The answer to your third question is "yes". I don't know about the second, although I think that's dealt with at the repeater (it would reject the duplicate ID).
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

Re: About chunkvnc's customization.

Post by Rat »

I have just given Supercoe a completely re-coded version of ChunkVNC which supports (many) customisation options... you can see some examples here:

www.vushield.com/remote.html
www.vuware.com/remote.html
www.xbase.com.au

The plan was for Supercoe to look it over and perhaps include some of it into the next release. Of course just how much of this functionality will make it into the v4.0 release is entirely up to Supercoe.

To give you some idea of the customisation options available I have included an example configuration file from this release below:


Rat.

Code: Select all

; Select Connection ID Type, (1 = Fixed, 2 = User-Selected, 3 = Random)
Const $ConnectIdFixed = 1, $ConnectIdUser = 2, $ConnectIdRandom = 3
Const $LowerLimit = 100000, $UpperLimit = 999999

$ConnectIdType = $ConnectIdRandom

; Define a Unique Connection ID number
Switch $ConnectIdType
	Case $ConnectIdFixed
		$ConnectId = 722115
	Case $ConnectIdUser
		$ConnectId = 'Enter a Connection ID'
	Case $ConnectIdRandom
		$ConnectId = Random($LowerLimit, $UpperLimit, 1)  ; Generate a random Connection ID number
	Case Else
		$ConnectId = 'Enter a Connection ID'
		$ConnectIdType = $ConnectIdUser
EndSwitch

; Display Code, (ignored except for $ConnectIdFixed)
$ShowID = True
If $ConnectIdType <> $ConnectIdFixed Then $ShowId = True

; Define some Re-branding Strings
$BrandName = 'ChunkVNC'                ; Used for tooltip when clicking on the logo
$LongName = 'ChunkVNC Remote Support'
$ShortName = 'ChunkVNCRemote'

; URLs
$RepeaterUrl = 'repeater.chunkvnc.com'
$WebURL = 'www.chunkvnc.com'

; GUI Background Colour
$BackgroundColor = 0x2B2EA5

; Exe Icons
$InstallerIcon = 'InstallerIcon.chunkvnc'
$ServerIcon = 'ServerIcon.chunkvnc'
$ViewerIcon = 'ViewerIcon.chunkvnc'

; Top/Left coordinates and Width and Height of clickable Logo image
$LogoLeft = 0
$LogoTop = 0
$LogoWidth = 480
$LogoHeight = 170

; Height, Font and Colour of Connection ID text
$IdHeight = 66
$IdFont = 'Arial Black'
$IdFontStyle = 0  ;0 - Normal, 2 - Bold, 3 - Italic, 4 - Underline, 8 - Strikethrough
$IdFontSize = 50  ; in pixels
$IdFontColor = 0x00C000

; Width and Height of Dialog client viewport area, (in this case same as the Logo since it covers the entire form client area)
$GuiWidth = $LogoWidth
$GuiHeight = $LogoHeight

If $ShowId Then $GuiHeight = $GuiHeight + $IdHeight
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

Is that possible to add some pre string to the RandomNumber?

As B stated, the repeater only works with numbers, names will be a large part of the next release.

Dose chunk have the function to prevent duplicate ID?

Currently 3.1 doesn't check if an ID is in use.
The included Windows repeater maxes out at 20 connections anyways so the probability of 20 random numbers being the same out of a group of 500,000 is low. The next release will include proper ID management.

Can ChunkViewer and InstantSupport both behind Nat router, but still able to connected to Repeater across the internet?

Yes, since both InstantSupport and ChunkViewer make outgoing connections so no port forwarding is required except for the repeater.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Hello, there

Thank you...Thank you for your time!
I have learned a lot from you guys. Really appreciate.

I'm very curious about the Repeater.
Download its Linux version(repeater014.zip) from [http://koti.mbnet.fi/jtko/uvncrepeater/].
Its performance is good.

However, The author comments in one of the source code like:
Maximum number of active session can be [1...1000] at the same time.

I'm not sure what's the meaning of 'active session'?

First, it means a vnc server or viewer was connected to Repeater, added to repeater's list.

Otherwise, it means, that a pair of server and viewer has connected via repeater.

many thanks.:-D
Last edited by addison on 2010-05-19 08:43, edited 2 times in total.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

Not sure as I've never had more than 5-10 connections at a time.

I believe it means 1000 pairs of viewer/server or 1000 active ID's at the same time.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Thank you, supercoe

Repeater Linux version is a little complicated than windows one.

However the two have a same file named repeater.cpp.
Searching the code, both viewer and server have a list store in the repeater.

Only if the length of the current list does not exceed the maximum length, a viewer or server can be added to the list.

So I assume that one 'active session' means a pair of viewer/server.
Yes?


regards
addison
Last edited by addison on 2010-05-20 08:47, edited 1 time in total.
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Hi,supercoe

Just want to make sure.

I noticed that when I start a UltraVNC Server and config its 'Add New Client' settings ,
on the repeater's window it records as the following:

Server added to list 123
recv 12
recv 0
connection closed by peer
Server Removed from list 123


Now the viewer can not connect the server based on the ID:123.

After checking the repeater's source code, it indeed has a 30 seconds timeout methods.

Another thing, if I restart UltraVNC server, I need to reconfig the 'Add New Client' settings.


While testing InstantSupport it is:

Server added to list 626646
recv 39
recv 0
connection closed by peer
Server Removed from list 626646
Server added to list 626646
recv 39



So chunk can make a repeated connection to the Repeater.

If install it as a service, the random ID will store in a config file.
Is this a big improvement of UltraVNC?

I remembered that InstantSupport is a wrapper of UltraVNC.
It can generate a random ID and securely connect the server to the repeater.

It also has a "Install Service" option .

Is the above items are all the differences between chunk and Ultra?


Thank you for your time.

sincerely
Addison
Last edited by addison on 2010-05-20 11:37, edited 1 time in total.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

ChunkVNC is only a script that passes command line arguments to UltraVNC, it is not a VNC product on it's own and completely relies on UltraVNC.


So chunk can make a repeated connection to the Repeater.

By using the UltraVNC -autoreconnect command line option.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Thanks supercoe,

I have check it out, that UltraVNC has -autoreconnect command line.
However, I cannot find this auto reconnect settings on viewer's or server's GUI.
Is this useful option only available by using command line?

thank you.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Hello supercoe,

Does chunk has any command line parameters?
Specifically, is it possible to launch chunk while initial its connection ID.
Just like this :
ChunkViewer.exe -id 123456

Actually, I have tried some methods, but with no luck.
Any idea?

thank you
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

The viewer doesn't have any command line parameters, really I don't think it would make sense.
If you're using command line there is no reason to use ChunkViewer, just send your commands to UltraVNC's viewer.exe.
Sending command line arguments to viewer.exe is all ChunkViewer really does.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
addison
8
8
Posts: 18
Joined: 2010-05-14 03:21

Re: About chunkvnc's customization.

Post by addison »

Thank you supercoe

It's clear now. :D
I will go for Ultra, but Chunk is still a good reference.
Thanks for your fantastic work.
Noli
8
8
Posts: 14
Joined: 2004-11-05 13:50
Location: Buenos Aires, Argentina
Contact:

Re: About chunkvnc's customization.

Post by Noli »

Congratulations! I like this project very much.

I have a question: how can I use vnc´s "last client disconnect"?

I mean I want to the PC or notebook restart if I lose the connection.

Regards,
Manuel Moguilevsky
Buenos Aires, Argentina
Yahoo Messenger: manuel_moguilevsky
Skype: manuel_moguilevsky
Buenos Aires - Argentina

Tel: +54 9 11 4444-6455
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

Sorry Noli I'm not sure what you mean?

If you would like to restart a computer and have it connect back to the repeater use the Install Service option in the InstantSupport tray icon.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: About chunkvnc's customization.

Post by B »

I'm pretty sure Noli is talking about the Admin property "When Last Client Disconnects". The choices are Do Nothing, Lock Workstation, and Logoff Workstation.

As supercoe says, these have nothing to do with <b>reconnecting</b> you. Rather, those options dictate what the server side does when you disconnect (accidentally <b>or</b> on purpose).

If you really want the whole machine to <b>restart</b> when you're disconnecting your VNC session, you could always just restart the machine while you're connected. As the machine shuts down you will, of course, be disconnected, unless the shutdown process gets stuck.
Noli
8
8
Posts: 14
Joined: 2004-11-05 13:50
Location: Buenos Aires, Argentina
Contact:

Re: About chunkvnc's customization.

Post by Noli »

If I was accidentally disconnected (because Internet failed or any other reason), I want to UltraVNC detect the disconnection and reset the PC.

I think it is an option in UltraVNC ("When Last Client Disconnects".), but I do not know how to set it in ChunkVNC.

Instead of RECONNECT me, I want to RESET the PC.

Regards, and thank you for your help!
Manuel Moguilevsky
Buenos Aires, Argentina
Yahoo Messenger: manuel_moguilevsky
Skype: manuel_moguilevsky
Buenos Aires - Argentina

Tel: +54 9 11 4444-6455
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

Open the file SRC\InstantSupport_Files\ultravnc.ini

Look for the setting "LockSetting=0"

This setting controls "When last client disconnects"

0 - Do Nothing
1 - Lock Workstation
2 - Logoff Workstation
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: About chunkvnc's customization.

Post by B »

Right, but he's asking for restart/reboot instead of logoff. I guess you'd have to modify and recompile the winvnc.exe itself to do that.

Or maybe there's some way to fiddle with Windows so that a logoff or lock gets translated to a restart instead.

I guess it would be a cool feature if VNC supported an "exit routine" that could launch an arbitrary executable (such as shutdown.exe) upon session termination.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

Gotcha, I though I was just lost in translation and reset = "reset it back to the login screen"

Really I don't see the benefit of restarting the whole machine vs just logging off?
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: About chunkvnc's customization.

Post by B »

Clean slate. You know how Windows gets bogged down. I can certainly envision where that feature might be desirable.

As I said, a generic "exit routine" option would be the most flexible way to add that feature. Lots of programs (such as backup programs) have a way to "run X when this program ends".
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

"Run program X on disconnect" would be a great idea, I think you should put that in the Feature Requests. ;)
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: About chunkvnc's customization.

Post by B »

Feature requests for UltraVNC or feature requests for ChunkVNC? It's hard to get the attention of that mysterious ChunkVNC developer, supermoe or something.

:)

And seriously, there are so many more important things that I'd like them to be fixing or adding that I'd not even bother suggesting it at this point. (Repeater issue and multimonitor, obviously, but also something like NX support would be way up on my list; but I think Rudi already said that one was not going to happen any time soon.)
Last edited by B on 2010-05-28 19:34, edited 1 time in total.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: About chunkvnc's customization.

Post by supercoe »

UltraVNC feature, but yea agreed on the more important issues.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
Post Reply