GithubHelp home page GithubHelp logo

phook's People

Contributors

drinchev avatar jayrhynas avatar msl-at-fcb avatar shishirchawla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phook's Issues

Sierra 10.12.5 breaks phook?

I was using phook with iTerm2 according to the article written at http://www.drinchev.com/blog/ssh-and-terminal-background/ to set the iTerm2 Profile when ssh'ing into a remote machine.

Since today's MacOS update, when phook executes, it exits immediately without firing the command specified with the '-a' option instead of waiting for the ssh session to end.

An example of usage in ~/.ssh/config is:

Host test
Hostname 192.168.1.2
PermitLocalCommand yes
LocalCommand phook -e 'echo "\033]50;SetProfile=RedProfile\a"' -a 'echo "\033]50;SetProfile=Default\a"'
User testuser

Normally, this would switch iTerm2 to the Profile 'RedProfile' while connected to the 'test' system via ssh, then when ssh exits, the iTerm2 Profile would change to the 'Default' profile. Now, the profile does successfully switch to the Profile 'RedProfile', but does NOT switch back to the 'Default' profile when ssh exits, and I do not see a running 'phook' process while ssh session is running.

Is it likely something in MacOS has broken phook?

suggestion save --execute pid

Suggestion for my ssh use case

In ssh/config i would like to use ProxyCommand with phook.

  1. -e setup cloud tunnel to vm
  2. ssh
  3. -a kill / quit the cloud tunnel

The kill step would be much simpler if phook could remember the pid of step1 and then somehow just kill/quit it, or i could reference the pid.

kevent: No such process

I just installed phook in a new machine and I'm getting this:

$ phook -e 'echo marco' -a 'echo polo'
marco
kevent: No such process

Any idea what's wrong with it?

Fails to install on Ubuntu

Fails to install on a clean Ubuntu 16.04.

$ make install
gcc -o phook phook.c
phook.c:12:23: fatal error: sys/event.h: No such file or directory
compilation terminated.
Makefile:4: recipe for target 'phook' failed
make: *** [phook] Error 1

after-script not run when connection breaks

Hi.

Maybe it's intended, but when the connection to the remote host is broken ('client_loop: send disconnect: Broken pipe') the after-script is not executed.

This happens to me regularly when the VPN dies or my internet connection gets reset.

OSX Monterrey - after hooks not firing

The standard shell.sh fails on Monterrey, the code:

if (ppid == 0)
    ppid = getppid();

isn't called.

This is due to ppid being initialised to something non-zero in:

pid_t ppid, fpid;

I'm not too sure what the value is, they're values like: 217858064, 223969296, etc.

Fortunately the fix is quite simple:

pid_t ppid = 0, fpid;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.