You are not logged in.

#151 2010-12-07 09:25:23

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Sorry, and thanks alot for your reply, mate!

Hmm, I had hoped there where some extra to it, since I don't use ssh and hence have no use for tmux then.

Offline

#152 2010-12-07 13:27:25

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

If a person doesn't use/need shell sessions then a multiplexer isn't much use.  If a person does, then they don't quite get it (I didn't at first) and someday they will -- at least that is my guess.

Offline

#153 2010-12-07 18:03:03

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

If shell sesions means multiple terminals at once in split panes, then as said I do use that every day, but just through my WM's allready built-in functionality instead of adding another tool for the same job...

However I can perfectly understand the need for terminal multiplexers when working in terminals without X, or if using a non-tiling WM, and as I learned in this thread, for ssh access of multiple terminals at once...

Last edited by mhertz (2010-12-07 18:12:24)

Offline

#154 2010-12-07 19:04:03

aqamar
Member
Registered: 2008-09-01
Posts: 49

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

someone can help me for use irssi + nicklist in tmux? is possible made a patch for nicklist for this working in tmux like works in screen?

Offline

#155 2010-12-07 20:00:32

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Whether irssi is run in or outside of tmux is irrelevant.  Unless I'm misunderstanding the question; I suggest creating a new post for this.  Also you might want to check out weechat which has the nicklist by default.

Offline

#156 2010-12-07 21:36:01

aqamar
Member
Registered: 2008-09-01
Posts: 49

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

steve___ wrote:

Whether irssi is run in or outside of tmux is irrelevant.  Unless I'm misunderstanding the question; I suggest creating a new post for this.  Also you might want to check out weechat which has the nicklist by default.

you're right, is off topic.... sorry

Offline

#157 2010-12-07 23:09:29

nXqd
Member
Registered: 2010-07-01
Posts: 173
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

firecat53: Thanks. And can you post your config to some paste-code site like pastbin, bitbucket or git . It will be better for us to view it first instead download the whole file smile
jsonwryan: Thanks, and one more thing your configs are pretty nice and I use most of them now. It's simple nice smile

Last edited by nXqd (2010-12-07 23:11:43)


When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles

Offline

#158 2010-12-15 00:20:41

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

mhertz wrote:

If shell sesions means multiple terminals at once in split panes, then as said I do use that every day, but just through my WM's allready built-in functionality instead of adding another tool for the same job...

I don't use ssh sessions on a regulare or anyhow heavy basis, but simply having this split panes/windows functionality is my very reason to use tmux. Plus the ability to break out panes from windows, detaching, horizontal splitting… none of these functionalities is offered by screen (w/o a patch) or any other program known to me (probably all the tiling wms exactly CAN DO this, but they always seemed to be too much work for me to get into which is why I don't know anything about them).

Offline

#159 2010-12-15 00:49:16

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Yeah, the nice part about tiling WM is you get this functionality with all program ie firefox, xpdf etc.

Offline

#160 2010-12-16 11:11:06

k3ttc4r
Member
From: around somewhere
Registered: 2008-12-28
Posts: 137
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

I'm just starting to find my way around tmux. I've tried screen several times before, but somehow never liked it. Then just today I remembered that I installed tmux a while back, but never used it big_smile

Anywho - I still have a problem. While I'm in tmux, "/home/christian/bin" isn't in my $PATH anymore. I've tried setting it with setenv (zsh), and it works, until I restart tmux.

I'm not sure if it's a tmux problem, or just my stupidity, but any help would be greatly appreciated big_smile


arch64   ||   github | dotshare | blog

Offline

#161 2010-12-20 22:54:11

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Hehe, I had a similar problem until the day before yesterday:

I only had

set -g default-command /bin/zsh

set. Since a prompt (or other program if specified) was available in any new pane, I thought there should not be a problem but on my laptop there was something different as on my desktop pc, so I only had a very small path and via »env« found out, that my environment under tmux was much "less" than under any instance of urxvt started from lxpanel or so.

