Cannot 'write' to pts because user not logged in

2013-09-23 Thread Porcelain Mouse
Hello All,

I use 'write' for a number of things, but since I switched to tmux, I can 
no longer write to different terminals.  'write' complains that the use 
I'm trying to send a message isn't logged in on the target terminal.

write:  is not logged in on pts/10

One idea is to get tmux to register the pty as a login.  Is that possible?

Another idea is to find out which is the "controlling" pts for the tmux 
client and 'write' to that.  That would be an acceptable workaround...but 
I can't quite figure out how to do it.  I've tried to get tmux to list 
information like #{client_id} using the -F  option but I get 
nothing.  So, how can I ask tmux to tell me which terminal a particular 
session is on?  Is that possible?

Thanks,
PMouse

-- 
PMouse

--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[tmux:tickets] #64 Imporve tmux emulating virtual console

2013-09-23 Thread roucarb



---

** [tickets:#64] Imporve tmux emulating virtual console**

**Status:** open
**Created:** Wed Sep 18, 2013 04:09 PM UTC by roucarb
**Last Updated:** Wed Sep 18, 2013 04:09 PM UTC
**Owner:** nobody

Hi,

I use something like this to create virtual console like with tmux, shared 
between local and remote access (think about science computation)
if test -z ${TMUX}; then
if tmux has-session -t ${TMUX_SESSION} 2> /dev/null; then
s_id="$(tty)"-"$(date "+%Y%m%d%H%M%N")"
exec tmux new-session -d -s "${s_id}" -t "${TMUX_SESSION}"\;\
  new-window \; \
  attach-session -t $session_id
else
exec tmux -l new-session -A -s ${TMUX_SESSION}
fi
fi

Will be nice to have some shortcut for some operation:
* create a unique name for the s_id something like the session number (avoiding 
the use of the racy $(tty)"-"$(date "+%Y%m%d%H%M%N") ). An option like -S will 
be really convinient (preferably not racy)
* tmux new-session -s foo -t fu when no fu session is running fail. Could be 
possible to add a flag to say create the session group if not exist like for 
instance -T (preferably not racy)
* tmux new-session could be completed by an option -W meaning create a new 
window

So the racy and quite complicated command line could be abbreviated to 
something like:
test -z ${TMUX} && exec tmux new-session -A -S -W -T ${TMUX_SESSION}


---

Sent from sourceforge.net because tmux-users@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/tmux/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/tmux/admin/tickets/options.  Or, if this is a mailing 
list, you can unsubscribe from the mailing list.--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
On Mon, 23 Sep 2013 13:13:59 -0500
Mark Volkmann  wrote:

> On Mon, Sep 23, 2013 at 1:00 PM, Sharon Kimble
> wrote:
> 
> > I have the urgent need to copy a tmux pane to either the normal
> > clipboard or a text file. I have used these instructions to copy the
> > text output in tmux -
> >
> > Cut & Paste -
> > 1) enter copy mode using Control+a [
> > 2) navigate to beginning of text, you want to select and hit
> > Control+Space
> >
> 
> I thought this was just Space.

Well that highlights it all
> 
> 
> > 3) move around using arrow keys to select region
> > 4) when you reach end of region simply hit Alt+w to copy the region
> >
> 
> I thought this was just Enter.

That turned off the highlighting, but its still not showing in my
clipboard, with the 'clipit' programme. 
> 
> 
> > 5) now Control+a ] will paste the selection
> 
Nothing seems to happen with 'CTRL+a+]' so I don’t know where its gone!

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 334501 


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
On Mon, 23 Sep 2013 19:25:15 +0100
Nicholas Marriott  wrote:

> Do "tmux saveb -" to send it to stdout, or just paste it into emacs or
> something with C-b ].

Thanks for this, I'm now got to the stage of highlighting it, then
press ENTER and 'tmux saveb -' and it pastes itself into the same pane!
It doesn't get as far as the clipboard, which is still showing 'Do
"tmux saveb -" to send it to stdout, or just paste it into emacs or
something with C-b ].' and that’s pasted into emacs too!

Just for clarity in case its relevant I'm using 'tmux version 1.9'
which is up-to-date with the git repo. 

