Thursday, November 17, 2011

redhat install notes

install a package
rpm –ivh packagename
upgrade a package
rpm –Uvh packagename

create a tar file
tar –cvf myfiles.tar mydir/
(add z if you are dealing with or creating .tgz (.tar.gz) files)

standard install from source
tar –xvzf Apackage.tar.gz
cd Apackage
./configure
make
make install

Wednesday, November 16, 2011

removing bad characters from file names

this will clean bad characters (such as \1b and \1f and \7f's) from a file and convert them to underscores

for file in *
do
mv “$file” $(echo “$file” | sed ‘s/[^A-Za-z0-9_.]/_/g’)
done

svn password snafu workaround

sometimes svn will emit the following message when trying to do a write:


svn gnome keyring is locked and we are non-interactive


the workaround is to change the default config to use local svn if you are not using svn+ssh to access the svn database.


this is done by altering the default client config file in the ~/.subversion directory.


Change to add the line in the auth stanza:
[auth]
password-stores=


to get it to use the "old" way.  The current config which is shown in the config file is password-stores=gnome-keyring,kwallet.  This is actually compiled in and is the default behavior.


There is apparently no path to actually "unlock" the gnome keyring for subversion if it has not been unlocked and that credential set, so it will emit the error message forever and is a bug.  This is just a document of the workaround.


http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553312

Monday, November 14, 2011

two gtk menu examples


menu factory and menu program for small examples

http://www.gtk.org/tutorial1.2/gtk_tut-13.html

to compile:


g++ main.cpp -Os -s `pkg-config gtk+-2.0 --cflags` `pkg-config gtk+-2.0 --libs`

create itemfactory as a .c file or you will get a huge list of deprecated error messages

here is tree example for GTK 2.0
http://scentric.net/tutorial/treeview-tutorial.html

svnserve init / startup script for ubuntu

One needs to create a script in /etc/init.d to ensure that svnserve is started at boot time.


A script with start, stop and restart (and optionally status) can be created, but a simple script which just starts the server will suffice.

#! /bin/sh
#
# svnserve
#
# start svn server
#

COMMAND="$1"
shift

case $COMMAND in
start)
svnserve -d -r /home/jws/svnserver/repository
;;
stop)
killall svnserve
;;
esac


the script can be installed into the init.d with the following:

update-rc.d svnserve defaults

Multiple repositories on same server:
http://wordaligned.org/articles/one-svnserve-multiple-repositories

make a directory called "repositories"
place all repositories in that directory.


start svnserv with that directory, rather than a pointer to a single repository.


Each repository is independent, with a separate url.


eg:
repositories
    local
    globalmt


svn://host/local is one base repo.
svn://host/globalmt is the other base repo

migrate cvs to svn:
http://cvs2svn.tigris.org/


cvs2svn can be installed on Ubuntu with apt-get


with a directly addressable copy of the cvs repository data, one can run the cvs2svn and produce an svn repository file structure with the migrated data.


cvs2svn -s <svn repo name> /cvs/cvsroot/modulename

Wednesday, November 9, 2011

microsoft xp file sharing

This addresses problems when a system is taken out of a domain and it is placed on a workgroup type network.  A number of settings won't be correct and have to be changed to share files on the machine.

turn on simple file sharing:
open folder options, make sure simple file sharing is on.


http://support.microsoft.com/kb/304040

make sure restricted anonymous access is off (if need be)

http://support.microsoft.com/kb/913628

thunderbird profiles


start->run->%appdata%  ... thunderbird->profiles

http://kb.mozillazine.org/Profile_folder_-_Thunderbird#Windows_2000_and_XP