From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: How to `start-process' in different terminal? Date: Tue, 24 Jun 2014 17:20:05 +0200 Message-ID: <87ha3atjve.fsf@gmail.com> References: <87egyhnfzj.fsf@kuiper.lan.informatimago.com> <87lhsmmvy3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403623268 27064 80.91.229.3 (24 Jun 2014 15:21:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Jun 2014 15:21:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 24 17:21:01 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WzSWm-0003ub-Dz for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jun 2014 17:20:56 +0200 Original-Received: from localhost ([::1]:60263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzSWl-0005XA-Vg for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jun 2014 11:20:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzSWK-0005Wx-7I for help-gnu-emacs@gnu.org; Tue, 24 Jun 2014 11:20:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzSWC-0002mi-Oj for help-gnu-emacs@gnu.org; Tue, 24 Jun 2014 11:20:28 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:56694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzSWC-0002mb-I6 for help-gnu-emacs@gnu.org; Tue, 24 Jun 2014 11:20:20 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WzSW9-0003X8-PB for help-gnu-emacs@gnu.org; Tue, 24 Jun 2014 17:20:17 +0200 Original-Received: from e178188029.adsl.alicedsl.de ([85.178.188.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 17:20:17 +0200 Original-Received: from tjolitz by e178188029.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 17:20:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 75 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178188029.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:BF1wlAMMjM2dsHqr0RSHFCUv9HQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98375 Archived-At: Thorsten Jolitz 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: ,---- | [tj@arch ~]$ 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