1LYXCLIENT(1) lyxclient 2.3.2 LYXCLIENT(1)
2
3
4
6 lyxclient - send commands to a running LyX editor
7
9 lyxclient [ options ]
10
12 When LyX starts, it creates a unique, per-process local socket in the
13 temporary directory through which commands can be sent. That is, it can
14 act like a server, accepting connections from clients. lyxclient can be
15 used as such client. lyxclient will take care of all connection and
16 communication protocol details, leaving you (or your app) free to con‐
17 centrate on what you want to send to LyX.
18
20 lyxclient must first identify to which server (i.e. a running LyX) com‐
21 mands are to be sent. The following options are used to specify the
22 server.
23
24
25 -p pid
26 specify the pid of the running LyX process to which lyx‐
27 client should send commands.
28
29 -a socket_address
30 specify explicitly which socket special file should be
31 used. These special files are located inside
32 lyx_tmpdir<lyx_pid><hash>, in the temporary directory.
33 There is one per running LyX process.
34
35 -t tmp_dir
36 if LyX is configured to use a temporary directory other
37 than /tmp, you must inform lyxclient of this.
38
39 If neither -a nor -p are invoked, lyxclient will search for
40 sockets in /tmp (or tmp_dir if the -t option is used) and use
41 the first socket to which it can connect. This is safe if you
42 are running only one LyX process at any one time.
43
45 lyxclient can send commands to LyX from both the command-line
46 and from standard input. LyX commands documentation can be
47 found in LyX Help menu.
48
49 -c command
50 send a single command, print LyX information to standard
51 output and exit. LYXCMD prefix is needed in the given com‐
52 mand.
53
54 -g file line
55 this is simply a wrapper for the command 'command-sequence
56 server-goto-file-row file line; lyx-activate'. It is used
57 by the PDF and DVI previewer to elicit inverse search and
58 focus the LyX window.
59
60 If neither -c nor -g are used, lyxclient will regard any stan‐
61 dard input as commands to be sent to LyX, printing LyX's
62 responses to standard output. Commands are separated by newlines
63 (the '\n' character). To finish communication and terminate the
64 lyxclient process, send the command 'BYE:'.
65
67 -n name
68 when starting communication, lyxclient sends an idenfifier
69 string to LyX. By default, this string is "PPID>PID",
70 where PPID is lyxclient's parent pid and pid is lyx‐
71 client's pid. Use this option to override this default.
72
73 -h print the lyxclient version and summarize its usage.
74
76 LYXSOCKET
77 can be used to specify the socket special file that must
78 be used. LyX sets this variable. It is overridden by
79 the -a option.
80
82 lyx(1), xdvi(1), LFUNs.lyx.
83
85 João Luis M. Assirati <assirati@fma.if.usp.br> is the principal
86 author of lyxclient.
87
88
89
90Version 2.3.2 2018-12-08 LYXCLIENT(1)