Skip to main content

Taskbar app displaying the remaining play time of users monitored by LittleBrother

Project description

LittleBrotherTaskbar-Logo

Taskbar Tray Application for LittleBrother

Overview

LittleBrotherTaskbar is a simple application which can be installed into the tray of the window manager to display the remaining play time of the current user.

Contact

The taskbar does not have a homepage of its own. It is sharing LittleBrother's homepage. Visit the project at Facebook or write comments to little-brother(at)web.de.

Screenshots

The following screenshots show the display of LittleBrotherTaskbar when optional play time is not active.

Screenshot Status Screenshot Status Screenshot Status

These are the corresponding screenhots when optional play time is active.

Screenshot Status Screenshot Status

Change History

See here

GitHub Status

Continuous Integration Status Overview

Status Master Release
CircleCI
Test Coverage
Snyk Vulnerability Known Vulnerabilities not available
Snyk Package Health not available little-brother-taskbar
Codacy Code Quality not available
Code Climate not available

Note: The vulnerability status is derived from the Python PIP packages found in requirements.txt.

Features

LittleBrotherTaskbar has the following features:

  • Shows the status (remaining play time) of a user monitored by LittleBrother on Linux and Windows systems.

  • Plays spoken notifications about the status:

    • Session length upon login
    • Reason why login is denied
    • Warnings about impending logout
    • Reason why user will be logged out
  • As of version 0.1.18 (see feature issue):

    • Shows the remaining "optional time" that a user can use to extend her time
    • Provides buttons to extend the session time (that is to request a time extension)

Prerequisites

LittleBrotherTaskbar requires an active installation of LittleBrother. The taskbar client will contact the master process of LittleBrother. Also, some Linux packages have to be installed to enable the compilation of the Python PIP package wxPython. See the installation instructions below.

In case you want to use the MP3 speech generation for notification messages you have to install the PIP package python-google-speak.

Tested Distributions

Distribution Version Comments Most Recent Test
Debian testing 15.AUG.2021
Ubuntu 19.3 08.AUG.2020

Quick Install

This guide will take you through the steps required to install, configure, and run the LittleBrotherTaskbar application on your system.

YouTube Video

little-brother-0_3_1

There are more videos related to LittleBrother and LittleBrotherTaskbar available at the LittleBrother homepage.

Install the Software

LittleBrotherTaskbar is available as a Python3 PIP package. Make sure you have the Debian packages

  • libgtk-3-dev
  • libpulse-dev

installed on your system. Also, the required library wxPython cannot be compiled successfully with some versions of the setuptools. Version 40.8.0 seems to work fine. Issue

pip3 install setuptools==40.8.0

to install exactly this version. Then type

pip3 install little-brother-taskbar

to install the latest version of the taskbar. If you want to install a specific version use

pip3 install little-brother-taskbar==[VERSION]

instead with [VERSION] replaced by the specific version.

Note: Compiling the wxPython library takes a LONG time. Depending on the speed of your system, compilation times of up to 15 minutes are not unusual. So, please, be patient!

Speech Generation and Output

In order to use the speech generation for notification messages, issue the command

pip3 install python-google-speak 

and use the --speech-engine command line option (see below). Also, install the Debian package mpg123:

apt-get install mpg123

Configure the Software

In its simplest setting the tool just needs to be started with the URL of the LittleBrother master API, e.g.

run_little_brother_taskbar --server-url=http://[HOSTNAME]:[PORT]

with [HOSTNAME] being the host where the LittleBrother master process is running and [PORT] being its port.

Extended Command Line Configuration

The tool recognizes the following extra options:

  • --username [NAME]: Set the username to [NAME]. If the option is not given the tool will try to derive the login name from the environment variable USER. If no user can be found, the tool will fail.

  • --locale [LOCALE]: Set the locale to [LOCALE], e.g. en_US. Note that this locale is only used until the taskbar receives the first status from the LittleBrother master since status contains the locale configured for the user.

  • --config [FILENAME]: Read the configuration file [FILENAME]. If this option is not given the tool will try to read the file ~/.config/LittleBrotherTaskbar.conf. See this file for an example.

  • --loglevel [LEVEL]: Set the log level to DEBUG, INFO, WARNING, or ERROR.

  • --speech-engine [ENGINE]: Activate and select the speech engine to speak messages for the monitored user. Possible values for [ENGINE] are: google (preferred; which requires PIP package python-google-speak) or external (which requires the Debian package festival and possibly some more configuration)

Installing LittleBrotherTaskbar as a StartUp Application

Once you have succeeded starting the tool on the command line (see above) it makes sense to install the tool as a startup application in your desktop environment. Most environments allow you to configure the applications which are automatically started upon logging into the desktop. Below you will find screenshots to guide you through the installation on a 19.3 Ubuntu system using the Mate Desktop.

  • From the main menu choose the entry Control Center. In the upcoming window click on Startup Applications.

    Startup Applications Step 1

  • Click on Add and enter your statement into the Command field. Chose a name and optionally set a comment.

    Startup Applications Step 2

  • Click on Add+ and and on Close.

  • Logout out of the desktop and login in again to test. If successful you should see the LittleTaskBar icon in the tray.

    Startup Applications Step 3

Installing LittleBrotherTaskbar on a Windows System

