Showing posts with label Gnome. Show all posts
Showing posts with label Gnome. Show all posts

Sunday, May 4, 2008

Using a dark theme in ubuntu

After installing a dark theme on my "new" laptop the other day, I've been adding quite a few tweaks in order to make it render correctly with the rest of Ubuntu 08.04 - Hardy Heron.

Theme installed: Darklooks - you can find it in Synaptic Package Manager (gnome-themes-extras).

Edit the theme file:

cd /usr/share/themes/Darklooks/gtk-2.0/

edit gtkrc, changing lines 181 and 182 from:

bg[NORMAL] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color


to:

bg[NORMAL] = @tooltips_bg_color
fg[NORMAL] = @tooltips_fg_color


This will keep the theme from crashing, I have yet to change the notifications and tooltips to be a dark color rather than yellow.

Enable the darklooks theme for gnome.

You can test it by opening firefox. If you have done the last step correctly, the theme should stick. Otherwise, it will revert back to a blocky theme.

Now for specific Apps, these tweaks are not theme specific - they should fix most dark themes.

The biggest concern for most people will be Firefox:

First, make a backup of your .mozilla profile folder (in your home folder)
uninstall firefox-3, and then install:

firefox-2
firefox-2-gnome-support
msttcorefonts

Why are we doing this? Firefox 3 has automated gtk integration - but, all those large dark widgets on top of light colored sites ... not very pretty. Firefox 2 has a way to get around this, but as of this post, Firefox 3 has disabled that option. You can write to your nearest Firefox developer and ask for this to be added back in!

Once you have firefox 2 up and running, merge your profile data back into your new .mozilla folder (bookmarks, add-ons, etc)

Go into the firefox preferences Edit > Preferences , and choose the Content tab. Click on the Colors button, and make sure 'Use System Colors' is unchecked. Save your changes and close that window. Next click on the Advanced fonts tab, and change the monospace font size to 14. Save and close all the way.

Download this archive, and extract it to a convenient place.

go to: /home/**/.mozilla/firefox/**/chrome , replacing the ** s with your user name and the correct profile code.

If you want to keep the ugly firefox 2 widgets, move the 'userContent-restore to firefox defaults.css' file into this folder, and remove everything after Content.

If you want prettier widgets, move the 'userContent.css' file into the chrome folder. You will not need to change its name. Next, go to /usr/share/firefox/res , and make a backup of your forms.css file. This folder belongs only to root, so you may have to do this in terminal.

sudo mv forms.css forms-backup.css

or some other such name. DO NOT SKIP THIS STEP! you should always make a backup when changing system files. Now, move the form-widgets folder, again using the terminal:

sudo cp -r where/ever/you/extracted/the/folder/form-widgets /usr/share/firefox/res/form-widgets

You should be done! You can use this page to test with.

If you know css, you can edit any of the .css files to change anything you like. You can also change the way the widgets look by opening them in your favorite image editing program.

These are the web pages that I visited in order to put all of these files together (along with a lot of my own tweaking):

Firefox Widgets
Instructions for FF3 I found this after I uninstalled FF3, according to a comment, it only works for FF2 ...
the stylish style referenced above
the unhelpful mozilla page
specific Darklooks theme problems
ubuntu forum thread with some helpful links
a possible fix for the auto complete bar in FF3
some good info

Things to fix still:

When you search for a word, it still uses a minty green color
The address bar on a secure page clashes, but is readable.
In the built in firefox boxes with hint text (like the search bar on the top right), the text is too dark to read easily.

One more thing! If you want to, you can install the stylish firefox extension, and then install a dark google theme, that way it will feel more like the rest of your desktop.


Open Office:
I haven't opened up anything but Writer, so, I don't know what else needs fixing yet.

Download this archive (7.7mb) and move the images_tango.zip file into /usr/lib/openoffice/share/config/ Don't extract it.

To change the icon theme so that it matches better (unless you like orange of course), go to the Tools > Options menu. Under the OpenOffice.org section, choose View. Change the icon size to small (if you think they are too large), and set the style to tango.

Next, to change the page background color from dark gray to white, choose Appearance from the left. Change document background to white, and font color to black. As you run into any other glitches, you can change them here.