Thanks
Sharon.
> 
> 
> On Mon, Sep 23, 2013 at 07:00:38PM +0100, Sharon Kimble wrote:
> > I have the urgent need to copy a tmux pane to either the normal
> > clipboard or a text file. I have used these instructions to copy the
> > text output in tmux - 
> > 
> > Cut & Paste - 
> > 1) enter copy mode using Control+a [ 
> > 2) navigate to beginning of text, you want to select and hit
> > Control+Space 
> > 3) move around using arrow keys to select region
> > 4) when you reach end of region simply hit Alt+w to copy the region
> > 5) now Control+a ] will paste the selection
> > 
> > And its copied somewhere but I cant see it or find it. 'xclip' is
> > running to help in the process. Whilst I was following the
> > instructions the text was not highlighted, I don???t know if it
> > should have been? 
> > 
> > Can somebody please help me save this pane output so that I can
> > post a bug against the new kernel for Debian testing. 
> > 
> > Thanks
> > Sharon.
> 
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Nicholas Marriott
Do "tmux saveb -" to send it to stdout, or just paste it into emacs or
something with C-b ].


On Mon, Sep 23, 2013 at 07:00:38PM +0100, Sharon Kimble wrote:
> I have the urgent need to copy a tmux pane to either the normal
> clipboard or a text file. I have used these instructions to copy the
> text output in tmux - 
> 
> Cut & Paste - 
> 1) enter copy mode using Control+a [ 
> 2) navigate to beginning of text, you want to select and hit
> Control+Space 
> 3) move around using arrow keys to select region
> 4) when you reach end of region simply hit Alt+w to copy the region
> 5) now Control+a ] will paste the selection
> 
> And its copied somewhere but I cant see it or find it. 'xclip' is
> running to help in the process. Whilst I was following the
> instructions the text was not highlighted, I don???t know if it should
> have been? 
> 
> Can somebody please help me save this pane output so that I can post a
> bug against the new kernel for Debian testing. 
> 
> Thanks
> Sharon.
> -- 
> ???A taste of linux = http://www.sharons.org.uk
> efever = http://www.efever.blogspot.com/
> efever = http://sharon04.livejournal.com/
> Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
> Registered Linux user 334501 



> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk

> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Nicholas Marriott
Pipe it to xclip or xsel or something.

 Original message 
From: Sharon Kimble  
Date: 23/09/2013  20:07  (GMT+00:00) 
To: Nicholas Marriott  
Cc: tmux-users@lists.sourceforge.net 
Subject: Re: Copying from tmux to clipboard or text file needed urgently. 
 
On Mon, 23 Sep 2013 19:25:15 +0100
Nicholas Marriott  wrote:

> Do "tmux saveb -" to send it to stdout, or just paste it into emacs or
> something with C-b ].

Thanks for this, I'm now got to the stage of highlighting it, then
press ENTER and 'tmux saveb -' and it pastes itself into the same pane!
It doesn't get as far as the clipboard, which is still showing 'Do
"tmux saveb -" to send it to stdout, or just paste it into emacs or
something with C-b ].' and that’s pasted into emacs too!

Just for clarity in case its relevant I'm using 'tmux version 1.9'
which is up-to-date with the git repo. 

Thanks
Sharon.
> 
> 
> On Mon, Sep 23, 2013 at 07:00:38PM +0100, Sharon Kimble wrote:
> > I have the urgent need to copy a tmux pane to either the normal
> > clipboard or a text file. I have used these instructions to copy the
> > text output in tmux - 
> > 
> > Cut & Paste - 
> > 1) enter copy mode using Control+a [ 
> > 2) navigate to beginning of text, you want to select and hit
> > Control+Space 
> > 3) move around using arrow keys to select region
> > 4) when you reach end of region simply hit Alt+w to copy the region
> > 5) now Control+a ] will paste the selection
> > 
> > And its copied somewhere but I cant see it or find it. 'xclip' is
> > running to help in the process. Whilst I was following the
> > instructions the text was not highlighted, I don???t know if it
> > should have been? 
> > 
> > Can somebody please help me save this pane output so that I can
> > post a bug against the new kernel for Debian testing. 
> > 
> > Thanks
> > Sharon.
> 
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[PATCH] Keep client when attaching in a "child" cmdq

