Thursday, August 21, 2008

CVS : How to checkout a branch

Checkout a branch version :
cvs checkout -r branch_name

Then an update can be done as usual :
cvs update

An alternative way is to update an existing checkout to switch to a branch :
cvs update -r branch_name

CVS : How to create a branch

Checkout the root version.

Put a Tag at that root from where to create the branch :
cvs tag -F -R root_branch_name

Create the branch from that tag :
cvs tag -b -r root_branch_name branch_name

Tuesday, August 19, 2008

How to change the way how LaTeX gives numbers to chapters, sections...

The best way is to use a renewcommand.
For instance :
\renewcommand\thesection{\arabic{part}.\arabic{chapter}.\arabic{section}}

gives 1.1.1 numbers to sections while :
\renewcommand\thesection{\arabic{section}}

will only display the section number of the given section without chapter or part information.

this can be used to redefine :
thechapter, thesection, thesubsection, and so on...

Wednesday, August 13, 2008

Clipboard between Linux and Windows using GDM

When using GDM on linux, one may receive the following find of message :

winProcSetSelectionOwner - OpenClipboard () failed: 00000578

This can be solved with setting in the [daemon] section :
KillInitClients=false

Monday, August 11, 2008

How to install SAMBA on a red Hat entreprise linux 5

Log as root on the PC.

if samba is not yet installed use the console to install the packages, for instance with yum :
> yum install samba
> yum install samba-common
> yum install samba-client
> yum install samba-swat
> yum install system-config-samba

How to configure samba :

Edit the file [/etc/samba/smb.conf]
In the [global] section add those lines :

workgroup = <your workgroup name>
guest account = nobody

then, in the same file, after section [homes], add your own shared directories for instance :

[shared]
comment = my shared directory
path = /the/path/to/the/directory
read only = no
public = yes
writable = yes
share modes = yes

write and close the smb.conf file.
Edit the file /etc/samba/smbusers and add the users you want to have access through samba,
with the format : linux_user_name = samba_user_name
I suggest that you give the same name for the samba user_name and for the linux user_name.
For instance :

user1 = user1
user2 = user2

write and close the smbusers file.
Usnig the shell prompt, execute the following command :

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

This should create a password file for samba users.
When this does not gives you access to your samba account, then use the following for each user :

smbpasswd -a <username to add>

you will be prompted for a password for the specified user.

NOTE 1 : After modification of a configuration file, restard the smb daemon.
NOTE 2 : The shared directory is a place where one may setup symbolic links so that only logging to this directory gives you access to any desired directory
NOTE 3 : SElinux is a kind of firewall, and your should configure it prior to use samba because it can prevent samba from running proprely, best to check your samba configuration is to disable SElinux.
NOTE 4 : The installed packages also include a graphical user interface to configure samba.

To mount a samba drive in windows :
- open explorer
- [Tools]->[Connect to a network harddrive]
- select a letter
- give the folder name : \\computer_name\shared_directory (e.g. \\mypc\shared)
- check the box "Reconnect at loggon"
- Click on "Connect with a different user name"
- Give a login and password for the shared directory you just defined with samba
- click OK twice.

To mount a samba drive in linux :
- smbclient //computer_name/shared_directory -U samba_user_name
- you will be prompted for a password.

Sunday, August 03, 2008

Using CentOS 5 packages with yum

Create the following new file : /etc/yum.repos.d/centos.repos
and put the following lines in it :

[CentOS5 base]
name=CentOS-5-Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
gpgcheck=0
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

[CentOS5 updates]
name=CentOS-5-Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates
gpgcheck=0
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

[CentOS5plus]
name=CentOS-5-Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus
gpgcheck=0
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5