Posts Tagged ‘iceweasel’

Setting up a custom Firefox to use in KDE Activities updated to Firefox 24

julio 17, 2013

This is the: Setting up a custom Firefox to use in KDE Activities article but rewritten to work with Firefox 24. This updated howto has been tested to work with Kde 4.10.

Actually the ZDFox application class name detection of kwin window manager is not working as expected because some strange reason and thus the article might be updated for it to work.

The ZDFox rebranding part that seems to work is because of window title being different for Iceweasel and ZDFox.

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/browser

Modified for Firefox 24 – Begin

for nlink in chrome defaults icons modules ; do
  rm $nlink
  ln -s ../../../share/zdfox/browser/$nlink $nlink
done

Modified for Firefox 24 – End
Added for Firefox 24 – Begin

cd /usr/lib/zdfox
rm firefox-bin
ln -s zdfox firefox-bin

Added for Firefox 24 – End

As per Rebranding Firefox we are going to:
Modified for Firefox 24 – Begin

cd /usr/lib/zdfox/browser/chrome

Modified for Firefox 24 – End

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.

Update
The application class is not changed as it was in old versions. Somehow I’m missing something that has changed between latest used Firefox version and Firefox 245. However you can change it from the command line thanks to:

--class=MyApplicationClass

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

zdfox -P pruebasZD3 -no-remote --class=ZDFox -new-window $url

as a launcher.

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.

Servidor Firefox sync local

diciembre 16, 2012

Voy a aprovechar para hacerme un servidor de firefox sync local porque lo necesito para hacer funcionar Firefox con las actividades de KDE sin romperme mucho el coco.

Requisitos

sudo apt-get install python-dev mercurial sqlite3 python-virtualenv

Instalación

mkdir /usr/local/firefoxsync

para poder hacer:

cd /usr/local/firefoxsync
hg clone https://hg.mozilla.org/services/server-full
cd server-full
make build

Configuración

En  mi caso voy a crear el directorio que albergará las bases de datos de la sincronización de firefox con:

mkdir /home/adrian/.firefoxsync

Y luego tendremos que abrir el fichero:

/usr/local/firefoxsync/server-full/etc/sync.conf

para descomentar:

[nodes]
fallback_node = http://localhost:5000/

y para escribir algo como:

[storage]
sqluri = sqlite:////home/adrian/.firefoxsync/storage.db

[auth]
sqluri = sqlite:////home/adrian/.firefoxsync/auth.db

En nuestro, muy extraño que queremos un servidor local no querremos que nadie desde fuera se nos conecte. Para ello modificaremos:

[server:main]
host = 127.0.0.1

en el archivo:

/usr/local/firefoxsync/server-full/development.ini

Script de arranque

Vamos a preparar un script de arranque de nuestro particular servidor de firefoxsync.

Creamos el fichero:

/usr/local/firefoxsync/mydaemon

con el contenido:

#!/bin/bash
umask 007
cd /usr/local/firefoxsync/server-full
bin/paster serve development.ini

. Le daremos permisos de ejecución con:

chmod +x /usr/local/firefoxsync/mydaemon

Arranque automático del script

Editaremos el archivo:

/etc/rc.local

para colocar antes de la línea:

exit 0

lo siguiente:

nohup /usr/local/firefoxsync/mydaemon 2>&1 >/dev/null &

.

Uso de la sincronización

En mi caso por el tema de las actividades no quiero sincronizar los tabs. Así que no los marcaré.

  • Herramientas
  • Configurar sincronizaci&oaute;n
  • Crear una nueva cuenta
  • Detalles de la cuenta
    • Dirección de correo: La que queramos
    • Password: Uno cualquiera
    • Confirmar password: El mismo de antes
    • Servidor: Usar un server personalizado.
             http://127.0.0.1:5000/
    • Captcha: Rellenarlo.
    • Opciones de sincronización
      • Nombre PC: El que queramos
      • Sincronizar mis: Dejar todo marcado excepto Tabs.
      • En mi caso personal tampoco sincronizo passwords.
    • Siguiente

Entonces empieza a sincronizar y nos aparece el estado en una nueva pestaña.

Securizar que no haya más usuarios

Una vez hayamos sincronizado seguramente no queramos que nadie más, aunque sea de nuestro propio equipo, pueda sincronizar.
Para ello editaremos el fichero:

/usr/local/firefoxsync/server-full/etc/sync.conf

para añadir la línea:

allow_new_users = false

y, claro está, habrá que apagar el servidor de sync de Firefox y volverlo a encender.

Bibliografía