snap and /etc/termcap

Vasilisc vasilisc777 at gmail.com
Tue Nov 22 11:27:30 UTC 2016


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.
-- 
Best regards,
vasilisc




More information about the Snapcraft mailing list