Showing posts with label debian derived linux. Show all posts
Showing posts with label debian derived linux. Show all posts

Monday, June 29, 2015

How to dist-upgrade BOSS GNU/Linux?

I am user of BOSS GNU/Linux version 5.0(code name: anokha) since a few years and i am content with it.  It's been about a year that the next version 6.0 (code name: anoop) is out there for public usage, I am bit afraid to upgrade my machine.  There are two reasons for my hesitation,

1.  I am completely adapted(/addicted) to BOSS 5.0, and pretty much comfortable with it.  I don't want to lose my comfortableness.

2.  I afraid to dist-upgrade, which many a time leads to -> at minimum inconsistency & at maximum machine crash.

So, what made me to upgrade my linux box?
It's been about 2 years since my last bug-fix to LibreOffice office suite.  And that FOSS contribution itch starts now again.  So, I decide to download & compile the source code LibreOffice in my Linux box.  But, Unfortunately when I to do so I end up with the error

"libo/sal/qa/rtl/strings/test_oustring_stringliterals.cxx: In member function ‘void test::oustring::StringLiterals::checkOUStringLiteral1()"
libo/sal/qa/rtl/strings/test_oustring_stringliterals.cxx:195:48: internal compiler error: Segmentation fault

As the reason pointed out by the LibreOffice developers, I have to use gcc-4.8 or higher version to compile the LibreOffice source.  But, It's not available with BOSS 5.0 (which derived from Debian release wheezy) and the same is with debian also (even backports also don't have gcc-4.8).  This leads to only one solution i.e upgrading the machine.
BOSS GNU/Linux Logo

Now, The steps to dist-upgrade your BOSS GNU/Linux machine.
(Note: 
* First backup all your (important)data, configuration files before proceeding the upgrade your machine.
* Ensure you have active internet connection throughout the following process.
* The process data consuming, it needs about 2.0 GB of data transfer) 

Steps to do in current version with the current repository (in our case BOSS 5.0 anokha)
1.  update the machine
     $sudo apt-get update 
2.  upgrade the machine
     $sudo apt-get upgrade
3.  dist-upgrade the machine
     $sudo apt-get dist-upgrade
     The steps 2 & 3 must be finished successfully without any errors.  If you end-up with errors first fix it, without you can't proceed.  And importantly
check each time what are the packages going to be removed.  If you find anything important shown as going to be removed, be ensure twice with double cautions is it ok to you and then proceed.

Steps to do in current version with the target repository (in our case BOSS 6.0 anoop)
1.  Modify the "/etc/apt/sources.list" to point to the new version's repository.  For our case open & edit the file "/etc/apt/sources.list" file as follows.

$sudo gedit /etc/apt/sources.list

existing:
deb http://packages.bosslinux.in/boss anokha main contrib non-free
deb-src http://packages.bosslinux.in/boss anokha main contrib non-free


After modification:
deb http://packages.bosslinux.in/boss anoop main contrib non-free
deb-src http://packages.bosslinux.in/boss anoop main contrib non-free


save and exit.

2. update the machine
   $sudo apt-get update

3. Upgrade the machine
   $sudo apt-get upgrade

4.  Upgrade the machine
   $sudo apt-get dist-upgrade

  In the 3 & 4 th steps be in & around your machine, as the new versions of the packages installed it will prompt for configuration file changes.  For example let's take "postgresql" configuration file.  You may be modified it for your previous needs.  As the newer version going to be installed you will be prompted with options to keep older configuration file, replace with new etc., give your option accordingly (default & recommended is keeping your old configuration file).  Once you crossed all the said steps successfully, machine will prompt for "reboot", after which you could be landed into newer version of BOSS GNU/Linux.

How to check the upgraded version?
$hostnamectl
output will be something like

    Static hostname: boss
              Icon name: computer-desktop
                  Chassis: desktop
            Machine ID: 62c6fd7923f0953d60
                  Boot ID: 5449ccd6794947cc8309fdff20546b0b
Operating System: BOSS GNU/Linux 6 (anoop)
                   Kernel: Linux 3.2.0-4-686-pae

Kernel Upgrade:
From the above output we are sure that the machine is i686 arch so we have to install the newer kernel of same architecture.  So, we will find the newer/latest linux kernel available in our repository and install.  First let us check the available linux kernels using
$apt-cache search linux-image  - outputs something like follows
linux-image-3.16.0-4-586 - Linux 3.16 for older PCs
linux-image-3.16.0-4-686-pae - Linux 3.16 for modern PCs
linux-image-3.16.0-4-686-pae-dbg - Debugging symbols for Linux  \ 3.16.0-4-686-pae
linux-image-3.16.0-4-amd64 - Linux 3.16 for 64-bit PCs
linux-image-486 - Linux for older PCs (dummy package)
linux-image-586 - Linux for older PCs (meta-package)
linux-image-686-pae - Linux for modern PCs (meta-package)
linux-image-686-pae-dbg - Debugging symbols for Linux 686-pae configuration (meta-package)
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-3.2.0-4-686-pae - Linux 3.2 for modern PCs
linux-headers-3.2.0-4-686-pae - Header files for Linux 3.2.0-4-686-pae

