Mozilla Schriften anpassen | setting Mozilla fonts

Posted on March 17th, 2007
I had problems with the fonts when I changed from Ubuntu to Gentoo. With gtk-theme i could fix the problem with most of my tools. However, the fonts for Firefox, Thunderbird and Seamonkey were still ugly. As none of the mozilla progammes having direct acces to these settings by the preference menu, I started to search for a solution. According to the suggestion to use a ~/.fonts.conf to change my settings, I went on to the userChrome.css file as I failed with the ~/.fonts.conf. This file is in every profile folder of mozilla tools in the folder /chrome, if not, you have to create it. This file regulates the settings for the design in menu and fonts. I used a global setting, because I wanted to have the settings for fonts in every part of my mozilla tools. The guys who want to config it more in detail should take a look to the following sites:

Userstyles
Customizing Mozilla

My userChrome.css looks now like this:

* {
font-family: fixed !important;
font-size: 10px !important;
}

The font depends now on my setting in gtk. Here it is “Terminus”, but you are free to use your own favorite. The font-size should be small and equal but still readable, so I took 10px. The “px” is important, otherwise there will be some parts in the menu that would not be affected by the config.

Here are some screenshots of my config in Firefox, Seamonkey and Thunderbird:

FirefoxSeamonkeyThunderbird

complete GNU-software gentoo-laptop and lightweight programms

Posted on March 13th, 2007

Buying a new harddisk with 5400rpm for my IBM Thinkpad X31 replacing the 4200rpm one I had to decide wether simply copying it with dd or reinstalling the whole system. Just copying it is the easiest way and in fact I had _no_ problems with my gentoo installation but there are some points why I decided to make a completely fresh install:

1. I wanted to try -* USE-flags with package based flags in /etc/portage/package.use so there are only packages I really need
2. I already had every config I would need, especially kernelconfig and xorg.conf so there won’t be much configuring work needed to be done
3. experimenting a lot on the system I was quite sure there were at least some packages I wouldn’t need as I already tried running KDE, GNOME and finally Openbox without any “complete” desktop environment and crappy things like graphical login managers ;)
4. >500 packages seemed to be quite a lot on my laptop as my workstation running KDE+beryl has about 600…
5. in the end it would be save to try installing it this way because I always could just change it to my old running system as I won’t delete it on the old harddisk till the new “minimal” system is running

I won’t explain every step on my way, my aim is to present the software I found on my way to a minimal productive system without limitting the range of functions.

First thing was to change the make.conf as I like running an unstable/testing system. I haven’t experienced problems with that so I added ACCEPT_KEYWORDS=”~x86″ to it. Much more important was the next step: adding -* to the USE-flags. As I said my primary aim was setting up USE-flags on a per-package-basis via package.use. Thinking about it there are in fact some USE-flags which still can be set globally activating CPU-features like mmx oder 3dnow. As my thinkpad has a pentium-m i my USE-flags finally were:

USE=”-* mmx nls nptl nptlonly sse sse2 unicode”

Unicode and nls aren’t affecting CPU-features but I recommend setting them nontheless as Unicode support is preferable on most systems…

After installing the base gentoo system and booting it for the first time I suggest doing an “emerge -pve world” and “emerge -pve system” to see which USE-flags would be affected at the moment by the flags, as there are still no per package flags set in package.use. As I didn’t find anything special I needed except wget with ssl, the only thing I did was:

# echo “net-misc/wget ssl” >> /etc/portage/package.use

I suggest doing an emerge -ev system and world at this point for haveing a system with the useflags set enabled. After that run “emerge -av –depclean” to remove packages that aren’t needed any more.

Next step was setting up X which was quite easy already having my xorg.conf on the other harddisk :) Emerging it I needed to set some useflags in package.use as I wanted DRI. As xorg also includes dependencies like xclock and xterm or twm I wanted to get rid of that (I just don’t need it) but in the end I resigned as I didn’t want to edit ebuilds all the time and there is no other way. If you are willing to do that kind of extra work, do it, I wanted to have a running system without editing ebuilds except it was absolutely necessary.

X and GUI software

