How to install UltraVNC Repeater for Linux (Debian & CentOS)

How to install UltraVNC Repeater for Linux (Debian & Cen

Postby pfaf » 2010-10-15 13:20

How to install UltraVNC Repeater for Linux (Debian & CentOS)

I simply cannot find the old thread
post #69750
So I created this one...

#We have created a version based on the repeater014.zip version which is at
#http://koti.mbnet.fi/jtko/uvncrepeater/repeater014.zip

#So, you can download UltraVNC repeater by giving
#wget http://www.wisdomsoftware.gr/download/u ... -ws.tar.gz

#Get build packages
#For Debian use
apt-get install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc

build-essential

#For CentOS use:
yum install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc

build-essential

#Get source into /usr/local/src
cd /usr/local/src
wget http://www.wisdomsoftware.gr/download/u ... -ws.tar.gz

#Unzip source file
gunzip uvncrep015-ws.tar.gz
tar -xvf uvncrep015-ws.tar.gz

#Install startup script
cd uvncrep015-ws
make; make install;

#Add a user for the service
useradd uvncrep

#Edit /etc/uvnc/uvncrepeater.ini according to your needs.
#Check the following parameters:
viewerport = 5901
maxsessions = 10
runasuser = uvncrep
logginglevel = 1
srvListAllow1 = 192.168.0.0 ;Allow network 192.168.x.x
srvListDeny0 = 127.0.0.1 ;Deny loopback

#Start the service
/etc/init.d/uvncrepeater start

Enjoy!
pfaf
 
Posts: 3
Joined: 2007-06-13 18:50
Location: Piraeus - Greece

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby italianpenguin » 2010-10-19 08:52

I am on Centos, there are some issues:

#Unzip source file
gunzip uvncrep015-ws.tar.gz
tar -xvf uvncrep015-ws.tar.gz


It works but without gunzipping. If i gunzip, then i have a .tar file.

Then, i want to run the repeater in foreground for see logs.
I noticed that it needs the .ini file in /etc/ and not in /etc/uvnc:

Code: Select all
UltraVnc Tue Oct 19 11:21:31 2010 > main(): ini file ([b]/etc/uvncrepeater.ini[/b]) read error, using defaults


So, for these tests, i copied the .ini in /etc/ and edited the /etc/uvncrepeater.ini.

I tried this repeater in my LAN (is it possible?? Ultravnc server allows it)
But even if the log says this:

# uvncrepeatersvc
UltraVnc Linux Repeater version 0.15
UltraVnc Tue Oct 19 11:25:29 2010 > dropRootPrivileges(): privileges successfully dropped, now running as user uvncrep
UltraVnc Tue Oct 19 11:25:29 2010 > routeConnections(): starting select() loop, terminate with ctrl+c
UltraVnc Tue Oct 19 11:26:28 2010 > acceptConnection(): connection accepted ok from ip: 10.0.0.52


in reality i cannot connect, and the viewer says "proxy connection failed"...

My .ini is the following:

Code: Select all
[general]
viewerport = 5909
serverport = 5901
ownipaddress = 10.0.0.13
maxsessions = 10
runasuser = uvncrep
allowedmodes = 3 
logginglevel = 1             


[mode1]
allowedmode1serverport = 0

requirelistedserver = 0             

srvListAllow0 = 10.0.0.0        ;Allow network 10.x.x.x
srvListAllow1 = 127.0.0.1

srvListDeny0 = 192.168.0.22     ;Deny host 192.168.2.22

[mode2]
requirelistedid = 0             

idlist0 = 1111                 
idlist1 = 2222
idlist2 = 0
idlist3 = 0
idlist4 = 0
idlist5 = 0
idlist6 = 0
idlist7 = 0
idlist8 = 0
idlist9 = 0

[eventinterface]
useeventinterface = true
eventlistenerhost = localhost
eventlistenerport = 2002
usehttp = true


Any suggestions
Anyway, good work, keep on with this

Regards
I.P.
Last edited by italianpenguin on 2010-10-19 09:24, edited 3 times in total.
italianpenguin
 
Posts: 3
Joined: 2010-10-19 08:41

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby pfaf » 2010-10-20 08:26

Yes, you are right for the extraction, it should be.

Code: Select all
#Unzip source file
gunzip uvncrep015-ws.tar.gz
tar -xvf uvncrep015-ws.tar


The installation was tested in a CentOS without a problem.

Indeed the default location of the uvncrepeater.ini file is /etc.
In the /etc/init.d/uvncrepeater file it is set up as /etc/uvnc/uvncrepeater.ini, so if you want it instead at /etc folder you can change it in the init.d script - parameter UVNCREPINI.

To run the service in terminal so that you can see the log files, while leaving the ini file in /etc/uvnc you can use the following command:

uvncrepeatersvc /etc/uvnc/uvncrepeater.ini

Regarding the settings in the uvncrepeater.ini file i would suggest the following:

change ownipaddress to 0.0.0.0

Code: Select all
ownipaddress = 0.0.0.0


I hope that the above will be of some help.

Kind regards,

Panos.
pfaf
 
Posts: 3
Joined: 2007-06-13 18:50
Location: Piraeus - Greece

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby italianpenguin » 2010-10-20 12:17

I followed your suggestions and now it works !!
Maybe it was the 0.0.0.0 that was causing me the problems.

A question... how to see all the active connections, and where i can see the event log ???

I.P.
italianpenguin
 
Posts: 3
Joined: 2010-10-19 08:41

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby italianpenguin » 2010-10-22 06:59

A question... how to see all the active connections, and where i can see the event log ???



I reply to myself ...
Log is in /var/log/uvncrepeater.log

I.P.
italianpenguin
 
Posts: 3
Joined: 2010-10-19 08:41

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby lokkju » 2010-11-19 07:15

As a note, I've had a repo with my mods and fixes up at http://code.google.com/p/uvncrepeater/ for almost a year now. I'd love to get a bit more traction in the repo, and would be happy to grant commit access to people who want to mod it.
lokkju
8
8
 
Posts: 9
Joined: 2006-10-17 23:05

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby pfaf » 2010-11-21 23:36

We would like to participate to ultravnc repeater code, since we too use it for our customers.

Would you like to contact us?

We have just changed the version to allow connection to 10.0.0.X local ips when requireListedServer is 1.

Our new version is at

http://www.wisdomsoftware.gr/download/u ... -ws.tar.gz

Kind regards to all,

Panos.
pfaf
 
Posts: 3
Joined: 2007-06-13 18:50
Location: Piraeus - Greece

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby lokkju » 2010-11-22 00:07

You're more then welcome to become a commiter to my repository. PM me your google acount email adress, and I'll add you to the repo.
lokkju
8
8
 
Posts: 9
Joined: 2006-10-17 23:05

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby PCP » 2010-12-13 11:12

Hello

We want to install UltraVNC repeater on a CentOS 5.5 Server.

Looking at the headers needed according to the first post, it appears to me that X is needed (?).

Can you please confirm? Our server is X-less..

Thanks in advance

Patrick
PCP
 
Posts: 1
Joined: 2010-12-13 11:03

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby lokkju » 2010-12-13 11:19

Which file do you see the references to X in? I'm not seeing it in my sources... and repeater itself should not require it.
lokkju
8
8
 
Posts: 9
Joined: 2006-10-17 23:05

Re: How to install UltraVNC Repeater for Linux (Debian &

Postby mau » 2011-05-04 12:07



Hi,
I've installed your uvncrepeater on ubuntu 10.04 (ubuntu is based on debian) and I've made some modifications:
1.- To add a user, best use
Code: Select all
aadduser --no-create-home  --system uvncrep


2.- I've modified the /etc/init.d/uvncrepeater script because yours doesn't work fine for me. Mine is like this:
Code: Select all
#!/bin/sh
#######
#Filename: uvncrepeater
#Version: v1.02
#Location: /etc/init.d
#Author: Fafakos Panayiotis - Greece
#Licence: GNU-GPL
#######
# Version info
#-------
# v1.02 - 20101122 - Corrected restart option
#-------
# v1.01 - 20101015 - Updated release for CentOS
# - Added small corrections to make it work under CentOS
# (update-rc.d and start-stop-daemon do not exist in CentOS)
#-------
# v1.00 - Initial release for Debian
#######
### BEGIN INIT INFO
# Provides:          uvncrepeater
# Required-Start:    $network $syslog
# Required-Stop:     
# Default-Start:     2 3 5
# Default-Stop:      0 6
# Short-Description: Start ultravnc repeater daemon at boot time
# Description:       Enable ultravnc repeater service.
### END INIT INFO


PATH=/sbin:/bin
SCRIPTNAME=$0
UVNCREPPID=/var/run/uvncrepeater.pid
UVNCREPLOG=/var/log/uvncrepeater.log
UVNCREPRUN=/usr/sbin/uvncrepeater-log
UVNCREPSVC=/usr/sbin/uvncrepeatersvc
UVNCREPINI=/etc/uvnc/uvncrepeater.ini

SYSTYPE=Debian
##type start-stop-daemon
if test $? -gt 0 ; then
        echo This is not a Debian system, or start-stop-daemon has not been installed.
        SYSTYPE=other
fi

#if service file does not exist then exit the script
if test ! -x $UVNCREPSVC ; then
    echo $UVNCREPSVC file was not found.
    echo Exiting...
    exit 2
fi

#Create the file to start the service if it does not exist
if test ! -x $UVNCREPRUN ; then
    echo '#!/bin/sh' > $UVNCREPRUN
    echo 'exec' $UVNCREPSVC $UVNCREPINI '2>>' $UVNCREPLOG  >> $UVNCREPRUN
    chmod +x $UVNCREPRUN
fi

pidof_uvncrepeatersvc() {
        # if there is actually an apache2 process whose pid is in PIDFILE,
        # print it and return 0.
        if [ -e "$UVNCREPPID" ]; then
                if pidof $UVNCREPSVC |grep $(cat $UVNCREPPID); then
                        return 0
                fi
        fi
        return 1
}


case "$1" in
start)
  echo -n "Running UltraVNC Repeater..."
  if [ "$SYSTYPE" = "Debian" ]; then
        start-stop-daemon --start -b -m -p $UVNCREPPID --exec $UVNCREPRUN -- $UVNCREPLOG
  else
        $UVNCREPRUN -- $UVNCREPLOG &
        echo $! > $UVNCREPPID
  fi
  echo "."
  ;;
stop)
  echo  "Stopping UltraVNC Repeater..."
  if [ "$SYSTYPE" = "Debian" ]; then
                start-stop-daemon --stop -p $UVNCREPPID
  else
        UVNCPID=`cat $UVNCREPPID`
        echo $UVNCREPRUN should be running at $UVNCPID
        if [ -e /proc/$UVNCPID -a /proc/$UVNCPID/exe ]; then
                echo Seems that this process exists. Trying to stop it...
                kill -15 $UVNCPID
                rm -f $UVNCREPPPID
        fi

  fi
  rm $UVNCREPPID
  ;;
