Archive

Archive for the ‘Linux’ Category

New Terminal Emulator for Cygwin

December 30th, 2008

Just recently there was a post to the cygwin mailing list, I typically won’t post items like this, but I felt this was an exception to the rule.

Hi,

I’d like to introduce “MinTTY”, a terminal emulator for Cygwin that I’ve been working on for a while. It is based on the terminal emulation and Windows frontend parts of PuTTY 0.60 by Simon Tatham and his team.

Unlike PuTTYcyg, MinTTY discards PuTTY’s networking functions, which are already convered by Cygwin’s ssh and telnet packages. This results in simpler configuration, a leaner interface and small code size. MinTTY’s most obvious difference to rxvt is its native Windows interface and configuration dialog.

More info, as well as the latest sources and binary can be found on the project page:

http://code.google.com/p/mintty

The MinTTY discussion group can be found at:

http://groups.google.com/group/mintty-discuss

I hope you’ll give MinTTY a try, and I’m looking forward to feedback and questions. Bug reports and feature requests can be sent via the issue tracker on the project page.

Regards,
Andy

I am using it currently; and quite honestly I think for an initial release it is quite good.

Author: gorshing Categories: Linux Tags:

xmllib2 and python

November 15th, 2008

I have been working with Python and libxml2 for a bit now and have found out there is little documentation out there on how to get everything working together. Also as I have very little permissions on some of the machine I work on, I need to be able to have my own installation of Python without affecting the entire system. I have put together the following steps to follow for installing your own installation of Python using least privileges (without root access) for both Windows and Linux.

One quick note about Linux, a lot of GNU Linux distributions out there might already have Python2.5, but I have not had the luck of dealing with any of these. You should check to make sure you need to install a custom installation.

Typically I would like the latest and greatest of a package, however; the libxml2 Windows package does not seem to acknowledge Python2.6 or above, so to keep everything on the same page I use Python2.5 on Linux as to match up with a Windows version also. It goes without saying, but if platform independence doesn’t matter to you then choose whichever way you would like, for myself I like to have my scripts be able to run on Linux and Windows.

Download and extract Python-2.5.2.tar.bz2 from http://www.python.org/ftp/python/2.5.2/. I typically just work out of my home directory, but to each their own.

wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2

Now just a simple extraction:

tar xjf Python-2.5.2.tar.bz2
 
cd Python-2.5.2

Now we need to configure the python setup. The key part is the –prefix portion, as many people out there are not too familiar with building a source distribution by hand. This basically is the location where all the binaries, libraries, and man pages will be stored. The layout under this directory will be something similar to (I kept this brief, you will have more than this):

$HOME/utils
  +- include/
       |- python2.5
  +- lib/
       |- python2.5
  +- share/
       |- man
  +- bin/
       |- python
       |- pydoc
       |- python2.5
export LDFLAGS="-R$HOME/utils/lib"
 
./configure --prefix=$HOME/utils
 
make

I use the LDFLAGS variable to keep from dealing with LD_LIBRARY_PATH, please these links for more information.

Note: On some hosts, such as Site5, you will need to ask IT Support to be put into a compiler group in order to obtain access to gcc.

Now we will install all the built binaries and libraries into the prefix directory we specified earlier.

make install

I will not get into it here, but it is possible to install multiple versions of Python side-by-side. If this is something you would like, then look into using make altinstall instead. The README file details this in the Installing section (around 75% into the file).

If all goes well, then $PREFIX/bin/python should work. I typically adjust my PATH environment variable to accommodate this:

export PATH=$HOME/utils/bin:$PATH

Installing libxml2 on Linux

As these steps follow extremely close to the preceding steps, I will make this a little more brief.

Download libxml2-2.7.2.tar.gz from ftp://xmlsoft.org/libxml2/ (a newer version might be available).

Extract the package in to a working directory.

tar xzf libxml2-2.7.2.tar.gz
 
cd libxml2-2.7.2

Then execute the following:

./configure --prefix=$HOME/utils --with-python=$HOME/utils/bin/python
 
make
 
make install

Installing libxml2 on Windows

To get libxml2 working on Windows, it is as trivial as downloading a package from http://users.skynet.be/sbi/libxml-python/, it automatically detects an installation of python and installs itself.

In some future posts, I’ll go over using libxml2 with python.

Author: gorshing Categories: Linux, Programming Tags: