snap and /etc/termcap

Didier Roche didrocks at ubuntu.com
Tue Nov 22 12:33:36 UTC 2016


Le 22/11/2016 à 12:27, Vasilisc a écrit :
> Guru, please help me.
> App in snap uses GTK/Perl/VTE (Terminal emulator widget - libvte9)
> In snapcraft.yaml
> ---
>  integration:
>   plugin: nil
>   stage-packages:
>    - libvte9
>    - libvte-common
>    - libvte-2.91-common
> ....
> ---
>
> VTE try open system file /etc/termcap and
> 1) if file not exist
> OR
> 2) if apparmor cannot allow access
>
> I got the problem
> "*** VTE ***: Failed to load terminal capabilities from '/etc/termcap
>
> I cannot press functional key, Enter ...
>
> I see in /var/log/syslog
> Nov 22 14:08:15 vb kernel: [16287.624094] audit: type=1400
> audit(1479812895.462:4889): apparmor="DENIED" operation="open"
> profile="snap.pac.pac" name="/etc/termcap" pid=13542 comm="pac"
> requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
>
> I found in source code vte
> http://packages.ubuntu.com/xenial/libvte9  ->
> http://archive.ubuntu.com/ubuntu/pool/main/v/vte/vte_0.28.2.orig.tar.xz
> ----
> commit 2b6cff9bfeb5ab13cc519abc45a15d9ad58948c0
> Author: Nalin Dahyabhai <nalin at src.gnome.org>
> Date:   Thu Aug 8 02:26:11 2002 +0000
>     * src/interpret.c: look for $pkgdatadir/termcap/$TERM first, as
> the widget does, before consulting /etc/termcap.
> -----
>
> But I do not understand what I should do
>
> In my wrapper script run.sh I tried redefine some variables, but
> problem still alive.
> --------------------------
> if [ ! -e "$SNAP_USER_DATA/.terminfo" ]; then
>     mkdir -p "$SNAP_USER_DATA/.terminfo"
>     export TERMINFO="$SNAP_USER_DATA/.terminfo"
>     export TERMINFO_DIRS="$SNAP_USER_DATA/.terminfo"
>     tic $SNAP/opt/pac/res/termcap
>     echo "export TERMINFO=$SNAP_USER_DATA/.terminfo" >
> "$SNAP_USER_DATA/.bashrc"
>     echo "export TERMINFO_DIRS=$SNAP_USER_DATA/.terminfo" >>
> "$SNAP_USER_DATA/.bashrc"
> fi
>
> export TERMINFO="$SNAP_USER_DATA/.terminfo"
> export TERMINFO_DIRS="$SNAP_USER_DATA/.terminfo"
> export TERMCAP="$SNAP/usr/share/terminfo/x/xterm+256color"
> -------------------
>
> Sorry for my english. Help me please.

Hey Vasilisc,

I don't think you can access to that file (see the denial preventing you
to access to it). This is linked the topic of having a terminal
interface (you will be blocked on other things anyway, like being unable
to launch other snaps, even in devmode.

Looking at
https://bugs.launchpad.net/snappy/+bugs?field.tag=snapd-interface, it
doesn't seem that anybody logged a bug for a terminal interface. Please
file one against this snappy launchpad project and tag it with
"snapd-interface".

Thanks!
Didier





More information about the Snapcraft mailing list