all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* multiple users, one emacs - how?
@ 2006-06-03 21:00 Joe Corneli
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Corneli @ 2006-06-03 21:00 UTC (permalink / raw)



The closest I've found to an answer is the suggestion by Pascal
in the thread "howto: 2 users interactively edit the same file ?",

http://lists.gnu.org/archive/html/help-gnu-emacs/2005-10/msg00842.html 

I haven't had a chance to try this -- but I am primarily interested in
a solution that doesn't involve/require X (e.g. because me and my
collaborators are typically editing files in cybercafes, where it is
AFAIK impossible to determine an actual IP address for the computer --
if I'm wrong about this, I'd be willing to accept an X windows
solution).

Ideally (at least for now) what I'd like would be to have a copy of
emacs running on a computer somewhere where we'd log in via shell
accounts, and then we'd e.g. fire up an emacsclient and all get access
to that emacs's state.

It seems to be insinuated that (or anyway I've imagined) emacsclient
can actually do this.  (Cf. this thread:
http://lists.gnu.org/archive/html/help-gnu-emacs/2005-08/msg00226.html)

Is this the case?  Can emacsclient be used by multiple users to access
the same emacs through a shell?  Or, if not emacsclient, can anyone
suggest a good solution?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: multiple users, one emacs - how?
       [not found] <mailman.2606.1149370719.9609.help-gnu-emacs@gnu.org>
@ 2006-06-04  1:04 ` Pascal Bourguignon
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal Bourguignon @ 2006-06-04  1:04 UTC (permalink / raw)


Joe Corneli <jcorneli@planetmath.org> writes:

> The closest I've found to an answer is the suggestion by Pascal
> in the thread "howto: 2 users interactively edit the same file ?",
>
> http://lists.gnu.org/archive/html/help-gnu-emacs/2005-10/msg00842.html 
>
> I haven't had a chance to try this -- but I am primarily interested in
> a solution that doesn't involve/require X (e.g. because me and my
> collaborators are typically editing files in cybercafes, where it is
> AFAIK impossible to determine an actual IP address for the computer --
> if I'm wrong about this, I'd be willing to accept an X windows
> solution).

Well, when you connect to a remote host, you can know the IP. But
you're right, you may be behind a NAT router. In that case, you can
send the X traffic thru ssh: ssh publishes a X display on a local port
on the remote that it forward back to the client, so you can have the
display on the local computer with: 
  ssh -X remote.host xclock -display localhost:10
for example.


> Ideally (at least for now) what I'd like would be to have a copy of
> emacs running on a computer somewhere where we'd log in via shell
> accounts, and then we'd e.g. fire up an emacsclient and all get access
> to that emacs's state.
>
> It seems to be insinuated that (or anyway I've imagined) emacsclient
> can actually do this.  (Cf. this thread:
> http://lists.gnu.org/archive/html/help-gnu-emacs/2005-08/msg00226.html)
>
> Is this the case?  Can emacsclient be used by multiple users to access
> the same emacs through a shell?  Or, if not emacsclient, can anyone
> suggest a good solution?

You have several options.

You could use the multitty branch of emacs, which allows to create new
tty frames as we can create new X frames.

In terminal 1:  emacs 
In terminal 2:  emacsclient --tty

You could also use: M-x make-frame-on-tty RET /dev/pts/NN RET xterm RET

But you'd need to ensure that your input in the xterm is not taken by
another program: run sleep 100000 for example!

xterm -display :0.0  -e bash -c 'ls -l /proc/$$/fd/;sleep 1000'

The advantage of multi-tty emacs is that you can have both X and
terminal frames.


You can also use screen, which would allow you to share terminals on
the same shell for any terminal application, including an emacs (even
a non multi-tty one):

screen -e^^^^ -d -m emacs -nw  # to launch an emacs
screen -r -x                   # to attach to the session
screen -r -x                   # to attach to the session from another terminal.


(with emacs, it's useful to use C-^ as screen escape instead of the
default C-a).

You can try it with:

screen -e^^^^ -d -m emacs -nw
xterm -e screen -r -x &
xterm -e screen -r -x &
xterm -e screen -r -x &


The advantage of screen is that you can easily detach from the session
and having it go on with no terminal.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

ATTENTION: Despite any other listing of product contents found
herein, the consumer is advised that, in actuality, this product
consists of 99.9999999999% empty space.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-04  1:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2606.1149370719.9609.help-gnu-emacs@gnu.org>
2006-06-04  1:04 ` multiple users, one emacs - how? Pascal Bourguignon
2006-06-03 21:00 Joe Corneli

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.