Gentoo migration to Gnome 3.2

2 minute read Currently is there no developer for compiz in Gentoo. That is a problem, it has bug and no one is fix them. So the Gentoo Stuff deciecd to remove them.
!!! The following installed packages are masked:
- x11-libs/libcompizconfig-0.8.4-r2::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> (22 Jan 2012)
# Mask compiz for last-rites unless someone steps up
# to maintain it. Removal in 30 days.
- x11-wm/compiz-0.8.6-r3::gentoo (masked by: package.mask)
- dev-python/compizconfig-python-0.8.4-r3::gentoo (masked by: package.mask)
- x11-apps/ccsm-0.8.4-r1::gentoo (masked by: package.mask)
- x11-plugins/compiz-plugins-unsupported-0.8.4-r1::gentoo (masked by: package.mask)
- x11-wm/compiz-fusion-0.8.6::gentoo (masked by: package.mask)
- x11-plugins/compiz-plugins-extra-0.8.6-r1::gentoo (masked by: package.mask)
- x11-themes/emerald-themes-0.5.2::gentoo (masked by: package.mask)
- x11-libs/compizconfig-backend-gconf-0.8.4-r2::gentoo (masked by: package.mask)
- x11-libs/compiz-bcop-0.8.4::gentoo (masked by: package.mask)
- x11-wm/emerald-0.8.4-r2::gentoo (masked by: package.mask)
- x11-plugins/compiz-plugins-main-0.8.6-r1::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook
  That why i started to move to gnome 3.2, i have try it on my Workstation. Addtional i found some nice extionas that allow me to bring some useable to Gnome 3. 2. But more late, that how i did it. Start with a look on the gnome-base/gnome package, then unmask it.
[I] gnome-base/gnome
 Available versions: (2.0) 2.32.1-r1 ~3.2.1
 {accessibility (+)cdr cups dvdr +extras +fallback ldap mono policykit}
 Installed versions: 2.32.1-r1(2.0)(15:44:58 12/20/11)(cdr cups dvdr ldap policykit -accessibility -mono)
 Homepage: http://www.gnome.org/
 Description: Meta package for GNOME 3, merge this package to install
 
 echo "gnome-base/gnome ~amd64" >> /etc/portage/package.keywords
emerge -DNuvaq world
This will enter some error message, i recommand to use the --autounmask-write to save the time by unmasking. This made end in some resolve error. Sometime it's no unmask everything in the right way, make sure you got x11-libs/cairo-1.10.2-r2 unmask, i used x11-libs/cairo-1.10.2-r1 and this caused some trouble. When you done, wait till it's compied. Restart the the Xserver or better the host.   After it, i went to https://extensions.gnome.org, here a list of some extensions i recommand: Note you need to use Firefox, Chrome has some bug and will not work yet.
https://extensions.gnome.org/extension/130/advanced-settings-in-usermenu/
https://extensions.gnome.org/extension/38/windows-alt-tab/
https://extensions.gnome.org/extension/6/applications-menu/
 
 
My feeling about Gnome 3.2: I'm very impress,  even my Suspend to Ram work almost Perfect.  It's quite workable, there some problem out like some long time for single application to start, links to file browser a broken or sometime you just have to relog. But i like it, it's smooth working and lots of fun!    

Nginx with SSL

2 minute read For a demo Application that has to be show in the Internet, we need a Scala Lift online. This contains sensitive data, so i need SSL. But the Jetty Server were all the Scala Lift Application is no able to handle Name or SSL so easliy (Or it can, but i have no idea how to do it). So i want that my Website allowing access via http, but then redicting to the HTTPS Page. Just made sure, i add a password so no one unknown can see it. First create a new SSL Certificate :
cd /usr/nginx/
mkdir SSL
cd SSL
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
add in your configuration /etc/nginx/site-avaiable/YOUR_DOMAINNAME_HERE
server {
 listen 0.0.0.0:80;
 server_name YOUR_DOMAINNAME_HERE,;
 log_format main '$remote_addr - $remote_user [$time_local] $status '
 '"$request" $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';
 access_log /var/log/nginx/YOUR_DOMAINNAME_HERE.log;
 rewrite ^(.*) https://YOUR_DOMAINNAME_HERE permanent;
 }

 server {
 listen 0.0.0.0:443;
 ssl on;
 ssl_certificate /etc/nginx/SSL/server.crt;
 ssl_certificate_key /etc/nginx/SSL/server.key;
 server_name YOUR_DOMAINNAME_HERE,;
 access_log /var/log/nginx/ssl-YOUR_DOMAINNAME_HERE.log;
location / {
 auth_basic "Restricted";
 auth_basic_user_file /etc/nginx/auth/dev-htpasswd;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-NginX-Proxy fale;
 proxy_set_header Host $host;
 proxy_pass http://localhost:8080;
}
}
Now enable the configuration and restart the nginx.  
Source:
Nginx Wiki 
josephscott.org 

Basic xserver on a vServer

1 minute read For fetching some date, my Application need a xserver. The Problem is that it's running on VM. So i install a basic xdm. I'll accessing this via VNC.
apt-get install tightvncserver
apt-get install xdm
Now starting the xdm and  tightvncserver
/etc/init.d/xdm start
tightvncserver :1
tightvncserver will ask for vnc password. This will be ask during a VNC client is connecting. Now connect to the server $IP:5901. There is a lonley bash wating  ;-)

[Gentoo]Jetty with a .WAR file

