All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
[TUTORIAL] How To Setup VNC Server Linux For Remote Desktop ur Machine
This Tutorial Worked Fine For Centos Any Version
1 Installation
From the root ssh we gonna install VNC-server.
first install desktop package
yum groupinstall Desktop
Further install
yum install gnome-core xfce4 firefox
yum install tigervnc-server
Now make the service on after every reboot
chkconfig vncserver on
==============
3 Adding VNC user
For security reasons i suggest add new vnc user..
Or u can Still using user=root
if want keep using root for vnc user
just skip the Adding VNC user part below and go directly to vnc password set and continue to the configuration part
vncpasswd
In my case I am i will use new user for vnc.
user=XTony it will differ in your case. You can use any username for the same.
useradd XTony
Now I will assign the vncpassword for the user with the user I just created before as:
su - XTony
vncpasswd
the output:
[root@server1 ~]# su - XTony
[XTony@server1 ~]$ vncpasswd
Password:<--yourvncpassword
Verify:<--yourvncpassword
[XTony@server1 ~]$
===============
Now I will make the configuration file for the vncserver by creating file as follows:
nano /etc/sysconfig/vncservers
at the last two line of the file uncomment it and give the entries like this.
[...]
VNCSERVERS="1:XTony"
VNCSERVERARGS[1]="-geometry 1024x768"
Here your port comes to be 5901 & 1024x768 resolution for the VNC client, you can choose resolution of your own choice.
===============
Now I will restart the VNC server service as root user:
service vncserver restart
=================
output :
[root@server1 ~]# service vncserver restart
Shutting down VNC server: [ OK ]
Starting VNC server: 1:XTony xauth: creating new authority file /home/XTony/.Xauthority
New 'server1.example.com:1 (XTony)' desktop is server1.example.com:1
Creating default startup script /home/XTony/.vnc/xstartup
Starting applications specified in /home/XTony/.vnc/xstartup
Log file is /home/XTony/.vnc/server1.example.com:1.log
[ OK ]
[root@server1 ~]#
==================
If you need any help post below.
Comments
Interesting, thanks Any recommendations re VNC client to use on Windows…?
yes do you from windows to other machine or from machine to windows
if you mean from windows to linux : u can use TigerVNC
windows to windows : not need to install anything just make sure remote desktop option is activated in your destination windows and use remote desktop conection .
Sorry for not being clear: I was asking about windows to linux box, after setting it up following your tutorial… thanks.
Can the port be changed as well? And how to do that? (e.g. for use on a NAT VPS)
through an ADSL router that performs NAT, i.e. all the PC's have subnet
IP
addresses (10.0.0.X), which means they cannot be accessed as such from a
remote VNC client through the Internet.
I know the public IP address of the router, but haven't found anything
on how
to build an IP address for individual PC's in the LAN (the ones running
VNC
servers) that can be addressed from a remote VNC client.
OK, this is an expanded answer to the one I gave somebody else
asking about VNC'ing to a server behind NAT. I assumed that
they had control of the NAT, I didn't realise that some ISPs
NAT'd people's connections.
So, I'm assuming that this is your setup (xDSL with home router):
(fixed font for this, folks)
In this example, the router has an IP address a.b.c.d (static, I
assume -).
Since the router is the only one
with a 'proper' (ie, public - ie, addressable through the internet)
IP address, you can only connect your VNCviewer to ports on this
router.
lets say you want to connect your viewer to
port 5900 on PCs 1,2 & 3.
So you need to forward 3 ports on the
router to port 5900 on PC1,2 & 3.
So, go into your router config, find 'port forwarding' (this may
be called something else - anyone seen a different term for this?)
and setup (for example)
....so you can now connect via the internet to your PCs using
vncviewer, and connecting to a.b.c.d:1 will give you PC1,
a.b.c.d:2 will give you PC2 etc.
Does that make sense? Post the model of your router and somebody
can probably give you the exact details of the port forwarding
config.
iam testing this tutorial for windows 8 to centos 6 and work as well without xrdp server (i dont recommend it for windows just install vnc server directly)
just after install vnc server on ur target machine eg:179.125.123.2
then install tigervnc in your windows machine
and connect to your target machine (for example)
179.125.123.2:5901
i using 5901 because the port spefied in my configuration is 1 as below:
VNCSERVERS="1:XTony
if i locate it to "3" as below
VNCSERVERS="3:XTony
then i will connect to
179.125.123.2:5903
`
Weren't you suppose to open ports 5901 to allow remote connections?...
@XTony, you have a very nice website. Which web designer did you use?
@serverian
OMG! So true!
And nice to see you btw
↑ this! I'd asked whether it would be possible to change the port on which the VNC server listens, so that I could choose one of the ports already allocated to my NAT'd VPS by my provider (where I have no control over this, but have the list of randomly allocated ports to choose from).
Seems I'd correctly assumed the VNC client could be manually configured accordingly to use the chosen port, so no problem at the client (Windows) end.
Actually iam the designer
Nice skills there! Can I hire you to design my websites as well?
you dont need to open the port
for Nat users
the idea it not change the Vnc port
but forward a port to the vnc port as specified before
i have no probleme let me check it first
This tutorial is copied almost word for word too.
https://www.howtoforge.com/vnc-server-installation-centos-6.5
Yep, that works Can use iptables for that. This said, it adds to complexity with no added utility. Would be more elegant to simply set the port(s) in the VNC server config.
yep u can use iptable:
just open
/etc/sysctl.conf
and make sure the following line is enabled, and set to "1":
Save the file, then run:
Configure IPTables;
change the
2.2.2.2 = to target machine
venet0 = Ethernet adapter
7705 = target Nat port
forward to
5901 = vnc port
**Step Two
**
iptables -t nat -A PREROUTING -d 1.1.1.1 -p tcp -m tcp --dport 5901:7705 -j DNAT --to-destination 2.2.2.2
1.1.1.1 = root server
Step Three
iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE
** cough * backupsy.com * cough*
It gets better: https://i.kamranali.uk/0d14f93d878bc084d378.png
Until earlier the logo was also that of Asura Hosting
Actually you are not.
Could you please clarify why you are using a ripped version of backupsy.com's design for your site? And why are you posting ripped tutorials? I am really looking forward to your "explanation".
I've spoken to Alex Wacker at Backupsy. He is looking into it.
@XTony
Oh, I think they know! @serverian = Oktay Kilic, Backupsy's owner
Hosting at OVH.
IP 51.255.37.230
[email protected]
He is also displaying fake testimonials on his site and claims that they originate from WHT and LET... :-) Not to mention the very funny "HARRY UP!" in his header.
i just starting in the service before 3 days so dont show me as a scam
i will change the design soon
Maybe he needs a 3 day ban then?
@Amitz @Ishaq
Off-topic: When did you become an administrator @Ishaq? Congratulations anyway!
https://www.ovh.co.uk/abuse/
Good news! He changed the color of the site from blue to green. That makes it totally original, right?
Also no more "HARRY UP!"