restart)
        "$SCRIPTNAME" stop && "$SCRIPTNAME" start
  ;;
force-reload)
        "$SCRIPTNAME" stop && "$SCRIPTNAME" start
  ;;
status)
        PID=$(pidof_uvncrepeatersvc) || true
    if [ -n "$PID" ]; then
                echo "UvncRepeaterSvc is running (pid $PID)."
        exit 0
    else
        echo "UvncRepeaterSvc is NOT running."
        exit 1
    fi
  ;;

*)
  echo "Usage:  $BASENAME {start|stop|restart|force-reload|status}"
  exit 1
  ;;

esac

exit 0


Thanks for your good work ;-)
mau
 
Posts: 1
Joined: 2010-05-06 08:11

Re: How to install UltraVNC Repeater for Linux (Debian & Cen

Postby TheKING » 2015-12-30 23:32

Please tell as how to set up repeater on Centos 7. I can not. Gives the following error:

Code: Select all
[root @ localhost uvncrep017-ws] # make; make install;
g ++ -Wall -c repeater.cpp
make: g ++: command not found
make: *** [repeater.o] Error 127
-------------------------------------------------- ---------
./install.sh
/ etc / uvnc directory already exists.
uvncrepeater.ini already exists - will not overwrite!
cp: stat failed for «repeater»: No such file or directory
./install.sh: line 15: type: update-rc.d: not found
update-rc.d is not available, perhaps CentOS ...
trying chkconfig
chkconfig is / usr / sbin / chkconfig
-------------------------------------------------- ---------
Do not forget:
a. to create a user for this service
i.e. useradd uvncrep
b. change the /etc/uvnc/uvncrepeater.ini file accordingly.
TheKING
 
Posts: 2
Joined: 2014-07-29 11:09


Return to Older

Who is online

Users browsing this forum: No registered users and 1 guest

cron