terminal

How do I determine if a terminal is color-capable?

I would like to change a program to automatically detect whether a terminal is color-capable or not, so when I run said program from within a non-color capable terminal (say M-x shell in (X)Emacs), color is automatically turned off. I don't want to hardcode the program to detect TERM={emacs,dumb}. I am thinking that termcap/terminfo sh...

What is the right way to stop an infinite while-loop with a Term::Readline-readline?

What is the right way to stop an endless while-loop with a Term::Readline::readline? This way I can not read in a single 0 #!/usr/bin/env perl use warnings; use strict; use 5.010; use Term::ReadLine; my $term = Term::ReadLine->new( 'Text' ); my $content; while ( 1 ) { my $con = $term->readline( 'input: ' ); last if not $con;...

Mac OS date command - getting higher temporal resolution

Hey all, I am trying to use the date command in Terminal on multiple Mac OS X machines that are synced via NTP to synchronize some code in a program. Essentially I am running a program... MyProgram with arguments[date] I can get date to give me the seconds since the Unix epoch with the %M specifier. When I try to use %N to get nanosec...

Generate terminal graphics

Hi, which open source software options exist for generating terminal graphics? I mean, there is for instance the nice matplotlib, which can generate beautiful plots from data, in PNG or similar formats. But there are similar alternatives for generating just kind of ascii graphics? Thanks ...

Can I print UTF-8 encoded files from Linux command-line?

enscript doesn't support utf-8 and the only other suggestion I've seen is to use lpr: lpr -o document-format=text/utf8 file_to_print but that gives an "Unsupported format" error. (Ubuntu 9.04 / GNOME Terminal 2.26.0) ...

Cakephp, Error when executing command cake extract in terminal

I get the following error when executing in Terminal the following command "cake extract": Error: Class ExtractShell could not be loaded. I have made sure that I'm in the right path and also all other commands I've executed work great like cake bake for example. Do you have any ideas ... ...

How to launch a mac application without a terminal window.

I've written an open-source c++ application and it works fine on Windows and Linux, I finally got a Mac Mini (with 10.5.8) so I've just been testing the Mac version. My application works fine when running it from inside a terminal window and typing ./appname , but if instead I double click on it from the finder, then it opens a termnial...

Is there a way to determine a terminal's background color?

Hello folks. (not sure if this question belongs here or to superuser) I'd like to know if there is any way to determine a terminal's background color ? In my case, using gnome-terminal. It might matter, since it's entirety up to the terminal application to draw the background of its windows, which may even be something else than a plai...

sudo port install cmake trouble (for MGTwitterEngine)

I am following This Tutorial on installing MGTwitterEngine on my MAC osx 10.6.2. I am stuck on this step: sudo port install cmake it gives me the following error: dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matchi...

How to check status of the serial terminal buffer from userspace in C

I am writing a serial communication program in userspace. I want to check how much of the buffer is full. Is there a way to do it using linux terminal i/o api? Thanks ...

Text-based game graphics in Python

I'm pretty new to programming, and I'm creating a simple text-based game.> I'm wondering if there is a simple way to create my own terminal-type window with which I can place coloured input etc. Is there a graphics module well suited to this? I'm using Mac, but I would like it to work on Windows as well Thanks ...

Accessing wireless network through terminal in ubuntu

I'm connected to a wireless network and it's working fine on browser but not on terminal. I'm getting a timeout error when i'm trying to download any plugin for ruby ...

Run Application Command to open Terminal

Question: What command do you type in to the "Run Application" box on ubuntu to open the terminal? Info: I'm having horrible horrible driver issues on my netbook. I might be able to solve some of these problems if I could just get to Terminal, but all I have is my keyboard, no mouse, so i need to know what command to type in to run ap...

Setting terminal flags through kernel parameters in linux

Can we set terminal flags through kernel command line ? ...

Terminal / Panel PC - Single Server Solution: Client/Server or RDP?

Hi, Our current setup involves a touch screen panel pc with embedded windows, that is connected via network to a server / dedicated pc, within the same physical location. Each of our 'units' has this hardware setup. For a quick resolution we deploy our application to the dedicated pc, and have the panel pc remote desktop to an account ...

How to find out where alias (in the bash sense) is defined when running Terminal in Mac OS X

How can I find out where an alias is defined on my system? I am referring to the kind of alias that is used within a Terminal session launched from Mac OS X (10.6.3). For example, if I enter the alias command with no parameters at a Terminal command prompt, I get a list of aliases that I have set, for example, this is one of them alia...

Terminal Asks for Email and Password, how do I Programmatically fill it out (in Ruby)?

I am running a command to push files to Google App Engine, and it might ask me for my email and password: $ appcfg.py update . Application: my-cdn; version: 3. # printed out Server: appengine.google.com. # printed out Scanning files on local disk. # printed out Initiating update. # printed out Email: [email protected] # now it asks me... ...

How do I output coloured text to a Linux terminal?

How do I print coloured characters to a Linux terminal that supports it? I'm using C++ for this program, but I think that might be irrelevant. EDIT: And secondly, how do I tell if it supports colour codes? ...

Xcode: How-to create a Terminal window inside my application?

Hi, While I am playing with Rubycocoa, I created a small application that works like a charm. However, the only thing missing is like a Terminal inside my application. In Coda, there is a similar kind of view that allows you to open up a terminal session. How would I create a Terminal view like this inside Interface Builder and Xcode? ...

Inserting # character in OS X terminal when using "option as meta key"

I'm using the option key as meta key in my terminals but since I am using a UK keyboard this means that I can't use alt-3 (AKA option-3) to insert a '#' (hash/pound) characte. I don't want to turn option-as-meta off since I use the functionality it provides. Does anyone know how I can insert '#' characters in this situation? ...