You are not logged in.

#1 2009-01-19 23:31:03

Duologic
Member
From: Belgium
Registered: 2007-11-11
Posts: 249

Links in framebuffer (directfb)

Finnaly got it working.
This was part of a project to build a nice OS without the need of X.
A webbrowser was kinda the main component.

Links can be compiled with a framebuffer component, so that would look extra nice.
I installed links-g in AUR. Ran it:

links -g -driver fb

This worked, but not as expected. The cursor would work right in any way, I configured gpm in many ways but no solution came up.

Next try was installing directfb from AUR
And I needed to edit the PKGBUILD from links-g for this: (I will post it to AUR)

# Contributor: Jeroen Op 't Eynde jeroen [at] xprsyrslf.be

pkgname=links-g-directfb
pkgver=2.2
pkgrel=1
pkgdesc="A text WWW browser, similar to Lynx, with framebuffer and X graphics enabled"
arch=('i686' 'x86_64')
url="http://links.twibright.com/"
license=('GPL')
conflicts=('links')
provides=('links')
depends=('directfb' 'gpm' 'libtiff' 'openssl' 'libpng' 'pcre' 'libx11' 'bzip2')
source=(http://links.twibright.com/download/links-$pkgver.tar.bz2)
md5sums=('bf5b20529a2a811701c5af52b28ebdd4')

build() {
  cd $startdir/src/links-$pkgver
  cd "intl" && ./gen-intl && cd .. || return 1
  ./configure --prefix=/usr --mandir=/usr/share/man --enable-javascript --enable-graphics --with-x \
              --with-fb --with-directfb 
  make || return 1
  make DESTDIR=$startdir/pkg install
}

As of following out of the DirectFB FAQ:

Whenever I try to start a DirectFB application, I get the error message "Error opening /dev/tty0"
The first DirectFB application that is started (the DirectFB master) needs root priviledges. The main reason is that only root is allowed to change virtual terminals. DirectFB slaves (all other apps started) can run as a normal user.

I used sudo to make this easy:

sudo links -g -driver directfb

I don't like doing this, because of the security risk.

I found something to fix this  but don't know how to apply it in Archlinux: http://ubuntuforums.org/showthread.php?t=453667
Maybe someone has some tips on udev permissions.
I've tried to put the givens rules into the xx-arch.rules, but no luck.

Next I came to execute links as root by default, I don't know how secure that is, but it feels more secure in some way.
I applied this:

chown root:root /usr/bin/links
chmod +s /usr/bin/links

source (at bottom): http://blog.chinaunix.net/u2/72217/showart_1085947.html

I'm still looking after a safer way, maybe someone got a fix for gpm or knows its way arround in udev permissions.

Offline

#2 2009-01-20 21:08:56

Duologic
Member
From: Belgium
Registered: 2007-11-11
Posts: 249

Re: Links in framebuffer (directfb)

I got it working, I added "-t imps2" to the arguments of gpm, and it fixed, maybe didn't look good enough, so now I'm running links -g in a non-root environment.
/etc/conf.d/gpm looks like this now:

GPM_ARGS="-m /dev/misc/psaux -t imps2 -r 30 -3"

Now I'm figuring out how to get the scroll wheel working with gpm. Anyone an idea?

Offline

Board footer

Powered by FluxBB