From owner-freebsd-questions@freebsd.org Thu Jul 28 15:16:24 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F3D6BA60EA for ; Thu, 28 Jul 2016 15:16:24 +0000 (UTC) (envelope-from thelostadmin@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 268871DFB for ; Thu, 28 Jul 2016 15:16:24 +0000 (UTC) (envelope-from thelostadmin@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id x1so65400874qkb.3 for ; Thu, 28 Jul 2016 08:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=5nDR8XY4t+sAq8CDcBrPmgDKza7H2T/8QskTFylHRYo=; b=YaejIQHsYalkd2bfCMb4ya7eZo5Garixdo0qIDos4rKs5LAWCx+dphz4LdjxmZtqPz ZSBSBrVVzEexCucCfk0QBdgRLA6+TfL+BV9aAoUcPIqwAJhNouplZuGbuP2UuT4rO+Nm myC7z1zk3/YsbXnALqlIsjVB1Hr3TLFAx0wu33LbRUdBcjy6sYICLA5lyd2nb/DktfMQ zxMEWT/8+pnixShc09e1mq4eXF12cxEMMVUnWpQgp2daXFkyKsgqJRb2m8/0+q0zASaO g+j5yp1C4hOGghcNiOFL/XEEKu157uq59w2B4NgTrscJSA0MsyU+8UyXu/ecOEBt9OhN Tjfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=5nDR8XY4t+sAq8CDcBrPmgDKza7H2T/8QskTFylHRYo=; b=gNyHad1e2QAOfZW+B3iDQdw5FJMN33Z0nV9Nu1zgxI7Cm/jWToLF8nt2ySBf/twimC DHBX8r58zyDc8gwWH9tElRRK0S0NATWeiyWkaK5w9slpYQJ8y6zpVm3Eht9ZKKklFnGr 2wusLFZTOqs0ql/uhD6n1r7QGsfo1C5W4p1tipcQcoNPVAan2MAqDarokauI93nhCGAG a8h+3lDoXzPub93fAkLqnuL3JcGbkjABSIAzgsQRD5UfAHwj0kVJUVm8n3viufLilRG+ a+7BNC87w79shxGu0a8GfbqPMymE9+exxFiWlRFXpm/Q3s8x0QK+GQTfPrCz16rskwCy YeLQ== X-Gm-Message-State: AEkoousEbbqnXuN7Rx3G1MtfmSd5dOBNxIXLuVzny/jQDkQh9x1/+xLW3N3mxdq3dSM/zA== X-Received: by 10.55.39.142 with SMTP id n136mr45426318qkn.149.1469718983287; Thu, 28 Jul 2016 08:16:23 -0700 (PDT) Received: from dhcp0.suntrap.ca (107-179-139-50.cpe.teksavvy.com. [107.179.139.50]) by smtp.gmail.com with ESMTPSA id r5sm293110qkf.34.2016.07.28.08.16.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jul 2016 08:16:22 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Using notify-send for notifications from cron-run scripts From: The Lost Admin In-Reply-To: <22638a43-6e29-c8ba-9535-decf2c436792@openmailbox.org> Date: Thu, 28 Jul 2016 11:16:21 -0400 Cc: "freebsd-questions@freebsd.org" Message-Id: <76DD0FF9-6518-4B60-9718-28495F038060@gmail.com> References: <22638a43-6e29-c8ba-9535-decf2c436792@openmailbox.org> To: twilight X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:16:24 -0000 Twilight, You probably need use xauth to export the X11 authentication cookie from = your user account to the root account. The Lost Admin thelostadmin@gmail.com > On Jul 22, 2016, at 3:41 PM, twilight = wrote: >=20 > Hello guys! >=20 > I'm trying to do some automation on my machine and I would like to = have > freebsd-update and portsnap ran weekly. I want to send a notification = to > my X session after completing the update fetch, that new updates are > available (updating automatically would not be desired as a good case > due to uncontrollable results). >=20 > But I've came across a problem: fetching fresh ports and freebsd = updates > requires the scripts to be ran from root, but in root session I'm = unable > to notify-send anything to my display. >=20 > I've tried to set `export DISPLAY=3D:0`, but that didn't work out. > Also I've tried to use `env DISPLAY=3D:0 su twilight -c 'notify-send > "...."'` but that didn't work out either. > Searching the net also lead me up to the same advances. >=20 > What am I doing wrong? I'd be very thankful for any advice >=20 >=20 > --=20 > Cheers~ >=20 > PGP key fingerprint: > 07B3 2177 3E27 BF41 DC65 CC95 BDA8 88F1 E9F9 CEEF >=20 > You can retrieve my public key at pgp.mit.edu. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"