Skip to content

Commit

Permalink
* add dbus module to pulseaudio command line since we have dbus enabl…
Browse files Browse the repository at this point in the history
…ed by default

* prettify config file by splitting long commands into multiple lines

git-svn-id: https://xpra.org/svn/Xpra/trunk@12139 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 13, 2016
1 parent 2b1fdfb commit eb366a9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
16 changes: 14 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,13 +896,25 @@ def get_printer_def(k):
postscript = get_printer_def("postscript")
except Exception as e:
print("could not probe for pdf/postscript printers: %s" % e)
SUBS = {'xvfb_command' : " ".join(xvfb_command),
def pretty_cmd(cmd):
lines = []
line = ""
for c in cmd:
if len(line+c)>=72:
lines.append(line+" \\\n")
line = " "+c
else:
line += " "+c
if line:
lines.append(line+" \\\n")
return (" ".join(lines)).rstrip("\\\n")
SUBS = {'xvfb_command' : pretty_cmd(xvfb_command),
'ssh_command' : DEFAULT_SSH_COMMAND,
'key_shortcuts' : "".join(("key-shortcut = %s\n" % x) for x in get_default_key_shortcuts()),
'remote_logging' : "both",
'env' : env,
'has_displayfd' : bstr(has_displayfd),
'pulseaudio_command' : DEFAULT_PULSEAUDIO_COMMAND,
'pulseaudio_command' : pretty_cmd(DEFAULT_PULSEAUDIO_COMMAND),
'conf_dir' : conf_dir,
'bind' : bind,
'socket_dirs' : "".join(("socket-dirs = %s\n" % x) for x in socket_dirs),
Expand Down
10 changes: 6 additions & 4 deletions src/xpra/platform/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
DEFAULT_ENV = []

DEFAULT_SSH_COMMAND = "ssh -x"
DEFAULT_PULSEAUDIO_COMMAND = "pulseaudio --start --daemonize=false --system=false " + \
"--exit-idle-time=-1 -n --load=module-suspend-on-idle " + \
"--load=module-null-sink --load=module-native-protocol-unix "+ \
"--log-level=2 --log-target=stderr"
DEFAULT_PULSEAUDIO_COMMAND = ["pulseaudio", "--start", "-n", "--daemonize=false", "--system=false",
"--exit-idle-time=-1", "--load=module-suspend-on-idle",
"--load=module-null-sink",
"--load=module-native-protocol-unix",
"--load=module-dbus-protocol",
"--log-level=2", "--log-target=stderr"]

if sys.version<'3':
CLIENT_MODULES = ["xpra.client.gtk2.client"]
Expand Down
2 changes: 1 addition & 1 deletion src/xpra/scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def addtrailingslash(v):
"clipboard-filter-file" : "",
"remote-clipboard" : "CLIPBOARD",
"local-clipboard" : "CLIPBOARD",
"pulseaudio-command": DEFAULT_PULSEAUDIO_COMMAND,
"pulseaudio-command": " ".join(DEFAULT_PULSEAUDIO_COMMAND),
"encryption" : "",
"tcp-encryption" : "",
"encryption-keyfile": "",
Expand Down

0 comments on commit eb366a9

Please sign in to comment.