Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, June 2, 2012

Unable to connect: Access denied: HTTP proxy server forbids port 6667 tunneling

if you are using Pidgin IRC client behind a proxy and getting this error
"Unable to connect: Access denied: HTTP proxy server forbids port 6667 tunneling"

Select
Account --> (select your account) --> Edit Account

GoTo proxy tab and change proxy type to "No Proxy"

Friday, June 1, 2012

mercurial abort: error: Name or service not known abort: error: Name or service not known abort: error: Name or service not known

Q: when cloning a mercurial repository, if you are getting error

"abort: error: Name or service not known"

Solution:
If you are behind a proxy please make sure /etc/mercurial/hgrc or ~/.hgrc has correct proxy settings.
Mercurial also uses ENV variable http_proxy if set. you can set http_proxy variable in unix using

export http_proxy=proxy.mydomain.in:8080   

where proxy.mydomain.in is the host and 8080 is the port.


This error can also happen if you were behind proxy before and now you are not.

So to unset proxy setting for mercurial make sure in
/etc/mercurial/hgrc
~/.hgrc
you had commented out those lines

also clear the http_proxy ENV

you can use unset command for this

unset http_proxy

Tuesday, May 29, 2012

apache htacess directory listing

Apache allows to disable directory listing using htacess files.

By default in ubuntu apache document root directory is /var/www

you can edit configuration file located at /etc/apache2/sites-enabled/000-default

You have a folder called "private" in /var/www/private which contains some information. If your system is connected to internet and have public access anyone can get data from http://yourdomain.com/private !!

To disable directory listing try this:

create a file called .htaccess in /var/www/private
set your favourite editor
export EDITOR=vim

sudo $EDITOR .htaccess

Options -Indexes                #disable directory listing on current directory
or
Options All -Indexes          #disable directory listing recursively


Install GRASS GIS 7.0 svn


Download GRASS GIS. you need an SVN client to checkout the source
cd ~/code

svn checkout https://svn.osgeo.org/grass/grass/trunk grass7



cd grass7

./configure --with-tcltk-includes=/usr/include/tcl8.5
--with-proj-share=/usr/share/proj --with-python
--with-gdal=/usr/local/bin/gdal-config --with-ffmpeg=yes
--with-ffmpeg-includes="/usr/include/libavcodec/
/usr/include/libavformat/ /usr/include/libswscale" --with-sqlite
--with-postgres --with-postgres-includes=/usr/include/postgresql/
--with-wxwidgets=/usr/bin/wx-config
--with-mysql-includes=/usr/include/mysql --with-opengl-libs=/usr/lib/

Compile using GNU Make
make
Install grass7. Default install location will be /usr/local/grass-7.0.svn
sudo make install
start GRASS GIS 7 using terminal. #$grass70

Tuesday, August 30, 2011

HowTo Install Redmine on linux

Install redmine on linux
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_using_Debian_package

How To setup svn server on ubuntu

Create new SVN repo

svnadmin create wgrass

Import files to SVN repo

svn import /home/rashad/code/wgrass/ file:///home/rashad/svn/wgrass


Create User - newuser for svn repo

sudo htpasswd -cm /etc/apache2/pass.passwd newuser
Enter Password:
Re-Enter Password:

Add user to svn Repo

nano wgrass/conf/passwd

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
newuser = pass


nano wgrass/conf/svnserve.conf

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd

Setting up dav access
Allow Anonymous checkout


  DAV svn
  SVNPath /home/rashad/svn/wgrass
  AuthType Basic
  AuthName "wgrass"
  AuthUserFile /etc/apache2/pass.passwd
    Order deny,allow
    
      Require valid-user
    

Disable Anonymous checkout


  DAV svn
  SVNPath /home/rashad/svn/wgrass
  AuthType Basic
  AuthName "wgrass"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user

now you can access svn on yourhos.com/svn/wgrass

Happy Hacking :)



Convert .ogv files to avi using mencoder

Convert .ogv to avi with sound

mencoder wgrass.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o wgrass.avi

Convert .ogv to .avi without audio

mencoder wgrass.ogv -ovc xvid -oac nosound -xvidencopts pass=1 -o wgrass.avi

Merge .mp4 files

mencoder -forceidx -ovc copy -oac pcm -o out.avi 1.mp4 2.mp4 3.mp4 4.mp4 5.mp4 6.mp4 7.mp4 8.mp4 9.mp4 10.mp4 11.mp4 12.mp4 13.mp4 

Saturday, August 13, 2011

ubuntu apt-get 504 gateway timed out error

If you are get a response like 504 gateway timed out error on Ubuntu 10.04+ when using apt-get update or apt-get install
0%[waiting for headers] [waiting for headers]
Stop firewall and try apt-get again

To stop iptables do the following:

$sudo iptables-save > /root/firewall.rules

$sudo iptables -X
$sudo iptables -t nat -F
$sudo iptables -t nat -X
$sudo iptables -t mangle -F
$sudo iptables -t mangle -X
$sudo iptables -P INPUT ACCEPT
$sudo iptables -P FORWARD ACCEPT
$sudo iptables -P OUTPUT ACCEPT
To restore or turn on firewall type the following command:
$sudo iptables-restore < /root/firewall.rules

If you are behind a proxy
change proxy settings in /etc/apt/apt.conf