Sunday, October 12. 2014
Huge fonts in new Chromium 38

A very short entry this time about debian and its chromium package. Today I have updated my laptop and the chromium package has been upgraded to version 38. Nothing strange during the process, but as soon as I started the browser all the fonts were absolutely huge (so big that the menus were not readable, only the first letters were shown and, therefore, you could not guess what the item was saying). It seems that it is a known issue because I quickly found several bugs (for example this debian bug, which explains my issue, and a similar ubuntu bug).
In order to fix the problem you need to add the following argument to the chromium startup: --force-device-scale-factor=1. For what I understand now chrome try to guess the scaling factor based in the DPI of your monitor and something is not currently working. In summary, if you want your chromium browser to look exactly as before the upgrade, just add a file inside the /etc/chromium.d/ directory adding the commented parameter.
# cat /etc/chromium.d/force-scaling CHROMIUM_FLAGS="$CHROMIUM_FLAGS --force-device-scale-factor=1"
Another tip is that now chromium uses (at least in debian) a configuration directory instead of a single file (now /etc/chromium.d/ exists instead of the /etc/chromium/default file that was used in previous entries). So if you want the pepper flash to work again you also need to reinstall it. Remember that now there is a non-free package called pepperflashplugin-nonfree that handles the plugin automatically:
# /usr/sbin/update-pepperflashplugin-nonfree --uninstall # /usr/sbin/update-pepperflashplugin-nonfree --install
After those two actions my chromium browser was back to normal aspect and behavior.
Regards!
Saturday, November 23. 2013
Upgrading gnome to version 3.8.4


