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

Saturday, October 6, 2012

Add Custom Application to Ubuntu Dashboard

To add a custom application icon to Ubuntu dashboard, create a file with name AppName.desktop in ~/.local/share/applications Put Following into that file

[Desktop Entry]
Name=Application Name
Comment=Application Description
Exec=<path to executable;>
Icon=<path to application icon>
Terminal=false
Type=Application
StartupNotify=true
Keywords=<some keywords>

Friday, December 16, 2011

Install Postgresql 9.1 in Ubuntu 9.04

first install python-software-properties:
sudo apt-get install python-software-properties

now add repository and update apt.
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update

now instal postgresql
sudo apt-get install postgresql-9.1 libpq-dev

Now change the postgres user password (still running as root):
su postgres
psql -d postgres -U postgres
alter user postgres with password 'a';
\q

To install GUI client pgsql
sudo apt-get install pgadmin3

original article: http://bit.ly/sUFCgb

Enable AutoComplete commands in Pinguy OS 11.04

To enable bash completion in interactive shells do following steps:

$ sudo vi /etc/bash.bashrc


uncomment following line in it

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi


Restart your terminal and its done!!!

Fix GPG error:....NO_PUBKEY

In Ubuntu, when we try to update the system we sometimes get error for GPG No_PUBKEY as follows:


W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C1622487AAA521A8

This does no harm as its not a security issue but its very annoying everytime getting the same error. It happens because you don't have a suitable public key for a repository. Follow this steps to get rid of the error:


gpg --keyserver keyserver.ubuntu.com --recv 9BDB3D89CE49EC21

Which retrieves the key from ubuntu key server and then this:


gpg --export --armor 9BDB3D89CE49EC21 | sudo apt-key add -

Which adds the key to apt trusted keys. This will solve you problem.

The solution can be found here & here.

Monday, December 12, 2011

Reset Apache2 on Ubuntu

Recently I was experimenting on apache2 and edited many config files. Soon I realised that PHP was not working properly on it. While installing joomla it was failing. So I removed apache2 using command:
     sudo apt-get purge apache2 
The problem was I didnt removed apache2 completely. Then I quicked googled and find out the correct way of getting it working back use following snippet.
APACHE_PKGS=`sudo dpkg --get-selections | grep apache | cut -f 1`
# Make sure things are sane:
echo $APACHE_PKGS
# Example output: apache2 apache2-mpm-prefork apache2-utils apache2.2-common \
# libapache2-mod-php5 libapache2-mod-python libapache2-svn
# Likely if you have a Python application:
# libapache2-mod-python libapache2-mod-python-doc libapache2-mod-wsgi
# Or if you roll with the PHP:
# libapache2-mod-php5
sudo apt-get remove --purge $APACHE_PKGS
# You might want to consider not re-installing the whole list;
# instead dump it out, audit, and install what you need:
sudo apt-get install $APACHE_PKGS
After this apache2 got resetted and working as it was freshly installed with all configurations replaced.
Reference : http://bit.ly/uBxq7L