Archive for marzo 2013

Setting up a custom Firefox to use in KDE Activities

marzo 29, 2013

The problem

Well, let’s see if I can explain it clearly. As you might now, I’m using Zimbra Desktop in an Ubuntu 10.04 chroot and that it’s based on Daver’s Zimbra Desktop on Oneric Ocelot which means that you can use whatever browser you want with it.. What I haven’t explained so far is that I’m experimenting on using a custom profile from Iceweasel (Debian’s Firefox fork) to open Zimbra Desktop.

This profile needs to be excluded from deletion in my Firefox kde script .

So, I’ve recently updated my Debian Unstable to 4.9.5 version and that means that according to the window title or the application class I can force the window to be in a given activity or even in all the activities at the same time.

That’s what I want to do. Open my Zimbra Desktop (actually Iceweasel opened with a given profile) and then kwin pins it into all activities.

When you try to do that you will see that when Iceweasel is starting it has different window titles which are changing:

  • No title
  • Zimbra Desktop
  • Zimbra : Bandeja de entrada.

After some tests I think that kwin detects the No title window title and that’s it.

So… What if I could change the application class (which it’s another variable that you can rely on to change activity and window pinning)? What if I could use Iceweasel or Firefox but with a different name? I suppose that would change the application class and voilà!

Setting up ZDFox

So I’m going to call ZDFox to my custom Iceweasel / Firefox and as you will see as I’m using custom profile I’m going to use the same default profile directory because I don’t need a non-default one, but you might want one.

cd /usr/lib
cp -a iceweasel zdfox
cd /usr/lib/zdfox
mv iceweasel zdfox
cd /usr/bin
ln -s ../lib/zdfox/zdfox zdfox
cd /etc
cp -a iceweasel zdfox
cd /usr/share/
cp -a iceweasel zdfox
cd /usr/lib/zdfox
for nlink in chrome defaults icons modules ; do
  rm $nlink
  ln -s ../../share/zdfox/$nlink $nlink
done

As per Rebranding Firefox we are going to:

cd /usr/lib/zdfox/chrome
mkdir en-US.dir
cd en-US.dir
unzip ../en-US.jar

Then you edit:

locale/branding/brand.dtd
locale/branding/brand.properties

so that you change the brand names. I’ve also changed brand.properties although it would seem it’s not compulsory.

Now let’s put everything back in the jar.

rm ../en-US.jar
zip -r ../en-US.jar *
cd ..
rm -rf en-US.dir

I’ve also noticed for the application class to be changed you need to edit:

/usr/lib/zdfox/application.ini

and change the Name field. In this same file you can change (or add it if you’re using default Firefox, I think it’s added specifically in Iceweasel):

Profile=mozilla/firefox

so that the profile path is different from the default one. As I’ve already said I’m not going to change it myself.

ZDfox use

So if you run zdfox both the window title and the application class will be ZDFox. So, that’s it, kwin finally detects Zimbra Desktop as a different program and I can pin it to all the activities.

Finally, if anyone is interested in the Zimbra Desktop part in my Zimbra Desktop launcher now I have:

zdfox -P pruebasZD3 -no-remote -new-window $url

as a launcher.

Updated Debian Unstable KDE SC to 4.9.5

marzo 29, 2013

I’ve just updated my KDE SC to 4.9.5 version thanks to the qt-kde repository.

I’ve updated my system to the last unstable packages with:

apt-get dist-upgrade

And finally I’ve just used the default instructions from qt-kde and apart from having to uninstall  a qtcurve package everything went fine.

Now I can setup a window or application by its name or class into a given activity (or all of the activities) automatically.

And Dolphin seems way faster than before as it was announced.

Debian Unstable with Kernel 3.8 – MBP 6,2

marzo 28, 2013

Introduction

I’m going to describe how to install Kernel 3.8 from Debian experimental repositories into a Debian Unstable from March 2013 (which it’s current kernel version is 3.2).

What I want to test is if I can use my MacBookPro 6,2 integrated Intel Graphics card without having to apply any patch to the kernel as I had already done.

System update

First of all what I have done is updated my system with:

apt-get update
apt-get dist-upgrade

Pinning setup

