Tight VNC Server/Viewer (Now with GUI!)

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#16 Post by gliezl »

downloaded the the pup file. installed it. even checked with dot pup manager, the applcation was installed. but when i run it, nothing happens. i just typed vncviewer 192.168.0.3:5900 then comes back to the prompt. nothing happens. :(

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#17 Post by rarsa »

The correct format is vncviewer 192.168.0.3:0

There is always confusion. The port is 5900, the display is :0

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#18 Post by rarsa »

Thanks you again for your input.

I have uploaded a new version of the installer.

Now it should works nicelly from the menu.

You can read the change log in the original post

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#19 Post by gliezl »

Ok! :D Thanks for this one. Atleast it nice to learn. Yeah, get confused about that port & display thing. I'll download your new version. I'll keep you guys posted.

Again, thank you :)

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#20 Post by gliezl »

I typed at the console, vncviewer 192.168.0.3:0, and still it just goes back to the prompt and nothing happen. It's supposed to prompt me a password, right? :(

Sorry, I'm quite new to this thing. Yet VNC in windows works fine in my machine. Please do assist me. Thanks :)

Guest

#21 Post by Guest »

If you just type
vncviewer
it should prompt you for an IP address in a pop-up, then for the password. I don't enter the screen number, and it works for me.

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#22 Post by gliezl »

when I type vncviewer it just goes back to the prompt. It does not prompt me a password either. :(

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#23 Post by rarsa »

Try reinstalling the DotPup.

If there was something wrong you would get an error.

Did you install it from this thread?
What version of Puppy are you running?
Are you running from CD? HDD install? USB? how?

===========

If you installed from the DotPup in this thread, do the following.\:

- Open a terminal
- execute vncviewer
- Just after it comes back to the prompt type "echo $?"
- Copy the text in the console and paste it in your response

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#24 Post by gliezl »

Reinstalled dotpup. I installed it from this thread. Puppy 1.0.4 running from live CD.

tried the echo $?, ithas an output of zero. "0"

It's ok for me if you teach me some console commands. :)

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#25 Post by pakt »

rarsa, after some experimenting, I have found a solution to the problem of fvwm95 hanging when clicking on 'TightVNC Server' in the menu if the password has not been set.

This way, a rxvt terminal opens on the server PC with the password dialog. Afterwards, the terminal stays open showing which display is used and any connection messages (useful for knowing the display number when starting up a VNC viewer). The terminal will automatically close when a 'vncserver -kill <display>' command is issued (from another rxvt terminal).

These changes should make TightVNC Server easier to use.

Here are the changes I've made:

in dotpup.sh

---< snip >---
# Register with fvwm95 menu
if [ -f /root/.fvwm95rc ]
then
egrep -i vncserver /root/.fvwm95rc >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.fvwm95rc /root/.fvwm95rc.bak
awk '{if (/AddToMenu "Network"/) {print $0;print "+ \"TightVNC server%pc-2x.xpm%\" Exec rxvt -e vncserver"} else {print $0};} ' /root/.fvwm95rc.bak > /root/.fvwm95rc
fi
fi
---< snip >---

in vncserver

Add in MAIN SCRIPT:

---< snip >---
echo "Display :$displayNumber listening on TCP port `expr 5900 + ${displayNumber}`"

wait

exit 0
---< snip >---

I have also added/modified the following lines to the runXstartup() function. This adds the icons and a nice blue Puppy-like background:

---< snip >---
echo "#xrdb $HOME/.Xresources" >> "$xstartup"
echo "xsetroot -solid lightblue" >> "$xstartup"
echo "xsetroot -cursor_name top_left_arrow" >> "$xstartup"
echo "#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &" >> "$xstartup"
echo "fvwm95 &" >> "$xstartup"
echo "rox -op /root/Choices/ROX-Filer/PuppyPin" >> "$xstartup"
chmod 0755, "$xstartup";
---< snip >---

Works nicely for me. Let me know what you think. :)

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#26 Post by rarsa »

Thank you patk,

1. Actually I implemented exactly that soultion for the password as soon as it was reported and posted it along with your proposed solution for the missing .vnc folder.

2. I also thought about puting a wait or a read at the end of the vncserver script so the user had time to read what was happening, but then I thought that it's not a very good practice as the script may be executed automatically at start up or by other script. I actually played with another wrapper script 'vncserverfrommenu" that would ask for some basic parameters (geometry, depth, etc) then call the vncserver script and then wait for the user to press enter. I decided not to include it as it may confuse new users. Experienced users can launch it from the command line.

3. Thank you for the customization example. Other people may base their personal customization on yours. Great!

4. Do you know tclck or XDialog? A solution for new users executing the VNC server could be a UI where they can select the vncserver parameters graphically. I can then save those parameters to a configuration file ~/.vnc/.vncserver. So, if you want to do it, I can include it in the package, if not, I'll implement it as soon as I get some time.

Currently the defaults are in the vncserver script. That's where the original tightVNC server script has them so I just did a semantic translation. (I want it to work as close as the original to avoid confusions)

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#27 Post by pakt »

