• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    Shell
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Z-Modem integration for iTerm2

Z-Modem integration for iTerm2

Preface

The purpose of this script is to add Z-Modem file transfer support to (in theory) any ssh session from within iTerm2.

This script is inspired by and would probably not exist without the scripts "iterm2-recv-zmodem.sh" and "iterm2-send-zmodem.sh" (c) by Matt Mastracci, https://github.com/mmastrac/iterm2-zmodem.

The motivation to not forking but rewriting the scripts was mainly to put the functionality into a single shell script to make it possible to share common code used by both sending and receiving funtionality and to make it more easy to extend the functionality in future.

Installation

Prework

For sending and receiving files the Z-Modem tools are required on both machines involved in the transfer. I recommend installing the lrzsz package which should be available in most Linux distributions or which can be downloaded and build from source from:

http://ohse.de/uwe/software/lrzsz.html

A recent version of iTerm2 is required for Mac OS X to make things work, downloadable from:

http://www.iterm2.com/

Optionally the script supports Growl notifications. For this to work the Growl application and the additional tool "growlnotify" is needed.

Installation and configuration

The script iterm2-zmodem should by copied to /usr/local/bin.

It's required to setup the following "Triggers" in iTerm2:

Regular expression: \*\*B0100
Action:             Run Coprocess
Parameters:         /usr/local/bin/iterm2-zmodem sz

Regular expression: \*\*B00000000000000
Action:             Run Coprocess
Parameters:         /usr/local/bin/iterm2-zmodem rz

The script "iterm2-zmodem" tries to determine the names (lrz, rz, lsz, sz) and locations of the binaries of growlnotify and the Z-Modem tools. The pathes searched are:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

If the Z-Modem tools are installed in some unusual place, the path can be specified when configuring the triggers using the LRZSZ_PATH environment variable, the "Parameters" setting of the trigger has to be modified in this case to become for example:

Parameters:         LRZSZ_PATH=/opt/lrzsz/bin /usr/local/bin/iterm2-zmodem rz

Usage

The file transfer is initiated on the remote machine by executing rz respectively lrz (for receiving a file on the remote machine) or by executing sz respectively lsz (for sending a file to the remote machine). See the command usage information of the Z-Modem tools for additional details.

Note, that sending files will overwrite the destination file on the local machine, if it already exists.

Disclaimer

Use with caution. This software may contain serious bugs. I can not be made responsible for any damage the software may cause to your system or files.

License

iterm2-zmodem

iterm2-zmodem

Copyright (C) 2013 by Harald Lapp [email protected]

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

3rd party code

The AppleScript portion included in the script is inspired by http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script licensed under cc-wiki with attribution required

More Repositories

1

rmate

Remote TextMate 2 implemented as shell script
Shell
886
star
2

identicon

Shell script for creating identicons with direct SVG rendering or ImageMagick based rendering
Shell
19
star
3

asciidia

Create SVG or bitmaps from simple ASCII diagrams, EBNF notations, etc.
PHP
17
star
4

flowdesigner

Flow designer component using jquery and paper.js
JavaScript
12
star
5

iadl

Internet archive collection downloader.
Shell
7
star
6

rmate-nim

Remote TextMate 2 with SSL support implemented in Nim
Nim
6
star
7

gitsplit

Helper tool for splitting git repositories using index-filter, tries to keep history also for renamed files.
Shell
4
star
8

js99er-nw

Node Webkit frontend for the js99er TI-99/4A (ti99/4a) emulator.
JavaScript
3
star
9

pi-in-a-qube

Banana Pi in a Cobalt Qube
2
star
10

ktinit

Helper script for creating gradle-based Kotlin projects.
Shell
2
star
11

imagewarp

Perspective projection of images using openCV.
C++
2
star
12

mkinst

Tool for creating self-contained installers.
Shell
1
star
13

phpcshtml

XSLT for transforming PHP CodeSniffer XML report to HTML.
XSLT
1
star
14

TI99

Archive of my TI99 Software
1
star
15

phphttpd

Library for building self-contained scripts for serving with PHP 5.4's builtin web-server
PHP
1
star
16

phplint

Unofficial fork of phplint
C
1
star
17

vscsetup

Helper tool for setting up my Visual Studio Code environment
Shell
1
star
18

uck-setup

My helper script for creating customized liveCD from within a uck customization console.
Shell
1
star
19

set-up

my working environment
Vim Script
1
star
20

img2video

Convert images to a movie slideshow using imagemagick and ffmpeg.
Shell
1
star