You are not logged in.

#1 2011-08-29 21:49:21

jwhendy
Member
Registered: 2010-04-01
Posts: 621

lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

I just noticed a directory in my top level home dir called gtk-3.0. I was a bit surprised. Checking inside, I find:

$ cat ~/gtk-3.0/settings.ini
[Settings] 
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

I don't understand why:

1) lxappearance is putting this here vs. ~/.config/gtk-3.0
2) why it mentions using .gtkrc-2.0 in a file dedicated to gtk-3.0 settings (unless gtk2 and gtk3 are controlled by the same gtk3 settings file)

Suggestions? I couldn't find an lxappearance settings file anywhere to perhaps set the location for storing settings.

Offline

#2 2011-08-29 22:48:02

nrempel
Member
Registered: 2010-12-27
Posts: 37

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

Are you using any tricks to get Gtk+ 3 themes looking nice?  I have my ~/.config/gtk-3.0/ symlinked to a theme in /usr/themes.  That could cause a permissions issue.

Offline

#3 2011-08-30 02:24:39

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

@nrempel: I know this is common, but I haven't done that. Mine is pretty simple and is set up more or less through the instructions on the Arch wiki:

$ ls -l ~/.config/gtk-3.0/
-rw-r--r-- 1 jwhendy users 132 Aug 29 21:22 settings.ini

$ cat ~/.config/gtk-3.0/settings.ini
[Settings]

gtk-theme-name = aldabra
gtk-icon-theme-name = elementary
gtk-fallback-icon-theme = gnome
gtk-font-name = Myriad Pro 10

I just created it myself with:

$ mkdir ~/.config/gtk-3.0
$ nano ~/.config/gtk-3.0/settings.ini

So, I'm guessing it should have default/correct permissions for my user?

Offline

#4 2011-08-30 02:31:12

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,000
Website

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

I noticed this too. I just moved the folder to .config/. I'm guessing it's a bug in lxappearance.

Offline

#5 2011-08-30 02:33:18

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

@karabaja4: well, at least it's not just me smile Yes, I figured there would be somewhere to set this for lxappearance in a config file, but found none. I may look into compiling it and seeing if it's compiled in?

Offline

#6 2011-08-30 02:38:38

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

Just filed a bug report. I'm assuming I'll find out soon whether it actually is a bug or not.

Offline

#7 2011-08-30 11:46:33

Wey
Member
Registered: 2011-04-22
Posts: 217

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

I had a quick look at the source code of the git version and i guess

char* file_path_gtk3 = g_build_filename(g_get_home_dir(), "gtk-3.0", NULL);

Should be

   char* file_path_gtk3 = g_build_filename(g_get_user_config_dir(), "gtk-3.0", NULL);

I'll try that out.

Edit: That worked out:

@@ -221,8 +221,8 @@
 
     /* Save also for GTK3 */
     g_string_prepend(content, "[Settings] \n");