2013-09-23 Thread Chris Johnsen
With tmux 1.7, when a client executes a 'source-file' command that
includes a 'new-session' or an 'attach-session' command, the client will
end up attached.

After the cmdq revamp, such a client always exits after 'source-file'
finishes. The "attaching commands" set cmdq->client_exit to 0, but, when
run under 'source-file' (or 'if-shell'), this only affects the "child"
cmdq that is used by these commands; the main cmdq created for the
client's direct commands still has client_exit at its default of 1, so
the client is told to exit shortly after the source-file command
finishes.

Introduce a new "unset" value to cmdq->client_exit so that
a client_exit value that is explicitly established in a "child" cmdq
('source-file' or 'if-shell') can be distinguished and passed along
to its "parent" cmdq (i.e. eventually up to the client's main cmdq).

---
The following shell command reproduces the issue:

./tmux -L other new -ds test \; if true 'attach -t test'

After the cmdq introduction the client exits immediately. In older
versions (and after this patch) the client stays attached to the
"test" session.

The same thing happens if you replace the "if-shell" command with
a "source-file" that does the attach; if-shell is just easier to use
in a shell one-liner since it does not need a separate file.
---
 cmd-if-shell.c| 3 +++
 cmd-queue.c   | 4 ++--
 cmd-source-file.c | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cmd-if-shell.c b/cmd-if-shell.c
index d1cbd7f..42b8376 100644
--- a/cmd-if-shell.c
+++ b/cmd-if-shell.c
@@ -148,6 +148,9 @@ cmd_if_shell_done(struct cmd_q *cmdq1)
struct cmd_if_shell_data*cdata = cmdq1->data;
struct cmd_q*cmdq = cdata->cmdq;
 
+   if (cmdq1->client_exit >= 0)
+   cmdq->client_exit = cmdq1->client_exit;
+
if (!cmdq_free(cmdq) && !cdata->bflag)
cmdq_continue(cmdq);
 
diff --git a/cmd-queue.c b/cmd-queue.c
index 671f1e9..7c651bf 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -35,7 +35,7 @@ cmdq_new(struct client *c)
cmdq->dead = 0;
 
cmdq->client = c;
-   cmdq->client_exit = 0;
+   cmdq->client_exit = -1;
 
TAILQ_INIT(&cmdq->queue);
cmdq->item = NULL;
@@ -256,7 +256,7 @@ cmdq_continue(struct cmd_q *cmdq)
} while (cmdq->item != NULL);
 
 empty:
-   if (cmdq->client_exit)
+   if (cmdq->client_exit > 0)
cmdq->client->flags |= CLIENT_EXIT;
if (cmdq->emptyfn != NULL)
cmdq->emptyfn(cmdq); /* may free cmdq */
diff --git a/cmd-source-file.c b/cmd-source-file.c
index 45a3a39..48dd638 100644
--- a/cmd-source-file.c
+++ b/cmd-source-file.c
@@ -96,6 +96,9 @@ cmd_source_file_done(struct cmd_q *cmdq1)
 {
struct cmd_q*cmdq = cmdq1->data;
 
+   if (cmdq1->client_exit >= 0)
+   cmdq->client_exit = cmdq1->client_exit;
+
cmdq_free(cmdq1);
 
cfg_references--;
-- 
1.8.4


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[PATCH] Restore 'splitw -h' binding

2013-09-23 Thread Chris Johnsen
The binding from '%' to 'splitw -h' was inadvertently lost in
a36da3a (Remove the barely-used and unnecessary command check()
function., 2013-08-21).

---
I rarely split windows manually, but I happened to notice that the
usual binding for '%' changed recently. This seems like an
accidental change in the "remove check()" commit.
---
 cmd-split-window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd-split-window.c b/cmd-split-window.c
index 5b5140b..40f7966 100644
--- a/cmd-split-window.c
+++ b/cmd-split-window.c
@@ -36,7 +36,7 @@ const struct cmd_entry cmd_split_window_entry = {
"[-dhvP] [-c start-directory] [-F format] [-p percentage|-l size] "
CMD_TARGET_PANE_USAGE " [command]",
0,
-   NULL,
+   cmd_split_window_key_binding,
cmd_split_window_exec
 };
 
-- 
1.8.4


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
I have the urgent need to copy a tmux pane to either the normal
clipboard or a text file. I have used these instructions to copy the
text output in tmux - 

Cut & Paste - 
1) enter copy mode using Control+a [ 
2) navigate to beginning of text, you want to select and hit
Control+Space 
3) move around using arrow keys to select region
4) when you reach end of region simply hit Alt+w to copy the region
5) now Control+a ] will paste the selection

