Archive for the ‘linux (most likely Debian)’ Category

Upgrading Ekiga Softphone version in Ubuntu

Friday, June 19th, 2009

Ubuntu (specially 8.10 Intrepid Ibex) comes with a very old version of Ekiga Softphone. In order to solve this we have a personal site at Launchpad, the PPA for Troels Liebe Bentsen.

Just follow the instructions described in this page: http://wiki.ekiga.org/index.php/Snapshots at the bottom of the page under the title “Ubuntu”.

Beware to use the information found at the PPA for Troels Liebe Bentsen page. That is:

1) the repository information for your Ubuntu version (for Intrepid use: deb http://ppa.launchpad.net/tlbdk/ppa/ubuntu intrepid main & deb-src http://ppa.launchpad.net/tlbdk/ppa/ubuntu intrepid main)

2) the repository signature found here.

SVN back-up and restore

Friday, May 22nd, 2009

To back-up my SVN repository, I have the following script:


#!/bin/bash
SVNDIR=/var/svn
DATE=`date +%d-%m-%Y`
TARNAME=svn_dump_$DATE.bz2
cd $SVNDIR
rm -f *.svndump
rm -f *.bz2
for repo in $(ls -d */)
do
filename=`basename $repo | cut -d\. -f1`
svnadmin dump $repo > $SVNDIR/$filename.svndump
done
tar -cvz -f $SVNDIR/$TARNAME *.svndump
cp $TARNAME /home/yo/svn_dump

Basically, it iterates thru all my repositories in SVNDIR and dumps them (the back up process itself) with svadmin dump.... After that it tars and compress the *.svndump files in one single file TARNAME and then copies it to its final destination /home/yo/svn_dump from where I grab the tar.bz2 files and burn them in a DVD or whatever.

I also have a cron job as follows:

0 0 * * 7 /home/yo/bin/scripts/svndump.sh >/dev/null 2>&1

which runs the script above once a week.

To restore a svn dump file I have to:
1) Untar the tar.bz2 back up file.
2) With the result I run: svnadmin load /path/to/reponame < filename.svndump
3) Set the correct permissions to the restored repositories. This is needed if you restore the back-up in a different path or computer.

That's pretty much what I do. My source code is safe in several different places (I'm a little bit paranoid, I know...)

Using SVN with Subclipse

Saturday, May 2nd, 2009

If you want to know the basics of SVN with Subclipse there’s no need to add anymore than what this article already says.

http://www.saltycrane.com/blog/2007/03/how-to-setup-subclipse-project-to/

Was really helpful and clear to me.

Installing Transmission torrent client as a service in Ubuntu Hardy

Thursday, November 27th, 2008

I have a PC that I use as server running Ubuntu 8.04 Hardy Heron and I wanted to install a command-line torrent client and run it as a service to download & seed stuff with no need of a monitor or X attached to it (because I don’t have any of them :P ). So after trying a few clients I decided to stick to Transmission, Ubuntu’s default torrent client.

To get this working, this is what I did:

1) In order to use it as a service, you have to download transmission-cli package which has the transmission-daemon & transmission-remote bins.

2) Before this, I added a new apt sources to the /etc/sources.list because Ubuntu’s sources has a very out-of-date version. So open /etc/sources.list and add the following lines:

deb http://ppa.launchpad.net/bortis/ubuntu hardy main
deb-src http://ppa.launchpad.net/bortis/ubuntu hardy main

Then update & install.

3) You should now have the client intalled. But to use it as a service / daemon, go to:

http://trac.transmissionbt.com/wiki/HeadlessUsageDebian

http://trac.transmissionbt.com/wiki/HeadlessUsage/General
and follow the instructions.

Remember to set the correct permissions to the TRANSMISSION_HOME & TORRENTFOLDER directories to allow writing & reading to the user you set in USERNAME.

I had some problems with transmission populating the default config file “settings.json”. What I did was to manually create the file and add this default content:

