Command line options

From Mudlet
Jump to navigation Jump to search

See also: How to open mudlet in windows cmd

Mudlet takes a few options when you start it from a terminal or a shortcut. The handiest ones skip the profile picker: --profile opens a profile you name, and --offline opens it without dialling the game - useful for editing triggers or reading a map while the game is down.

Recent additions

  • --offline - opens whichever profiles load at startup without connecting to their game server. Added in Mudlet 5.0
  • -f, --fullscreen - starts Mudlet filling the screen, whatever the profile has saved. Added in Mudlet 4.20
Example
# open the Achaea profile, but do not connect
mudlet --profile=Achaea --offline

Full listing

Available command line options as at 5.0

  > mudlet --help
Options:
       -h, --help                   displays this message.
       -v, --version                displays version information.
       -s, --splashscreen           show splashscreen on startup.
       -p, --profile=<profile>      additional profile to open, may be
                                    repeated.
       -o, --only=<predefined>      make Mudlet only show the specific
                                    predefined game, may be repeated.
       -f, --fullscreen             start Mudlet in fullscreen mode.
       --offline                    open the profiles loaded at startup
                                    without connecting to their game
                                    server.
       --steammode                  adjusts Mudlet settings to match
                                    Steam's requirements.
There are other inherited options that arise from the Qt Libraries which are
less likely to be useful for normal use of this application:
       --dograb                     ignore any implicit or explicit -nograb.
                                    --dograb wins over --nograb even when --nograb is last on
                                    the command line.
       --nograb                     the application should never grab the mouse or the
                                    keyboard. This option is set by default when Mudlet is
                                    running in the gdb debugger under Linux.
       --reverse                    sets the application's layout direction to right to left.
       --style=style                sets the application GUI style. Possible values depend on
                                    your system configuration. If Qt was compiled with
                                    additional styles or has additional styles as plugins
                                    these will be available to the -style command line
                                    option. You can also set the style for all Qt
                                    applications by setting the QT_STYLE_OVERRIDE environment
                                    variable.
       --style style                is the same as listed above.
       --stylesheet=stylesheet      sets the application styleSheet.
                                    The value must be a path to a file that contains the
                                    Style Sheet. Note: Relative URLs in the Style Sheet file
                                    are relative to the Style Sheet file's path.
       --stylesheet stylesheet      is the same as listed above.
       --sync                       forces the X server to perform each X client request
                                    immediately and not use buffer optimization. It makes the
                                    program easier to debug and often much slower. The --sync
                                    option is only valid for the X11 version of Qt.
       --widgetcount                prints debug message at the end about number of widgets
                                    left undestroyed and maximum number of widgets existing
                                    at the same time.
       --qmljsdebugger=1234[,block] activates the QML/JS debugger with a
                                    specified port. The number is the port value and block is
                                    optional and will make the application wait until a
                                    debugger connects to it.

Arguments:
        [FILE]                       File to install as a package
Report bugs to: https://github.com/Mudlet/Mudlet/issues
Project home page: http://www.mudlet.org/

Choosing where Mudlet keeps its files

Mudlet keeps profiles, maps and settings in ~/.config/mudlet. Two things can move that:

  • a portable.txt file beside the Mudlet executable, or in ~/.config/mudlet, holding the path to use. This wins over everything else
  • the XDG_CONFIG_HOME environment variable, which makes Mudlet look in $XDG_CONFIG_HOME/mudlet instead. Added in Mudlet 5.0. The value has to be an absolute path, or it is ignored

Setting XDG_CONFIG_HOME on its own will not move an existing installation, and Mudlet will not silently start you afresh with your profiles left behind. It picks whichever of the two directories has the better claim to be the real one - profiles beat a settings file, which beats an empty directory - so an existing ~/.config/mudlet full of profiles keeps being used and Mudlet notes why in its log.

To move over, create the profiles directory in the new location and copy your data across:

mkdir -p "$XDG_CONFIG_HOME/mudlet"
cp -a ~/.config/mudlet/. "$XDG_CONFIG_HOME/mudlet/"

Note Note: A profiles directory under $XDG_CONFIG_HOME/mudlet is taken as your deliberate choice, so that location wins even while it is still empty. If both directories end up holding profiles, only the ones in $XDG_CONFIG_HOME/mudlet are listed and the others are hidden - Mudlet warns about this on startup. Unset XDG_CONFIG_HOME to get back to the old directory.