rarsa wrote: 1. Actually I implemented exactly that soultion for the password as soon as it was reported and posted it along with your proposed solution for the missing .vnc folder.
Oops :oops:, missed that one. That's what I get for having too many versions of tightvncserver laying around :?
rarsa wrote: 2. I also thought about puting a wait or a read at the end of the vncserver script so the user had time to read what was happening, but then I thought that it's not a very good practice as the script may be executed automatically at start up or by other script.
I see your point, but being a new user to VNC myself, I found it confusing to have no feedback when starting the server from the menu. I really find the terminal window useful for seeing the display # and connection messages, also as a reminder that a VNC server is running.. Perhaps two scripts are called for: one adapted to be started from the menu and another that can be executed at startup or by another script :?:
rarsa wrote: 4. Do you know tclck or XDialog? A solution for new users executing the VNC server could be a UI where they can select the vncserver parameters graphically. I can then save those parameters to a configuration file ~/.vnc/.vncserver. So, if you want to do it, I can include it in the package, if not, I'll implement it as soon as I get some time.
I don't know tclck or XDialog. It may not be that obvious, but I'm just a newbie in shell scripting. Took a lot of searching on the net and head-scratching before finding the solution in my previous post. I'm honored by the fact that it turned out to be the one you also came up with. :D

As to your suggestion, I've been looking through Barry's scripts to learn how he writes his wizards. Perhaps a VNC Wizard? Don't have the details at hand, but I believe he uses Xmessage to create his dialogs. May be similar to what you're suggesting? I'll let you know if I come up with something.

Meanwhile, thanks for all the work you're putting into this :)

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#28 Post by gliezl »

Sorry, it seems that the vncviewer command is not working for me. In my previous post, I was pertaining to vncviewer rather than vncconnect. The error was "command not found", something like that. Have I really installed the DOTPUP properly? I just followed the procedure. (GUI interface) :(

I don't have the binary file itself. (vncviewer) :?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#29 Post by rarsa »

Please notice that there are two packages: vncviewer and vncserver.

You need to install vncviewer.

Please post the result of the following command:

Code: Select all

 ls -la ~/my-applications/tightvnc

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#30 Post by gliezl »

rarsa wrote:Please notice that there are two packages: vncviewer and vncserver.

You need to install vncviewer.
Yes, you are right. vncviewer was not installed in the first place.
Thanks for your help. :)
Now I am enjoying VNC. :D

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#31 Post by pakt »

rarsa, I've been working with TightVNC for some time now learning how it works and trying to understand some problems I've had with it. I've also got a prototype 'Puppy VNC Server Wizard' working using xmessage in a script a la BarryK's Video Wizard (actually, I've borrowed a lot of the code from that wizard ;) ).

First off, I've discovered why I couldn't get the xterm line in xstartup to work (after removing the # of course :) ). There is an error when xstartup is created by vncserver. Here is the original code:

echo "#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &" >> "$xstartup"

which results in:

#xterm -geometry 80x24+10+10 -ls -title X11 Desktop &

Note that the quotation marks have disappeared from around 'X11 Desktop'. This turns 'Desktop' into a parameter, which xterm rejects and therefore fails to start. The line in vncserver should be:

echo -e "#xterm -geometry 80x24+10+10 -ls -title \"$VNCDESKTOP Desktop\" &" >> "$xstartup"

preserving the quotation marks.

Now for the main problem that I seem to have (finally) fixed. I haven't had any problems starting VNC servers from within fvwm95, but when running Puppy in text mode and starting a VNC server, I only got an X window and mouse cursor on the client - the lines in xstartup didn't seem to work. It appears that this was caused by the DISPLAY variable (set in vncserver) not being exported. When vncserver starts the xstartup script, $DISPLAY is blank. I changed this line in the vncserver 'runXstartup' function from:

DISPLAY=:${displayNumber}

to

export DISPLAY=:${displayNumber}

now vncserver works like a charm when running Puppy in text mode! :D

User avatar
miamuy
Posts: 14
Joined: Tue 02 Aug 2005, 01:47
Location: Philippines

#32 Post by miamuy »

:D a big thanks there, pakt! i'm have that same problem, done your solution & works for me. thanks!

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#33 Post by pakt »

miamuy wrote::D a big thanks there, pakt! i'm have that same problem, done your solution & works for me. thanks!
Appreciate your feedback, miamuy. Glad it worked for you too :D

You may be interested to know that I've been in contact with rarsa and sent him a prototype VNC Server Wizard that I've made. I was thinking he might be able to use it as is or modified to his liking in his VNC-pup package.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#34 Post by rarsa »

I'll be rebuilding the VNC install soon at the request of Barry.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#35 Post by rarsa »

I've released a new version of the vncserver. It was a necessary update for puppy 1.0.5, but it will run in older puppys.

http://www.murga.org/%7Epuppy/viewtopic.php?p=5943#5943

Thanks to all the feedback and testing from patk (forum name), it has a substantially improved interface for new users.

patk created a prototype wizard from which I built uppon. The result was quite pleasing to both of us. Hopefully it will also be for you.

Here is the changelog:
# Edit Sept 29, 2005 -> New installation version uploaded. (1.2.9-0.6)
- New vncserver-wizard included. Thanks to pakt for the initial prototype and for his patience and feedback testing the following versions.
- The xstartup executes jwm by default
- Faster vncserver -l command
- Rox cursor and Pinboard lanunched by default on the new displays. Thanks to pakt for the advice.


So there it is for you to try and provide feedback.

Post Reply