{
    "blocklist-enabled": 0,
    "download-dir": "\/shares\/internal\/PUBLIC\/Torrent\/work",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "encryption": 0,
    "max-peers-global": 200,
    "peer-port": 51413,
    "pex-enabled": 1,
    "port-forwarding-enabled": 1,
    "rpc-access-control-list": "+127.0.0.1",
    "rpc-authentication-required": 0,
    "rpc-password": "",
    "rpc-port": 9091,
    "rpc-username": "",
    "upload-limit": 40,
    "upload-limit-enabled": 1
}

You can find out what options for this config files are available at:

http://trac.transmissionbt.com/wiki/EditConfigFiles

Hope it helps, cheers!

Epiphany Webkit

Saturday, September 6th, 2008

Note: this post was created using Epiphany Web Browser 2.22.3

I am very happy with the new version of Epiphany, Gnome’s web browser. With its brand new WebKit HTML engine, it works fast and fluently.

Right now I am using a PPA version of it since it has not been included in the official Ubuntu repositories. It will be on October 30th, when Ubuntu 8.10 becomes alive!

Install it and try it by yourself. To install it just add the following two lines to your /etc/apt/sources.list:

deb http://ppa.launchpad.net/stemp/ubuntu hardy main #WebKit & Midori
deb http://ppa.launchpad.net/michelinux/ubuntu hardy main #Epiphany-WebKit


Then just run:

sudo apt-get update
sudo apt-get install epiphany-webkit

Source: http://theindexer.wordpress.com/2008/07/04/install-epiphanywebkit-on-hardy-heron/

Archive directory with tar with "exclude" parameter.

Monday, September 1st, 2008

You can archive a directory using tar and exclude files or sub-directories using the “exclude” parameter:

tar cvjf ORIG DEST –exclude=PATTERN

*ORIG: the origin directory. I.E: /home/me

*DEST the destination archive file. I.E: /home/me/Desktop/home.tar.bz2

*PATTERN: file & subdirectories exclusion pattern. I.E: .* (excludes all hidden files)

Note: –exclude has two hyphens

Install Apache's Tomcat 6

Sunday, August 10th, 2008

This is extracted from RUNNING.txt file of Apache’s Tomcat 6 distribution. I think it is pretty straight-forward, so there’s nothing else I should add here.

===================================================
Running The Apache Tomcat 6.0 Servlet/JSP Container
===================================================
Apache Tomcat 6.0 requires the Java 2 Standard Edition Runtime
Environment (JRE) version 5.0 or later.

=============================
Running With JRE 5.0 Or Later
=============================
(1) Download and Install the J2SE Runtime Environment (JRE)

(1.1) Download the Java 2 Standard Edition Runtime Environment (JRE),
release version 5.0 or later, from http://java.sun.com/j2se.

(1.2) Install the JRE according to the instructions included with the
release.

(1.3) Set an environment variable named JRE_HOME to the pathname of
the directory into which you installed the JRE, e.g. c:\jre5.0
or /usr/local/java/jre5.0.

NOTE: You may also use the full JDK rather than just the JRE. In this
case set your JAVA_HOME environment variable to the pathname of
the directory into which you installed the JDK, e.g. c:\j2sdk5.0
or /usr/local/java/j2sdk5.0.

(2) Download and Install the Tomcat Binary Distribution

NOTE:  As an alternative to downloading a binary distribution, you can create
your own from the Tomcat source repository, as described in “BUILDING.txt”.
If you do this, the value to use for “${catalina.home}” will be the “dist”
subdirectory of your source distribution.

(2.1) Download a binary distribution of Tomcat from:

http://tomcat.apache.org

(2.2) Unpack the binary distribution into a convenient location so that the
distribution resides in its own directory (conventionally named
“apache-tomcat-[version]“).  For the purposes of the remainder of this document,
the symbolic name “$CATALINA_HOME” is used to refer to the full
pathname of the release directory.

(3) Start Up Tomcat

(3.1) Tomcat can be started by executing the following commands:
$CATALINA_HOME\bin\startup.bat          (Windows)
$CATALINA_HOME/bin/startup.sh           (Unix)