2 minute read
Jetty with a .WAR file
In my company i currenly have a lot to do with Scala Lift. We're developing some stuff with it, but because it takes a lots of time to setup a Scala environment and we need quick show solution, we'll go with a .war file. The problem on my gentoo is, there is no jetty packages, so i searched for some overlays. I still got the java-overlay. With eix jetty, i'm searching for jetty:
* www-servers/jetty [1]
Available versions: (5) ~5.1.3-r1
 {doc source test}
 Homepage: http://www.mortbay.org/
 Description: A Lightweight Servlet Engine
The jetty version is outdate, so i'm downloading the jetty from the offical webpage:
wget -c http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip
#Now unzip it
mkdir jetty && unzip jetty-6.1.26.zip -d jetty/
during the download i found a useful blog entry about jetty for debian.  How to deploy a .WAR file there. It's little bit like tomcat but just easier. Move you .WAR File to the $JETTY_HOME/webapps/ folder and start the Jetty Server.
java -jar start.jar
I found also on the overlays.gentoo an updated version of jetty, this can be found on the dustin overlay
layman -a dustin
eix-sync && eix jetty
* www-servers/jetty [1]
 Available versions: (6) ~6.1.24
 {elibc_FreeBSD}
 Homepage: http://jetty.codehaus.org/
 Description: Jetty Web Server; Java Servlet container
[1] "dustin" /var/lib/layman/dustin
I add the =www-servers/jetty-6.1.24 ~amd64 to /etc/portage/package.keywords, now install the jetty:
emerge -avq jetty
so far Akendo

Web Sources:

http://lifeofaprogrammergeek.blogspot.com/2010/06/deploying-war-in-jetty.html
http://overlays.gentoo.org/proj/java
http://gpo.zugaina.org/www-servers/jetty
http://www.gentoo.org/proj/en/java/
 

No iwlagn in Linux 3.2+

1 minute read I  installed today the new Kernel 3.2 and didn't have any Wifi, that is related to some changes in the iwlagn divers. It have being rename to iwlwifi. I keep using a static Kernel for my Laptop and so i didn't enable the new driver automatically. My first idea was that the sys-kernel/linux-firmware has to be updated. But after short check on the Wifi devices everything was clear. No Devices was found with wlan0, so  i check the driver and a try of loading the related module iwlagn. After wounder some minutes i check on the old and the new kernel. The dirver seems to be the same, just the name has change.  i reanabled the new driver, re-compile the new kernel! Everything works normaly.   I check on the h-online and found this git diffs of the kernel.
Rename the iwlagn module as iwlwifi in preparation for future
changes.  Add an alias to iwlagn for backward compatibility.
Normaly there have to a an alias, but for static kernel the driver has to renable.   so far Akendo.  
Sources:
Ubuntu Forum:"Confused between iwlwifi vs iwlagn" H-online:"Kernel Log Part 1 Network" H-online:"Kernel Log Minor gems"    

Update my Blog

1 minute read I just updated my Blog. It's now move to my a host of my own. My old blog on blogger is still online, you can reach it with original URL 4k3nd0.blogger.com or b2.blog.akendo.eu   Have fun!

How to empty swap

1 minute read Bad applications does Bad stuff with you Memor. Today my Skype decide to flood my Memory. Lucky i notified this on the right time and was able to run killall -9 skype . But what left is a overfileld Memory and swap. For the Memory itself no problem, the kernel will empty it by demand. But for my older hard drive takes ages to get it back. So the best is it to empty it. The best way to do it: swapoff/swapon.
swapoff /dev/sdb5
This take now a while but it will do the job. When it's done re-enable it with 
swapon /dev/sdb5

Debian PostgreSQL 8.4 can't create Database with UTF-8 Encoding

2 minute read The Problem I encounter a  problem with fresh  Debian VM. I create this VM for our developer, during the installation script following problem appears and stop the script:
new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.
psql:./__cre_database.sql:76: \connect: FATAL:  database "db" does not exist
psql: FATAL:  database "db" does not exist
All database in postgres was created with SQL_ASCII The Solution You have to take care that you have a right UTF-8 setting in your bash environment. When you no LC option set, the default POSFIX will be used. 
postgres=# \l
List of databases
Name    |  Owner   | Encoding  | Collation | Ctype |   Access privileges  
-----------+----------+-----------+-----------+-------+-----------------------
postgres  | postgres | SQL_ASCII | C         | C     | : postgres=CTc/postgres
template0 | postgres | SQL_ASCII | C         | C     | =c/postgres                                                      
template1 | postgres | SQL_ASCII | C         | C     | =c/postgres
                                                       : postgres=CTc/postgres(3 rows)
A check on the locale show's me that there is no UTF-8 support. The Solution is very easy. Enable UTF-8 on the Bash:
export LANG="en_US.UTF-8"
Note: You should add this to your /etc/profile! After  this, re-install postgres via apt-get:
apt-get remove --purge postgresql-8.4 && apt-get install apt-get install postgresql-8.4
Now your Postgres Databases are in UTF-8.

Skypetab-ng on Gentoo

1 minute read Like a lots of people, i don't like skype but have to use it. For work and also a lots of friends. But the Skype GUI is very "feature"-less and gives sometimes hard times to deal with it. Thanks to skypetab-ng it get at least some "usability" . I tried to run this by Hand, but for some reason the Compile wasn't able to create a 32-bit library.I just found a nice Overlay for  Skypetab-ng, thanks to the Gentoo Forum!
To work with the Overlay, just add the rion overlay to your system:
layman -a rion
All what's left to do is a eix-sync and just install with emerge skypetab-ng
Sources: Gentoo Forums Post about Skypetabs
Overlay Webpage for Skypetabs-ng
skypetabs-ng