As I commented several times in the blog I have a thing upgrading all my debian boxes. My confidence in this distribution is quite big and problems are rare, even in the case of the testing branch (the one I use). Nevertheless it is a good habit checking the packages that are going to be upgraded (just look over the names). For example mayor version upgrades for the X server or its modules, icedove, gnome core packages or kernel could affect your working productivity, and it is recommended to upgrade them when you have time to fix possible problems. But the summary is that, now, I have only one package that makes my legs shake every time I see its name in the list of packages to upgrade: gnome-shell.
The past Wednesday I run an apt-get update and upgrade and I saw that gnome-shell 3.8 had come to testing (mayor version change, from 3.4 to 3.8 ). I was working and obviously upgrading was risky so I canceled it. But the same day, in the afternoon, I had two or three hours free and I decided to go for it (it was about 5pm but I wanted to jog a bit later). The change from gnome2 to gnome3 had been complicated (see this post I wrote above gnome-shell-extensions at that time) and the transition to current 3.4 version made me again change some extensions. But, you know, it is suppose that now gnome3 is more mature and things should be smoother. That was not the case with my laptop.
During the upgrade the desktop crashed and I upgraded blindly (mental note, gnome-shell should be upgraded using the console -Ctrl+Alt+F1-). After the reboot GDM3 did not start. The horrible message "Oh No! Something has gone wrong" appeared and it was impossible to login. Checking logs (dmesg, /var/log/gdm3,..) was useless, I saw nothing relevant there. After some time I see this bug that was similar but in theory it was fixed in my current version. Nevertheless it gave me the idea to install lightdm (another desktop manager) and, finally, I could enter to a graphical session in my laptop.
To my surprise my gnome-shell desktop was setup by default (all my customizations gone, I suppose that my problem with GDM and all the things I tried to fix the issue forced this situation). So I used gnome-tweak-tool to select the same themes and extensions I had before. But again more surprises, the default dock in gnome-shell-extensions have been removed in 3.7.x, the weather extension I had did not work, and my GTK3 theme and gnome-shell theme had issues (the desktop background did not work, notifications were garbled,...). So nice! Good upgrade! I forgot about jogging, having a comfortable desktop again was going to be long.
The main things I did were the following:
The common dock has disappeared so I installed another one. I chose the dash to dock extension which is in the gnome extensions web and worked without problem.
The weather extension of Neroth did not work. Neither installing it from the extensions page nor compiling it. But I realized that debian guys had added it to the repository. So it was, at the end, easily installed:
apt-get install gnome-shell-extension-weather
Themes were another story. My gtk3 theme had problems and all the others I tried were more or less the same. Finally I decided to just use the default but changing the default blue color for a red one. It could not be so difficult.
I did the following steps:
Create a new theme directory in the local themes directory for gnome2. My theme will be named AdwaitaRed:
$ cd ~/.themes $ mkdir AdwaitaRed $ cd AdwaitaRed
Copy the default files in the Adwaita gnome theme and rename the theme to the new name:
$ cp -r /usr/share/themes/Adwaita/** . $ sed -e "s/Adwaita/AdwaitaRed/g" index.theme > index.theme2 $ mv index.theme2 index.theme
At this moment you can select the new theme with gnome-tweak-tool but it is exactly the same than default Adwaita (but with a different name).
Follow the instructions from tactical vim to uncompress the gresource file (it seems that the default theme instead of using plain files uses an archived one). I copied the script that the site recommends changing some paths:
$ cat ~/extract.sh #!/bin/bash GR_FILE="/home/ricky/.themes/AdwaitaRed/gtk-3.0/gtk.gresource" GR_BASEDIR="/org/gnome/adwaita/" mkdir /home/ricky/.themes/AdwaitaRed/gtk-3.0/files cd /home/ricky/.themes/AdwaitaRed/gtk-3.0/files || exit for RSRC in $(gresource list $GR_FILE); do RSRC_FILE=$(echo "${RSRC#$GR_BASEDIR}") mkdir -p $(dirname "$RSRC_FILE") ||: gresource extract "$GR_FILE" "$RSRC" > "$RSRC_FILE" done
And executing it the resources were placed in the files directory. After that I deleted the gresource original file.
$ ~/extract.sh $ rm gtk.gresource
Now the references in gtk.css and gtk-dark.css (in gtk-3.0 directory) were changed to link to the dearchived files.
$ cat gtk.css @import url("files/gtk-main.css"); $ cat gtk-dark.css @import url("files/gtk-main-dark.css");
Then I changed the gtk-main.css file and all the colors that were blue (a fucking lot of them) were changed to #f43030. Here you can improve the solution, cos there are a lot of different blues (lighter and darker ones), I just changed all of them for the same red color.
Now if you select AdwaitaRed in the gnome-tweak-tool you have the default Adwaita theme but with red instead of blue (you now, the selections, borders, progress bars and so on).
Finally I tried to fix the problem with the gnome-shell theme. I tested the Holo Red and my previous Adwaita X Red but both gave me problems (mainly notifications). So I finally mixed the Adwaita X Red and the default theme.
Copy the default theme in the new custom theme:
$ cd ~/.themes/AdwaitaRed/ $ mkdir gnome-shell $ cp /usr/share/gnome-shell/theme/** gnome-shell
Copy the Adwaita X Red upon default files:
$ cp ~/.themes/Adwaita\ X\ Red/gnome-shell/** gnome-shell
Then I mixed both gnome-shell.css files. It was a nightmare but it seems that now everything works.
With those changes it was around 10pm at night I had wasted all the evening with this task. Besides as soon as I switched off the laptop I realized why GDM crashed in a blinding flash, the problem was for sure that I had customized the greeting screen (just the background picture). Today I have restored the original files of the GDM3 package (those in /etc/gdm3 directory) and GDM3 works again.
In the new version to change the background image you need to modify a css file /usr/share/gnome-shell/theme/gnome-shell.css (I was not dare enough to try another theme). I just changed this property:
#lockDialogGroup { background: #2e3436 url(/usr/share/images/desktop-base/magneto-login2.jpg); background-repeat: no-repeat; }
The image should be exactly the resolution of the screen.
I present some screenshots just to show how my desktop looks now.
I do not know, I think this should not be so difficult. It is astonishing for me that gnome changes so many things in each version, extensions are not compatible, themes do not work, previous configurations crashes GDM3,... Nevertheless I have to say that in my desktop box (which uses almost the default gnome configuration) the upgrade was smooth. GDM3 did not crash and my previous configuration was preserve, only some extensions were missing (weather and dock, and the panel settings I use there to auto-hide top panel). So maybe in my laptop I simply had bad luck. I think you start to know me, this entry is mainly for me, the next time I see a major version of gnome-shell in the upgrade list I will come here to revise this information.
Cheerio!
Sunday, May 5. 2013
Debian 7.0 released!

The Debian community has released today the next version of their famous Linux distribution. Following a two-year cycle and after ten months frozen the new version 7.0 (codename wheezy) can be downloaded now from their website. As always it comes to light once all the critical bugs were fixed (something that never stops to amaze me):
Good job guys and time to meet Jessie!
Comments