Embed interactive shell (VTE) in a PyGtk GUI to manipulate its own widgets

放肆的年华 提交于 2020-01-14 03:12:06
问题 I am planning to do the folliwing: Create a PyGtk GUI (hardcoded, no Glade) with some widgets, and at the bottom of the screen put some sort of VTE (Virtual Terminal Emulator) from where I could manipulate the widgets, for example changing their attributes and calling their methods from the commandline. The result would be similar to using AutoCAD's commands, only that I would be acting upon the GUI objects. I have already found very few things about gtk.VteTerminal widget, but not only could

tmux man-page search highlighting

别来无恙 提交于 2019-12-29 16:28:08
问题 When I search in, for example, man ls while in a tmux session, the search strings don't appear highlighted - the page jumps down so that the search string is on the top line of the buffer, as expected, but it's not highlighted. Doing the same thing in the same shell while not in a tmux session results in highlighted search strings. I have no idea where to start looking to solve this. Any hints are appreciated. 回答1: Based on Less Colors For Man Pages by Gen2ly , here is my man page and how to

Ctrl-Z sent to Fedora server over telnet does not stop the process

柔情痞子 提交于 2019-12-23 04:45:47
问题 Objective: I am working on an iOS terminal emulator for accessing my Unix server through the telnet protocol. I am testing against both AIX and Fedora Linux. Problem: If I send Ctrl-Z (ASCII 26) to the AIX server, it behaves as expected: I get back a string like stopped programname , and then any further characters I send get echoed back. When I send it to the Fedora server, I get no echo-back until I send Ctrl-Z a second time. The program is running under Bash on the Fedora machine. Why am I

Building a Terminal Emulator for Android

有些话、适合烂在心里 提交于 2019-12-22 13:54:06
问题 I've been trying to build a Terminal Emulator for Android. Being pretty new to this, my idea was to execute each command and store the output in a file, whose contents would be displayed after each execution. Pseudo Code : public Boolean execCommands(String command) { try { rt = Runtime.getRuntime(); process = rt.exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); os.writeBytes("echo $ \""+command+ "\" >> /sdcard/Android/data/terminalemulatorlog.txt\n\n\n"); /**

Executing python script in android terminal emulator

我只是一个虾纸丫 提交于 2019-12-21 13:00:47
问题 I installed python 2.7 in my Android device and I tried executing a python script by typing the command in terminal emulator. The problem is that although I use the full path for python the following error appears: link_image[1997]: failed to link ./python CANNOT LINK EXECUTABLE. I tried to add environment variables in ./~bashrc but I didn't make it. Any idea ? 回答1: OK it is solved. I followed these steps (http://code.google.com/p/python-for-android/wiki/RunPythonFromShell) but first I had to

Emacs key bindings change in terminal emulator

喜欢而已 提交于 2019-12-19 10:24:44
问题 I notice that some Emacs key bindings change in terminal emulator ( xfce4-terminal ). For example: M-SPC under TTY sets the mark, but in xfce4-terminal it does nothing. Also: C-- is undo in TTY and does nothing in terminal emulator C-/ is erase char backward in TTY, and undo in terminal emulator Is there any solution to prevent the burden of learning two rules? I just want them as usual in TTY console. 回答1: It's not an Emacs problem so much as a terminal problem. Terminal emulators can be

Open source C# vt100 server

穿精又带淫゛_ 提交于 2019-12-12 09:27:40
问题 Does anyone know of an open source C# vt100 server? I'm looking to create a C# server that understands the escape sequences from a vt100 client. 回答1: This takes me waaaay back. I... don't think it's the server, but the application, that needs to understand the escape sequences. The server only needs to pass them to the application that's running. Think of a text-based application. It needs to know what the user is sending to it so that it can send back the proper response. The terminal server

Python terminal emulation

依然范特西╮ 提交于 2019-12-12 08:49:55
问题 I'd like to have an xterm-compatible virtual terminal running inside a Python app. I'll need to run ncurses-based applications inside it, feed it with user's input and read its output. So far I've found python-vte, but it only provides a GTK+ widget (libvte has the required VtePty class, but Python bindings don't) and has an unacceptable libgtk dependency. Is there any other way to perform a teminal emulation in Python? 回答1: After all, I've found the pyte, which is exactly what I wanted. 回答2:

How to simulate a terminal in Android using Kivy?

余生颓废 提交于 2019-12-12 03:46:25
问题 I'm trying to build a Android terminal emulator using Kivy, for now, I can use some simple commands, like ping and wget , and grab their output using subprocess.PIPE , but I can't figure out how to use more complex commands like su or nano . For instance, su gives a error saying that is must be run in a terminal. What I have create a Android terminal emulator using Kivy? 来源: https://stackoverflow.com/questions/40755167/how-to-simulate-a-terminal-in-android-using-kivy

Cannot open /data folder in a rooted Android device

微笑、不失礼 提交于 2019-12-10 10:39:42
问题 My HTC Sensation is rooted (I can see the SuperUser app; I can su using the Terminal Emulator app; I was able to install Android Stock ROM Cyanogenmod). I'm not able to open the /data folder using either ADT or adb shell su (permission denied) or File Expert app. What can I do to open the folder? 回答1: I found the answer and solution: As for access the adb shell , I need to enable "Root access" for ADB in "Developer options" (this apply for stock Android 4.0.4 by Cyanogenmod but the same