Links browser requires suid in VGA mode

Bug #234717 reported by Philip Ganchev
8
Affects Status Importance Assigned to Milestone
links2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: links2

Running "links2 -g" in the Linux console fails with the error message "svgalib: cannot get I/O permissions". As I understand, this is because programs that use vgalib require suid privileges. The file should be given suid privileges:

sudo u+s $(which links2)

The file should have these privileges by default - that should be done by the distribution.

Description: Ubuntu 7.04
Release: 7.04

links2 2.1pre26-4build1

Revision history for this message
Lenin (gagarin) wrote :

i disagree, but it's described in README.Debian in the docs.

Revision history for this message
Peter Garrett (peter-garrett) wrote :

Actually the solution given in README.Debian is not strictly necessary, and is probably a Bad Idea.

You can do something like this:

In

/etc/udev/rules.d/40-permissions.rules

 (For example, setting user "foo" as a member of group "tty" and
 making devices writable by that group as follows:

 KERNEL=="mice" GROUP="tty", MODE="0660"
 KERNEL=="tty[0-9]*" GROUP="tty", MODE="0660"
 KERNEL=="fb0" GROUP="tty", MODE="0660" )

Unfortunately, although this enables links2 -g with directfb *from a command prompt*, it will still
fail when called *from a bash script* . This is an issue if for example you have set up a menu using bash
along the lines of

read -s -n 1
      case $REPLY in
                  1)
                   links2 -g http://google.com
                   menu
                   ;;
                   2)
                   elinks http://google.com
                   menu
. ;;
                    *)
                    menu
                    ;;
esac

Where "menu" is a function, and so on.

links2 -g -driver fb <some_url_here>

*will* run from such a script/menu , but the mouse loses the directfb feature of enabling the scroll wheel,
and the "fb" driver is slow, with the mouse pointer far less responsive.

A solution to the "Won't run from a script" issue would be appreciated, if such a solution exists...
I need this for a live CD without X that uses menus etc....

Revision history for this message
Peter Garrett (peter-garrett) wrote :

Please ignore the obvious syntax error in the "case" statement of my comment above :)

Revision history for this message
Peter Garrett (peter-garrett) wrote :

I attach a hack used in conjunction with the comments and code above.

This scriptlet enables 'xlinks2' (links2 -g) to run from a script (in my case normally from bash menus), without X, with directfb, and without using suid root on the links2 binary.

It requires having the user as a member of the group used as above. (Say tty, or video).
In Ubuntu Hardy for some reason the permissions on /dev/tty0 are changed during boot, presumably by configuration changes in some package that I have not identified. A work-around for this is to place this in /etc/rc.local :

chown root:video /dev/tty0 (if the group chosen is 'video')

The script uses a background loop and job control to return the user to the parent menu on quit from xlinks2.

Revision history for this message
David Ring (n1ea) wrote :

It would be wonderful if this program worked in graphics mode. I run it and it says "graphics not enabled when compiling". I tried adding libs but finally got stuck when it said libvga needed and we have libvga installed. This is a great program. Lightning fast.

Revision history for this message
Lenin (gagarin) wrote :

lightning fast indeed, but without css. i switched to chromium-browser as fast but with beautiful webkit rendering...

Revision history for this message
David Ring (n1ea) wrote : Re: [Bug 234717] Re: Links browser requires suid in VGA mode

Lightning fast is chromium-browser - but link2 -g works in graphics mode in
the terminal.

Try that with chromium.

On Tue, May 4, 2010 at 9:44 AM, Gürkan Sengün <email address hidden> wrote:

> lightning fast indeed, but without css. i switched to chromium-browser
> as fast but with beautiful webkit rendering...
>
> --
> Links browser requires suid in VGA mode
> https://bugs.launchpad.net/bugs/234717
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “links2” package in Ubuntu: New
>
> Bug description:
> Binary package hint: links2
>
> Running "links2 -g" in the Linux console fails with the error message
> "svgalib: cannot get I/O permissions". As I understand, this is because
> programs that use vgalib require suid privileges. The file should be given
> suid privileges:
>
> sudo u+s $(which links2)
>
> The file should have these privileges by default - that should be done by
> the distribution.
>
> Description: Ubuntu 7.04
> Release: 7.04
>
> links2 2.1pre26-4build1
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/links2/+bug/234717/+subscribe
>

Revision history for this message
Axel Beckert (xtaran) wrote :

A fix has been uploaded to Debian (as 2.7-2) by removing SVGA (svgalib/libsvga) support completely, as svgalib is about to be removed from Debian and likely from Ubuntu, too.

Changed in links2 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package links2 - 2.7-2ubuntu1

---------------
links2 (2.7-2ubuntu1) saucy; urgency=low

  * Resynchronise with Debian (LP: #234717). Remaining changes:
    - Build-depend on libtiff-dev rather than libtiff4-dev.
 -- Colin Watson <email address hidden> Thu, 06 Jun 2013 16:40:35 +0100

Changed in links2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.