PDA

View Full Version : TPR How-To Repository?



Mojo
15-10-2004, 12:28
One thing that struck me on my return to Linux was the hours spent trawling various forums looking for answers to various questions.

Is there any mileage in us compiling a TPR Linux Mini How-To repository - I'm glad to edit and host it - for common tasks for people like us? I guess many here are running mixed Windoze/Linux environments and need some help with the basics to make things work? I know I did.

I would suggest we standardise on Fedora Core as the distribution, as this has the same roots as Red Hat and Mandrake most people should be covered by this.

Examples:

How to integrate file sharing with Samba
How to keep your machines up to date with patches
How to install and run <insert name of DC project here>

Comments/suggestions/flames?

PMM
15-10-2004, 12:45
Go for it, I know it would if nothing else help me ;)

Spaceboy
15-10-2004, 16:11
Excellent idea... I need to write a Samba guide anyway :rolleyes:

Egad
15-10-2004, 16:39
I know I could use such a repository of useful information.

wolram
15-10-2004, 17:38
:thumbsup: Great idea

I'm not a linux user, tried once and probably will again, so the information will be of great value when I decide to give it a go :)

PMM
15-10-2004, 18:17
Linux seems great but my head is so so much in the windows & dos world that
anything not handled by the GUI is alien to me on Linux.

Really don't understand the Hardware side for drivers and stuff if its something not
per the install.

I have a USB drive dos or NTFS formated certainly would like to know how I mount
it to see the contents windows is very much plug it in its there, have not a foggest
if its even been seen in Linux.

sirgaz
15-10-2004, 18:42
I'm the same with linux...in the gui i can get things up and running but when it comes to console stuff i get stuck. Because of this i've gone back to windows for now as theres some things i just can't get working.

samba and wine/winex would be great how to's

Mojo
16-10-2004, 12:23
This is the sort of thing I had in mind. I think they need to be stored as web pages so we can have in-line screen shots and cross indexes etc. However, the information in this one is valid and should work.

Comments?

__________________________________________________________________

HOW-TO Set up a vnc server to administer a headless Linux box

This document is intended for users of Fedora Core 2 and details how to set up a vnc server to start with Linux - allowing Windows and Linux clients to login to the box using X-Windows and perform monitoring and administration tasks.

VNC References

VNC stands for Virtual Network Computing and is free software. More information can be found at http://www.realvnc.com

1. Check if VNC is installed on your system

VNC can be installed with Linux - heading "Network Servers". To check if it is installed from a console window type in:

service --status-all | grep Xvnc

If you have the vnc server installed it will show up as Xvnc, either "running or "stopped" e.g.

Xvnc (pid 2138) is running...
Xvnc is stopped

In either of these cases the service exists and will just require configuration, if there is no line reading Xvnc you will need to install the software.

If your vnc server is running stop it now. From root, type in

service vncserver stop

2. Install the VNC server

Skip this step if you already have VNC.

To install from the Fedora CD set, use "System Settings|Add/Remove Applications" from your normal X desktop. VNC server can be found in "Network Servers". Click the check box, feed the appropriate CD into the box when prompted.

To install from the command line using the Internet, vnc is available as a download or as an RPM package. Follow the instuctions with the download to install.

3. Configuring the VNC server

First, you need to add yourself as a valid vnc user as all vnc connections require a valid password. To do this, from a console type in

vncpasswd

You will be prompted (twice) for a password to be used by VNC when you attempt to log in.

Next, we need to tell the system to start a vnc server for you. This is done by logging in as root and editing the system control file for vnc servers. In this example I have used user "fredbloggs" - you would use your normal login name.

The file to edit is /etc/sysconfig/vncservers, so

vi /etc/sysconfig/vncservers

The file will probably look something like this



# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# URL:http://www.uk.research.att.com/vnc/sshvnc.html

# VNCSERVERS="1:myusername"


Change to the following:



# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# URL:http://www.uk.research.att.com/vnc/sshvnc.html

# VNCSERVERS="1:myusername"
VNCSERVERS="1:fredbloggs"


Note the warnings contained in the file about insecure networks, VNC should always be run behind your firewall.

The next step is to test the above by starting the vnc server. Still as root, start vnc with

service vncserver start

and if all is well you will get a message similar to the following

Starting VNC server: 1:fredbloggs [ OK ]

If you get an error, check vnc is installed correctly, and the changes made to the configuration file /etc/sysconfig/vncservers.

Starting the server has generated some configuration files, we will need to edit this configuration now to make it work, they are stored in a hidden directory under your home directory. Change to this directory (using your normal login NOT root)

cd $HOME/.vnc

There is a file in this directory called xstartup, this is the script executed when you try to login under vnc. Change the file by uncommenting the following two lines (to uncomment simply remove the # at the beginning of the line

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Since we have changed files, it's best to restart the vnc server now. As root, type in

service vncserver restart

That completes your configuration.

4. Testing your VNC server

For this you need the VNC client on any machine, even the one you are on. If you have vnc loaded on your Linux box, from your normal login type in

vncviewer localhost:1

If all is well you will be prompted for the vnc password you set in step (3) and be greeted with your normal desktop.
From a Windows VNCViewer on the same network, you simply need to provide the name or IP address of your linux box when prompted. In our case, if we assume the machine is called "Fedora" on IP "192.168.0.254" either of the following would do:

Fedora:1
192.168.0.254:1

The trailing :1 is significant, it must tie up with the entry made in /etc/sysconfig/vncservers or you will get no response.

wolram
16-10-2004, 14:04
:spin: ... I'll read that again later Mojo, it may sink in after a while :)

mebbe we need "an idiots guide to Linux" :confused: :thumbsup:

Endre
16-10-2004, 16:51
Seems like a really good idea, might stop me from asking stupid questions on the boards;)

Spaceboy
18-10-2004, 09:56
Works a treat mate! :thumbsup:
only things are... I can start the vnc service using "1:root" in the config file, but not any other user.
Does the user need to have logged in to the console once before setting the vnc config ?

still... top notch matey :thumbsup:

Mojo
18-10-2004, 10:26
it should work for any user, well it does for me on Fedora.

the vncpasswd and the edit of the file in $HOME/.vnc should be performed as normal user. The user must exist and have a writable home directory as X needs to write its config files there.
the edit of the /etc/sysconfig/vncservers and the start/stop of services should be done as root.

The only other differences I can think of are your firewall (my network is pretty secure so I don't run the Fedora firewall - vnc uses tcp port 5901 for vnc session :1, 5902 for :2 etc. etc.) and your Fedora security level (mine is set to the normal/minimum setting - from memory)

HTH