Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install run-in-gui

How to install run-in-gui

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install run-in-gui
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
1.1.3
1.1.3 Available View build log
1.1.3
1.1.3 Available View build log
 
License
GPL
Imports
Lastest release
version 0.0.1 on Jan 9th, 2014
Donate to support this free software |

System Message: WARNING/2 (<string>, line 5)

Line block ends without a blank line.

|:------------------------------------:| | <img width="164" height="164" title="" alt="" src="doc/bitcoin.png" /> | | [1DmVQkuY1zjP6ZiPi1QJgSowHtR8afBDMS](bitcoin:1DmVQkuY1zjP6ZiPi1QJgSowHtR8afBDMS) |

This project contains two programs that assist you in executing programs in a separate desktop session (defined by the environment variables of any program executing in that session), and then switching to the session in real-time as the program executes. It's useful to start GUI programs from cron that need a graphical display and/or audio access.

Why is this useful? Because of the way that Linux has evolved, nowadays it's very hard to get certain computer programs to do things that were trivial in the past. For example: getting your music player to play a list of songs to wake you up -- unless you're running the program straight from the GUI, it won't actually work; either the program just won't run, or the audio will be corked.

Caveat: this program still requires you to be logged in.

Tools included in this set

This package contains several tools:

  1. run-in-env-of: a tool that runs the command of your choice in the

    environment of the PID of your choice. If run as root, it can

    System Message: WARNING/2 (<string>, line 31)

    Definition list ends without a blank line; unexpected unindent.

    setuid() to the user and group of that PID.

  2. run-in-gui: a tool that sorts out a desktop session you're running then uses run-in-env-of to execute the command on your choice under that desktop session. Prior to the execution of that program, it switches to the selected desktop session, to enable hardware access to devices that would otherwise be blocked (e.g. audio).

What you need to have before using this package

  • Python 2.7 on your local machine
  • loginctl fully operational
  • /proc mounted

Installation

You will need to install this package on your local machine.

You can install this package directly from PyPI using pip:

pip install run-in-gui

If you are on an RPM-based distribution, build an RPM from the source package and install the resulting RPM:

python setup.py bdist_rpm

Otherwise, just use the standard Python installation system:

python setup.py install

You can also run it directly from the unpacked source directory:

export PYTHONPATH="$PWD"/src
./<program> <parameters>

Usage

Say, for example, you want to run Amarok from a crontab, but you want Amarok to start on your logged-in desktop session. No problem: you can stick this into your crontab:

20 4 * * * /usr/local/run-in-gui/bin/run-in-gui amarok -p Tokeup.m3u

As you can see, at exactly 4:20 AM, Amarok will be executed in your desktop session, and will start playing the playlist Toke up.m3u in your home directory.

You can also do the exact same thing from an at job:

echo /path/to/run-in-gui amarok -p Matanga.m3u | at 5:45

If, for some reason, the program won't start, check your mail folder in /var/mail/$USERNAME, where cron traditionally deposits crontab output.

Docutils System Messages

System Message: ERROR/3 (<string>, line 5); backlink

Undefined substitution referenced: ":------------------------------------:".

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.