I found out, that in order to have the .zlogin file being parsed, I had to tell tmux I want to use it as a login shell. (Something here is very strange, since, as I already said, on my desktop, I did not need to do that. I assume, that the reason is having a #! /bin/sh in the first line of .xinitrc instead of #! /bin/zsh…).

To achieve this, I set

set -g default-shell /bin/zsh

and now it works.

Hope it works for you, and maybe could somebody with more (login) shell insight explain if I am wrong with my suggestions or not…

greetings

Offline

#162 2010-12-21 01:22:34

k3ttc4r
Member
From: around somewhere
Registered: 2008-12-28
Posts: 137
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Setting both default-shell and default-command to /bin/zsh did the trick for me, too big_smile
Thanks for your help!


arch64   ||   github | dotshare | blog

Offline

#163 2010-12-22 15:37:24

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Hehe,
FWIW I still had to struggle on my thinkpad with unicode support in urxvt/tmux.

I filnally found out that I told slim to start my .xinitrc with »/bin/zsh«. And not with »/bin/zsh -l«. Which was the reason for my locals being set as  "POSIX" all the way through. Hence, no de_DE.utf8-support.

After changing zsh to start .xinitrc as a login-shell (which then forks my urxvt+tmux-session and thus passes the environment correctly, I was able to remove the »default-shell« option from .tmux.conf to have not every single instance of zsh source ~/.zlogin again and again.

Hopefully I came to a way more profound understanding of login-shell behaviour, environment passing and LOCALES by now. Thanks tmux!

Another nice function that is only available in tmux-git so far is: last-pane:

Via

unbind C-a
bind C-a last-pane
unbind a
bind a last-pane

it is possible to change to the last used pane; and back again. Similiarly to »cd -«.

Nice one!

But one question still resides: Though I have »tmux.vim« in »/usr/share/vim/vimfiles/syntax« syntax highlighting won't work automatically when I open ~/.tmux.conf. How can I achieve this?

greetings,

Jakob

Last edited by jakob (2010-12-22 15:42:43)

Offline

#164 2010-12-22 16:06:00

k3ttc4r
Member
From: around somewhere
Registered: 2008-12-28
Posts: 137
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

I haven't really messed with loginshells, so I suppose it's still bash for me. I guess I might have to look into that.

Concerning vim - apparently it cannot determine the file type, so you might have to set that manually. You could write a little shell script to set the syntax to tmux in your vimrc, or maybe you can try adding a modeline to tmux.conf, along the lines of "vim: set filetype=tmux :" (not tested, so no guarantee)


arch64   ||   github | dotshare | blog

Offline

#165 2010-12-22 16:18:11

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

k3ttc4r wrote:

Concerning vim - apparently it cannot determine the file type, so you might have to set that manually. You could write a little shell script to set the syntax to tmux in your vimrc, or maybe you can try adding a modeline to tmux.conf, along the lines of "vim: set filetype=tmux :" (not tested, so no guarantee)

Yes, I also thought of that, found the line you are quoting here in my .vimperatorrc, but had no success. Put in the beginneng or in the end of the file doesn't matter, I won't get true highlighting, I also tried »# vim: set syntax=tmux« and similar things, w/o success…

Offline

#166 2010-12-30 18:41:03

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Has anyone managed to mimic the scroll and scrollbar behaviour as seen with xterm and screen?  Specifically, Shift-PgUp/Dn buffer scrolling (without prefixing) with optional use of scrollbar; the equivalent of termcapinfo xterm ti@:te@.

I'm aware of set -g terminal-overrides 'xterm*:smcup@:rmcup@', but that doesn't use the shift modifier.

Last edited by thayer (2010-12-30 18:43:13)


thayer williams ~ cinderwick.ca

Offline

#167 2010-12-30 20:54:55

tzervo
Member
From: Athens
Registered: 2009-04-03
Posts: 86

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

@mhertz: in addition to what the others said (especially the ssh trick, I use it to monitor some 30 remote simulations at once, this is where it is almost indispensable) tmux attach -t offers many possibilities, especially if used with xbindkeys, dmenu etc, to detach from a session and then reattach to it quickly with a hotkey (xbindkeys, ie. win+m, attach to the mplayer session) or with a menu (dmenu)

EDIT
------

... plus it makes more sense to make terminal applications independent from X (tmux does that, since you can spawn a tmux app in xterm/urxvt and then attach to it from outside X)

Last edited by tzervo (2010-12-30 21:01:48)

Offline

#168 2011-02-19 09:27:33

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Anybody else having problems with session initialization?

This is in my tmux.conf:

new-session weechat
new-window rtorrent
new-window zsh

I've also tried:

new-sesion 'exec weechat'
new-session 'exec rtorrent'
new-session 'exec zsh'

and

new-session 'weechat'
new-window 'rtorrent'
new-window 'zsh'

None of those worked. What I do see happening though, is it's creating two sessions when I first start tmux.

Last edited by Berticus (2011-02-19 09:32:21)

Offline

#169 2011-02-19 13:00:07

vik_k
Member
From: Pune, India
Registered: 2009-07-12
Posts: 227
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

the first method is quite correct, however when you start tmux in terminal you have to run tmux attach rather than just "tmux" to start these apps in terminal.


"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette

Offline

#170 2011-02-19 14:06:24

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

tzervo wrote:

@mhertz: in addition to what the others said (especially the ssh trick, I use it to monitor some 30 remote simulations at once, this is where it is almost indispensable) tmux attach -t offers many possibilities, especially if used with xbindkeys, dmenu etc, to detach from a session and then reattach to it quickly with a hotkey (xbindkeys, ie. win+m, attach to the mplayer session) or with a menu (dmenu)

EDIT
------

... plus it makes more sense to make terminal applications independent from X (tmux does that, since you can spawn a tmux app in xterm/urxvt and then attach to it from outside X)

I haven't tried tmux, since I'm not sure it would benefit me over screen. I use a tiling WM, and I have never splitted the layout inside screen.

This is an example of what gets launched during login:

# screen -dmS session command
screen -dmS rtorrent rtorrent
screen -dmS mutt mutt
screen -dmS music ncmpcpp

Then I press a shortcut to launch a script. This script launches dmenu with the content of:

find /tmp/screens/S-$(whoami) -type p -printf '%f\n'

An example output of the above command:

1000.192.168.0.1
1001.rtorrent
1002.mutt
1003.index.php
1004.208.67.222.222
1005.qemu.monitor.1
1006.qemu.monitor.2
1007.zsh

Then the resulting choice from dmenu is launched like:

urxvtc -e sh -c "screen -r $the_return_from_dmenu"

That way I have all my different sessions easily available through a shortcut when I'm in dwm.

I'm wondering if there is any advantage for me to use tmux instead of screen here?

Offline

#171 2011-03-02 23:08:57

tzervo
Member
From: Athens
Registered: 2009-04-03
Posts: 86

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

My understanding is that:
1) tmux is better over screen in that it has the vertical split without needing a patch and it has nicer functionalities when you want to move between split panes (I too don't use these since I use my WM for that).
2)screen is better than tmux in that its sharing feature _works_ (you will understand this if you try to share a session in tmux with terminals of different size

For me, I chose tmux because it is newer and it is reported to be slimmer (less bloat/legacy code?) but it actually makes no great difference.

Offline

#172 2011-03-05 23:16:21

lifeafter2am
Member
From: .........
Registered: 2009-06-10
Posts: 1,325
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

I am having some problems and don't quite know why.  First, quite a few of my custom keys aren't working (including Enter, j, k, ctrl-Enter).  Do I need to unbind all of these keys before I rebind them?

Also, the pane border stuff isn't working at all.  The border around the panes is always green.

If someone could take a look at my tmux.conf I would appreciate it.  I have been staring at the man page all day, and need a little guidance.  big_smile

# Bind Prefix
set -g prefix C-f
unbind C-b
bind C-f send-prefix

# Key-bindings
bind-key -n C-f display-panes
unbind %
bind | split-window -h
bind - split-window -v
bind k next-pane
bind j last-pane
bind a resize-pane -r -U
bind z resize-pane -r -D
bind h resize-pane -r -L
bind l resize-pane -r -R
bind -n Ctrl-Enter new-window -a
bind 1 break-pane -t 1
bind -n C-1 select-window -t 1

# Repeat time
set repeat-time 2000

# Status Bar
set status-bg blue
set status-fg white
set status-left '#[fg=white] %H:%M'
setw window-status-current-bg black
setw window-status-alert-bg red
set status-right '#[fg=white] [#25T] Bat:#(acpi | cut -d "," -f 2-)| %H:%M'
set status-justify centre

# Window Notifications
setw monitor-activity on
setw visual-activity on
setw bell-action any

# Window Highlighting
set pane-active-border-fg blue
set display-panes-active-colour blue
set display-panes-colour black

# Amount of time numbers stay on panes
set display-panes-time 5000

# Automatic Window Namting
setw automatic-rename

#binarii @ irc.binarii.wtf
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#173 2011-03-05 23:28:49

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,347
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Using the global switch should allow you to change the border colours. Try:

set -g pane-border-fg blue
set -g pane-active-border-bg default

Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#174 2011-03-06 03:40:10

lifeafter2am
Member
From: .........
Registered: 2009-06-10
Posts: 1,325
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

jasonwryan wrote:

Using the global switch should allow you to change the border colours. Try:

set -g pane-border-fg blue
set -g pane-active-border-bg default

Awesome that worked!

Now, for some reason I am getting errors on some of my keys:

/home/aoi/.tmux.conf: 11: unknown command: next-pane
/home/aoi/.tmux.conf: 17: unknown key: C-Enter
/home/aoi/.tmux.conf: 19: unknown key: C-1

So, I have no clue why C-Enter and C-1 won't bind.  For next-pane, what is the default behavior (C-b , o) doing?  It seems to move me to the next pane, but thats not the command obviously.  lol.


#binarii @ irc.binarii.wtf
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#175 2011-03-06 07:37:08

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,347
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

For next pane, you could use:

bind k select-pane -L
bind j select-pane -R

You might have to ask in #tmux about binding to Return/Enter...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

Board footer

Powered by FluxBB