On a Windows system some additional configuration needs to be done most of which relates to the audio playback. Since the tool mpg123 is not available and the default Windows Media player is a little difficult to handle from the command line it is recommended to install the media player vlc.

Configuration of the video player

If the file %userprofile/.config/LittleBrotherTaskbar.conf does not exist yet, create it with a text editor and add the following lines:

[AudioHandler]
audio_player=mpg123
mpg123_binary=C:\Program Files\VLC Plus Player\vlc.exe
play_command_pattern={binary} --intf dummy {filename}

We are abusing the mpg123 driver to configure the vlc binary. The path in mpg123_binary may have to be adapted to your specific installation of vlc. The option --intf dummy will force vlc to start without a GUI frontend.

Choosing the Python version

As of June 2022, the module wxPython is only available as a pre-compiled package for Python 3.9 and older. On a Python 3.10 system you will have to compile the module yourself which can be a real nuisance on any system and is definitely so on Windows. So, if you do not have any other need for a Python 3.10 interpreter it is strongly recommended to use Python 3.9.

Troubleshooting

So, you went through all of the above but LittleBrotherTaskbar does not seem to work? Maybe this troubleshooting page can help you.

Configuration

Most settings of the application can be configured using the configuration dialog which reached using the right mouse click on the tray icon:

Configuration Dialog Configuration Dialog Configuration Dialog Configuration Dialog

The configuration will be saved to (and subsequently loaded from) the file ~/.config/LittleBrotherTaskbar.conf.

Caveats

Issue Lists

The application LittleBrotherTaskbar is far from perfect. Issues are listed on GitHub (see here). Feel free to open new issues if you have any trouble with installing and/or running the application.

Missing Tray Icon on Modern Desktops (e.g. Gnome)

The application little_brother_taskbar uses the wxPython package to interact with the XWindows system including the system tray functionality. Unfortunately, the specification for the latter varies across the windows managers and their versions. In modern versions of Gnome, for example, the tray icons provided by wxPython are no longer supported. However, there is a Gnome extension called TopIcons Plus which can be installed using a Debian package which shows all "old-fashioned" tray icons in the modern Gnome toolbar at the top of the screen.

Follow these steps:

  • As root open a shell and install the extension:

    apt-get install gnome-shell-extension-top-icons-plus
    
  • Log out of the X session.

  • Log into a new X session as the monitored user using the Gnome Desktop.

  • Verify that there is at least the Little-Brother icon visible in the top center toolbar.

This extension may actually make other icons of installed applications visible which are using the old tray API. Be prepared for a surprise.

Internationalization

The application uses the PIP package Flask-Babel to provide internationalization for the web frontend, Currently, the following languages are supported/prepared (in the order they were made available):

Flag Language Locale Status Translation provided by
Flag USA English en Up-to-date Marcus Rickert
Flag Germany German de Up-to-date Marcus Rickert
Flag Italy Italian it Up-to-date Albano Battistella
Flag Netherlands Dutch nl 0.1.10 Simone & Lex
Flag Finland Finnish fi 0.1.10 Iisakki Kosonen
Flag Turkey Turkish tr 0.1.10 Selay Dogan
Flag Russia Russian ru 0.1.10 J. Moldawski
Flag Japan Japanese ja 0.1.10 Arik M.
Flag Bangladesh Bangla bn 0.1.10 Rownak Jyoti Zaman
Flag France French fr 0.1.11 Albano Battistella
Flag Thailand Thai th 0.1.10 Busaba Kramer
Flag Spain Spanish es 0.1.10 Ruth Wucherpfennig-Krömer
Flag Lithuania Lithuanian lt In preparation N.N.
Flag Croatia Croatian hr In preparation N.N.

Note that the spoken messages are provided by the LittleBrother master process. Check here for the availability of desired foreign language.

Sample Screenshots

Screenshot Status in Italian Screenshot Status in Finnish Screenshot Status in Turkish Screenshot Status in Russian Screenshot Status in Japanese Screenshot Status in Bangla Screenshot Status in French Screenshot Status in Thai Screenshot Status in Danish Screenshot Status in Spanish

Sample Speech Audio Files

Your help with translations is greatly appreciated. Please, contact the author if you are interested in providing a translation. You do not necessarily have to clone this repository or be familiar with Python to do so.

Credits

  • Thanks to all the people maintaining the wonderful script language Python and the libraries on PyPi.

  • The country flags were taken from www.countryflags.com.

  • See the section about on internalization for credits regarding the translations.

  • The site www.mehr-schulferien.de maintains the vacation metadata for Germany.

  • The configuration dialog was generated using wxGlade.

  • People contributing by providing pull requests:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

little-brother-taskbar-0.1.23.tar.gz (72.6 kB view details)

Uploaded Source

File details

Details for the file little-brother-taskbar-0.1.23.tar.gz.

File metadata

File hashes

Hashes for little-brother-taskbar-0.1.23.tar.gz
Algorithm Hash digest
SHA256 005f1135b2f5a08f2a1901c84a3f04e2292eb64fa0dc4cb5c54578fd064f4385
MD5 cfb7594c23be23b380ee6a91258cd97d
BLAKE2b-256 4517fc705a3ba711ad0d1587c315338c0b84edbafc21d384718dc4cecd0af905

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page