Reply
Thread Tools
Posts: 16 | Thanked: 3 times | Joined on May 2010
#1
hello,

i'm asking if it is possible to make a script for auto connection to a specific ip.

basically the script should do this:
- open vnc viewer
- open connection on choosen ip
- pass the vnc password

i understand that is not correct to ask for the script itself (but if someone have already made it it will be great :-) ) and i'm not a total noob, but my knowledge are limited to windows and high level programming (.net, java), so if make the script is not so hard some advice on how to do that will be appreciated

thank you all
giovanni
 
mrsellout's Avatar
Posts: 889 | Thanked: 2,087 times | Joined on Sep 2010 @ Manchester
#2
Have a look at the excellent Presence VNC. With it you can save the password associated with an ip address, so all you have to do on startup is select the ip (you don't even need to do that if you only have one saved) and press connect.

I'm not sure if VNC Viewer has been updated of late, but Presence VNC had just about everything you needed and was much much more touchscreen friendly by the time I removed VNC Viewer last year.
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#3
Presence VNC still doesn't let me do the one thing I want to be able to do - move scroll bars in the window I'm VNC'ing to, as it just moves the screen around. Unless that feature is there, and I've just not read about it at all.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
mrsellout's Avatar
Posts: 889 | Thanked: 2,087 times | Joined on Sep 2010 @ Manchester
#4
Originally Posted by Mentalist Traceur View Post
Presence VNC still doesn't let me do the one thing I want to be able to do - move scroll bars in the window I'm VNC'ing to, as it just moves the screen around. Unless that feature is there, and I've just not read about it at all.
Have you disabled tapping? You can't scroll down by dragging, but you can tap the track on either side of the bar to move it around.
 
Banned | Posts: 537 | Thanked: 117 times | Joined on Oct 2009 @ N900 LAND
#5
VNC eneter a wibble !&9
 
Posts: 16 | Thanked: 3 times | Joined on May 2010
#6
i will try presencevnc but the scrollbar "bug" is a bad thing also for me...

anyway i' looking for a 1 click solution, like a shortcut on desktop that do what i explain.
searching this forum i found a thread with sample code to realize a script to do a similar thing. i try it but it give me an error...

this is my script (sorry i dont know the tag to put it in a 'code' box)

--------------------

#!/bin/sh
# Waits for machine to boot and keeps trying to access it (retries only with ssh)
# by Cue from maemo talk

initialwait=10
retrywait=10

waitmessage()
{
count=$1
while [ $count -ge 0 ]
do
sleep 1
clear
echo $2 $count $3
count=`expr $count - 1`
done
}

# is there the right number of arguments
if [ $# -ne 1 ] && [ $# -ne 3 ]
then
echo "Usage $0 00-17-C4-40-BE-6D marie 192.168.1.4"
exit 2
fi

if [ $# -eq 3 ]
then
ssh $2@$3
error=$?
else
error=1
fi

if [ $error -ne 0 ]; then
echo "machine probably not on. sending magic packet."
#wake machine with previously written shell script
#/home/user/MyScripts/wakeonlan.py $1
#use this instead if you use the indirect wake on lan script
#/home/user/MyScripts/wakeonlan.sh $1
error=$?
if [ $error -ne 0 ]
then
echo "wake on lan script was not found encountered an error"
else

#Wait for "initialwait" seconds for machine to boot
echo "Magic Packet Sent"
waitmessage $initialwait 'Waiting' 'seconds for remote machine to boot'
echo "apro vnc"
vncviewer

if [ $# -eq 1 ]; then
vncviewer
else

while true
do

ssh $2@$3
error=$?
if [ $error -ne 0 ]; then
waitmessage $retrywait 'Retrying in' 'seconds, press Ctrl+C to exit'
echo "Trying to connect"
else
break
fi
done
fi
fi
fi




-----------------

the error is:
ERROR:maemo-vnc-viewer.c:50:create_data: assertion failed: (result->osso)
Aborted


any idea?
 
mrsellout's Avatar
Posts: 889 | Thanked: 2,087 times | Joined on Sep 2010 @ Manchester
#7
That's way above my level of competence, so I can't help you there sorry. However I just did a google search for your error code and found this from a previous version that ran on the NITs. Maybe it can be of assistance.

FWIW I've just being having a look at the preferences in PresenceVNC and rediscovered that you can assign mouse wheel up and down to the volume rocker, which can help with the scrollbar issue.

For your script you might want to ask in the PresenceVNC thread, maybe the author could assist you anyway.
 

The Following User Says Thank You to mrsellout For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#8
Originally Posted by mrsellout View Post
Have you disabled tapping? You can't scroll down by dragging, but you can tap the track on either side of the bar to move it around.
I CAN do that. But it's not convenient for me, nearly as much as the scroll bar use is. Scroll bar is a bit easier to control than the movement of the bar by tapping the track. It doesn't make it unusable, just inconvenient enough that the other advantages of Presence VNC never were enough to warrant that for me.

- Edit -
Originally Posted by mrsellout View Post
FWIW I've just being having a look at the preferences in PresenceVNC and rediscovered that you can assign mouse wheel up and down to the volume rocker, which can help with the scrollbar issue.
And then you loose volume control. I want my volume control too. What I'd prefer is some combination of volume keys and something else. Oh, it also doesn't help with things that have horizontal scrollbars. I would prefer that there be a button for "mouse-wheel-press", which would toggle off the screen drag and send the mouse wheel click mouse event to the VNC'ed to computer... I should go suggest that.

Last edited by Mentalist Traceur; 2011-04-07 at 02:10.
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:05.