And its copied somewhere but I cant see it or find it. 'xclip' is
running to help in the process. Whilst I was following the
instructions the text was not highlighted, I don’t know if it should
have been? 

Can somebody please help me save this pane output so that I can post a
bug against the new kernel for Debian testing. 

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 334501 


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
On Mon, 23 Sep 2013 20:54:43 +0100
Nicholas Marriott  wrote:

> Pipe it to xclip or xsel or something.

How? I thought it just went to xclip automatically, which then
transferred it to the normal clipboard?

Sharon. 
> 
>  Original message 
> From: Sharon Kimble  
> Date: 23/09/2013  20:07  (GMT+00:00) 
> To: Nicholas Marriott  
> Cc: tmux-users@lists.sourceforge.net 
> Subject: Re: Copying from tmux to clipboard or text file needed
> urgently. 
> On Mon, 23 Sep 2013 19:25:15 +0100
> Nicholas Marriott  wrote:
> 
> > Do "tmux saveb -" to send it to stdout, or just paste it into emacs
> > or something with C-b ].
> 
> Thanks for this, I'm now got to the stage of highlighting it, then
> press ENTER and 'tmux saveb -' and it pastes itself into the same
> pane! It doesn't get as far as the clipboard, which is still showing
> 'Do "tmux saveb -" to send it to stdout, or just paste it into emacs
> or something with C-b ].' and that’s pasted into emacs too!
> 
> Just for clarity in case its relevant I'm using 'tmux version 1.9'
> which is up-to-date with the git repo. 
> 
> Thanks
> Sharon.
> > 
> > 
> > On Mon, Sep 23, 2013 at 07:00:38PM +0100, Sharon Kimble wrote:
> > > I have the urgent need to copy a tmux pane to either the normal
> > > clipboard or a text file. I have used these instructions to copy
> > > the text output in tmux - 
> > > 
> > > Cut & Paste - 
> > > 1) enter copy mode using Control+a [ 
> > > 2) navigate to beginning of text, you want to select and hit
> > > Control+Space 
> > > 3) move around using arrow keys to select region
> > > 4) when you reach end of region simply hit Alt+w to copy the
> > > region 5) now Control+a ] will paste the selection
> > > 
> > > And its copied somewhere but I cant see it or find it. 'xclip' is
> > > running to help in the process. Whilst I was following the
> > > instructions the text was not highlighted, I don???t know if it
> > > should have been? 
> > > 
> > > Can somebody please help me save this pane output so that I can
> > > post a bug against the new kernel for Debian testing. 
> > > 
> > > Thanks
> > > Sharon.
> > 



-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


How to copy the whole buffer?

2013-09-23 Thread Sharon Kimble
Okay, I'm attacking the problem from another direction - how can i copy
*all* of the buffer to a text file please. I've used 'tmux capture-pane
-t keep \; save-buffer -b 0 ~/tmuxtest.txt' which worked slightly in
that it only copied over the visible part of the buffer/pane but I'm
after everything!

Can it be done please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: How to copy the whole buffer?

2013-09-23 Thread Thomas Adam
On Mon, Sep 23, 2013 at 11:46:04PM +0100, Sharon Kimble wrote:
> Okay, I'm attacking the problem from another direction - how can i copy
> *all* of the buffer to a text file please. I've used 'tmux capture-pane
> -t keep \; save-buffer -b 0 ~/tmuxtest.txt' which worked slightly in
> that it only copied over the visible part of the buffer/pane but I'm
> after everything!

