An IDE for TeX

March 4th, 2008 by Leons Petrazickis

TeXnicCenter is an excellent IDE for developing TeX documents on Windows. It follows the usual interface conventions and is quite helpful in getting started and debugging. TeX is the standard page layout language for writing mathematical and scientific papers.

Here are some excellent tutorials for getting started with TeX.

The IDE requires MikTeX for actually compiling TeX files into PDF, PS, and so on.

Posted in unix, tex | No Comments »

Unknown root password in Suse Linux

March 3rd, 2008 by Leons Petrazickis

After I installed Suse Linux Enterprise Desktop 10, I tried to update it. It prompted me for a root password even though the install hadn’t asked for one — it had only created a regular user. Sudo didn’t help.

I tried booting in single-user mode, but that also prompted me for the root password.

Finally, I appended init=/bin/bash to the Linux boot command in GRUB. That booted me in a passwordless command line, letting me run passwd and fix things.

Posted in unix | No Comments »

Setting up SVN with Trac on a web server

June 21st, 2007 by Leons Petrazickis

Trac is an excellent web-based wrapper for SVN that adds bug tracking, a wiki, and several handy project management features. I keep setting up new repositories up for all the little projects we cook up in DB2 Technical Marketing, so I thought I’d write up a guide.

Installing Trac, SVN, and dav_svn for Apache2 is left as an exercise for the reader.

Create a new SVN repository:

svnadmin create /var/svn/Project
 

Create a new Trac environment:

trac-admin /var/trac/Project initenv
 

Change the owner to Apache so that it can read and write:

cd /var/svn
chown -R www-data Project
cd ../trac
chown -R www-data Project
 

Navigate to Apache site settings:

cd /etc/apache2/sites-enabled
 

If you want Trac to support multiple repositories, edit the trac file to look like this:

<VirtualHost *>
        ServerAdmin me@somewhere.com
        ServerName mysite.com
        DocumentRoot /usr/share/trac/cgi-bin/
        <Directory /usr/share/trac/cgi-bin/>
                Options Indexes FollowSymLinks MultiViews ExecCGI
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        Alias /var/trac/chrome/common /usr/share/trac/htdocs
        <Directory "/usr/share/trac/htdocs">
                Order allow,deny
                Allow from all
        </Directory>
        Alias /trac "/usr/share/trac/htdocs"

        <Location /trac.cgi>
                SetEnv TRAC_ENV_PARENT_DIR "/var/trac"
        </Location>
        <LocationMatch "/trac.cgi/[^/]+/login">
                AuthType Basic
                AuthName "Trac"
                AuthUserFile /etc/apache2/trac.passwd
                Require valid-user
        </LocationMatch>

        DirectoryIndex trac.cgi
        ErrorLog /var/log/apache2/error.trac.log
        CustomLog /var/log/apache2/access.trac.log combined
</VirtualHost>
 

The above assumes that all the repositories are in /var/trac

Navigate to Apache settings:

cd /etc/apache2/mods-enabled/
 

Append to dav_svn.conf:

<Location /svn/Project>
   DAV svn
   SVNPath /var/svn/Project

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd

  AuthzSVNAccessFile /etc/apache2/dav_svn.authz

  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
  </LimitExcept>

</Location>
 

The above lets you check out from http://yoursite/svn/Project

If you like, you can add a new user to dav_svn.psswd:

cd ..
htpasswd2 /etc/apache2/dav_svn.passwd NewUser
 

Users can then be granted permissions by editing the dav_svn.authz file. Sample file:

[groups]
developers = NewUser, OtherUser
others = ThirdUser

# Restrictions on the entire repository.
[/]
# Anyone can read.
* = r
# Developers can change anything.
@developers = rw

# Other can write here
[/trunk/public/images]
@others = rw

[/trunk/public/stylesheets]
@others = rw
 

Restart Apache:

killall apache2
apache2

You now have have an Trac/SVN install with SVN at http://yoursite/svn/Project and Trac at http://yoursite/trac.cgi

Posted in unix | No Comments »