So, once updated the system we need to setup pinning. As explained in Debian Wiki – How To Upgrade kernel we add some lines to preferences file so that experimental packages aren’t used as default.

cat >> /etc/apt/preferences << EOF
Package: *
Pin: release o=Debian,a=experimental
Pin-Priority: 102
EOF

Now we are going to add the experimental repository to sources list with just:

echo "deb http://ftp.de.debian.org/debian experimental main" >> /etc/apt/sources.list

and we apply changes with:

apt-get update

Kernel installation

In my case I want to install the latest amd64 kernel so I need to issue:

apt-get -t experimental install linux-image-3.8-trunk-amd64

You can check latest versions at  packages debian experimental linux-image .

Once rebooted (and connected via cable) I’m going to install linux-headers so that I can install wl module so that wireless works too:

sudo apt-get install -t experimental linux-headers-3.8
m-a prepare

After some tests I realised that I needed to uninstall virtualbox before doing m-a prepare with:

apt-get remove virtualbox

.

Then I realised that I needed a fixed version of module-assistant which can be downloaded from this bug: 697360 because kernel version was not being detected ok.

Wireless install

m-a a-i broadcom-sta

But, even then, the build failed.

for templ in ; do \
    cp $templ `echo $templ \
| sed -e 's/_KVERS_/3.8-trunk-amd64/g'` ; \
  done
for templ in `ls debian/*.modules.in` ; do \
    test -e ${templ%.modules.in}.backup \
|| cp ${templ%.modules.in} \
${templ%.modules.in}.backup 2>/dev/null \
|| true; \
    sed -e 's/##KVERS##/3.8-trunk-amd64/g \
;s/#KVERS#/3.8-trunk-amd64/g \
; s/_KVERS_/3.8-trunk-amd64/g \
; s/##KDREV##/3.8.3-1~experimental.1/g \
; s/#KDREV#/3.8.3-1~experimental.1/g \
; s/_KDREV_/3.8.3-1~experimental.1/g  \
'  ${templ%.modules.in}; \
  done
dh_clean
/usr/bin/make clean KBUILD=/lib/modules/3.8-trunk-amd64/build KVERS=3.8-trunk-amd64
make[1]: se ingresa al directorio `/usr/src/modules/broadcom-sta'
KBUILD_NOPEDANTIC=1 make -C /lib/modules/3.8-trunk-amd64/build M=/usr/src/modules/broadcom-sta clean
make[2]: se ingresa al directorio `/usr/src/linux-headers-3.8-trunk-amd64'
CFG80211 API is prefered for this kernel version
  CLEAN   /usr/src/modules/broadcom-sta/.tmp_versions
make[2]: se sale del directorio `/usr/src/linux-headers-3.8-trunk-amd64'
make[1]: se sale del directorio `/usr/src/modules/broadcom-sta'
 debian/rules \
KVERS=3.8-trunk-amd64 \
KSRC=/lib/modules/3.8-trunk-amd64/build \
KDREV=3.8.3-1~experimental.1 kdist_image
/usr/bin/make  -f debian/rules kdist_clean kdist_config binary-modules
make[1]: se ingresa al directorio `/usr/src/modules/broadcom-sta'
for templ in ; do \
    cp $templ `echo $templ \
