Compdigitec Labs

Modifying Android settings from the filesystem / terminal

By admin | November 5, 2012

(Root access is required for this entire procedure; but root access is usually present on development builds anyway.) Normally, the built-in Settings app can be used on Android to change system settings. But if you’re on a development build where the settings app is broken and can’t be used, the Android settings database can be found at:

/data/data/com.android.providers.settings/databases/settings.db

Probably, you will need to cp the file to a place that any user can read from (e.g. /sdcard). Then, git pull the file and open it in SQLite Manager or something similar, and you can edit it. The most interesting table will probably be the “secure” table, where you can change the system settings.

Just use adb push to push the file back on the device, and use mv to move it to /data/data/com.android.providers.settings/databases/.

Topics: Mobile | 3 Comments »

Solving “libtool: Version mismatch error”

By admin | October 18, 2012

After ./configure and make, you get this interesting scenario:

libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1ubuntu1, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1ubuntu1
libtool: and run autoconf again.
make[5]: *** [perl.lo] Error 63

The solution?

autoreconf -ivf

Topics: Linux | 4 Comments »

Quilt responding with “File series fully applied” and not working

By admin | October 15, 2012

The story so far…

quilt push -a

File series fully applied

git diff

(no output)

git status

# On branch master
nothing to commit (working directory clean)

What’s happening here? Well, it turns out that we need to reset and clean the .pc directory of quilt:

git reset --hard HEAD
git clean -f -d
rm -rf .pc

Now, let’s try applying the patches:

quilt push -a

Applying patch patch-number-one.patch
patching file configure.ac

Applying patch fix-build.patch
patching file src/diff.hpp

Now at patch fix-build.patch

Much better, no? And now it brings us to a point where we can now do dpkg-buildpackage -us -uc -b.

Topics: Linux | No Comments »

Libavcodec – native NEON compile vs hybrid mode

By admin | October 4, 2012

Background

Benchmarks using the latest VLC beta and benching whether a native build solely for NEON is faster or a hybrid build. The expectation is that the native build should be very slightly faster than the hybrid build. This is done on a TI OMAP 4460 (Galaxy Nexus). Method is same as previous benchmarks.

Results

Ironically, it appears that the hybrid build is slightly faster(?) than the native NEON build, although in practice there is no real difference for the user. So the proper result should be inconclusive.

Hybrid mean 80.25% Native NEON mean 81.56%
Hybrid median 82.10% Native NEON median 82.80%

Libavcodec Native NEON mode vs hybrid mode

Raw data

Hybrid build:
19453   126 10079    R     575m 82.6   1 72.0 org.videolan.vlc
19453   126 10079    S     593m 85.3   1 64.4 org.videolan.vlc
19453   126 10079    S     594m 85.4   1 85.0 org.videolan.vlc
19453   126 10079    S     594m 85.5   0 83.1 org.videolan.vlc
19453   126 10079    S     594m 85.5   0 81.8 org.videolan.vlc
19453   126 10079    S     597m 85.9   0 77.9 org.videolan.vlc
19453   126 10079    S     597m 85.9   0 85.6 org.videolan.vlc
19453   126 10079    S     597m 85.9   0 85.5 org.videolan.vlc
19453   126 10079    S     598m 85.9   0 81.6 org.videolan.vlc
19453   126 10079    S     598m 86.0   0 82.1 org.videolan.vlc
19453   126 10079    S     598m 86.0   1 83.8 org.videolan.vlc

Native NEON build:
19703   126 10079    S     590m 84.8   0 68.4 org.videolan.vlc
19703   126 10079    S     589m 84.7   1 82.3 org.videolan.vlc
19703   126 10079    S     592m 85.1   1 81.1 org.videolan.vlc
19703   126 10079    S     592m 85.1   1 83.0 org.videolan.vlc
19703   126 10079    S     593m 85.2   1 81.0 org.videolan.vlc
19703   126 10079    S     593m 85.3   1 83.2 org.videolan.vlc
19703   126 10079    S     593m 85.3   1 82.8 org.videolan.vlc
19703   126 10079    S     594m 85.3   1 79.8 org.videolan.vlc
19703   126 10079    S     594m 85.4   1 83.8 org.videolan.vlc
19703   126 10079    S     594m 85.4   1 85.6 org.videolan.vlc
19703   126 10079    S     594m 85.4   1 86.2 org.videolan.vlc