-    char* file_path_gtk3 = g_build_filename(g_get_home_dir(), "gtk-3.0", NULL);
-    char* file_path_settings = g_build_filename(g_get_home_dir(), "gtk-3.0", "settings.ini", NULL);
+    char* file_path_gtk3 = g_build_filename(g_get_user_config_dir(), "gtk-3.0", NULL);
+    char* file_path_settings = g_build_filename(g_get_user_config_dir(), "gtk-3.0", "settings.ini", NULL); 

     if (!g_file_test(file_path_gtk3, G_FILE_TEST_IS_DIR))
     {

Last edited by Wey (2011-08-30 12:07:29)

Offline

#8 2011-08-30 12:01:49

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

Normally it should indeed use XDG_CONFIG_HOME?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#9 2011-08-30 14:29:34

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

.:B:. wrote:

Normally it should indeed use XDG_CONFIG_HOME?

Correct. I can confirm this too, but will wait for an update to fix this. Untill then I just change themes manually.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#10 2011-08-30 15:20:58

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

@Unia: Is lxappearance able to change gtk3 themes? I thought I'd have to use it to change gtk2 and then manually set gtk3. Or are they (both gtk2 and gtk3) automatically used as long as there is a gtk-3.0 folder in the theme? I'm still playing catch up with all this theme stuff since applications started using gtk3.

Offline

#11 2011-08-30 16:03:25

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

jwhendy wrote:

@Unia:Or are they (both gtk2 and gtk3) automatically used as long as there is a gtk-3.0 folder in the theme?

It should do that. But right now it's creating a settings.ini in ~/gtk-3.0 instead of ~/.config/gtk-3.0 so you still have to do it manually.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#12 2011-08-30 19:34:03

grimi
Member
Registered: 2009-12-27
Posts: 27

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

Hi, I've changed/added some lines in lxappearance.c. Now, for me lxappearance is working as is should.
This is the patch:

--- src/lxappearance.c	2011-07-29 16:50:19.000000000 +0200
+++ src/lxappearance1.c	2011-07-30 18:51:40.323368701 +0200
@@ -153,21 +153,33 @@
 
     char* file_path = g_build_filename(g_get_home_dir(), ".gtkrc-2.0", NULL);
     GString* content = g_string_sized_new(512);
+    GString* content3 = g_string_sized_new(512);
     g_string_append(content,
         "# DO NOT EDIT! This file will be overwritten by LXAppearance.\n"
         "# Any customization should be done in ~/.gtkrc-2.0.mine instead.\n\n");
+    g_string_append(content3, "[Settings]\n"
+        "# DO NOT EDIT! This file will be overwritten by LXAppearance.\n");
+    
     if(app.widget_theme)
         g_string_append_printf(content,
             "gtk-theme-name=\"%s\"\n", app.widget_theme);
+        g_string_append_printf(content3,
+            "gtk-theme-name = %s\n", app.widget_theme);
     if(app.icon_theme)
         g_string_append_printf(content,
-            "gtk-icon-theme-name=\"%s\"\n", app.icon_theme);
+            "gtk-icon-theme-name=\"%s\"\n", app.icon_theme);        
+        g_string_append_printf(content3,
+            "gtk-icon-theme-name = %s\n", app.icon_theme);
     if(app.default_font)
         g_string_append_printf(content,
             "gtk-font-name=\"%s\"\n", app.default_font);
+        g_string_append_printf(content3,
+            "gtk-font-name = %s\n", app.default_font);
     if(app.cursor_theme)
         g_string_append_printf(content,
             "gtk-cursor-theme-name=\"%s\"\n", app.cursor_theme);
+        g_string_append_printf(content3,
+            "gtk-cursor-theme-name = %s\n", app.cursor_theme);
     save_cursor_theme_name();
 
     g_string_append_printf(content,
@@ -196,20 +208,46 @@
         app.enable_hinting ? 1 : 0
         );
 
+   g_string_append_printf(content3,
+        "gtk-cursor-theme-size = %d\n"
+        "gtk-toolbar-style = %s\n"
+        "gtk-toolbar-icon-size = %s\n"
+        "gtk-button-images = %d\n"
+        "gtk-menu-images = %d\n"
+        "gtk-enable-event-sounds = %d\n"
+        "gtk-enable-input-feedback-sounds = %d\n"
+        "gtk-xft-antialias = %d\n"
+        "gtk-xft-hinting = %d\n",
+        app.cursor_theme_size,
+        tb_styles[app.toolbar_style],
+        tb_icon_sizes[app.toolbar_icon_size],
+        app.button_images ? 1 : 0,
+        app.menu_images ? 1 : 0,
+        app.enable_event_sound ? 1 : 0,
+        app.enable_input_feedback ? 1 : 0,
+        app.enable_antialising ? 1 : 0,
+        app.enable_hinting ? 1 : 0
+        );
+
     if(app.hinting_style)
         g_string_append_printf(content,
             "gtk-xft-hintstyle=\"%s\"\n", app.hinting_style);
+        g_string_append_printf(content3,
+            "gtk-xft-hintstyle = %s\n", app.hinting_style);
 
     if(app.font_rgba)
         g_string_append_printf(content,
             "gtk-xft-rgba=\"%s\"\n", app.font_rgba);
