crosh customisation

On a chromebook, one can customise the terminal as follows. This is very handy used in conjunction with CLI crouton, to have a nice command line.

  • Open the command line: Ctrl-Alt-T
  • Open the Javascript console: Ctrl-Shift-J
  • Enter a setting by typing: term_.prefs_.set('key', 'value');

    Possible keys with examples:

  • Disable audible bell: > term_.prefs_.set('audible-bell-sound', '');
  • Hide scrollbar: > term_.prefs_.set('scrollbar-visible', false);
  • Set background to solarized dark: > term_.prefs_.set('background-color', "white");
  • Set foreground to solarized dark: > term_.prefs_.set('foreground-color', "black");
  • Change font size permanently for all terminals: > term_.prefs_.set('font-size', 20);
  • Change font size as one-off for current terminal: Ctrl-+ or Ctrl--
  • If you screw up and you want to start again: > term_.prefs_.resetAll();

Useful snippets ready to copy/paste:

Solarized Light colors:

console.log("Solarized Light");
term_.prefs_.set('background-color', "#fdf6e3");
term_.prefs_.set('foreground-color', '#586e75');

Solarized Dark colors:

console.log("Solarized Dark");
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', '#93a1a1');

No scrollbar, no bell, decent font size:

console.log("Lyderic's defaults");
term_.prefs_.set('audible-bell-sound', '');
term_.prefs_.set('scrollbar-visible', false);
term_.prefs_.set('font-size', 20);

You can find additional information on the crosh FAQ page.

écrivain et éditeur

Après plusieurs vies, j’écris maintenant