The existing kernle is linux-3.2 and we have linux-3.16 in our repository for i686 architecture.  So, we could proceed with installation of new kernel
$sudo apt-get install linux-image-3.16.0-4-686-pae

Now, your machine will prompt you for rebooting.  Before rebooting you may consider purging removed packages(optional but recommended).


Purging removed packages:
Purge = (In Linux) Complete removal of a package including configuration files.  Many a time a package removed but its configuration files may stay with the machine.  To remove those unnecessary configuration files we purging.

$ dpkg -l | awk '/^rc/ { print $2 }'  - Lists all the removed packages
$sudo apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }') - purge the removed packages.


 

Thursday, May 7, 2015

How to block websites and show warning page in local machine using webserver?

This post specific to Debian based linux

3 main steps:
1. Add website entries in the /etc/hosts file
2. Setup a webserver in local machine
3. Create files to serve using web server.

1. Add website entries in /etc/hosts file

    Open /etc/hosts file in an editor (as a super user, for normal users the file will open only in readonly mode.).  The typical content of the file will looks like

#Local Machine
127.0.0.1    localhost
127.0.1.1   

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


add your new entries (websites to be blocked) at the bottom of the file like

127.0.0.1    twitter.com
127.0.0.1    yahoo.com
127.0.0.1    facebook.com
...
...
save and exit.

2. Setup a webserver in local machine.


  Any webserver can be used for the very purpose which ranges apache, Thin, twiggy, yaws, wbox, webfs, mini-httpd, lighttpd etc.,   As we are going to serve only one static webpage, It would be better if we use a very minimal, low foot print server.

I found micro-httpd a optimum one for the purpose.  Now, do the following steps in terminal.

#touch /etc/inetd.conf

#sudo apt-get install micro-httpd inetutils-inetd

By default the service directory for the micro-httpd server is "/var/www".  But, if you want to change it, you can do so in the file "/etc/inetd.conf".

3. Create files to serve using web-server


Content of a sample warning page.

<html>
<head> <title> Warning page! </title> </head>
<body bgcolor="black">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<div align="center" style="color: red; margin-top: 25%;">

<b><h2>
Very Sorry!The website you are trying to acces is blocked </h2>
</b> </div>
</body>
</html>

copy paste the above content in a file and save it with the name "index.html" under "/var/www/" directory.  Now, reboot your machine then try to access the blocked websites via browser.  Now, you can access all the websites for blocked one your browser will show the warning page.

Monday, July 15, 2013

How to remove libreoffice configuration/settings in debian based linux to fix the settings change problems?

Some times we do accidentally change the some settings of the libreoffice and endup with
1. weird/awakward views of our documents
2. problems in exporting our documents from one format to another say .odt to .doc
3. Alignment issues etc.,

So, If you don't know how to revert the settings/configuration you changed, or forget what changes you made.. there is one simple way to revert to the default settings.  i.e removing the configuration data of that particular user to libreoffice.

One can find this libreoffice configuration/settings file at the following path in debian based linux like ubuntu, BOSS GNU/Linux etc.
/home//.config/libreoffice/  <-- b="">Inside this you have directory named user.  Just remove(or cut & paste to some other place) this directory and launch the Libreoffice application again.  

Note:
.config is hidden file so you first enable your file browser to see the hidden files by the short cut CTRL+h. 

Thursday, October 25, 2012

How to install a specific version of a debian package?

Some times the debian package version which is installed in your linux box (say foo-package-x.y.xy ) is different from what version you really want(say foo-package-y.x.yx).  Assume that both the versions are available in the repository.  So, how we install the exact version we needed..? Here comes the solution, from terminal issue the following command,

$sudo apt-get install foo-package=y.x.yx
Replace the foo-package with your packagename, y.x.yx with the version (name)number you need.  Now, the package with the given version will be installed.

If you want to see all the available versions of particular debian package in the repository.. do the following,
$sudo apt-get update 
The above command updates the package index of your machine with the repository.
$sudo apt-cache show <package-name>
The above command shows the details of package, where we find version details also.

Want to install linux debian packages without internet connection..? check this out

Sunday, October 23, 2011

Tamil fonts not displayed properly in browsers.. in linux..

Once i came to know about tamil lyricist Arivumathi's blog.  So, i open it in my browser but tamil fonts are not shown properly.  The fonts are either like a rectangle or torn.  I try to see the blogpost in tamil properly, and atlast i got the following solution..

The solution is removing the Freesans, Freeserif fonts from your linux system(BOSS, ubuntu, all debian derived linux).  These fonts are in /usr/share/fonts/truetype/freefont directory.  Either remove the fonts by deleting it or copy it to some other place but not in the fonts directory.  Thats all now the blog is shown well in tamil.  the following images are

Tamil blog with tamil font rendering problem
Tamil blog after font problem fixed