########################################################################
# Server Options:

# Directory for server log files:
#log-dir = /run/user/$UID
#log-dir = ~/.xpra
#log-dir = /tmp
log-dir = auto

# Log file:
log-file = $DISPLAY.log

# Delegate "start" and "start-desktop" subcommands to the system-wide proxy server instance
#start-via-proxy = auto
start-via-proxy = no

# Environment variables for children started
# with 'start-child' or 'start':
# (can be specified multiple times)
#start-env = HOME=/home/alt
#start-env = GDK_DEBUG=dnd
start-env = #avoid Ubuntu's global menu, which is a mess and cannot be forwarded:
start-env = UBUNTU_MENUPROXY=
start-env = QT_X11_NO_NATIVE_MENUBAR=1
start-env = #fix for MainSoft's MainWin buggy window management:
start-env = MWNOCAPTURE=true
start-env = MWNO_RIT=true
start-env = MWWM=allwm
start-env = #force GTK3 applications to use X11 so we can intercept them:
start-env = GDK_BACKEND=x11
start-env = #force Qt applications to use X11 so we can intercept them:
start-env = QT_QPA_PLATFORM=xcb

# Commands to start by default
#  (may be specified more than once):
# examples:
#start-child = /usr/bin/xterm
#start-child = /usr/bin/xeyes
#start=/bin/true
#
# Xsession can take care of initializing dbus, keyring-daemon,
# gpg-agent or whatever else might be usually started together with X
#start = /etc/X11/Xsession true
# Or you can specify individual actions:
#xrdb -merge /etc/X11/Xresources
#xrdb -merge ~/.Xresources
#
# The difference between start and start-child is only relevant
# when using exit-with-children.
# This causes the server to terminate when the last child has exited:
exit-with-children = no

# Commands to start immediately after the first client has connected:
# (see above for the start vs start-child distinction)
#start-after-connect = touch ~/.xpra/connect
#start-child-after-connect = xterm

# Commands to every time a client connects:
# (see above for the start vs start-child distinction)
#start-on-connect = touch ~/.xpra/login
#start-child-on-connect = xterm

# Start a dbus-daemon:
# dbus-launch =
# dbus-launch = /usr/bin/dbus-launch --close-stderr
dbus-launch = dbus-launch --close-stderr

# Start a dbus server which can be used to interact with the server process:
#dbus-control = no
dbus-control = yes

# Forward client dbus rpc requests:
# (requires client configuration)
#dbus-proxy = no
dbus-proxy = yes

# A wrapper for executing all sub-commands:
# exec-wrapper = vglrun --
# exec-wrapper = vglrun -d :1 --

# Allows clients to start new commands in the server context:
#start-new-commands = yes
start-new-commands = no

# Start a pulseaudio server with each session:
pulseaudio = auto

# pulseaudio server start command:
pulseaudio-command = pulseaudio --start -n --daemonize=false --system=false --exit-idle-time=-1 --load=module-suspend-on-idle '--load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\ Speaker"' '--load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\ Microphone"' '--load=module-native-protocol-unix socket=$XPRA_PULSE_SERVER' --load=module-dbus-protocol --load=module-x11-publish --log-level=2 --log-target=stderr --enable-memfd=no

# commands used to configure the pulseaudio server:
# pactl set-source-volume SomeSource 20%
pulseaudio-configure-commands = pactl set-default-sink Xpra-Speaker
pulseaudio-configure-commands = pactl set-default-source Xpra-Microphone.monitor


# Systemd specific options:
# Wrap server start commands with systemd-run:
#systemd-run = no
#systemd-run = auto
systemd-run = auto

# Command line arguments passed to systemd-run:
#systemd-run-args = -p MemoryAccounting=true -p MemoryHigh=384M -p MemoryLimit=512M
#systemd-run-args = -p CPUAccounting=true -p CPUQuota=25%
