Pages

How to fix E: Could not get lock /var/lib/apt/lists/lock problem


You got following message when you try to run apt-get update command in Ubuntu?

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

 Solution

1. Search for processes

ps -A | grep apt-get

2. See if there is any process running as apt-get then kill that process

sudo kill -9 

If the error persists, apply following commands in a termina,

sudo su
sudo rm /var/lib/apt/lists/lock
apt-get update


How to Install Broadcom Wireless Driver (BCM4313) in Ubuntu / Xubuntu 12.04

I tried following method to install Broadcom wireless Driver with Dell Vostro 3500  in Ubuntu/Xubuntu 12.04 (64 bit) Linux.

First of all check your wireless chipset model number,

lspci | grep Network

Install following prerequisites,

sudo apt-get install linux-headers-generic build-essential dkms

Download the package from here,

Open following file,

gedit /etc/modprobe.d/blacklist.conf

Add following lines,

blacklist b43
blacklist b43legacy
blacklist bcma
blacklist ndiswrapper


Comment the following line,

# blacklist bcm43xx

Restart laptop and check wireless working or not.

Mobile media converter

Mobile Media Converter is a helpful tool for mobile users to cross platform transfer of media files. It can handle various formats like MP3, Windows Media Audio (wma), Ogg Vorbis Audio (ogg), Wave Audio (wav), MPEG video, AVI, Windows Media Video (wmv), Flash Video (flv), QuickTime Video (mov) and commonly used mobile devices/phones formats like AMR and 3GA audio (amr) and 3GP video.


Here is the link to mobile Media Converter

Install HP LaserJet P1108 printer in Ubuntu 12.04

Visit the following page to install HP Laserjet P1108 in Ubuntu 16.04 / Debian 8.
http://linuxhalwa.blogspot.in/2017/06/install-hp-laserjet-p1108-printer-in-ubuntu.16.04.html

You can find that HP LaserJet P1108 do not work simply adding printer with Ubuntu 12.04. You have to execute following commands to configure the printer


sudo apt-get install python-qt4
sudo apt-get install hplip-cups
sudo hp-setup -i


User settings,

sudo adduser vimal lp
sudo adduser vimal lpadmin

Replace vimal with your user name. 

Install Drupal on Ubuntu 12.04

Drupal is an Open Source content management system. Drupal is very powerful, flexible and popular among web developers. Whitehouse website build on Drupal.


Now Drupal is now available with Ubuntu 12.04 software repository and very easy to install. Please follow the instructions to install Druapl on your Ubuntu 12.04 server or desktop.

Install LAMP server
LAMP package contain MySQL, Apache and PHP.

apt-get update
apt-get upgrade
apt-get install lamp-server^

Enter MySQL root password during installation. 

Enable rewrite function in Apache,

sudo a2enmod rewrite
sudo service apache2 restart


Install Drupal

apt-get install drupal7

Check which version of Drupal is available latest and change version number.

Add Drupal configuration for Apache,

sudo cp /etc/drupal/7/apache2.conf /etc/apache2/mods-enabled/drupal.conf

Restart Apache

sudo service apache2 restart

Open a browser and type the address and proceed with installation process,

http://127.0.1.1/drupal7/install.php

Update Drupal to latest version using Drush
Drush is a command line shell and scripting interface for Druapl.

sudo su 
apt-get install drush

Check new Drupal updates available. Enter inside the Drupal installation place and apply following commands.
cd /usr/share/drupal7
drush up -n | grep available
drush up

Information courtesy: https://help.ubuntu.com/community/Drupal

To know wireless card information in your laptop?

To find wireless card model number is essential to install suitable driver. Execute following command in a terminal to display wireless driver information,

lspci | grep Network


How to know your computer architecture (32 / 64 bit) ?

Open a terminal and type following command,

uname -m

Result

i686 = 32 bit
x86_64 = 64 bit

Another command is

lscpu

Here is the result from my 64 bit PC,

 

How to clear all data in a column in a MySQL database table

In certain cases its essential to clear all data in a particular column in a table.
For example a database name is school
There is a table inside school is student
A column inside school is email 

Column email contains email ids of about 100 students.
Apply following command, if you want to clean all email id entries from email column.

mysql -uroot -p  [enter mysql root password]

You can get mysql command prompt, enter following commands there;

use school;
UPDATE `student` SET `email` = '';
quit;



Now email column inside student table is clean.

How to find CPU architecture information

In certain situations, you have to find PC architecture (32 bit / 63 bit) for various purposes. Here is a simple command to display Linux architecture information.

lscpu

The result is,

Install Whisker menu on Xubuntu 12.04 /XFCE 4

Whisker menu is an application launcher available with XFCE 4. Very easy to find and launch applications with the help of Whisker menu.


Install  Whisker menu on Xubuntu 12.04
Apply following commands,
sudo add-apt-repository ppa:gottcode/gcppa
sudo apt-get update
sudo apt-get install xfce4-whiskermenu-plugin

Remove your default menu and add Whisker menu from panel properties.
Panel > Add New Items > Whisker Menu

View your network information

This command is helpful to collect information about your network details.
Open a terminal and apply following command,

nm-tool

See the result.

How to upgrade to Koha 3.12 in Koha Live DVD?

New version of Koha released with bundle of new features.
You can visit the release notes and check new features available with.

http://koha-community.org/koha-3-12-0-released/#more-4403

You can also download illustrated release notes,
http://koha-community.org/files/2013/05/Koha-3.12-release-notes.pdf

If you are Koha Live DVD user, you can easily upgrade to 3.12 version.

http://sourceforge.net/projects/kohalivedvd/

Apply the following command in Applications > Accessories > Terminal

sudo su    [enter the Linux password when it ask, check read me file to find password]
apt-get update
apt-get install koha-common


After upgrading you have to install additional perl modules missing,

Open Koha staff interface and check,  About Koha > Per Modules

You can find missing perl modules highlighted in different colors,

How to install missing perl modules,
Apply following commands in a terminal,

sudo su
sudo cpan


Here is an example to install a perl module called Data::Pagination

install Data::Pagination

The same way, you can install other missing Perl modules.
Now your Koha is upgraded to Koha 3.12 and ready to use.

How to safeguard the panels of Xubuntu Linux for public use computers

Remove and modify the items in panels of Linux desktop is a common problem in Internet cafe's and libraries. A solution is available with Xubuntu Linux to prevent removing the items from desktop panel accidentally by users. 
Follow the steps below,

1. Configure the panels before start the process. Add/remove/edit items from panels.
2. Apply the following command,

sudo cp /home/vimal/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/

3. Apply the following command to edit the file.

sudo leafpad /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

4. Find following line at the top of the file.

<channel name="xfce4-panel" version="1.0">

Insert # symbol at the start of the line.

5. Copy the following line and paste after the line above mentioned line.

<channel name="xfce4-panel" version="1.0" locked="*" unlocked="root">


 
Save the file. 
 

6. Restart your system.

Information courtesy:  
https://sites.google.com/site/easylinuxtipsproject/xfce#TOC-Safeguard-the-panels-kiosk-mode- 

How to recover gnome-shell

If you found that your gnome-shell task bar missing?
And your desktop seems plain and not able to access applications menu.
You can recover your lost desktop. Follow the steps.

Apply the key combinations, Ctrl + Alt + T 
A terminal will open. Enter the following commands,

sudo su
gnome-shell --replace

You can see that, your desktop panels and menus appear again