(3.2) After startup, the default web applications included with Tomcat will be
available by visiting:      http://localhost:8080/

(3.3) Further information about configuring and running Tomcat can be found in
the documentation included here, as well as on the Tomcat web site:      http://tomcat.apache.org

(4) Shut Down Tomcat

(4.1) Tomcat can be shut down by executing the following command:
$CATALINA_HOME\bin\shutdown            (Windows)
$CATALINA_HOME/bin/shutdown.sh         (Unix)

watch-movies: TV-Out & Display manager

Wednesday, June 25th, 2008

Continuing with my need of watching movies on my TV using my notebook and Ubuntu easily, I developed this mini-app in Python to turn on/off the TV output and the LCD display.

watch-movie.tar.gz

I hope you find this useful.

Note: you need python-gtk installed on your Ubuntu box.

Develop J2ME apps in Ubuntu with Eclipse, EclipseME & Sun Java Wireless Toolkit 2.5.2

Tuesday, June 24th, 2008

1-Download Sun’s Java Wireless Toolkit 2.5.2:
http://java.sun.com/products/sjwtoolkit/download.html

2-Install dependencies (found in the previous link):

yo@notebook# sudo apt-get install libxpm-dev libxt-dev libx11-dev libice-dev libsm-dev libc6-dev libstdc++6-dev

3-Install Sun’s Java Wireless Toolkit 2.5.2. Go to the dir were you downloaded the installer:

yo@notebook# chmod +x sun_java_wireless_toolkit-2_5_2-linux.bin
yo@notebook# ./sun_java_wireless_toolkit-2_5_2-linux.bin

You must enter the location of the JVM (I’m using JDK6 and it is located in /usr/lib/jvm/java-6-sun/bin/) and select a destination dir.

4-Install EclipseME plugin using the instructions found in:
a) http://eclipseme.org/docs/installation.html
b) http://eclipseme.org/docs/installEclipseME.html
c) http://eclipseme.org/docs/configuring.html

They work perfectly!

5-Now go develop some cool app for your mobile :-)

Reference: http://www.gonzalomarcote.com/blog/?p=15

ATI M6 LY TV-Out with (X)(K)(U)buntu Gutsy and xrandr.

Saturday, January 12th, 2008

I finally got my tv-out working on Xubuntu, I had already made it work but I re-installed my OS and did not remember what I did, so I had to start from scratch.

Just follow these steps to make it work:

Note:  output, set and off options are precedeed with two hyphens (i.e. – - output). I don’t know why, in this post, it seems like they have just one.

1) Plug your TV output to your TV.

2) Run the following command on a terminal window:

xrandr –output S-video –set load_detection 1

This will scan and detect the TV connection. If you run:

xrandr -q

it will return something like this:

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1024 x 1024
VGA-0 disconnected (normal left inverted right)
LVDS connected 1024×768+0+0 (normal left inverted right) 0mm x 0mm
1024×768 60.0*+ 60.0
800×600 60.3
640×480 59.9
S-video connected (normal left inverted right)
800×600 59.9 + 60.3

If you look at the last two lines you will see that the TV (named S-video) is “connected”. If you see that you S-video output is “disconnected”, try rebooting your computer leaving the TV cable plugged. After reboot, repeat this step in order to ensure that the TV has been detected.

3) This video card only supports 800×600 for the S-video output and 1024×768 for the monitor. So to avoid resolution problems (this means seeing the entire desktop on your TV), change the resolution to 800×600, before turning the TV output on:

xrandr -s 800×600

4) Now that you have the proper resolution, you can turn the TV output on. Just run the following command:

xrandr –output S-video –auto

You should see your desktop on your TV now!

Here is a list of other useful commands.

Turn off TV output: xrandr –output S-video –off

Turn monitor off (I do this when I see movies): xrandr –output lvds –off

Turn monitor on: xrandr –output lvds –auto

Turn resolution back to 1024×768: xrandr -s 1024×768

Hope this helps!