From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex ter Weele Subject: Re: GTK applications crash on start Date: Sat, 03 Mar 2018 12:47:37 -0600 Message-ID: <87lgf9808m.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> References: <87fu5kcvpc.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> <87371icday.fsf@gnu.org> <87po4l80yb.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esCC7-0006XV-E7 for help-guix@gnu.org; Sat, 03 Mar 2018 13:47:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esCC4-0002iH-Al for help-guix@gnu.org; Sat, 03 Mar 2018 13:47:43 -0500 In-Reply-To: <87po4l80yb.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> (Alex ter Weele's message of "Sat, 03 Mar 2018 12:32:12 -0600") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Alex ter Weele Cc: help-guix@gnu.org Alex ter Weele writes: > > $ echo $LD_LIBRARY_PATH > > $ echo $LD_PRELOAD > /gnu/store/hfz0z0fs14jgl0kzk5hid2msr83lxii1-spectrwm-3.1.0/lib/libswmhack.so.0.0 > > That's weird, looks like my WM set LD_PRELOAD. I wouldn't have expected > that. And sure enough, with LD_PRELOAD unset: > > $ LD_PRELOAD= emacs -Q --eval "(kill-emacs)" > ...(GTK warnings omitted) > $ echo $? > 0 > > So why and how does spectrwm set LD_PRELOAD? I can't figure this out. OK, I figured it out: https://github.com/conformal/spectrwm/blob/SPECTRWM_3_1_0/spectrwm.c#L3764. Looks like it injects libswmhack.so so that it can intercept X events, e.g. https://github.com/conformal/spectrwm/blob/SPECTRWM_3_1_0/lib/swm_hack.c#L137