From d6baba289616fff4dd11596d35d8f856cea1a38b Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 12 Dec 2012 22:16:28 +0000 Subject: [PATCH] cadene-session-start: Smarter system start --- data/99cadence-session-start | 2 +- src/cadence_session_start.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/99cadence-session-start b/data/99cadence-session-start index 3fc988b..600cc53 100644 --- a/data/99cadence-session-start +++ b/data/99cadence-session-start @@ -14,7 +14,7 @@ export LV2_PATH="$LV2_PATH_str" export VST_PATH="$VST_PATH_str" # Start JACK (or not), according to user settings -CADENCE_SESSION="$INSTALL_PREFIX/bin/cadence-session-start -s" +CADENCE_SESSION="$INSTALL_PREFIX/bin/cadence-session-start --system-start" exec $CADENCE_SESSION & unset LADSPA_PATH_str diff --git a/src/cadence_session_start.py b/src/cadence_session_start.py index 190e0f9..6ecf55b 100755 --- a/src/cadence_session_start.py +++ b/src/cadence_session_start.py @@ -41,9 +41,9 @@ def forceReset(): os.remove(config) # Start JACK, A2J and Pulse, according to user settings -def startSession(): +def startSession(systemStarted): # Check if JACK is set to auto-start - if not GlobalSettings.value("JACK/AutoStart", False, type=bool): + if systemStarted and not GlobalSettings.value("JACK/AutoStart", False, type=bool): print("JACK is set to NOT auto-start on login") return True @@ -214,8 +214,10 @@ if __name__ == '__main__': printVST_PATH() elif arg == "--reset": forceReset() + elif arg == "--system-start": + sys.exit(startSession(True)) elif arg in ["-s", "--s", "-start", "--start"]: - sys.exit(startSession()) + sys.exit(startSession(False)) elif arg in ["-h", "--h", "-help", "--help"]: printHelp(cmd) elif arg in ["-v", "--v", "-version", "--version"]: