Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 13 Dec 2018, 02:25
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Tmux
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Thu 24 Sep 2009, 09:30    Post subject:  Tmux
Subject description: Terminal Multiplexer
 

Home: http://tmux.sourceforge.net/
Version: 1.7
Quote:
tmux is a "terminal multiplexer", it enables a number of terminals (or windows) to be accessed and controlled from a single terminal. tmux is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU screen.

it is highly recommended to read the manpage in /usr/share/doc .

extract:
Tmux may be controlled from an attached client by using a key combination of a prefix key, `C-b' (Ctrl-b) by default, followed by a command key.

Some of the default key bindings are:
Code:
c    Create a new window.
d    Detach the current client.
l    Move to the previously selected window.
n    Change to the next window.
p    Change to the previous window.
&    Kill the current window.
,    Rename the current window.
?    List all key bindings.


Compiled and tested in 4.31.

aragon
tmux-1.7.pet
Description 
pet

 Download 
Filename  tmux-1.7.pet 
Filesize  168.33 KB 
Downloaded  627 Time(s) 

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html

Last edited by aragon on Mon 18 Feb 2013, 09:39; edited 1 time in total
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Mon 18 Feb 2013, 04:19    Post subject:  

uploaded new version. see first post.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Wed 20 Feb 2013, 15:12    Post subject:  

How do I change the modifier used to resize windows? It is ALT by default...

Currently, I can only resize windows in tmux in a terminal emulator, not when I actually drop out of X - because the ALT key is used to switch ttys (or something!) ... So resizing doesn't work, instead, I am sent to a login page ... (Hope I'm being clear!)

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Wed 20 Feb 2013, 15:51    Post subject:  

hi scottman,please look at this exmple

https://github.com/myfreeweb/dotfiles/blob/master/tmux.conf

for the resize-pane, to get an impression, how it works.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Wed 20 Feb 2013, 19:01    Post subject:  

thats great, cheers.
_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2711

PostPosted: Sat 14 Jul 2018, 13:12    Post subject: Bump  

Bumping a (very) old thread.

tmux can be great for running terminal sessions on a server, disconnecting, and then reattaching again from the same or another machine - back into the exact same session on the server.

tmux activation keycode is typically ctrl-b, so after you've ssh into a remote server and ran tmux to present a terminal window, ctrl-b d will detatch the client from that. Later you might ssh back into the server again from the same or a different device, and run tmux attach ... to restore/attach back to the session again.

tmux also caters for opening up several different terminal windows, so you might for instance have one showing htop, another connected to IRC, another to news or mail ...etc. Provided the client device can ssh, then it can be a very lightweight device.

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2711

PostPosted: Thu 19 Jul 2018, 06:44    Post subject: tmux collaboration  

Say you have a lightweight (low electrical power consumption) always on device, that's hard wired to the net, maybe connected to your family TV as a monitor and that also has a keyboard attached. If that is running something like openbsd that comes with mail, web ...etc. along with X all included and sensibly configured out of the box, then one function might be to open up ssh port forwarding to that device so you or other family members might remotely ssh into it. Assuming the PC also has a sound output (speakers connected) then a family member might ssh into the box from anywhere, on any device that supports ssh (ssh supporting handhelds, phone ...etc.), and play a sound file on that 'at home' PC to draw attention to family members at home - somewhat similar to ringing a phone. They might then switch the TV over to show the terminal screen and using tmux you can both setup and use the same terminal session.

You set up a tmux session using something like tmu new-session -s somesessionname
On the terminal session that runs that they will be entered into that session.
Another family member who has ssh into the same box using the same userid can show current sessions by running tmux ls ... to list any sessions. Seeing session somesessionname is running they can then attach to that using tmux attach -t somesessionname Thereafter both are seeing the exact same terminal session, anything than any one types/runs, so the other sees that. A third or more family members could also join in a similar manner. A form of group/collaboration instant messaging type function.

If you have tmux installed, you can try it out for yourself on the same single PC/laptop. Open two terminal windows and setup a tmux session as above in one, and then connect to that tmux session using the other.

If you have a always on server that might be running a httpd web server and using the TV as its monitor, then also constantly running a tmux session for others to connect to at any time is a low additional overhead. A form of low-cost/easy message board, where you at home can leave messages in the tmux session for other family members to ssh/tmux into and see; Or where remote family members can ssh/tmux into and "ring" the home PC system to draw attention to you asking to 'chat'.

One of the primary benefits of tmux is that sessions persist. After you ssh into a box and start a tmux session then you can detatch from that (or if the link fails), and later reattach again perhaps from another location using another device ... and the session will still be running as before. Kick off a compile for instance that might take many hours using your phone ssh/tmux into your 'server', disconnect and later reconnect again and the compile will still be running (assuming it hadn't completed).

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2711

PostPosted: Sat 21 Jul 2018, 17:49    Post subject:  

If you run your browser under user (restricted), and tmux under root ... and use tmux for your docs, data, diary ....etc. then that provides a element of data protection in the event of a browser flaw/hack. It's also quite nice/usable to have just the two running, a browser full of tabs that you flip between, and alt-tab to a tmux full of windows that you flip between. calcurse calander/appointments/todo is a nice little tmux program ... as seen/used in this video https://youtu.be/EMgOIbS4_Ms
_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2711

PostPosted: Thu 20 Sep 2018, 14:22    Post subject:  

Run mc in a X session and the file manager/editor supports mouse controls. tmux however doesn't, but if you add the following to your .tmux.conf
Code:
set-option -g mouse on

# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
then you can click on tmux window names to switch between windows ...etc.

The attached is pretty much my default first boot desktop (except for Firefox and mtpaint aren't running). The console also looks pretty much like the terminal pane (tmux with htop, mc, sh) - same colours etc. It's nice having the desktop (X) version also supporting mouse actions in both tmux and mc.

I used to use Libre writer mostly for documentation. Now I'm more inclined to use mc's internal editor to add text in a non distractive way, then run that through ispell to correct spellings, then add <p align="justify"> to each paragraph, and wrap that within a html table type structure (add <html><body><table><tr><td width=5%></td><td> at the top and /</td><td width=5%></td></tr></table></body></html> at the bottom. I have both of those as files so I can simple insert them. Having converted the file to html format I use a browser to view that file and then print it to a pdf file format.

tmux and mc work very well over the net, so even if you're running them remotely on a low power handheld or phone you can still access/edit/create documents in a consitent manner. With tmux you can even detatch from a tmux session and then reattach again later - even from a different device. And for collaboration two or more of you can even attach to the same session.
s1.jpg
 Description   
 Filesize   91.63 KB
 Viewed   82 Time(s)

s1.jpg


_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0954s ][ Queries: 13 (0.0199s) ][ GZIP on ]