I feel like we're going round in circles here, from what I've read in the
other thread.

Which version of tmux is this on?  Git (1.9)?  If so, I think when you say
"whole buffer" here, you're probably wanting to capture the entire pane (see
capture-pane, with the -S and -E options).

Getting the contents of that in to the clipboard, if that's even what you
want now (given that again, capturep can output the result to STDOUT), is
down to tools like xclip, etc., but if the content is in a file, what
difference would it make?

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Jan Larres
On 24/09/13 09:21, Sharon Kimble wrote:
> On Mon, 23 Sep 2013 20:54:43 +0100
> Nicholas Marriott  wrote:
>
>> Pipe it to xclip or xsel or something.
>
> How? I thought it just went to xclip automatically, which then
> transferred it to the normal clipboard?

No. Tmux copies things to its own internal paste buffers without
touching the system clipboard. To pipe the current buffer to xclip do
this:

  $ tmux saveb - | xclip -i -selection clipboard

For doing this more easily in the future add these two bindings to your
tmux.conf:

  # Copy tmux paste buffer to CLIPBOARD
  # Use save-buffer instead of show-buffer to avoid inserting spurious 
linebreaks
  bind-key C-y run-shell -b "tmux save-buffer - | xclip -i -selection clipboard"
  # Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
  bind-key C-p run-shell "xclip -o -selection clipboard | tmux load-buffer -; 
tmux paste-buffer"

Jan


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: How to copy the whole buffer?

2013-09-23 Thread Sharon Kimble
On Mon, 23 Sep 2013 23:52:06 +0100
Thomas Adam  wrote:

> On Mon, Sep 23, 2013 at 11:46:04PM +0100, Sharon Kimble wrote:
> > Okay, I'm attacking the problem from another direction - how can i
> > copy *all* of the buffer to a text file please. I've used 'tmux
> > capture-pane -t keep \; save-buffer -b 0 ~/tmuxtest.txt' which
> > worked slightly in that it only copied over the visible part of the
> > buffer/pane but I'm after everything!
> 
> I feel like we're going round in circles here, from what I've read in
> the other thread.
> 
> Which version of tmux is this on?  Git (1.9)?  If so, I think when
> you say "whole buffer" here, you're probably wanting to capture the
> entire pane (see capture-pane, with the -S and -E options).

Yes, git 1.9 up-to-date. 

So I've used this 'tmux capture-pane -E 3319 -S 1 -t keep \;
save-buffer -b 0 ~/tmuxtest2.txt' and 'tmuxtest2.txt' is created
but still only shows just the visible part of the pane, so what am I
failing on atm please?
> 
> Getting the contents of that in to the clipboard, if that's even what
> you want now (given that again, capturep can output the result to
> STDOUT), is down to tools like xclip, etc., but if the content is in
> a file, what difference would it make?

I'd be happy if it just created a whole buffer/pane text-file. 

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
On Tue, 24 Sep 2013 10:57:02 +1200
Jan Larres  wrote:

> On 24/09/13 09:21, Sharon Kimble wrote:
> > On Mon, 23 Sep 2013 20:54:43 +0100
> > Nicholas Marriott  wrote:
> >
> >> Pipe it to xclip or xsel or something.
> >
> > How? I thought it just went to xclip automatically, which then
> > transferred it to the normal clipboard?
> 
> No. Tmux copies things to its own internal paste buffers without
> touching the system clipboard. To pipe the current buffer to xclip do
> this:
> 
>   $ tmux saveb - | xclip -i -selection clipboard

Thanks for this Jan, and I've used the command you’ve given, but its
failing atm due to an old alias of xclip which is now commented out but
unable to get rid of it completely due to some unknown error
in .bashrc, so the whole thing is failing atm!

If you feel like it, the whole of the .bashrc is at
http://paste.debian.net/45437/ but I cant see why its failing at all. 

> For doing this more easily in the future add these two bindings to
> your tmux.conf:
> 
>   # Copy tmux paste buffer to CLIPBOARD
>   # Use save-buffer instead of show-buffer to avoid inserting
> spurious linebreaks bind-key C-y run-shell -b "tmux save-buffer - |
> xclip -i -selection clipboard" # Copy CLIPBOARD to tmux paste buffer
> and paste tmux paste buffer bind-key C-p run-shell "xclip -o
> -selection clipboard | tmux load-buffer -; tmux paste-buffer"
> 
> Jan