Pidgin:
First, make sure you are running the new pidgin, it should be 2.4.1 or higher. If you have Hardy Heron installed, you are good to go.

In the Tools > Plugins menu, turn on 'Conversation Colors' and set Sent and Received Messages to #ADADAD (you can go lighter or darker, at your preference).

Next, turn on the 'Pidgin GTK+ Theme Control', and set the hyperlink color to #576BBE , the Sent Message Name color to #8496DD , and the Received Message Name color to #EA987D . Again, you can change these as you like, but this is a good starting place.

If you have a smaller screen (1024x768), you won't be able to see the save or close button. Click tab until you get to the re-read gtkrc files, then click tab again, and push your [ENTER] key.

Gedit:
Open Gedit, \go to the Edit > Preferences menu, and choose the Fonts and Colors Tab. Change the theme to Oblivion. This theme is not ideal, color wise, but it's readable!

Terminal:
Open up your terminal, go to the Edit > Current Profile menu, choose the Colors tab, you can try using the colors from the system, or change the scheme white or green on black. Whichever suits your fancy. You can also change the colors individually if you like.

That's it for now, as I use the theme, I know I'll run into more things that need fixing, and I will either add them to this post, or make a new one.

Wednesday, April 9, 2008

Windows+L to Lock Screen.

Aka L or L. For the past several releases Gnome/Metacity have an issue with setting certain keyboard binding shortcuts involving the WinKey.

There are really normally two bugs involved. The first bug is that Gnome doesn't think the Win key is a modifier, so it registers as Super_L (meaning the Left Super Key as a standalone) whenever you try to bind a shortcut using that key. This can be fixed through System -> Preferences -> Keyboard -> Layout Options -> Alt/Win Key Behavior. Choose the option labeled "Super is mapped to the Win-keys (default)" Yes, I know it says default, but it isn't really. You'll notice that one or two other options in the same series are also labeled default.

The second bug is that there are two separate shortcut managers, metacity and gnome-settings-daemon, and one of them (gnome-settings-daemon) happens before gnome does its magic modifier mappings, the other happens after. Basically this means that when you set the key bindings under Keyboard Shortcuts in preferences, you are using a certain key layout when you make your selection, but when the keys actually get interpreted, they are using a different (and defective) layout, which lacks certain keys -- such as the Windows key. So far, there's not really a good way to fix the problem, but there is a way to work around it. Instead of letting gnome-settings-daemon handle the task you are trying to assign, find an alternate way to perform the task using metacity (or compiz). Open up gconf-editor from a terminal, then go to /apps/metacity/global_keybindings where you will find a series of run_command_X options from 1 to 12. Fill in one of them with the value l (you actually type it like that, with the angle brackets, etc.) then fill in the corresponding command_X item in /apps/metacity/keybinding_commands with the command you are trying to launch, which - if you are trying to bind Windows+L is most likely:

/usr/bin/gnome-screensaver-command --lock

This will launch the gnome screensaver and lock the screen.

I know this isn't perfect, but a workaround is better than nothing. I hope it was helpful!

Monday, July 23, 2007

Scrambled Xvnc Keyboard Mapping on Ubuntu Feisty

This is just a bug workaround:

If you log in through Xvnc (I use it with xinetd) and see the gdm screen, log in to gnome fine, but then after that your keyboard comes out scrambled, here's a quick and dirty fix (you'll have to do this from a console that is working, maybe SSH?):

sudo mv /usr/share/xmodmap/xmodmap.us /usr/share/xmodmap/xmodmap.us.bkup

Of course, this only works if you were using the US keyboard layout. This is not ideal, but it gets the job done in this particular case.

The fix for this is apparently already in the upstream code and should be available in the next gnome update from Ubuntu.

Monday, April 23, 2007

Getting rid of the tooltips in the Gnome panel

Tooltips in the panel seem pointless to me, they hardly ever tell you more information that you can already gather by just reading the menu entry. If you are using Compiz or Beryl and have menu effects turned on, all those tooltips popping up and sparkling everywhere could get old very fast.

Here's how to get rid of them:

Open a terminal and type gconf-editor. This should open the Gnome Configuration Editor. Navigate to Apps > Panel > Global and uncheck tooltips_enabled. Enjoy your tooltip-free Gnome Panel!