1LYXCLIENT(1) lyxclient 1.4 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 are documented in
47 <fixme>.
48
49 -c command
50 send a single command, print LyX information to standard
51 output and exit.
52
53 -g file line
54 this is simply a wrapper for the command
55 'server-goto-file-row file line'. It is used by the DVI
56 previewer to elicit inverse DVI search.
57
58 If neither -c nor -g are used, lyxclient will regard any stan‐
59 dard input as commands to be sent to LyX, printing LyX's
60 responses to standard output. Commands are separated by newlines
61 (the '\n' character). To finish communication and terminate the
62 lyxclient process, send the command 'BYE:'.
63
65 -n name
66 when starting communication, lyxclient sends an idenfifier
67 string to LyX. By default, this string is "PPID>PID",
68 where PPID is lyxclient's parent pid and pid is lyx‐
69 client's pid. Use this option to override this default.
70
71 -h print the lyxclient version and summarize its usage.
72
74 LYXSOCKET
75 can be used to specify the socket special file that must
76 be used. LyX sets this variable. It is overridden by
77 the -a option.
78
80 lyx(1), xdvi(1), lyx functions <fixme>.
81
83 João Luis M. Assirati <assirati@fma.if.usp.br> is the principal
84 author of lyxclient.
85
86
87
88Version 1.4 Oct 2003 LYXCLIENT(1)