jaromil / hasciicam

(h)ascii for the masses! html refreshed ascii video cam
GNU General Public License v2.0
87 stars 9 forks source link

Only using sudo #6

Closed alcir closed 5 years ago

alcir commented 5 years ago

I'm able to compile it, and it works without any issue, only if I use sudo. Otherwise I get

hasciicam 1.3 - (h)ascii 4 the masses! - http://ascii.dyne.org
(c)2000-2014 by Jaromil @ RASTASOFT

Device detected is /dev/video0
Card name: Integrated_Webcam_HD: Integrate
Current input is Camera 1
Current capture is 640 x 480
format YUYV, 1280 bytes-per-line
Grey buffer is 38400 bytes
Ascii size is 160x60
using LIVE mode

X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  45 (X_OpenFont)
  Serial number of failed request:  7
  Current serial number in output stream:  8

Why?

jaromil commented 5 years ago

Because the user running hasciicam needs to have read access on /dev/video* or be part of the 'video' group in some distros.

ktx-git commented 4 years ago

Hi ! I have the same issue on ArchLinux x86_64:

My hasciicam release is taken from https://aur.archlinux.org/packages/hasciicam/

ldd /usr/bin/hasciicam linux-vdso.so.1 (0x00007ffc4e7fd000) libaa.so.1 => /usr/lib/libaa.so.1 (0x00007fc057637000) libc.so.6 => /usr/lib/libc.so.6 (0x00007fc057470000) libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fc0573ff000) libm.so.6 => /usr/lib/libm.so.6 (0x00007fc0572ba000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fc057179000) libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00007fc057171000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fc05768a000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fc057145000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fc05713f000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fc05713a000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fc057132000)

the PKGBUILD say:

Maintainer: Steffen Weber <-boenki-gmx-de->

Contributor: schuay jakob.gruber@gmail.com

Contributor: rennero rennero@bastardi.net

pkgname=hasciicam pkgver=1.3 pkgrel=2 pkgdesc="Renders video input as ascii (to the terminal, textfile, or live webpage)" url="http://ascii.dyne.org/" depends=('aalib' 'libv4l') arch=('i686' 'x8664') source=("https://files.dyne.org/$pkgname/${pkgname}$pkgver.tar.gz") md5sums=('4d77c6a4cf6e2b1474d5fec0ff450b80') license=('GPL3')

build() { cd ${pkgname}_$pkgver ./configure --prefix="$pkgdir/usr" --mandir="$pkgdir/usr/share/man" make }

package() { cd ${pkgname}_$pkgver make install

cd "$pkgdir/usr/share" mv icons pixmaps rm -r menu }