help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to `start-process' in different terminal?


From: Thorsten Jolitz
Subject: Re: How to `start-process' in different terminal?
Date: Tue, 24 Jun 2014 17:20:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> writes:

> The use-case I had in mind is:
>  
>  - Emacs on the console with terminal-multiplexer (tmux), no Xorg server
>    running
>
>  - Emacs libraries (org, auctex ...) produce pdf output
>
>  - pdf can be viewed without X11 using frame-buffer tools like fbgs
>
>  - but these tools don't work with terminal-multiplexer like tmux, thus
>    I have to manually switch from tty1 (with tmux) to tty2 (without
>    tmux) and call fbgs from there.
>
> The question was if its possible to e.g. make org-export instruction
>
> ,----
> | Export to LaTeX as PDF file and open
> `----
>
> work in such a scenario too. 
>
> From your answer I would say 'yes', I only need to figure out the very
> last tmux-specific steps. I'll try ...

Ok, after some experimenting I figured out that calling fbgs from Emacs
does not work anyway (not even from Emacs on e.g. tty2 with tty-type
linux and no tmux/screen involved.

I get the same error I get when calling fbgs from tmux:

,----
| address@hidden ~]$ LC_ALL=C fbgs junk/test1.pdf
| 
| ### rendering pages, please wait ... ###
| 
| GPL Ghostscript 9.14 (2014-03-26)
| Copyright (C) 2014 Artifex Software, Inc.  All rights reserved.
| This software comes with NO WARRANTY: see the file PUBLIC for details.
| Processing pages 1 through 1.
| Page 1
| using "Bitstream Vera Sans Mono-16", pixelsize=16.67
| file=/usr/share/fonts/TTF/VeraMono.ttf
| ioctl VT_GETSTATE: Inappropriate ioctl for device (not a linux console?)
`----

So the solution seems to be writing a shellscript that detaches from the
tmux session and then call fbgs on its (pdf) argument and call this
shell-command from Emacs Lisp. 

This 

,----
| #!/bin/sh
| # detach from tmux and call fbgs on arg
| 
| tmux detach
| fbgs "$1"
`----

does not work yet, I get the same error as above, although prompt is now
at a linux console and I can successfully call fbgs manually. 

PS 

If this would work, a simple manual 'tmux attach' would bring you back
to the tmux session and Emacs.




-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]