+        g_string_append_printf(content3,
+            "gtk-xft-rgba = %s\n", app.font_rgba);
 
     if(app.color_scheme)
     {
         char* escaped = g_strescape(app.color_scheme, NULL);
         g_string_append_printf(content,
-            "gtk-color-scheme=\"%s\"\n",
-            escaped);
+            "gtk-color-scheme=\"%s\"\n", escaped);
+        g_string_append_printf(content3,
+            "gtk-color-scheme = %s\n", escaped);
         g_free(escaped);
     }
 
@@ -218,20 +256,20 @@
         g_get_home_dir());
 
     g_file_set_contents(file_path, content->str, content->len, NULL);
+    g_string_free(content, TRUE);
 
     /* Save also for GTK3 */
-    g_string_prepend(content, "[Settings] \n");
-    char* file_path_gtk3 = g_build_filename(g_get_home_dir(), "gtk-3.0", NULL);
-    char* file_path_settings = g_build_filename(g_get_home_dir(), "gtk-3.0", "settings.ini", NULL);
+    char* file_path_gtk3 = g_build_filename(g_get_user_config_dir(), "gtk-3.0", NULL);
+    char* file_path_settings = g_build_filename(g_get_user_config_dir(), "gtk-3.0", "settings.ini", NULL);
 
     if (!g_file_test(file_path_gtk3, G_FILE_TEST_IS_DIR))
     {
         g_mkdir_with_parents(file_path_gtk3, 0755);
     }
 
-    g_file_set_contents(file_path_settings, content->str, content->len, NULL);
+    g_file_set_contents(file_path_settings, content3->str, content3->len, NULL);
 
-    g_string_free(content, TRUE);
+    g_string_free(content3, TRUE);
     g_free(file_path);
 }
 

and PKGBUILD:

pkgname=lxappearance
pkgver=0.5.1
pkgrel=2
pkgdesc="GTK+ theme switcher of the LXDE Desktop (manages icons and fonts)"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://lxde.org/"
groups=('lxde')
depends=('gtk3' 'intltool')
makedepends=('pkgconfig')
source=(http://downloads.sourceforge.net/sourceforge/lxde/${pkgname}-${pkgver}.tar.gz gtk3.patch)

build() {
    cd "$srcdir/$pkgname-$pkgver"
    patch -Np0 -i ../gtk3.patch
    ./configure --sysconfdir=/etc --prefix=/usr --enable-gtk3
    make
}

package() {
    cd "$srcdir/$pkgname-$pkgver"
    make DESTDIR="$pkgdir" install
}

md5sums=('34d157a7fe97ef0b93db8fab3f251e07'
                 'de390fe903d59cd9236165604e40281e') 

Last edited by grimi (2011-08-30 19:48:21)

Offline

#13 2011-08-30 19:41:28

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

Awesome -- looks like someone posted a patch in the lxappearance bug report I filed as well: http://sourceforge.net/tracker/?func=de … tid=894869. Hopefully it gets fixed upstream.

Offline

#14 2012-10-01 05:36:33

dasbaer
Member
Registered: 2012-05-27
Posts: 6

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

hm, this is not so new anymore.
i think it has been fixed meanwhile; however, i'm having trouble with lxappearance changing my mouse theme and i don't know where it stores the setting because it's not in any gtkrc or settings.ini

so, does anyone know which files it changes besides gtk in home folder?

i'm using window maker live installation which, i think, is based on debian sid.

thanks.

Offline

#15 2012-10-01 05:40:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

dasbaer wrote:

i'm using window maker live installation which, i think, is based on debian sid.

And you should ask on their forums (or at least Debian Sid's forums). These are the Arch Linux forums and meant for Arch support.

Closing since the topic is fairly old (and patched).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#16 2012-10-01 05:41:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: lxappearance is creating ~/gtk-3.0 vs. using ~/.config/gtk-3.0

dasbaer:

I am going to go ahead and close this thread.  It seems your current issue is not the same issue as the original thread.  Please feel free to start a new thread. If you feel it is relevant, so ahead and link back to this thread.

Edit, I guess i'm not going to close this thread.  smile  Hello ngoonee.  I'm off to bed now...

ngoonee-edit: and hi there e-waller smile

Last edited by ngoonee (2012-10-01 06:59:50)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB