Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write a python script that will launch alsamixer. alsamixer is a command-line application, that you typically launch by:

  1. Opening up a Terminal.
  2. Typing alsamixer.

I'm trying to make alsamixer something I can launch, so that after clicking it, it will launch a terminal with alsamixer already running before any physical interaction from me.

share|improve this question
    
GNOME, KDE or something else? – Michael Hampton Jul 14 '12 at 7:22
up vote 2 down vote accepted

You can launch an xterm which first runs a command via

xterm -e alsamixer

Armed with that knowledge you can easily make a script that launches the terminal:

echo '#!/usr/bin/env sh\n\nxterm -e alsamixer' > mixer ; chmod +x mixer

Move that script to your desktop or whatever. If you use a different terminal it might have different options, -e is fairly standard though.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .