User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tmux [2020/04/14 13:50] ssm2017tmux [2022/02/07 13:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== tmux ======
 ===== links ===== ===== links =====
   * [[http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course]]   * [[http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course]]
Line 91: Line 92:
 # Highlight active window # Highlight active window
 set-window-option -g window-status-current-bg red set-window-option -g window-status-current-bg red
 +</sxh>
 +
 +===== tmux php =====
 +<sxh php>
 +exec('sudo -u username sh -c "tmux new-session -dPs test"', $output, $code);
 +print_r($output);
 +print_r($code);
 +</sxh>
 +
 +/etc/sudoers.d/sudoers
 +<sxh>
 +www-data ALL=(ALL) NOPASSWD:ALL
 +# be carefull, it is better to filter the commands sending the script to a bash script
 +www-data ALL=(ALL) NOPASSWD: /var/www/mysite/commands.sh
 +</sxh>
 +
 +/home/username/.tmux.conf
 +<sxh>
 +set -g default-shell '/bin/sh'
 </sxh> </sxh>
 {{tag>tmux}} {{tag>tmux}}

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information