By now the only thing I did was searching for adequate software. I tried to avoid qt applications and kde/gnome apps as most of them bring in a huge amount of dependencies like kdelibs or half of the gnome package. Here is the list of programms I chose and use. Everyone should do the work it’s supposed to do quite well and till now I don’t miss a thing. I didn’t list things like firefox, thunderbird, and openoffice as they are well known and don’t produce unecessary deps. All programms are extremely lightweight and very fast and don’t lack in funcionality.

Imageviewer: mirage
PDF-reader: epdfview
Text-editor: tea
Filemanager: rox
Sysmonitor: conky
Pager: netwmpager
Terminal: urxvt
Image-editing: gimp

Additional Software:

I also think it might be useful to mention software like pypanel and xchat. Both are very nice if you like having a panel or a graphical IRC client and are lightweight and have many dependencies. One really nice programm I found on my way through portage was Gliv. It’s an imageviewer which uses opengl to render images (try it, its really nice). I liked to use it but its getting kind of slow watching pictures >1mb with the radeon7000 in my laptop so I had to switch to mirage. If your GPU is a little faster (not very hard indeed :P ) you will like it.
If you need a “full” music player you should take look at Exaile. It’s an GTK based amarok clone and quite nice. Another nice app if you need or like a graphical archiving tool is archive.

Conclusion:

I think it was a good decision making a fresh gentoo install. I have about 320 packages now and can do most things I need with my laptop. In fact I don’t miss any functionality atm. One thing I feared was setting the useflags manually could be a lot of work but it was _really_ easy. If you download the package.use you will see that it counts only about 20 entries.

For those who are interested, here are some config files I created. The package.use and rox.conf for example and screenshots of the programs. Conky and netwmpager are seen on nearly every screenshot so I didn’t make seperate ones for them:

Screenshots:

mirageepdfviewepdfviewtea-editorgimpurxvt

Here the config files:

package.use
my rox config
my Xdefaults (for urxvt)

If you are interested in the conkyrc look in the blogpost for the conkyrc ;)

how to set custom DPI with startx / without graphical login managers

Posted on February 25th, 2007
While cleaning up my laptop of unnecessary crap I thought it might be useful to get rid of any graphical login manager as I don’t see any use in it any more. Just running startx should be enough so why wasting memory needlessly?!
The only thing I didn’t know was how to set my dpi manually as the automatically determined value resulted in quite weird and unreadable fonts using 72dpi. I used 86dpi on my laptop and defined that value in the kdmrc, which is part of the login manager shipped with kde: kdm, of which I wanted to get rid off.

After looking through the kdmrc I concluded that the values there are just piped to the Xserver so there must be a way of giving them to the Xserver directly. Using google I found the solution. The “defaultserverargs” argument is also available in the startx script which is located in “/usr/X11R6/bin/startx” so just edit it with

# nano -w /usr/X11R6/bin/startx

and search the argument “defaultserverargs” and add the following “-dpi 86″ setting the dpi to your preferred value. The line should look something like that after changing it:

defaultserverargs=”-nolisten tcp -dpi 86 -br”

These are the results (look exactly at the fonts and conky), on the left without setting the dpi manually and on the right after setting it:


default dpi user specified dpi

How to get multiple rows with Openbox and other WMs

Posted on February 21st, 2007

One very annoying thing working with virtual desktops is that ordering them in one line is a very unefficient way to navigate through.
As usual there is a quite easy possibility to eliminate this problem for example by ordering desktops in the form of a square. I have seen this at a screenshot with 49 virtual desktops in a Fvwm environment and so it should also work quite well with my (atm) 9 desktops and openbox. Using this order you can navigate from the center desktop to the others directly and can also reach every other desktop with a maximum of 2 hops.

Reading through the EWMH specifications for window managers I found the following part which explains how it is possible to handle the desktop layout. As openbox is EWHM compliant this should somehow work with openbox (and every other window manager which is EWHM compliant).

Asking in #openbox on irc.oftc.net what would be the easiest way a guy called Mikachu gave me his code for a little program which does exactly what I was looking for without using a pager like netwmpager or obpager (which would also have been a possibility). You will find the sourcecode downloadable at the bottom of this post and in the following a short description how to use it.

