Setting up a custom Firefox to use in KDE Activities

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.

Anuncio publicitario

Etiquetas: , , , , , ,

Una respuesta to “Setting up a custom Firefox to use in KDE Activities”

  1. Setting up a custom Firefox to use in KDE Activities updated to Firefox 24 | El blog de adrian15 Says:

    […] Super Grub Disk, GNU/Linux y cualquier otra cosa que se me antoje. « Setting up a custom Firefox to use in KDE Activities […]

Deja una respuesta

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Salir /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Salir /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Salir /  Cambiar )

Conectando a %s


A %d blogueros les gusta esto: