Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
key & mouse stroke GUI monitoring [Solved [out of portage]]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1125

PostPosted: Mon Oct 08, 2018 7:10 pm    Post subject: key & mouse stroke GUI monitoring [Solved [out of porta Reply with quote

Hi,
How to have nice looking key (and maybe mouse... ) strokes echoed on x11 screen, for educational perposes, screencasts, etc ?
Seems like google's 'key-mon ' isn"t avaiable, or failed overlay digest after imported in /usr/local/portage...
Any idea?

Thks 4 ur attention.


Last edited by CaptainBlood on Mon Oct 08, 2018 11:45 pm; edited 3 times in total
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1125

PostPosted: Mon Oct 08, 2018 8:57 pm    Post subject: Reply with quote

Code:
cat key-mon-1.17.ebuild
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

PYTHON_DEPEND="2"

inherit python eutils fdo-mime

DESCRIPTION="Keyboard Status Monitor"
HOMEPAGE="https://code.google.com/p/key-mon/"
SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
   gnome-base/librsvg
   dev-python/pygtk:2
   dev-python/python-xlib
   x11-proto/recordproto
   x11-libs/gtk+"
RDEPEND="${DEPEND}"

pkg_setup() {
   python_set_active_version 2
   python_pkg_setup
}

src_prepare() {
   python_convert_shebangs 2 src/${PN}
   python_convert_shebangs 2 src/keymon/*.py
}

src_install() {

   insinto /usr/share/${PN}
   doins -r src/*
   fperms 755 /usr/share/${PN}/${PN}
   dosym /usr/share/${PN}/${PN} /usr/bin/${PN}
   doman man/${PN}.1
   newdoc README.rst README
   domenu icons/${PN}.desktop

   insinto /usr/share/mime/packages/
   doins icons/${PN}.xpm
}

pkg_postinst() {
   fdo-mime_mime_database_update
   fdo-mime_desktop_database_update
}

pkg_postrm() {
   fdo-mime_mime_database_update
   fdo-mime_desktop_database_update
}# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

PYTHON_DEPEND="2"

inherit python eutils fdo-mime

DESCRIPTION="Keyboard Status Monitor"
HOMEPAGE="https://code.google.com/p/key-mon/"
SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
   gnome-base/librsvg
   dev-python/pygtk:2
   dev-python/python-xlib
   x11-proto/recordproto
   x11-libs/gtk+"
RDEPEND="${DEPEND}"

pkg_setup() {
   python_set_active_version 2
   python_pkg_setup
}

src_prepare() {
   python_convert_shebangs 2 src/${PN}
   python_convert_shebangs 2 src/keymon/*.py
}

src_install() {

   insinto /usr/share/${PN}
   doins -r src/*
   fperms 755 /usr/share/${PN}/${PN}
   dosym /usr/share/${PN}/${PN} /usr/bin/${PN}
   doman man/${PN}.1
   newdoc README.rst README
   domenu icons/${PN}.desktop

   insinto /usr/share/mime/packages/
   doins icons/${PN}.xpm
}

pkg_postinst() {
   fdo-mime_mime_database_update
   fdo-mime_desktop_database_update
}

pkg_postrm() {
   fdo-mime_mime_database_update
   fdo-mime_desktop_database_update
}
Trying to digest leads to:
Code:
ls; ebuild * digest
key-mon-1.17.ebuild
Unable to unshare: EINVAL
 * ERROR: dev-python/key-mon-1.17::x-portage failed (depend phase):
 *   python.eclass could not be found by inherit()
 *
 * Call stack:
 *             ebuild.sh, line 635:  Called source '/usr/local/portage/dev-python/key-mon/key-mon-1.17.ebuild'
 *   key-mon-1.17.ebuild, line   9:  Called inherit 'python' 'eutils' 'fdo-mime'
 *             ebuild.sh, line 300:  Called die
 * The specific snippet of code:
 *         [[ -z ${location} ]] && die "${1}.eclass could not be found by inherit()"
I know nothing about writing ebuild, but I have a feeling and hope this one could be not to difficult for some of you who dare to share...

Thks 4 ur attention, interest & support
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1125

PostPosted: Mon Oct 08, 2018 11:27 pm    Post subject: Reply with quote

I've ended up by dowloading and installing
Code:
https://github.com/derRaphael/Screen-Key-Mon
Does keyboard & mouse, has settings, themes, seems compton compatible
Works almost fine, but mouse select doesn't work as the focus changes window within the process.

Can't compare with others alike though (screenkey key-mon)
key-mon seems to have a debian package but I don't know if it's easily installable as such on gentoo.

Installed following the README:
Had 2 install python-xlib.
Guess gentoo's pygtk ebuild matches requested python-gtk2, so no install in this respect.
To install I had 2 switch default python to 2_7, as it was defaulred to 3_6
Quick & dirty desktop file
Code:
cat ./.local/share/applications/screenkeymon.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Screen Key Mon
GenericName=Screen Key Monitor
Comment=Monitoring Key & Mouse Strokes
Categories=Utility;
TryExec=bash
Exec=bash -c 'screen-key-mon'
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1125

PostPosted: Mon Oct 08, 2018 11:47 pm    Post subject: Reply with quote

Alternate proposals are more than welcome...

Thks 4 ur attention.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum