Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset e4c8e3cf in mainline


Ignore:
Timestamp:
2017-10-26T14:41:22Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
90c340fb
Parents:
7c50de5a
Message:

Add support for XFCE terminal to ew.py run in console function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    r7c50de5a re4c8e3cf  
    5656                return emulators[platform][machine][processor]
    5757
     58def termemu_detect():
     59        for termemu in ['xfce4-terminal', 'xterm']:
     60                try:
     61                        subprocess.check_output('which ' + termemu, shell = True)
     62                        return termemu
     63                except:
     64                        pass
     65
    5866def run_in_console(cmd, title):
    59         cmdline = 'xterm -T ' + '"' + title + '"' + ' -e ' + cmd
     67        cmdline = termemu_detect() + ' -T ' + '"' + title + '"' + ' -e \'' + cmd + '\''
    6068        print(cmdline)
    6169        if not is_override('dryrun'):
    62                 subprocess.call(cmdline, shell = True);
     70                subprocess.call(cmdline, shell = True)
    6371
    6472def get_host_native_width():
Note: See TracChangeset for help on using the changeset viewer.