[Chinese-commits] [zhcon] 08/10: Document "adduser <user> video" to allow zhcon to start

Anthony Fok foka at debian.org
Thu Nov 19 13:24:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

foka pushed a commit to branch master
in repository zhcon.

commit 24e17720220b51f8721a834a0b9dc6d0e0c510df
Author: Anthony Fok <foka at debian.org>
Date:   Thu Nov 19 06:13:17 2015 -0700

    Document "adduser <user> video" to allow zhcon to start
---
 debian/README.Debian                               | 13 ++++++
 .../0013-adduser-to-video-group-message.patch      | 51 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 65 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
index 244f5cb..dd53244 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,5 +1,16 @@
 zhcon for Debian
 ----------------
+
+In order for zhcon for a normal (non-root) user, please add yourself
+to the "video" group, like this:
+
+    $ sudo adduser $(whoami) video
+
+Then, log out, and log back in, and zhcon should start for you!
+
+ -- Anthony Fok <foka at debian.org>  Thu, 19 Nov 2015 05:01:00 -0700
+
+
   zhcon needs FrameBuffer support enabled in Linux kernel. I have
 removed all debconf stuff because framebuffer is default for several
 years in Debian kernel and other major Linux distributions. If you
@@ -7,6 +18,7 @@ have a custom kernel, make sure you have the option enabled.
 
  -- Aron Xu <aron at debian.org>  Thu, 09 Jun 2011 17:24:01 +0800
 
+
   zhcon need the framebuffer support, so you must rebuild the kernel
 with the framebuffer options by yourself. ;-)
   You should set kernel "Code maturity level options" to " Prompt for 
@@ -18,6 +30,7 @@ start the new kernel. ;-)
 debian kernel packages. 
 
  -- Yu Guanghui <ygh at debian.org>, Thu, 23 Aug 2001 11:30:33 +0800
+
   
   zhcon can work without framebuffer, but I didn't fully test. ZNPY
 is the default input method now. If it doesn't work for you, please
diff --git a/debian/patches/0013-adduser-to-video-group-message.patch b/debian/patches/0013-adduser-to-video-group-message.patch
new file mode 100644
index 0000000..64d0250
--- /dev/null
+++ b/debian/patches/0013-adduser-to-video-group-message.patch
@@ -0,0 +1,51 @@
+Description: Tell user to join the "video" group so zhcon can start
+ in these days of modern hardware and modern Linux kernel,
+ the old warning message is obsolete and inaccurate.
+ Running "sudo adduser $(whoami) video" should fix the problem
+ for most end users.
+Author: Anthony Fok <foka at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-11-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/zhcon.cpp
++++ b/src/zhcon.cpp
+@@ -704,9 +704,23 @@
+     r = GraphDev::Open(xres, yres, depth);
+ #endif
+     if (!r)
+-        throw(runtime_error(
++        throw(runtime_error("\n"
++            "===============================================================================\n"
++            "ERROR: zhcon failed to start: Could not open framebuffer.\n"
++            "\n"
++            "Worry not, the fix is simple.  Run this command:\n"
++            "\n"
++            "    $ sudo adduser $(whoami) video\n"
++            "\n"
++            "Then, log out, and log back in, and run zhcon, and it should be up and running.\n"
++            "This command adds you, a normal (non-root) user, to the \"video\" group,\n"
++            "and allows zhcon to access the framebuffer device /dev/fb0.\n"
++            "\n"
++            "Good luck!\n"
++            "===============================================================================\n"
++            /*
+             "\n============== I'm really sorry, but... ================\n"
+-            "I can not open graphical device on this machine, this can happen when:\n"
++            "I cannot open graphical device on this machine, this can happen when:\n"
+             "1. your kernel does not have framebuffer device enabled, check the output from `dmesg|grep vesa`\n"
+             "2. you are running on a non-i386 machine so no VGA support\n"
+             "3. you are running under X-Window but libggi is not compiled in (required for running zhcon under X-Window)\n"
+@@ -714,9 +728,10 @@
+             "Don't be panic by this message, thousands of people have run zhcon successfully, surely you can!\n"
+             "I suggest you visit http://zhcon.sourceforge.net for more information, or send an email to zhcon-users at lists.sourceforge.net\n"
+             "I'm pretty sure your problem will be solved very quickly\n"
+-            "You can subscribe to the list on https:// lists.sourceforge.net/lists/listinfo/zhcon-users\n"
++            "You can subscribe to the list on https://lists.sourceforge.net/lists/listinfo/zhcon-users\n"
+             "\n"
+             "Good Luck!\n"
++            */
+             ));
+     gpScreen = GraphDev::mpGraphDev;
+     GraphDev::mBlankLineHeight = f.GetOption(string("blanklineheight"), 0);
diff --git a/debian/patches/series b/debian/patches/series
index 142ae3e..f425543 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 0010-install-fonts-and-ime-tables-to-usr-share.patch
 0011-winime-64bit-fix.patch
 0012-zhcon-conf-for-debian.patch
+0013-adduser-to-video-group-message.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/zhcon.git



More information about the Chinese-commits mailing list