Yes, I will amend my tmux.conf once I've got this sorted out.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Jan Larres
On 24/09/13 11:26, Sharon Kimble wrote:
> On Tue, 24 Sep 2013 10:57:02 +1200
> Jan Larres  wrote:
>> No. Tmux copies things to its own internal paste buffers without
>> touching the system clipboard. To pipe the current buffer to xclip do
>> this:
>>
>>   $ tmux saveb - | xclip -i -selection clipboard
>
> Thanks for this Jan, and I've used the command you’ve given, but its
> failing atm due to an old alias of xclip which is now commented out but
> unable to get rid of it completely due to some unknown error
> in .bashrc, so the whole thing is failing atm!

You can either remove the alias with the 'unalias' command or call xclip
as 'command xclip' which will bypass the alias.

> If you feel like it, the whole of the .bashrc is at
> http://paste.debian.net/45437/ but I cant see why its failing at all.

If you are talking about the 'unexpected end of file' errors then that's
because you have commented out the closing braces of the prompt_on() and
prompt_off() functions and are missing a 'fi' at the end.

Jan


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Sharon Kimble
On Tue, 24 Sep 2013 11:58:35 +1200
Jan Larres  wrote:

> On 24/09/13 11:26, Sharon Kimble wrote:
> > On Tue, 24 Sep 2013 10:57:02 +1200
> > Jan Larres  wrote:
> >> No. Tmux copies things to its own internal paste buffers without
> >> touching the system clipboard. To pipe the current buffer to xclip
> >> do this:
> >>
> >>   $ tmux saveb - | xclip -i -selection clipboard
> >
> > Thanks for this Jan, and I've used the command you’ve given, but its
> > failing atm due to an old alias of xclip which is now commented out
> > but unable to get rid of it completely due to some unknown error
> > in .bashrc, so the whole thing is failing atm!
> 
> You can either remove the alias with the 'unalias' command or call
> xclip as 'command xclip' which will bypass the alias.
> 
> > If you feel like it, the whole of the .bashrc is at
> > http://paste.debian.net/45437/ but I cant see why its failing at
> > all.
> 
> If you are talking about the 'unexpected end of file' errors then
> that's because you have commented out the closing braces of the
> prompt_on() and prompt_off() functions and are missing a 'fi' at the
> end.
> 
> Jan
> 
Thanks Jan, thats .bashrc is now sorted out, so I do this - 

1 - CTRL+a+[
2 - move cursor to beginning of required text
3 - press SPACE
4 - move cursor to end of required text
5 - press ENTER
6 - CTRL+a+]
7 - command xclip -o > tmuxing.txt

tmuxing.txt is created but is only 5 bytes big consisting of one word
'xclip'.

So where am I going wrong please? I'm genuinely at a loss with this.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.1.2
Registered Linux user 561944


signature.asc
Description: PGP signature
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Copying from tmux to clipboard or text file needed urgently.

2013-09-23 Thread Jan Larres
On 24/09/13 12:15, Sharon Kimble wrote:
> Thanks Jan, thats .bashrc is now sorted out, so I do this -
>
> 1 - CTRL+a+[
> 2 - move cursor to beginning of required text
> 3 - press SPACE
> 4 - move cursor to end of required text
> 5 - press ENTER
> 6 - CTRL+a+]
> 7 - command xclip -o > tmuxing.txt
>
> tmuxing.txt is created but is only 5 bytes big consisting of one word
> 'xclip'.

'Ctrl-a ]' will paste the buffer directly into whatever application
you're currently running, which would be the terminal in your case. I
guess that's not really what you want. Is anything happening when you
press that? I can't tell from your notation but note that you're NOT
supposed to hold Ctrl when pressing ']'.

The correct sequence for you would be instead of doing 6+7 to execute
the pipeline I wrote earlier:

  $ tmux saveb - | command xclip -i -selection clipboard

Jan


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users