Finally found a solution. For some reason (probably bug), Sublime Text is exiting with success code right after starting, when it is started with gksu. To prevent this from happening I used -w
argument passed to subl
on startup
smc@smc-comp ~ $ subl --help Sublime Text build 3065 Usage: sublime_text [arguments] [files] edit the given files or: sublime_text [arguments] [directories] open the given directories Arguments: --project <project>: Load the given project --command <command>: Run the given command -n or --new-window: Open a new window -a or --add: Add folders to the current window -w or --wait: Wait for the files to be closed before returning -b or --background: Don't activate the application -h or --help: Show help (this message) and exit -v or --version: Show version and exit Filenames may be given a :line or :line:column suffix to open at a specific location.
So the command looks like this:
gksu "subl -w %F"
Maybe this will save someone time looking at the same issue