From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: andres.ramirez Newsgroups: gmane.emacs.devel Subject: Re: Environment variables for remote processes Date: Wed, 19 Nov 2014 10:12:26 -0500 Message-ID: <87d28jteat.wl%andres.ramirez@kipuamutay.com> References: <030C5AEB-C009-4995-B153-6EECD44802C8@fb.com> <87y4rkhdt6.fsf@gmx.de> <87y4rf2jtx.fsf@gmx.de> <87r3x6eq8w.fsf@gmx.de> <87mw7rtnxg.fsf@gmx.de> <83a93rduz4.fsf@gnu.org> <87h9xxvf31.fsf_-_@gmx.de> <87mw7oe2y3.fsf@gmx.de> <87h9xwdvxx.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1416410110 21510 80.91.229.3 (19 Nov 2014 15:15:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2014 15:15:10 +0000 (UTC) Cc: Eli Zaretskii , dpittman@fb.com, Michael Albinus , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 19 16:15:04 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xr6yG-00049u-Hx for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2014 16:15:04 +0100 Original-Received: from localhost ([::1]:58961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr6yG-0005OO-15 for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2014 10:15:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr6y8-0005NW-TY for emacs-devel@gnu.org; Wed, 19 Nov 2014 10:15:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr6y4-0007Nq-Gs for emacs-devel@gnu.org; Wed, 19 Nov 2014 10:14:56 -0500 Original-Received: from mail-yh0-x234.google.com ([2607:f8b0:4002:c01::234]:44579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr6xz-0007ND-DX; Wed, 19 Nov 2014 10:14:47 -0500 Original-Received: by mail-yh0-f52.google.com with SMTP id z6so349927yhz.11 for ; Wed, 19 Nov 2014 07:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:message-id:from:to:cc:newsgroups:subject:in-reply-to :references:user-agent:mime-version:content-type; bh=oTjjXzYHVMVIlONbfKzRK3J5O+ax2KQ4Ty6Ed3WVCAk=; b=oseud5cPsMvjmoBZxAi3hIN47MX4yd4lG4J4Jt+Jz8Ac5nl9HYGmnWCGJgkD2Lo0Zr lWZhfC9UVUXIibvvtudyT1/50ITOhXwRdWbLxc3311H1Fu4l/9YMlHfpaGpKkod8gm2I Rg+dcSezsAaQGOE97ZbaNbcsarUFWczLKQ0O+XUvLhS9xIBnFQb8zwBYiDr6xKXrJWTj ZMT43SBV/zEK4C57nvuvs1vh5DSBOrpr/BXFnVT2O2lSAQt0bzt7Xa//N8xMFNKlWrE7 +xEEy6XyzbZL9zlJ4YolRMwWcYqR/2ugJal1RBA9TAUF4alWwGOsfBaUDvMasiel/N86 xeTA== X-Received: by 10.236.207.232 with SMTP id n68mr39706040yho.36.1416410086100; Wed, 19 Nov 2014 07:14:46 -0800 (PST) Original-Received: from tiahua.ryu.edu ([190.239.156.87]) by mx.google.com with ESMTPSA id g27sm1106425yhc.24.2014.11.19.07.14.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Nov 2014 07:14:45 -0800 (PST) Original-Newsgroups: gmane.emacs.devel In-Reply-To: X-Mailer: Wanderlust/2.15.9 X-Attribution: AR User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.0.50 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177757 Archived-At: Hi guys this is my case. I think it qualifies as as subprocess. I hope it helps to clarify some ideas: * how I start emacs It is started from a crontab and using daemon: @reboot emacs --quick --daemon ** Notice: known condition emacs daemon issue with gtk (this gtk bug have years ) http://bugzilla.gnome.org/show_bug.cgi?id=85715 * What's the problem with emacs started before X? no 'DBUS_SESSION_BUS_ADDRESS' and other variables. Test the condition with an external process notify-send (test the line below on eshell): notify-send 'wellcome' 'Visit kipuamutay' ** enviroment variables from emacs started on cron job (very short) COLUMNS=80 HOME=/home/aramirez LANG=en_US.UTF-8 LINES=34 LOGNAME=aramirez OLDPWD=/home/aramirez/downloads PATH=/usr/bin:/bin PWD=/home/aramirez SHELL=/bin/sh SHLVL=1 TERM=dumb USER=aramirez XAUTHORITY=/home/aramirez/.Xauthority _=/usr/bin/emacs ** enviroment variables from emacs started after X ANT_HOME=/usr/share/apache-ant CLASSPATH=/home/aramirez/GNUstep/Library/Libraries/Java:/usr/lib/GNUstep/Libraries/Java COLUMNS=80 DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uxYK2KP5AO,guid=bde80a1c96d99a424bfa48eb546cacf2 GUILE_LOAD_PATH=/home/aramirez/GNUstep/Library/Libraries/Guile:/usr/lib/GNUstep/Libraries/Guile HOME=/home/aramirez INFOPATH=/usr/share/info::/home/aramirez/GNUstep/Library/Documentation/info: LANG=en_US.UTF-8 LC_COLLATE=C LD_LIBRARY_PATH=/home/aramirez/GNUstep/Library/Libraries:/usr/lib LIBRARY_COMBO=gnu-gnu-gnu LINES=34 LOGNAME=aramirez MAIL=/var/spool/mail/aramirez MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins OLDPWD=/home/aramirez/downloads PATH=/home/aramirez/GNUstep/Tools:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/local/bin:/home/aramirez/bin:/usr/local/bin:/home/aramirez/bin PWD=/home/aramirez SHELL=/bin/bash SHLVL=5 TERM=dumb USER=aramirez WINDOWID=14680098 WINDOWPATH=1 XAUTHORITY=/home/aramirez/.Xauthority XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SESSION_ID=c1 XDG_VTNR=1 XTERM_LOCALE=en_US.UTF-8 XTERM_SHELL=/bin/bash XTERM_VERSION=XTerm(312) _=/usr/bin/emacs * CONCLUSION: In this particular case. It should be possible to add the necessary environment variables for notify-send to work. (dbus-init-bus my-dbus-address) is not enough ** This could be unrelated to this thread, but related to this case;when emacs is started from a cron job before X: gnupg validation is not possible *** issue with this when restarting emacs remotely (GPG developers and the gui-popup 4 requesting the passphrase), when no X then no popup :( http://permalink.gmane.org/gmane.emacs.devel/169412 Best Regards