Your message dated Sun, 25 Apr 2010 16:39:09 +0200
with message-id <[email protected]>
and subject line Closing
has caused the Debian Bug report #515796,
regarding acpi-support: videobtn.sh: optionally run a graphical UI to RandR
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
515796: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515796
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: acpi-support
Version: 0.109-11
Severity: wishlist
Tags: patch

Hi,

videobtn.sh currently runs acpi_fakekey to generate
a $KEY_VIDEOOUT X event. I'd like it to run a RandR GUI (e.g. grandr),
which would, I believe, enhance the desktop user's experience in
most cases.

The attached patch achieves so, by adding a USE_RANDR_UI to
/etc/default/acpi-support. For backward compatibility's sake,
this option is disabled by default.

Unless the preferred UI software is explicitly set in
/etc/default/acpi-support, a sensible one is guessed at runtime.

Bye,
--
   <[email protected]>
  | gnupg key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | Do not be trapped by the need to achieve anything.
  | This way, you achieve everything.

>From fd18efb3804d409ee2702349edc7111b35cd21bb Mon Sep 17 00:00:00 2001
From: intrigeri <[email protected]>
Date: Tue, 17 Feb 2009 18:39:36 +0100
Subject: [PATCH] /etc/acpi/videobtn.sh: optionally run a graphical UI to RandR

... if USE_RANDR_UI is enabled in /etc/default/acpi-support. Unless the
preferred UI software is configured in /etc/default/acpi-support, a sensible one
is guessed at runtime.
---
 acpi-support     |    7 +++++++
 debian/changelog |    9 +++++++++
 videobtn.sh      |   21 ++++++++++++++++++++-
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/acpi-support b/acpi-support
index e6faffb..b176a98 100644
--- a/acpi-support
+++ b/acpi-support
@@ -138,6 +138,13 @@ RESTART_IRDA=false
 # a prefix given in this list is skipped)
 SKIP_INTERFACES="dummy qemu"
 
+# Uncomment this line to have a RandR GUI run when the video button is pressed
+# USE_RANDR_UI=true
+
+# Path to your preferred RandR graphical frontend - guessed if not specified
+# RANDR_UI=/usr/bin/grandr
+
+
 # Note: to enable "laptop mode" (to spin down your hard drive for longer
 # periods of time), install the laptop-mode-tools package and configure
 # it in /etc/laptop-mode/laptop-mode.conf. 
diff --git a/debian/changelog b/debian/changelog
index efddd5e..7861c3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+acpi-support (0.109-11+intri2) unstable; urgency=low
+
+  * /etc/acpi/videobtn.sh: run a graphical UI to RandR if USE_RANDR_UI is
+    enabled in /etc/default/acpi-support. Unless the preferred UI software
+    is configured in /etc/default/acpi-support, a sensible one is guessed
+    at runtime.
+
+ -- intrigeri <[email protected]>  Tue, 17 Feb 2009 18:24:49 +0100
+
 acpi-support (0.109-11+intri1) unstable; urgency=low
 
   * /etc/acpi/events/ibm-videobtn: run /etc/acpi/videobtn.sh, as do
diff --git a/videobtn.sh b/videobtn.sh
index ab5e548..3ce8a27 100644
--- a/videobtn.sh
+++ b/videobtn.sh
@@ -1,5 +1,24 @@
 #!/bin/sh
 [ -f /usr/share/acpi-support/key-constants ] || exit 0
 
+. /etc/default/acpi-support
 . /usr/share/acpi-support/key-constants
-acpi_fakekey $KEY_VIDEOOUT
+
+if [ "$USE_RANDR_UI" = true ]; then
+   getXconsole;
+   if [ x"$XAUTHORITY" != x"" ]; then
+      export DISPLAY=":$displaynum"
+      if [ -z "$RANDR_UI" ]; then
+	 if [ -x /usr/bin/grandr ]; then
+	    RANDR_UI=/usr/bin/grandr
+	 elif [ -x /usr/bin/arandr ]; then
+	    RANDR_UI=/usr/bin/arandr
+	 fi
+      fi
+      if [ -n "$RANDR_UI" -a -x "$RANDR_UI" ]; then
+	 su $XUSER -c "$RANDR_UI"
+      fi
+   fi
+else
+   acpi_fakekey $KEY_VIDEOOUT
+fi
-- 
1.5.6.5


--- End Message ---
--- Begin Message ---
I close these bugs in an effort to clean up because they are wontfix anyway.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ 179140304, AIM/Yahoo/Skype michaelmeskes, Jabber [email protected]
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


--- End Message ---

Reply via email to