Topics: Mobile | 1 Comment »

libmedia source code in Android 4.1 Jellybean

By admin | August 28, 2012

If you’ve been wondering where the libmedia.so sources (previously located at platform/frameworks/base/media/libmedia) have gone in Android 4.1 “Jellybean”, it has been split to a new repository, platform/frameworks/av.

This was initially announced on Google Groups in April but it was not specified where the files were to be relocated to. Most Google searches for libmedia still show it to be under frameworks/base.

The specific commit that removed libmedia from frameworks/base was made by James Dong of Google. This note should help some of us who are searching for the new and updated libmedia source.

Topics: Mobile | 1 Comment »

Compiling GNU Nano for Android

By admin | July 13, 2012

If you just want a pre-built, ready to use version of Nano for Android, you can get the pre-built version.

The results of these steps include:

GNU Nano running on Android

# Export toolchain for build
export ANDROID_NDK=/opt/android-ndk-r8
export CC="$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8/platforms/android-5/arch-arm"
export CXX="ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ --sysroot=/opt/android-ndk-r8/platforms/android-5/arch-arm"

# Build ncurses static lib
wget ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz -O- | tar zxvf -
cd ncurses-5.9/

# ../form/fty_num.c:226: error: 'struct lconv' has no member named 'decimal_point'
# fty_num.c:(.text+0x280): undefined reference to `localeconv'
patch -p0 << NcursesPatch
--- form/fty_num.c	2012-07-13 23:04:53.914039027 -0400
+++ form/fty_num.c	2012-07-13 23:05:38.057484067 -0400
@@ -36,6 +36,12 @@

 MODULE_ID("$Id: fty_num.c,v 1.28 2010/01/23 21:14:36 tom Exp $")

+/* "MISSING FROM BIONIC - DEFINED TO MAKE libstdc++-v3 happy" */
+#ifdef HAVE_LOCALE_H
+#   undef HAVE_LOCALE_H
+#   define HAVE_LOCALE_H 0
+#endif
+
 #if HAVE_LOCALE_H
 #include <locale.h>
 #endif

NcursesPatch

./configure --with-normal --without-shared --without-cxx-binding --enable-root-environ --disable-widec --without-tests --host=arm-linux
make -j3

# Nano 2.2.6 build
cd ..
wget http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz -O- | tar zxvf -
cd nano-2.2.6/

# Patch to get around bionic deficiencies
patch -p0 << NanoAndroid
--- src/chars.c	2012-07-13 22:02:21.741210225 -0400
+++ src/chars.c	2012-07-13 22:04:02.887938640 -0400
@@ -79,6 +79,7 @@
     return ((unsigned int)c == (unsigned char)c);
 }

+/*
 static void mbtowc_reset(void)
 {
     IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0));
@@ -88,6 +89,7 @@
 {
     IGNORE_CALL_RESULT(wctomb(NULL, 0));
 }
+*/

 /* This function is equivalent to isalnum() for multibyte characters. */
 bool is_alnum_mbchar(const char *c)
--- src/files.c	2012-07-13 22:13:35.516739719 -0400
+++ src/files.c	2012-07-13 22:13:38.796698486 -0400
@@ -2237,13 +2237,16 @@
 	    tilde_dir = mallocstrncpy(NULL, buf, i + 1);
 	    tilde_dir[i] = '\0';

+	    /*
 	    do {
 		userdata = getpwent();
 	    } while (userdata != NULL && strcmp(userdata->pw_name,
 		tilde_dir + 1) != 0);
 	    endpwent();
-	    if (userdata != NULL)
-		tilde_dir = mallocstrcpy(tilde_dir, userdata->pw_dir);
+	    */
+	    char* home = getenv("HOME");
+	    if (home != NULL)
+		tilde_dir = mallocstrcpy(tilde_dir, home);
 	}

 	retval = charalloc(strlen(tilde_dir) + strlen(buf + i) + 1);
@@ -2340,7 +2343,7 @@
     assert(buf != NULL && num_matches != NULL && buf_len > 0);

     *num_matches = 0;
