Home page of this blog

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

Saturday, August 13, 2011

Optimizing libc6 package for core2 in Ubuntu/Mint


Disclaimer: The following is only for who would love to take risks. Rebuilding/Resinstalling libc6 may make the system totally unrecoverable. Use the following at your own risk and hence I am not uploading the packages I built optimized for core2


This is how I fetched and built libc6 package optimized for core2. 


Install build dependencies for libc6

sudo apt-get build-dep libc6


Create a directory for building libc (preferably inside /usr/src/)



cd /usr/src/
mkdir -p glibcbuilds
cd glibcbuilds

Get the source package of libc6 from Ubuntu/Debian repository (deb-src should be enabled for getting source packages)

apt-get source libc6


Enter into eglibc folder extracted

cd eglibc-2.13/




Edit debian/rules  and modify CFLAGS


#edit the required cflags like march and mtune
#modify run test suite to no
vi debian/rules


BUILD_CC = gcc-4.5 -fno-stack-protector -U_FORTIFY_SOURCE -march=core2 -mtune=core2
BUILD_CXX = g++-4.5 -fno-stack-protector -U_FORTIFY_SOURCE -march=core2 -mtune=core2

RUN_TESTSUITE = no

The above are the changed in debian/rules for targeting/optimizing to core2

Enable parallel build

#set 8 for a i7, 4 for a quadcore, 2 for a core2, 1 for others
export DEB_BUILD_OPTIONS="parallel=8"


Clean before building

#clean
fakeroot debian/rules clean


Build

#build
time fakeroot dpkg-buildpackage -uc -us

Install the built packages

cd ..

sudo dpkg -i libc6_2.13-0ubuntu13_amd64.deb libc6-dev_2.13-0ubuntu13_amd64.deb libc6-i386_2.13-0ubuntu13_amd64.deb libc6-dev-i386_2.13-0ubuntu13_amd64.deb



Wednesday, January 6, 2010

Running multiple window managers simultaneously in debian

I am trying out lightweight window managers in my debian (debian-squeeze) box without exiting my gnome. Want to know how I am doing that? Read below

The real advantage of lightweight window manager like openbox, will give more screen real estate, will allow a different power ful feel of user interface. It is fun :)

Or another use will be running both gnome and kde simultaneously!!!!

For example I want to run openbox along with gnome (or KDE or lxde or xfce or ...), here is how I did it

Here is the default gnome window manager running and I start from here







Install the other window manager, in this example I am trying openbox so here is what I did to install openbox

sudo aptitude install -R openbox obmenu obconf openbox-themes


I used -R in aptitude to force aptitude to skip the recommended packages as the recommended packages will pull lots of extra packages, which is not needed for just testing and having a feel of new window manager




Start virtual terminal 1

Ctrl + Alt + F1 (to choose virtual terminal 2 give Ctrl + Alt + F2, for 3 Ctrl + Alt + F3 ...)

Run the installed window manager using xinit but force it to go to the next virtual display terminal using -- :n


By default xinit launches program in display terminal 0 (which is the display in which the default window manager is running by default and to get to it, we can use Ctrl + Alt + F7)

Here is the command to run it in from virtual terminal 1 (this wont run from gnome-terminal)

xinit /usr/bin/openbox-session -- :1




in the above line note -- :1

this means run the window manager or program passed to xinit in display number 1. Note :1 sends the newly launched window manager to display 2 as xinit is zero based.

replace /usr/bin/openbox-session with

/usr/bin/jwm --> for running jwm window manager
/usr/bin/e16 --> for enlightment 16
/usr/bin/enlightenment_start --> for englightment 17
/usr/bin/lxsession --> for lxde
startfluxbox --> for fluxbox


and so on

replace :0:1 with :2  or :3 ... to run the new window manager in display console 1, 2, 3, ...

Also note I am using display console to represent a virtual console which runs window manager and virtual terminal to represent a command line virtual console, display console starts 7 to 12 and command line console starts from 1 to 6, which are accessible by key combination Ctrl + Alt + F(n)

where n is the console number and press that numbered function key along with Ctrl and Alt pressed


To switch between display consoles use

Ctrl + Alt + F7 --> to switch to display console 1
Ctrl + Alt + F8 --> to switch to display console 2
Ctrl + Alt + F9 --> to switch to display console 3

Most of the light weight window managers can be accessed by right clicking on desktop

Here are some screenshots of openbox in another virtual display console


openbox configuration editor



Iceweasel running in openbox (see the minimize, maximize, close buttons and the title bar, isn't it cool to have firefox maximized to full screen!!)


Here is the openbox widgets with gradient style



Enjoy, since this is debian, this should work with ubuntu as well (and it works in my netbook!! which runs ubuntu)

I learned more about window managers from the excellent arch linux wiki, you too can read them here

http://wiki.archlinux.org/index.php/Category:Desktop_environments_(English)