first you need to compile it with

# gcc -o setlayout setlayout.c -lX11

second run the binary. You need to tell it via arguments what to do and running it

# ./setlayout

will tell you the following:

The first is layout, 0 is horizontal and 1 is vertical.
Second and third is number of desks horizontally and vertically.
The last is starting corner, 0 = topleft, 1 = topright, 2 = bottomright, 3 = bottomleft.

finally run it with the arguments you need

# ./setlayout 0 3 3 0

and voila, here are my 9 virtual desktops ordered in form of a square :)

screenshot

Big thx to Mikachu from #openbox for writing it and explanations, here is the sourcecode:
Mikachu’s little programm

horizontal conky (howto) with one conkyrc

Posted on February 20th, 2007

First a short description to those not knowing conky: conky is a highly configurable and tiny system monitor (imho the best for X as I don’t like GKrllM). It can do a lot, you just need to know how to do it…

### Intro

After switching from a 14″ widescreen Laptop to a 12″ IBM Thinkpad X31 I didn’t see my conky as often as I would have liked to see it (hey, what sense would a system monitor make, if you didn’t see it…)
The best solution I figured out was having a horizontal conky which would be placed at the bottom of the desktop and as tiny as possible so I would be able to run most apps in nearly fullscreen mode but still having in sight the most important things. Looking at the screenshot section I found a quite nice horizontal conky but it was achieved by running conky 3 times with 3 different conkyrc. This consumed up to 5% CPU power which was far too much imho so i started thinking about creating my own one which will be better then the rest… hopefully

### Getting started

Probably the most annoying thing was the changing width of some lines caused by increased cpu load for example but thanks to drphibes in #conky on freenode I was able to eliminate that problem with the use_spacer yes option. After that it was straight forward and the only problem i had was how to position the different items and chosing which I needed wanted ;)
First part are some small bars for things like CPU and the mounted partitions, followed by percentage aso. Second part is netstats like wlan strength and up/down speeds. After that the system monitor with the 3 top processes and some infos. To move the different items in their horizontal position you can use either simple spaces or the offset variable. I mostly used offset because it’s more comfortable imho but do as you please.
Last thing are portage infos which I implemented with Hellf[i]re’s scripts (found them on the conky page, big thx). They are gentoo specific as portage is gentoo’s package manager, so if you want to use my conkyrc on another distro just remove the parts in the conkyrc. If gentoo is the operating system conky will run on you’ll need to do 2 things:
first: the portage scripts need to be executable as conky executes them with the different exec variables so just execute the following:

# chmod +x /home/$user/.conky/emerge*

second: the user who is running conky needs to have read access to /var/log/emerge.log which leads to a problem: every time you start emerging something, gentoo will reestablish the root-only read access to the file so (as root)

# chmod o+r emerge.log

won’t work but until you start emerging something. Easiest solution is to add your user to the portage group with (as root)

# gpasswd -a $user portage

You _won’t_ be able to (un-)install programms but will be able to read the emerge.log. I will watch out for a more restrictive solution but till then this should work fine ;)

And here you see the result in comparison to the old conkyrc:

vertical conky conky horizontal

### Finishing off

This is just a first snapshot of my conkyrc (call it release if you want). I plan to implement (much )better colors and 2 different rcs for dark and bright backgrounds so everybody should be happy. The layout is quite final although some items possibly will get some little improvements. Perhaps i will also implement jesse’s timeleft script for portage which is based on genlop but this has quite a low priority atm.
At the moment there are still some small problems so I will tell you how to avoid them: the first line of the conkyrc with infos about hostname and used kernel will differ from mine so you will also have to change the first offset variable to a value that works for you.

### Info to the files
I created a hidden directory to put all the scripts in called .conky under /home/$user/ . If you like something else you will need to change the conkyrc so it works for you. You will definitely need to change the username except you are called schischa too :P
Please comment and rate so I know what to think of next!

Here are the files: conkyrc and scripts


design: makequick.com | modificashuns and bugfixes by jesse
bottom