From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 12:02:22 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFBCA16A4B3 for ; Thu, 18 Sep 2003 12:02:22 -0700 (PDT) Received: from priv-edtnes10-hme0.telusplanet.net (outbound02.telus.net [199.185.220.221]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B45543FCB for ; Thu, 18 Sep 2003 12:02:21 -0700 (PDT) (envelope-from cpressey@catseye.mine.nu) Received: from kallisti.ca ([207.81.23.108]) by priv-edtnes10-hme0.telusplanet.netSMTP <20030918190220.FUHQ17782.priv-edtnes10-hme0.telusplanet.net@kallisti.ca> for ; Thu, 18 Sep 2003 13:02:20 -0600 Date: Thu, 18 Sep 2003 12:04:53 -0700 From: Chris Pressey To: freebsd-questions@freebsd.org Message-Id: <20030918120453.2d558777.cpressey@catseye.mine.nu> In-Reply-To: <20030918110025.5b15edfa.cpressey@catseye.mine.nu> References: <20030918110025.5b15edfa.cpressey@catseye.mine.nu> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: svgalib program is setuid root but still can't seem to allocate graphics console X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 19:02:22 -0000 On Thu, 18 Sep 2003 11:00:25 -0700 Chris Pressey wrote: > Hi, > > I'm trying to write some code that uses /usr/ports/graphics/svgalib. > I've started off with the first example program on: > > http://www.svgalib.org/jay/beginners_guide/beginners_guide.html > > As root, I can compile and run it fine, and I get the message: > > [svgalib: allocated virtual console #10] > > And if I try to run it as a normal user, I get: > > svgalib: Cannot get I/O permissions. > > This is expected, because the program is not setuid root. So as root > I chmod u+s it, but then when I run it as a normal user I get: > > You must be the owner of the current console to use svgalib. > Not running in a graphics capable console, > and unable to find one. > Using RAGE driver, 8192KB. ChipID:35 MemType:6 > Rage: BIOS reports base frequency=28.636MHz Denominator= 31 > svgalib 1.4.3 > You must be the owner of the current console to use svgalib. > Not running in a graphics capable console, > and unable to find one. > Not running in a graphics capable console, > and unable to find one. > > This is on ttyv0, btw. I'm running X on ttyv9. Followup: this is happening not just with my own program, but with programs in the ports tree like /usr/ports/graphics/acidwarp and /usr/ports/graphics/seejpeg, on both of my FreeBSD machines: FreeBSD foo 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Thu Aug 28 11:26:32 CDT 2003 root@foo:/usr/obj/usr/src/sys/FOO i386 FreeBSD bar 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #3: Tue Sep 9 11:35:09 CDT 2003 root@bar:/usr/obj/usr/src/sys/BAR i386 Both machines contain this in their dmesg: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 But in short this doesn't feel like a video problem, it feels like a setuid-bit/svgalib/both problem. Is anyone else experiencing these sorts of problems? Was there some recent STABLE change regarding setuid/svgalib that I missed? -Chris