4

I have VSCode installed on Ubunutu 14.04 64-bit but when it's launched from terminal there is this error:

[6303:0615/111654:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

Is this something I should fix or it is coming from VSCode?

Also is there a way to launch it from terminal but terminal not to stay open all the time?

0

2 Answers 2

6

Since it seems safe to ignore the startup errors, add this to your .bashrc:

function __code {
   if [ "$@x" != 'x' ]; then
      (~/path/to/Code "$@" &) &> /dev/null
   else
      (~/path/to/Code &) &> /dev/null
   fi
}

alias code='__code'

This will allow you to use the same calling convention as in the documentation.

If you don't want to suppress the errors just remove the &> /dev/null bit.

Also don't forget to replace ~/path/to with the actual path where you extracted the zip file to.

3
  • After adding this at the end of .bashrc VSCode does not start from terminal command anymore :-). Is there a way to debug it.
    – NexusStar
    Commented Jun 18, 2015 at 13:23
  • @NexusStar Try running the command (~/bin/code/Code &) &> /dev/null directly in the shell. Also did you check to make sure the path to code is correct? (Replace ~/bin/code/ with the path that you extracted the zip file to.) Commented Jun 18, 2015 at 21:22
  • amazing...exactly what i wanted Commented Feb 13, 2016 at 5:36
1

A set uid sand box is to help limit interprocess communication. Worth looking into if you are interested in stepping up security, but not needed for Code to run right.

To launch an application (Code in his case) from a terminal and to be able to close the terminal use disown.

Code &
disown

And to redirect the CLI output from the program into a file use

Code &> /dev/null

putting the two together to launch Code with no terminal output, and the ability to close the window:

Code &> /dev/null &
disown
1
  • This actually works but the error stays on and it's needed to type (Ctrl + c) to "reclaim" terminal.
    – NexusStar
    Commented Jun 18, 2015 at 13:26

Not the answer you're looking for? Browse other questions tagged .