How to change background color?

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
nomko
Posts: 18
Joined: Mon Sep 10, 2012 6:55 am
Location: The Hague, The Netherlands

How to change background color?

Post by nomko »

Hi,

How can i change the background color of PCManFM? IS there some tutorial?
If not, can someone explain it to me step-by-step how to change the background color?

Many thanks!
ASUS P5KPL-AM SE*Intel Core2 Quad CPU Q8200*4 GiB ram*nVidia GeForce 9500GT*Realtek RTL8101/8102E*RaLink RT2500 802.11g*Optiarc DVD-RW AD-7200A*HDD:Samsung HD501LJ/HD103SI*Sitecom X5-N600 Router
vasa1
Posts: 39
Joined: Sat May 11, 2013 9:51 am

Re: How to change background color?

Post by vasa1 »

nomko wrote:Hi,

How can i change the background color of PCManFM? IS there some tutorial?
If not, can someone explain it to me step-by-step how to change the background color?

Many thanks!
nomko wrote:Hi,

How can i change the background color of PCManFM? IS there some tutorial?
If not, can someone explain it to me step-by-step how to change the background color?

Many thanks!
As far as I know, there isn't a simple GUI, point-and-click method to change the background of a single application. If you don't mind doing it globally, the color tab in lxappearance (called Customize Look and Feel in Lubuntu) should get you started.

If you only want to change the background color of PCManFM, you'll need to get your hands dirty. I, or someone else, can help you do that if that is what you wish. In brief ...

Copy the theme folder you want to start off with from /usr/share/themes to ~/.themes. Then rename the copied theme's folder name. For example, copy /usr/share/themes/Clearlooks to ~/.themes/Clearlooks. Then rename ~/.themes/Clearlooks to ~/.themes/MyClearlooks.

Within MyClearlooks, you'll find a folder called gtk-2.0. Within that, you'll find a file called gtkrc. Make a backup of that file and then edit gtkrc to your taste. To see the effect of each edit,
save gtkrc,
open lxappearance, select under the "widget" tab, MyClearlooks (or whatever)
close all instances of PCManFM and reopen PCManFM.

For now, all gtk2 applications will be affected. See later for how to modify only PCManFM's appearance.

You can get a lot done by changing colors right near the top of gtkrc. For example, the gtkrc in my copy of Clearlooks has this near the top:

Code: Select all

gtk-color-scheme = "base_color:#ffffff\nfg_color:#000000\ntooltip_fg_color:#000000\nselected_bg_color:#86ABD9\nselected_fg_color:#ffffff\ntext_color:#1A1A1A\nbg_color:#EDECEB\ntooltip_bg_color:#F5F5B5"
Other themes may present information like this:

Code: Select all

gtk_color_scheme = "fg_color:#333333"
gtk_color_scheme = "bg_color:#e0e0e0"
gtk_color_scheme = "base_color:#ffffff"
gtk_color_scheme = "text_color:#333333"
gtk_color_scheme = "selected_bg_color:#8FB2CF"
gtk_color_scheme = "selected_fg_color:#ffffff"
gtk_color_scheme = "tooltip_bg_color:#303334"
gtk_color_scheme = "tooltip_fg_color:#E6E6E6"
gtk_color_scheme = "link_color:#148add"
gtk_color_scheme = "sidepane_color:#dae0e6"
gtk_color_scheme = "sidebar_color:#dae0e6"
Mostly, you'll need to alter bg_color and base_color. These are the main colors of the background. Further down gtkrc, you'll find a section for how to theme the menu bar area and menu dropdown area. Depending on how much free time you have you can change the colors of most anything.

Whatever you choose, keep in mind that the end result may not be prettier than what you started out with. For example, some icons which look nice against a light background may not look so nice against a dark background. And some themes have an additional file such as pcmanfm.rc or image files that are used to draw the scrollbar area. You'll have to figure that out yourself.

You could also find and install a dark theme (and matching icons) if that's what you want.

Then, to have only PCManFM use the modified theme, modify PCManFM's .desktop file in ~/.local/share/applications to have the Exec= line look like this:

Code: Select all

Exec=bash -c 'GTK2_RC_FILES=/home/vasa1/.themes/MyDark/gtk-2.0/gtkrc pcmanfm %f'
(Caveat: Re. the %f at the end, I can never get a grip on when I should use %f or %u or %U or something else or nothing.) Note, that this is possible for any application that is gtk2-based. I don't know if it's possible to launch just one gtk3 application with a different theme.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: How to change background color?

Post by drooly »

nomko, you should search before posting:
http://forum.lxde.org/viewtopic.php?f=22&t=36177
(my post there)

ps: if you want that for the root account, you have to add these settings to one of the .gtkrc files in the /root folder!
Locked