aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/terminal.py
AgeCommit message (Collapse)Author
2016-02-13lib/oe/terminal: set workdir for konsole terminalPascal Bach
It seems that if the --workdir option is not set konsole does open in the users home directory. By setting --workdir . konsole opens in the recipes work directory. This is the same behavior as observed for other consoles. (Tested with Konsole 2.14.2 on Debian Jessie). Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01lib/oe/terminal: use C locale when determining versionDariusz Pelowski
Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-25terminal: Open a new window instead of split on older tmux versions (<1.9)Leonardo Sandoval
If an old version is detected (<1.9), create a new window instead of split: the reason is that there is no easy way to get the active pane height if no nested formats are supported. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-26terminal.py: Allow devshell/menuconfig on recent gnome-terminalLeonardo Sandoval
Recent versions of gnome-terminal does not support non-UTF8 charset: https://bugzilla.gnome.org/show_bug.cgi?id=732127 as a result, devshell and menuconfig tasks silently hang (error found on trace log of 'strace -f -v -s 8192 -e write=2 bitbake -c devshell quilt-native': "Non UTF-8 locale (ANSI_X3.4-1968) is not supported!"). As a workaround, clearing the LC_ALL environment variable so it uses the locale. Once fixed on the gnome-terminal project, this should be removed. Tested on gnome-terminal versions: GNOME Terminal 3.4.1.1 GNOME Terminal 3.14.2 (Default on Ubuntu 15.04) [YOCTO #7791] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-26lib/oe/terminal: fix konsole terminal support for KDE 4.xPaul Eggleton
It seems that the --nofork option genuinely stops konsole from going into the background now; I'm not sure when this changed but it does seem to be working so we can use it. (Tested with Konsole 2.10 and 2.14.2). Fixes [YOCTO #4934]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-26lib/oe/terminal: fix regressionsPaul Eggleton
Fix up some issues introduced by OE-Core commit 818c94f5b9882c2028ef9f056714a0a3c9045551: * If we want to support versions with more than two parts, versions with only one part, or versions with non-integer parts, then we have to stay with strings. We can use distutils.version.LooseVersion() to help with comparisons. * We don't want a warning when launching gnome-terminal 3.10+ and logger.warn() doesn't take a first integer parameter anyway (logger.debug() does). * Also clean up tabs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24terminal.py: No --disable-factory for gnome-terminal >= 3.10Sven Ebenfeld
--disable-factory has been disabled in earlier versions of gnome-terminal but from version 3.10 it raises an error and quits. This makes devshell unusable with gnome-terminal >= 3.10. This patch checks for the version and removes --disable-factory if you have the terminal version 3.10 or higher. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-07terminal.py: add tmux new window optionDan McGregor
Add a new terminal type that makes a new window in the running tmux session instead of splitting the window. 80x25 is not enough to run menuconfig inside a split window, so add the option to create a new window instead. Use the new window option by default when the split window would be less than 19 lines high. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03lib/oe/terminal: add support for Terminology terminal emulatorRodrigo Chiossi
Terminology is the default Enlightenment terminal emulator Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03terminal.py: fixes launching multiple windows of gnome-terminalAlejandro Hernandez
When resolving a patch, a new process of gnome-terminal is created for every patch to be resolved, it "waits" for the previous one to end, instead of launching multiple windows at the same time. [YOCTO #7254] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-04-23make menuconfig work for recent xfce environmentAndreas Müller
xfce terminal was renamed 'Terminal' -> 'xfce4-teminal' mainline end of 2012, so the distros supporting 'Terminal' will dissapear. The distros not mentionied in __init__ do (e.g fedora 19 - tested) fail - or will fail sooner or later. Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02meta/lib/oe/terminal.py: Don't pass non-supported '--disable-factory' flag ↵Jacob Kroon
to gnome-terminal By default, all GNOME terminals share a single process, reducing memory usage. This can be disabled by starting gnome-terminal with the --disable-factory option However, gnome-terminal in Fedora 20 does no longer support the '--disable-factory' flag, so remove it. As the support for 'mate' terminals was added as a copy of the gnome code in 8cc078a9c679845464c59028f584d7aba098cc1f, remove the flag here aswell. Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-30lib/oe/terminal.py: add support for MATE desktop terminalsAndre McCurdy
A simple clone of the corresponding Gnome class. Without this, devshell fails completely on a default installation of MATE desktop Linux Mint 15. Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02TmuxRunning: handle multi-word commandsTyler Hall
Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single argument for its command. This applies to the "split-window" command as well as "new." Note that this alone is not enough to fix the TmuxRunning devshell when using pseudo because tmux does not preserve the environment that pseudo requires. Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-11handle two-word commands with tmuxPeter Seebach
Trying to make a devshell using tmux can fail because "tmux new" expects a single command, not a series of arguments. It does, however, split strings in a suitable way. So you can quote the command. The failure mode is particularly arcane, in that you end up with a message like: ERROR: Unable to spawn terminal auto: \ Execution of 'pseudo /bin/bash' failed with exit code 1: usage: new-session [-d] [-n window-name] [-s session-name] \ [-t target-session] [command] which is confusing because there's no "new-session" anywhere in sight (that's actually "tmux new"), and because what failed to execute wasn't either pseudo or bash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09meta/lib/oe: Replace StandardError with ExceptionRichard Purdie
StandardError is removed in python3, replace with Exception class instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15oe.terminal: add tmux classesChristopher Larson
This adds two new Terminal classes. It's separated into two, so that opening a split inside a tmux window is preferred to the other terminal types, but opening a tmux session is prioritized only slightly higher than screen. - tmuxrunning: Open a new pane in the current running tmux window. Requires that the TMUX variable be added to the env whitelist to use it. - tmux: Open a new tmux session Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04oe.terminal: add tmux classesChristopher Larson
This adds two new Terminal classes. It's separated into two, so that opening a split inside a tmux window is preferred to the other terminal types, but opening a tmux session is prioritized only slightly higher than screen. - tmuxrunning: Open a new pane in the current running tmux window. Requires that the TMUX variable be added to the env whitelist to use it. - tmux: Open a new tmux session Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24terminal: Add support for running custom terminals.Morten Minde Neergaard
Example config: OE_TERMINAL = "custom" OE_TERMINAL_CUSTOMCMD = "mysuperterm" Signed-off-by: Morten Minde Neergaard <mneergaa@cisco.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-24terminal: Send LogExecTTY event to spawn screenJason Wessel
Bitbake has the ability to request to run a command and if it is not possible fall back to emitting a log message. This can be used to start a screen client automatically on the controling tty if the UI has an interactive tty. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24terminal: pass data store all the way through to terminal classJason Wessel
Passing the data store will be needed for firing a custom event for the screen class. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25terminal.py: use unique ids for screen sessionsJason Wessel
When running multiple sets of builds on the same system, it is hard to distinguish which build belongs to which screen session and you can end up resuming the wrong session. The simple solution is to just append the process id to the screen session invocation to make each unique. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18terminal.py: Fix Xfce on ubuntu/debian; some cleanupJeffrey C Honig
* Xfce class was setting and passing wrong variable for ubuntu/debian. * Xfce class was using -e instead of -x for passing command. The former creates a shell escape nightmare * Clean up local and instance/class variables with same name but different usage. * Remove side-effect and directly return formatted command for clarity. Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-11-01lib/oe/terminal: add support for XFCE's terminal emulatorJoshua Lock
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting! Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-18lib/oe/terminal.py: declare konsole from KDE 4.x as unsupportedPaul Eggleton
Konsole 2.x (from KDE 4.x) does not work as devshell - it does not pass the environment or current working directory through among other issues, so do a version check and disable it if it is found (skipping to the next available terminal application.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-08-10oe.terminal: improve how we spawn screenChris Larson
- Name the screen session 'devshell', to avoid confusion if running bitbake itself under a screen session. - Display a warning message when spawning screen, so it's clear to the user that screen has been run (otherwise do_devshell just appears to hang). Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-08-10Rework how the devshell functionsChris Larson
In the new implementation, each known terminal is defined as a class in oe.terminal, as a subclass of bb.process.Popen. terminal.bbclass wraps this functionality, providing the metadata pieces. It obeys the OE_TERMINAL variable, which is a 'choice' typed variable. This variable may be 'auto', 'none', or any of the names of the defined terminals. When using 'auto', or requesting an unsupported terminal, we attempt to spawn them in priority order until we get one that's available on this system (and in the case of the X terminals, has DISPLAY defined). The 'none' value is used when we're doing things like automated builds, and want to ensure that no terminal is *ever* spawned, under any circumstances. Current available terminals: gnome konsole xterm rxvt screen Signed-off-by: Chris Larson <chris_larson@mentor.com>