| sed -e 's/_KVERS_/3.8-trunk-amd64/g'` ; \
  done
for templ in `ls debian/*.modules.in` ; do \
    test -e ${templ%.modules.in}.backup \
|| cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
    sed -e 's/##KVERS##/3.8-trunk-amd64/g ;\
s/#KVERS#/3.8-trunk-amd64/g ;\
 s/_KVERS_/3.8-trunk-amd64/g ;\
 s/##KDREV##/3.8.3-1~experimental.1/g ;\
 s/#KDREV#/3.8.3-1~experimental.1/g ;\
 s/_KDREV_/3.8.3-1~experimental.1/g  \
'  ${templ%.modules.in}; \
  done
dh_clean
/usr/bin/make clean KBUILD=/lib/modules/3.8-trunk-amd64/build KVERS=3.8-trunk-amd64
make[2]: se ingresa al directorio `/usr/src/modules/broadcom-sta'
KBUILD_NOPEDANTIC=1 make -C /lib/modules/3.8-trunk-amd64/build M=/usr/src/modules/broadcom-sta clean
make[3]: se ingresa al directorio `/usr/src/linux-headers-3.8-trunk-amd64'
CFG80211 API is prefered for this kernel version
/usr/src/modules/broadcom-sta/Makefile:80: Neither CFG80211 nor Wireless Extension is enabled in kernel
make[3]: se sale del directorio `/usr/src/linux-headers-3.8-trunk-amd64'
make[2]: se sale del directorio `/usr/src/modules/broadcom-sta'
make[1]: No se hace nada para `kdist_config'.
dh_testdir
dh_testroot
dh_prep
# Build and install the module
make -C /lib/modules/3.8-trunk-amd64/build M=/usr/src/modules/broadcom-sta
make[2]: se ingresa al directorio `/usr/src/linux-headers-3.8-trunk-amd64'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  LD      /usr/src/modules/broadcom-sta/built-in.o
  CC [M]  /usr/src/modules/broadcom-sta/src/shared/linux_osl.o
  CC [M]  /usr/src/modules/broadcom-sta/src/wl/sys/wl_linux.o
  CC [M]  /usr/src/modules/broadcom-sta/src/wl/sys/wl_iw.o
  CC [M]  /usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.o
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c: In function ‘wl_cfg80211_join_ibss’:
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
757:26: error: ‘struct cfg80211_ibss_params’ has no member named ‘channel’
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
 At top level:
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
1664:2: warning: initialization from incompatible pointer type [enabled by default]
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
1664:2: warning: (near initialization for ‘wl_cfg80211_ops.set_tx_power’) [enabled by default]
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
1665:2: warning: initialization from incompatible pointer type [enabled by default]
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
1665:2: warning: (near initialization for ‘wl_cfg80211_ops.get_tx_power’) [enabled by default]
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
 In function ‘wl_update_bss_info’:
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
2092:11: error: ‘struct cfg80211_bss’ has no member named ‘information_elements’
/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.c:\
2093:15: error: ‘struct cfg80211_bss’ has no member named ‘len_information_elements’
make[5]: *** [/usr/src/modules/broadcom-sta/src/wl/sys/wl_cfg80211.o] Error 1
make[4]: *** [_module_/usr/src/modules/broadcom-sta] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: se sale del directorio `/usr/src/linux-headers-3.8-trunk-amd64'
make[1]: *** [binary-modules] Error 2
make[1]: se sale del directorio `/usr/src/modules/broadcom-sta'
make: *** [kdist_build] Error 2

Even trying to force broadcom-sta-source from experimental branch did not work because I had already the last package version.

In the official broadcom sta site: http://www.broadcom.com/support/802.11/linux_sta.php the last version is from 2011 :(. There’s an email for making questions.

I’ll probably ask there if they plan to release versions adapted to 3.8 or not.

So I’m going to revert to my former 3.2.21 custom kernel for the moment.

About Intel i915

As far as I’ve tried the Intel thing did not work

If I remove the four outb lines from the grub boot online editing and I boot then nouveau driver was used instead of intel. In the logs I notice:

'2' invalid for lvds_channel

If the four outb lines remain then I get a blank screen of no use.

Rebooting my internet ego…

marzo 8, 2013

Some time ago I read an article that said that kind of 14% of Internet interaction was active. That mean that the other interaction, the passive one, just consuming webpages or other media was the other 86%.

I find myself lately checking my most visited pages in a loop:

I’ve recently being used to check slashdot too.

Anyways I feel my life incomplete not being able to comment (or bookmark to comment later) these pieces of news. So I think this is going to change.

One of these changes is writing in English in this same blog which, to the date, I wrote exclusively in Spanish.

Not that my English is perfect but I want to get a broader audience and I want to force Spanish people to learn English by not handing them my howtos in their native language.

Spain regaining world leadership again should start by people learning English and that explains why I’m pretending to be English native speaker on Rescatux and Super Grub Disk support chats.

So my wish is:

Whenever I found myself checking once again the same passive pages I open up my wordpress blog and write an article about the most interesting and useful piece of news I’ve read.

If everything goes ok, I cannot promise anything because I’m quite of busy at work right now, my posting frequence will increase.