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: CtrlAltT
  • Open the Javascript console: CtrlShiftJ
  • 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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s