-
+#if 0
     while ((userdata = getpwent()) != NULL) {
 	if (strncmp(userdata->pw_name, buf + 1, buf_len - 1) == 0) {
 	    /* Cool, found a match.  Add it to the list.  This makes a
@@ -2362,7 +2365,7 @@
 	}
     }
     endpwent();
-
+#endif
     return matches;
 }

--- src/nano.c	2012-07-13 22:49:46.001453034 -0400
+++ src/nano.c	2012-07-13 22:51:23.860222781 -0400
@@ -1534,6 +1534,12 @@
     }
 #endif

+    /* Workaround for enter key */
+    /* https://github.com/Evervolv/android_external_nano/commit/7b568f0b417c1fe3fe8597c600bdbcda4837013f */
+    if (input == 10) {
+        input = NANO_CONTROL_M;
+    }
+
     /* Check for a shortcut in the main list. */
     s = get_shortcut(MMAIN, &input, meta_key, func_key);

--- src/prompt.c.old	2012-07-13 22:51:47.839921315 -0400
+++ src/prompt.c	2012-07-13 22:51:49.615898989 -0400
@@ -87,6 +87,10 @@
     }
 #endif

+    if (input == 10) {
+        input = NANO_CONTROL_M;
+    }
+
     /* Check for a shortcut in the current list. */
     s = get_shortcut(currmenu, &input, meta_key, func_key);

NanoAndroid

./configure --disable-rpath --disable-nls --host=arm-linux --disable-color --disable-utf8 --disable-browser CFLAGS="-I$PWD/../ncurses-5.9/include" LIBS="$PWD/../ncurses-5.9/lib/libncurses.a" LDFLAGS="-L$PWD/../ncurses-5.9/lib"
make -j3

# Create a terminfo package (skip if you already have one)
tar cvf terminfo.tar -C /lib terminfo/
adb push terminfo.tar /data/local/tmp

# deploy to phone
adb push ./src/nano /data/local/tmp
adb shell
# On Android phone now:
cd /data/local/tmp
tar xf terminfo.tar # skip if you did not do "create a terminfo package" above
export TERMINFO=./terminfo # or wherever your terminfo is
# Run nano on Android phone
./nano
# If you get an error like Error opening terminal: vt100.
# It means that you did not do the TERMINFO thing properly.

Topics: Mobile | 6 Comments »

Android MPEG-2 benchmarks

By admin | July 12, 2012

VLC for Android beta benchmarks (July 12, 2012) for the MPEG-2 format. Specs and method are the same as in the audio benchmarks.

MPEG-2 sample
http://streams.videolan.org/samples/MPEG2/dvd.mpeg

Skip to

ARMv6 without VFP

Results – libmpeg2

libmpeg2
Mean: 72.99%
Median: 72.80%
Mode: N/A
libavcodec
Mean: 73.17%
Median: 73.70%
Mode: 71.50%

libmpeg2 vs avcodec - ARMv6

MPEG-2 with libmpeg2 (ARMv6 without VFP)

--no-audio --codec libmpeg2,none
PID    PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
Pass 1:
D/VLC(14999): using decoder module "libmpeg2"
14999  6998 10076    S     185m100.4   0 76.9 org.videolan.vlc
14999  6998 10076    S     189m102.7   0 72.8 org.videolan.vlc
14999  6998 10076    S     195m105.5   0 70.1 org.videolan.vlc
14999  6998 10076    S     199m107.9   0 74.6 org.videolan.vlc
14999  6998 10076    S     204m110.3   0 71.6 org.videolan.vlc
14999  6998 10076    S     204m110.4   0 76.1 org.videolan.vlc
14999  6998 10076    S     204m110.4   0 78.3 org.videolan.vlc
Pass 2:
D/VLC(15048): using decoder module "libmpeg2"
15048  6998 10076    S     186m100.8   0 71.4 org.videolan.vlc
15048  6998 10076    S     190m102.8   0 71.9 org.videolan.vlc
15048  6998 10076    S     195m105.7   0 66.0 org.videolan.vlc
15048  6998 10076    S     200m108.2   0 72.4 org.videolan.vlc
15048  6998 10076    S     205m111.0   0 69.6 org.videolan.vlc
15048  6998 10076    S     206m111.6   0 76.3 org.videolan.vlc
15048  6998 10076    S     206m111.6   0 80.5 org.videolan.vlc
Pass 3:
D/VLC(15085): using decoder module "libmpeg2"
15085  6998 10076    S     172m 93.1   0 66.6 org.videolan.vlc
15085  6998 10076    S     183m 99.3   0 69.8 org.videolan.vlc
15085  6998 10076    S     185m100.1   0 72.7 org.videolan.vlc
15085  6998 10076    S     188m101.7   0 72.9 org.videolan.vlc
15085  6998 10076    S     191m103.3   0 73.6 org.videolan.vlc
15085  6998 10076    S     192m104.1   0 74.8 org.videolan.vlc
15085  6998 10076    S     193m104.8   0 73.8 org.videolan.vlc

MPEG-2 with libavcodec (ARMv6 without VFP)

--no-audio --codec avcodec,none
PID    PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
Pass 1:
D/VLC(15163): using decoder module "avcodec"
15163  6998 10076    S     185m100.1   0 65.0 org.videolan.vlc
15163  6998 10076    S     185m100.3   0 69.1 org.videolan.vlc
15163  6998 10076    S     189m102.4   0 69.9 org.videolan.vlc
15163  6998 10076    S     194m105.0   0 72.5 org.videolan.vlc
15163  6998 10076    S     199m107.8   0 75.5 org.videolan.vlc
15163  6998 10076    S     204m110.7   0 72.9 org.videolan.vlc
15163  6998 10076    S     207m112.3   0 76.3 org.videolan.vlc
Pass 2:
D/VLC(15199): using decoder module "avcodec"
15199  6998 10076    S     185m100.0   0 75.4 org.videolan.vlc
15199  6998 10076    S     188m101.8   0 74.8 org.videolan.vlc
15199  6998 10076    S     184m 99.5   0 74.1 org.videolan.vlc
15199  6998 10076    S     188m102.0   0 71.6 org.videolan.vlc
15199  6998 10076    S     193m104.4   0 73.5 org.videolan.vlc
15199  6998 10076    S     195m105.4   0 71.5 org.videolan.vlc
15199  6998 10076    S     195m105.4   0 76.7 org.videolan.vlc
Pass 3:
D/VLC(15227): using decoder module "avcodec"
15227  6998 10076    S     187m101.4   0 75.9 org.videolan.vlc
15227  6998 10076    S     191m103.4   0 73.8 org.videolan.vlc
15227  6998 10076    S     196m106.1   0 73.7 org.videolan.vlc
15227  6998 10076    S     201m108.9   0 71.3 org.videolan.vlc
15227  6998 10076    S     206m111.7   0 71.5 org.videolan.vlc
15227  6998 10076    S     208m112.7   0 75.2 org.videolan.vlc
15227  6998 10076    S     208m112.7   0 76.4 org.videolan.vlc

ARMv7 with NEON

Results – libmpeg2

libmpeg2
Mean: 49.95%
Median: 50.5%
Mode: 51.6%
libavcodec
Mean: 57.01%
Median: 58.3%
Mode: 59.9%

libmpeg2 vs avcodec - ARMv7

MPEG-2 with libmpeg2 (ARMv7 with NEON)

--no-audio --codec libmpeg2,none
PID    PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
Pass 1:
D/VLC(11577): using decoder module "libmpeg2"
11577   119 10033    S     526m 75.6   0 51.0 org.videolan.vlc
11577   119 10033    S     526m 75.6   0 50.5 org.videolan.vlc
11577   119 10033    S     526m 75.6   0 50.9 org.videolan.vlc
11577   119 10033    S     525m 75.5   1 50.4 org.videolan.vlc
11577   119 10033    S     526m 75.6   1 49.0 org.videolan.vlc
11577   119 10033    S     526m 75.7   1 51.3 org.videolan.vlc
11577   119 10033    S     526m 75.7   1 51.6 org.videolan.vlc
Pass 2:
D/VLC(11632): using decoder module "libmpeg2"
11632   119 10033    S     525m 75.5   0 49.3 org.videolan.vlc
11632   119 10033    S     524m 75.4   0 51.2 org.videolan.vlc
11632   119 10033    S     525m 75.4   1 50.7 org.videolan.vlc
11632   119 10033    S     525m 75.5   0 49.5 org.videolan.vlc
11632   119 10033    S     525m 75.5   1 46.8 org.videolan.vlc
11632   119 10033    S     525m 75.5   0 49.5 org.videolan.vlc
11632   119 10033    S     525m 75.5   0 48.6 org.videolan.vlc
Pass 3:
D/VLC(11683): using decoder module "libmpeg2"
11683   119 10033    S     527m 75.7   0 50.2 org.videolan.vlc
11683   119 10033    S     527m 75.7   0 51.4 org.videolan.vlc
11683   119 10033    S     527m 75.7   0 51.6 org.videolan.vlc
11683   119 10033    S     527m 75.7   0 51.7 org.videolan.vlc
11683   119 10033    S     526m 75.7   0 42.1 org.videolan.vlc
11683   119 10033    S     526m 75.7   0 52.0 org.videolan.vlc
11683   119 10033    S     527m 75.7   1 49.6 org.videolan.vlc

MPEG-2 with libavcodec (ARMv7 with NEON)

--no-audio --codec avcodec,none
PID    PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
Pass 1:
D/VLC(11099): using decoder module "avcodec"
11099   119 10033    S     534m 76.8   0 57.9 org.videolan.vlc
11099   119 10033    S     534m 76.8   0 58.9 org.videolan.vlc
11099   119 10033    S     534m 76.8   1 58.3 org.videolan.vlc
11099   119 10033    S     534m 76.8   0 54.1 org.videolan.vlc
11099   119 10033    S     534m 76.8   1 56.3 org.videolan.vlc
11099   119 10033    S     534m 76.8   1 59.9 org.videolan.vlc
11099   119 10033    S     535m 76.9   1 58.6 org.videolan.vlc
Pass 2:
D/VLC(11375): using decoder module "avcodec"
11375   119 10033    S     526m 75.6   1 44.7 org.videolan.vlc
11375   119 10033    S     528m 76.0   1 54.8 org.videolan.vlc
11375   119 10033    S     528m 76.0   1 59.7 org.videolan.vlc
11375   119 10033    S     528m 76.0   0 62.6 org.videolan.vlc
11375   119 10033    S     528m 76.0   1 59.8 org.videolan.vlc
11375   119 10033    S     529m 76.0   0 56.9 org.videolan.vlc
11375   119 10033    S     529m 76.0   0 58.7 org.videolan.vlc
Pass 3:
D/VLC(11431): using decoder module "avcodec"
11431   119 10033    S     528m 75.9   1 53.9 org.videolan.vlc
11431   119 10033    S     528m 75.9   1 56.0 org.videolan.vlc
11431   119 10033    S     528m 75.9   0 59.9 org.videolan.vlc
11431   119 10033    S     528m 75.9   0 55.6 org.videolan.vlc
11431   119 10033    S     528m 76.0   1 49.5 org.videolan.vlc
11431   119 10033    S     528m 76.0   0 59.5 org.videolan.vlc
11431   119 10033    S     528m 76.0   0 61.7 org.videolan.vlc

Topics: Mobile | 2 Comments »

When git am fails, use 3way

By admin | July 3, 2012

git am 0001-Very-valuable-piece-of-art.patch

Applying: Very valuable piece of art
error: patch failed: Apple.java:212
error: Apple.java: patch does not apply
error: patch failed: Window.java:840
error: Window.java: patch does not apply
Patch failed at 0001 Very valuable piece of art
When you have resolved this problem run “git am –resolved”.
If you would prefer to skip this patch, instead run “git am –skip”.
To restore the original branch and stop patching run “git am –abort”.

What to do? –3way to the rescue!

git am --3way

Applying: Very valuable piece of art
Using index info to reconstruct a base tree…
Falling back to patching base and 3-way merge…
Auto-merging Apple.java
Auto-merging Window.java

Smooth.

Topics: Linux | 2 Comments »

fclose() freezes/hangs when run inside pthread on Android 2.1

By admin | June 25, 2012

There appears to be an obscure bug that has somehow recently activated on ARMv6, non-FPU builds of VLC for Android. This has been only observed on Android 2.1 and possibly on other Android 2.x platforms with ARMv6, non-FPU builds Android 2.2. On the other hand, it works perfectly on an Android 4.0 on a NEON device (same code), so it is probably specific to Android 2.2 and 2.1 (not tested on 1.6).

The obscure bug involves hanging during a fclose() call whilst being run inside a POSIX pthread_once thread. This obscure bug was causing hanging on startup of VLC for Android on an Android 2.1, no-FPU, no-NEON device. Further testing with the Android emulator also revealed that the Android 2.1 and 2.2 emulator crashes too, suggesting a bionic bug (Android 2.3 works fine). Here is a condensed, VLC-neutral version of the code from VLC core that is specific to this problem, adapted from src/posix/linux_cpu.c:

// arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8/platforms/android-9/arch-arm -I. -g -march=armv6j -mtune=arm1136j-s -msoft-float android.c -o android
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <stdlib.h>

/* getdelim and getline courtesy of VLC's compat/getdelim.c */
ssize_t getdelim(char**v1,size_t*v2,int v3,FILE*v4){char*A1=*v1;size_t A2=(A1 != NULL)?*v2:0;size_t A3 = 0;for(;;){if((A2 - A3) <= 2){A2=A2?(A2*2):256;A1=realloc(*v1,A2);if(A1 ==NULL)return-1;*v1=A1;*v2=A2;}int c=fgetc(v4);if(c==-1){if(A3==0||ferror(v4))return -1;break;}A1[A3++]=c;if(c==v3)break;}A1[A3]='\0';return A3;} ssize_t getline(char** a,size_t* b,FILE* c){return getdelim(a,b,'\n',c);}

static uint32_t cpu_flags = 0;

static void vlc_CPU_init (void) {
    FILE *info = fopen ("/proc/cpuinfo", "rt");
    if (info == NULL) return;
    char *line = NULL;
    size_t linelen = 0;
	// ...irrelevant code skipped...
    while (getline (&line, &linelen, info) != -1) {
        // ...do stuff with the loop...
    }
    fclose(info); /* hangs here */
    free(line);
	// ...parse and set cpu_flags...
    cpu_flags = 1;
}

unsigned vlc_CPU(void) {
    static pthread_once_t once = PTHREAD_ONCE_INIT;
    pthread_once (&once, vlc_CPU_init);
    //vlc_CPU_init();
    return cpu_flags;
}

int main(void) {
    if(vlc_CPU() > 0)
        puts("Successful");
    else
        puts("Failure, or a.k.a. will never reach here");
    return 0;
}

Interestingly, after debugging there are two ways to workaround this bug:

  1. Comment out the fclose() on line 21 above, or
  2. Don’t run vlc_CPU_init() inside a thread – comment out line 29 and uncomment line 30 to run vlc_CPU_init() unthreaded.

Further research – “The stdio library uses locks internally” – yields that this may be a bug in bionic, Android’s own custom implementation of libc as well as pthreads. So far, the fact that fclose() works successfully if not run inside a pthread, as well as the knowledge that stdio has internal locks, may suggest a bug in the bionic implementation on Android 2.2 / 2.1 and below.

See also http://code.google.com/p/android/issues/detail?id=5116.

Topics: Linux | 1 Comment »

Enabling icons in Qt4 apps on GNOME / GTK

By admin | June 3, 2012

By default on the latest versions of Debian and Ubuntu, the gconf preferences “/desktop/gnome/interface/menus_have_icons” and “/desktop/gnome/interface/buttons_have_icons” are set to false by default. Despite this, GTK2 and GTK3 applications both display icons next to their menus by default. However, Qt4-based applications such as VLC media player don’t display icons. To fix this:

gconftool --type boolean --set /desktop/gnome/interface/buttons_have_icons true
gconftool --type boolean --set /desktop/gnome/interface/menus_have_icons true

Or, open gconf-editor and set both “/desktop/gnome/interface/menus_have_icons” and “/desktop/gnome/interface/buttons_have_icons” to true.

VLC before the menus_have_icons fix

VLC before the menus_have_icons fix

VLC after the menus_have_icons fix

VLC after the menus_have_icons fix

References

Topics: Linux | 6 Comments »

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles! « Older Entries Newer Entries »