Skip to contentSkip to conversation

Xfce Terminal Support v2

PATCH Applied Joshua Lock 2 participants 3 messages Oct 31, 2011 – Nov 1, 2011

lore
Share & tools
lore
#0 lore raw

cover Xfce Terminal Support v2

Turns out v1 of this was pretty useless, thanks to Chris for reviewing and spotting most of my bloopers. I keep telling myself not to submit patches before the weekend, but never listen.

I've not had chance to test this on Ubuntu/Debian but am reasonably confident it'll work there now.

Thanks,
Joshua

The following changes since commit ff13e06892f102d915855cde50896349b07b3717:

clutter-gtk: add LIC_FILES_CHKSUM to include file (2011-10-31 10:46:59 +0000)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/work

Joshua Lock (1):
lib/oe/terminal: add support for XFCE's terminal emulator

 meta/lib/oe/terminal.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.7
#1 lore raw

PATCH 1/1 lib/oe/terminal: add support for XFCE's terminal emulator

That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting!

---
 meta/lib/oe/terminal.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
meta/lib/oe/terminal.py +23 -0
index 1455e8e..43639d5 100644
@@ -57,6 +57,20 @@ class Gnome(XTerminal):
     command = 'gnome-terminal --disable-factory -t "{title}" -x {command}'
     priority = 2
 
+class Xfce(XTerminal):
+    command = 'Terminal -T "{title}" -e "{command}"'
+    priority = 2
+
+    def __init__(self, command, title=None, env=None):
+        # Upstream binary name is Terminal but Debian/Ubuntu use
+        # xfce4-terminal to avoid possible(?) conflicts
+        distro = distro_name()
+        if distro == 'ubuntu' or distro == 'debian':
+            cmd = 'xfce4-terminal -T "{title}" -e "{command}"'
+        else:
+            cmd = command
+        XTerminal.__init__(self, cmd, title, env)
+
 class Konsole(XTerminal):
     command = 'konsole -T "{title}" -e {command}'
     priority = 2
@@ -131,3 +145,12 @@ def check_konsole_version(konsole):
         if ver.startswith('Konsole'):
             vernum = ver.split(' ')[-1]
     return vernum
+
+def distro_name():
+    try:
+        p = Popen(['lsb_release', '-i'])
+        out, err = p.communicate()
+        distro = out.split(':')[1].strip().lower()
+    except:
+        distro = "unknown"
+    return distro
Signature · 1 line
1.7.7
#2 lore raw

Re: [PATCH 1/1] lib/oe/terminal: add support for XFCE's terminal emulator

Quoted 7 lines · Joshua Lock

That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting!

---
 meta/lib/oe/terminal.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

Merged to master, thanks.

Richard