Bash/xdotool: Commands work, but not in a script
I am making a bash script for Linux which closes the terminal window if the window loses focus. On the command line, I was able to do this: termwin=$(xdotool getactivewindow) while : do if [[ …
Dynamically reformatting man pages on terminal dimension changes
One common workflow of mine is to open a manual page in a terminal, then another terminal in which to test things. The man page is formatted to the initial dimensions of the first terminal. When I now …
Running java pipe to mutt
I'm trying to run a java command in terminal on OSX and while it works without issue if I just run the command I would also like to email the resulting file but if I add a pipe after my java command …
How to launch an iOS application in Simulator from Terminal and AppleScript
I have made an iOS application in Xcode and built it. It has created an .app bundle. I am able to launch the app in Simulator or on the device successfully from Xcode or iTunes, but now I want to ...
Installing GPG tools via terminal on mac
I am trying to install gpg tools on a mac mini i have ssh access to so i can then install s3cmd. I know you can use the installer dmg here http://www.gpgtools.org/installer/index.html But as i only …
Where do I find my user folder in the OS X folder hierarchy?
In Terminal, how do I go from Macintosh HD to places such as johnsmith that contains Downloads, Desktop etc. In a Finder window, it seems they are independent of each other. From Macintosh HD, I see …
Get current working directory name in Bash Script
How would I get just the current working directory name in a bash script, or even better, just a terminal command. pwd gives the full path of the current working directory, e.g. '/opt/local/bin' but …
apply password directly to a zip file from terminal
Is it possible to apply a password to an existing zip file without having to manually enter the password twice. I want be able to specify the password also at the time of issuing the command. So ...
How to enable/disable mobile broadband from terminal?
I use ZTE USB Modem on Natty Narwhal. Every thing works fine but sometimes it get disconnected. I want to write Shell script that reconnects mobile broadband if it is disconnected or the received data …
Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?
I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
PLINK change character set translation to UTF-8 (utf8)
Does anyone know how to configure the character set translation on plink (the command line version of Putty) to UTF-8? I'm trying to SSH to a Linux server whose character set configuration is UTF-8. …
Getting to virtual terminal with Keytouch overriding Fn keys
I have a Chromebook running Ubuntu that I just broke. I had everything on the internal harddrive for the computer, but ran out of space, so I decided to move my home partition onto a memory card that …
Always having to export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
to run mysql on my mac I always have to send this command on terminal: export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ How to solve this for ever? Thanks,
Gnome-terminal and solarized theme Coloring Issue
Hi i tried to apply solarized color theme to my gnome terminal, like explained Here But its all greyed out and not that colorful as expected. See here Any Idea what i can do?
Exit program if i get any char
i'm creating a program and i want to exit the program if i get any key pressed. So far i can only do that if the return is pressed, it happens, because the getch needs the return to be pressed. Code: …
Rails S Hangs, port not disconnected?
Disclamer: I'm a complete beginner so please bear with me, I don't know how to name my problem, so checking the net for answers was troublesome. I have a problem with port. Problem: I start rails …
Synchronise/Merge MP3 collections without duplication or huge copies
I have one drive containing about 90GB of MP3s which is used at home, it serves three Squeezebox players though the Slimserver software running on one of the desktop Macs. I have a separate firewire …
How does git, for example, create the database they use?
Hi so I am working on a terminal application and would like to use a database. I am not sure the best way to go about doing it though. So I want to have the program be able to install like you would …
Way to switch F keys to 'application' keys and back on mac via terminal? (10.6)
Is there a command I can issue via terminal to switch my F1-12 keys to being application keys (media, screen brightness ...) and back? i.e. replicate toggling System Preferences => Keyboard => …
How do I Create a Context Menu to Open a File in GNU Emacs inside Mintty under Cygwin?
I run GNU Emacs under Cygwin. What I am interested in doing: Configuring Windows shell integration (right-click context menu) for GNU Emacs inside Mintty under Cygwin so that I can use it to edit …
signal spacebar key stroke on xte?
I have been using xte for some UI testing and I found that xte 'key Space' doesn't seem to do much. How can I signal a spacebar key stroke on xte (Linux)?
how to append a string after a command?
Each time I run a command like this ssh user@myhost.com I've to type in the ssh password. Each time I run a command like this git push origin master (pushing code to github) I've to type in …
setsid by default in Terminal
So I've just discovered the command setsid, which makes life a whole lot easier for running programs from Terminal. What I'd like to know is if there's a way to set programs to launch in a new session …
How can I solve this error I get when I commit changes on an SVN repository from the Ubuntu terminal?
When I commit changes on a SVN repository, I always run into the following problem in the terminal in Ubuntu: Error reading /home/ssylee/.nano_history: Permission denied Any ideas how to solve it?
crontab executing jar with properties files
I'm trying to use crontab to execute a jar every minute. This jar is working well if I execute it via Terminal. The point is that the jar reads some constants at execution time, from two java ...
Using PHP to execute terminal commands
How can PHP be used to create a number of commands in the terminal? For example, if I want to change the permissions on a folder or a file, I might run Sudo Chmod 777 FileName from the command ...
Make a string generated from my bash script to be ready to paste to elsewhere
I use putty to remotely connect to a linux server where I have a bash script(function) which I designed to generate some string. Normally I can just let my function to echo the string to the putty ...
Ubuntu 12.04 GNOME Terminal (3.4.1.1) Xorg 100% CPU
after upgrading Ubuntu 11.04 to 12.04 (x64 arch) maximizing or resizing GNOME Terminal (3.4.1.1) windows larger cause the Xorg (1.11.3) or X process to utilize 100% CPU. Resizing smaller, moving ...
Alternate fonts for console windows?
I like to find some new/interesting fixed width fonts for console. We all know Lucida/Courier, what else? Update So, the winner is Consolas (which indeed is built in in new Windows 7) Jeff had ...
Lion Recovery Terminal will not allow me to run TestDisk?
Setup: Macbook Air (2011) running Lion with BootCamp (Windows 7). Problem: I have somehow screwed up my partition table. When I boot I only can select Windows instead of Windows and Lion. However ...