Codes from my life

Posts tagged ‘Linux’

Running topcoder applet behind proxy

Somehow the default Iced Tea Webstart throws NullPointerException which I dont know how to debug. I downloaded SUN JDK and installed on my machine, you can use your package manager also. It usually gets installed in /usr/java/jdk-<version> and /usr/java/latest links to the latest version installed, so it is better to use the later. Then download the ContestApplet.jnlp and simply sun the following command to get it working.

$ /usr/java/latest/bin/javaws ContestApplet.jnlp

It uses default system proxy to download the content from Topcoder needed to execute the arena. When the arena is open set the proxy and use HTTP Tunnel A or B. For us Tunnel B works.

using java on linux

This was a problem faced by my friend. He happens to use only JAVA that too JAVAC. He does not like to use Netbeans I don’t know why. And he said that it was the only problem that stopped him from using Linux. So I decided to help him. These were some links which were really helpful.

http://en.opensuse.org/Java
http://en.opensuse.org/Installing_Sun%27s_Java_on_SUSE_Linux (to be more precise)

The problem was that the openJDK which provides JAVC which is the default installation on openSUSE is different from JAVAC provided by SUN because the same Hello World program which compiled on SUN’s JAVAC failed to compile on openJDK’s JAVAC.

The details can be found out here http://lug.nitdgp.ac.in/wiki/index.php/How_to_use_Java_on_Linux

The repositories described there are Local to our college you can use your package manager to locate the packages. For openSUSE users sun’s packages are in Non-OSS repo

mouting network directory as your own directory, NFS

I manage our local GLUG server. And the server was running out of space. So I was thinking of some alternative, so NFS clicked my mind. I am trying to mirror Ubuntu repo for our college students.

There is another server in the college which I happen to manage, so I decided to give NFS a try. Since both the machines are running openSUSE the distro of my choice, it was not difficult at all. http://en.opensuse.org/NFS This link gave sufficient information about using NFS.

Within 10 minutes I was done. But I need to see how fast it actually is once the download completes. Hope it works out. Then our repo will be complete with support for Fedora, openSUSE and ubuntu. Check out the repo here. http://lug.nitdgp.ac.in/repository/

should i try fedora

Rangeen, who happens to be the only Fedora ambassador in our college did a very good work by creating a local Fedora repository http://lug.nitdgp.ac.in/repository/fedora-local/ . I am an openSUSE user and I am satisfied with it, we also have a local packman mirror http://lug.nitdgp.ac.in/repository/packman/ which happens to be the biggest repo for openSUSE. But the only problem is that it is not a complete repo, I mean while installing packages I need to download some packages from the internet also. But the Fedora repo which also has the updates is nearly a complete repo.

So I am thinking about trying Fedora now.

making direcories and symbolic links in apache web directory

This made me worried for the past two days. Thanks to IRC I got the solution.
Add these lines at the end of your default-server.conf file for apache. On opensuse it is in /etc/apache2/defualt-server.conf

<Directory “path to directory like /srv/www/htdocs/download”>
options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride All
Order allow,deny

Allow from all

</Directory>

Then restart apache.
This makes the directory visible from web browser and makes apache follow symbolic links !
This was really painful yet the answer was so simple.
I need to look in apache configurations properly.

setting up an SVN server is as easy as eating cake

I tried to set up an svn server on my laptop today as I have organized a hack session today to bring in more people for hacking FOSS.
I have chosen opendchub for three reasons:
1. They have seen it working. And they actually use it.
2. The source code is as less as 10 c files.
3. The project is dead. I have already applied for the maintainership. You dont apply please 😛

This is a helpful link href=”http://en.opensuse.org/Setting_up_a_Subversion_server_using_Apache2 . I hope everything turns out positively.

using GIT behind proxy

GIT is another software used for version control as SVN or CVS. Today when I was at gym Shreyank requested me to find out a possible solution for using GIT as he saw what I had posted earlier to use SVN and Pidgin. He was really very happy to see Pidgin working.

I came back then I thought I should give it a try too. I visited the LDTP site. There I saw a link for using git behind proxy. I dont know how it worked for me. I simply noticed that there was a simple change of protocols while using proxy, git:// was changed to http://.This is what I used to download the source of LDTP

$git clone http://anongit.freedesktop.org/git/ldtp/ldtp.git

I tried and bang! it was working for me. I had done only the usual proxy setting form yast, it sets up the http_proxy Environment variable. Check if it is set for you.

$echo $http_proxy

If the output is not “http://10.0.0.1:3128&#8243; then the proxy setting is not done for you. Do this

$export http_proxy=”http://10.0.0.1:3128&#8221;

It should work for you also.

Cheers 🙂