|
Kexi Command Line Options
started by jstaniek
Usage
kexi [options] [project-or-filename]
^ toc
Supported options
^ toc
Options related to entire projects
Note: if none of the below options are used, default is "open database" action.
- Create a new, blank project using specified database driver and database name. You will be asked for confirmation if overwriting is needed.
- Like --createdb, but also open newly created database.
- Drop (remove) a project using specified database driver and database name. You will be asked for confirmation.
- --drv <name> or --dbdriver <name>
- Database driver to be used. Ignored if shortcut filename is provided. 'SQLite' is assumed if this option is ommited.
- --type <name> or -t <name>
- Specify a type of a file provided as argument. This option is useful if your filename has not set a valid extension and it's type cannot be detected unambiguously by looking at it's contents. This option is ignored if no file is specified as an argument. Available file types are:
- - "project" for a project file (the default)
- - "shortcut" for a shortcut file pointing you to a project.
- - "connection" for a database connection data.
- --conn <shortcut_filename> or --connection <shortcut_filename>
- Specify a database connection shortcut .kexic file containing connection data. Can be used with --createdb or --create-opendb for convenience instead of using options like --user, --host or --port. Note: Options like --user, --host have precedence over settings defined in the shortcut file.
Note 1: Shortcuts to database connection are files typically saved by Kexi in /home/YOURNAME/.kde/share/apps/kexi/connections/ directory. You can copy them whenever you want but note they can contain password information if you saved it.
Note 2: Use the '--connection filename' option with database name to immediately open the database without any questions. Example use: "kexi --conn /home/myname/.kde/share/apps/kexi/connections/myserver.kexic mydbname". This way you can create a desktop shortcut for faster opening of recently used database project.
- Specify that any database connections will be performed without write support. This option is ignored when "createdb" option is present, otherwise the database could not be created.
- Start project in User Mode, regardless of the project settings.
- Start project in Design Mode, regardless of the project settings.
- Show the Project Navigator side pane even if Kexi runs in User Mode.
- Skip displaying startup dialog window. If there is no project name specified to open, empty application window will appear.
^ toc
Options related to opening objects
- --open [<object_type>:]<object_name>
- Start Kexi with specified object shown automatically. <object_type> is optional, if omitted - table type is assumed. Other object types can be query, report, form, script (may be more or less, depending on your plugins installed).
- --design [<object_type>:]<object_name>
- Like --open, but the object will be opened in Design Mode, if one is available
- --edittext [<object_type>:]<object_name>
- like --open, but the object will be opened in Text Mode, if one is available
- --exec [<object_type>:]<object_name>, or --execute [<object_type>:]<object_name>
- Start execution of object of type <object_type> and name <object_name> on application start. <object_type> is optional, if omitted - macro type is assumed. Other object types can be script (may be more or less, depending on your plugins installed). Use "" chars to specify names containing spaces.
- Start new object's design of type <object_type>
- --print [<object_type>:]<object_name>
- Open Print dialog window for object of type <object_type> and name <object_name> in specified project on application start for quick printing of the object's data. <object_type> is optional, if omitted - table type is assumed. Object type can be also query.
- --print-preview [<object_type>:]<object_name>
- Open Print Preview window for object of type <object_type> and name <object_name> from specified project on application start. See --print for more details.
^ toc
Options related to database servers
- --user <name> or -u <name>
- User name to be used for connecting to a database project. Ignored if a shortcut filename is provided.
- --host <name> or -h <name>
- Server (host) name to be used for connecting to a database project. Ignored if a shortcut filename is provided.
- Server's port name to be used for connecting to a database project. Ignored if a shortcut filename is provided.
- --local-socket <filename>
- Server's local socket filename to be used for connecting to a database project. Ignored if a shortcut filename is provided.
- Skip displaying connection dialog window and connect directly. Available when opening .kexic or .kexis shortcut files.
^ toc
Arguments
- Kexi database project filename, Kexi shortcut filename, or name of a Kexi database project on a server to open.
^ toc
Experimental options
(currently none)
^ toc
Notes
- Type 'kexi --help' to get a complete options list.
- Database driver names and object names are case insensitive.
- User Mode allows data/functions executing/inserting/updating only (i.e. no schema modifications i.e. no design). Design mode (the default) allows all design actions.
- In typical case, eg. for MySql, you will need a root user and password to create database project - see first example below.
^ toc
Examples
- kexi --createdb --dbdriver mysql --user root my_new_project
- Creates empty 'my_new_project' project on a local MySQL server (user root is used and will be asked for password).
- kexi --createdb my_new_project.kexi
- Creates empty 'my_new_project.kexi' project file (default SQLite driver)
- kexi --dbdriver postgresql --dropdb project
- drops 'project' from a local PostgreSQL server
- kexi --open mytable --edittext query:query1 --design form:form1 project.kexi
- Opens 'project.kexi' Kexi project file and auto-opens 'mytable' table (in data view), opens 'query1' query in SQL Editor view, and finally, open a form 'form1' for design.
- kexi --new form project.kexi
- Starts a new form's design within 'project.kexi'
- kexi --user-mode --show-navigator --open form:cars --open form:persons db.kexi
- Opens 'db.kexi' database file in the User Mode, shows the project navigator, and automatically opens 'cars' and 'persons' forms.
^ toc
Planned Options
- --compact - compacts the (SQLite) database and exits
- passing more server connection information
- renaming projects
- migration options
- querying (displaying object lists, etc.)
|