I'm trying to run a script on session start, so I added it to System -> Preferences -> Startup Applications.
The script does run, but some of the commands inside don't appear to run at all. If after startup I open a terminal and run the script manually, it runs fine!
#!/bin/bash if [ "$DISPLAY" == ":0.0" ]; then tmux new -s Phys \; \ new-window -t Phys -n synergy \; \ send-keys -t Phys:1 '~/bin/start-synergy' 'enter' \; \ send-keys -t Phys:0 'xbmc' 'enter' \; \ select-window -t Phys:1 else tmux new -s NX \; \ new-window -t NX -n miro \; \ send-keys -t NX:0 'transmission-gtk' 'enter' \; \ send-keys -t NX:1 'miro' 'enter' \; \ select-window -t NX:1 fi
The only reason I'm using tmux is so I'd be able to see the console output, since I was having trouble making the script open the applications properly.
However, it doesn't work at all, tmux doesn't start.
As I said, if I open a terminal and run this script, then it does work perfectly!
I tried redirecting tmux' output to a log file to see if I got a clue there, but the log ends up empty.
Also, I added
echo commands that output to a file, just to see if the script is being run at all, and it is.
What could be the cause?