]> git.lyx.org Git - lyx.git/blob - src/client/lyxclient.1in
prepare Qt 5.6 builds
[lyx.git] / src / client / lyxclient.1in
1 .\" Man page for lyxclient.
2 .\" Use the following command to view man page:
3 .\"
4 .\"  tbl lyxclient.1 | nroff -man | less
5 .\"
6 .TH LYXCLIENT 1 "@LYX_DATE@" "Version @VERSION@" "lyxclient @VERSION@"
7 .SH NAME
8 lyxclient@version_suffix@ \- send commands to a running LyX editor
9 .\"
10 .\" setup
11 .de Cr
12 .ie n (c)
13 .el \(co
14 ..
15 .SH SYNOPSIS
16 \fBlyxclient@version_suffix@\fR [ \fIoptions\fR ]
17 .br
18 .SH DESCRIPTION
19 When LyX starts, it creates a unique, per-process local socket in the
20 temporary directory through which commands can be sent. That is, it can act
21 like a server, accepting connections from clients. \fBlyxclient\fR
22 can be used as such client. \fBlyxclient\fR will take care of all
23 connection and communication protocol details, leaving you (or your app)
24 free to concentrate on what you want to send to LyX.
25 .SH SERVER IDENTIFICATION OPTIONS
26 \fBlyxclient\fR must first identify to which server (i.e. a running LyX)
27 commands are to be sent. The following options are used to specify the server.
28 .TP 6
29 .TP
30 .BI \-p " pid"
31 specify the \fIpid\fR of the running LyX process to which \fBlyxclient\fR
32 should send commands.
33 .TP
34 .BI \-a " socket_address"
35 specify explicitly which socket special file should be used. These special
36 files are located inside lyx_tmpdir<lyx_pid><hash>, in the temporary
37 directory. There is one per running LyX process.
38 .TP
39 .BI \-t " tmp_dir"
40 if LyX is configured to use a temporary directory other than /tmp, you must
41 inform \fBlyxclient\fR of this.
42 .PP
43 If neither \fB\-a\fR nor \fB\-p\fR are invoked, \fBlyxclient\fR will search for
44 sockets in /tmp (or \fItmp_dir\fR if the \fB\-t\fR option is used) and use
45 the first socket to which it can connect.
46 This is safe if you are running only one LyX process at any one time.
47 .SH COMMAND MODE OPTIONS
48 \fBlyxclient\fR can send commands to LyX from both the command-line
49 and from standard input.
50 LyX commands documentation can be found in LyX Help menu.
51 .TP 6
52 .BI \-c " command"
53 send a single \fIcommand\fR, print LyX information to standard output and exit. LYXCMD prefix is needed in the given command.
54 .TP
55 .BI \-g " file line"
56 this is simply a wrapper for the command 'server\-goto\-file\-row \fIfile\fR \fIline\fR'. It is used by the DVI previewer to elicit inverse DVI search.
57 .PP
58 If neither \fB\-c\fR nor \fB\-g\fR are used, \fBlyxclient\fR will regard any
59 standard input as commands to be sent to LyX, printing LyX's responses to
60 standard output. Commands are
61 separated by newlines (the '\\n' character). To finish communication
62 and terminate the \fBlyxclient\fR process, send the command 'BYE:'.
63 .SH MISCELANEOUS OPTIONS
64 .TP 6
65 .BI \-n " name"
66 when starting communication, \fBlyxclient\fR sends an idenfifier
67 string to LyX. By default, this string is "PPID>PID", where PPID is
68 \fBlyxclient\fR's parent pid and pid is \fBlyxclient\fR's pid.
69 Use this option to override this default.
70 .TP
71 .BI \-h
72 print the \fBlyxclient\fR version and summarize its usage.
73 .SH ENVIRONMENT
74 .TP
75 .B LYXSOCKET
76 can be used to specify the socket special file that must be used.
77 LyX sets this variable.
78 It is overridden by the \fB\-a\fR option.
79 .SH SEE ALSO
80 lyx@version_suffix@(1), xdvi(1), LFUNs.lyx.
81 .SH AUTHORS
82 Jo\[~a]o Luis M. Assirati <assirati@fma.if.usp.br> is the principal author
83 of lyxclient.