• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Emacs Keybindings in Chrome Without Gnome

    November 4th, 2014
    tech, ubuntu  [html]
    If you want emacs keybindings in desktop apps on Linux people will tell you to run:
    $ gsettings set \
      org.gnome.desktop.interface \
      gtk-key-theme "Emacs"
    
    If you're running a full desktop environment that's enough, but if you're running something lighter weight like Fluxbox or Awesome you'll also need to run:
    $ gnome-settings-daemon
    
    Unlike the gsettings change, this needs to run every time you log in, so put it in your .xsession or your indow-manager-specific startup file.

    (I just upgraded my linux desktop to Ubuntu 14 LTS (Trusty) and this broke Unity, the window manager I'd been using. I could probably have fixed this by blowing away the configuration and replacing it, but I never really liked it anyway so I decided to go with fluxbox instead.)

    For reference, here's my .xsession contents:

    # Replace the 'caps-lock' key with a second 'control' key.
    /usr/bin/setxkbmap -option 'ctrl:nocaps'
    
    # We want emacs keybindings, especially in Chrome.  Things like Ctrl+d
    # to mean "forward delete" instead of "create a bookmark".  Fixing
    # this has two parts: we need to set a configuration option, and we
    # need to run a settings daemon to make it available.
    #
    # This only needs to be run once, but no harm in running it every
    # login:
    gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
    # This needs to run every time:
    gnome-settings-daemon &
    
    # Make the background black.
    fbsetroot -solid black
    
    # Start and place terminals.  81 columns because code here is limited
    # to 80 columns and emacs reserves a column for the wrapping
    # indicator.  73 columns because that's what fits in the remaining
    # space.
    uxterm -geometry 81x90+1428+0 &
    uxterm -geometry 81x90+1920+0 &
    uxterm -geometry 81x90+2412+0 &
    uxterm -geometry 81x90+2904+0 &
    uxterm -geometry 73x22+3396+0 &
    uxterm -geometry 73x22+3396+310 &
    uxterm -geometry 73x22+3396+620 &
    uxterm -geometry 73x19+3396+930 &
    
    # Chrome.
    google-chrome &
    
    # Start the window manager last, and don't run it in the background.
    fluxbox
    

    Comment via: google plus

    Recent posts on blogs I like:

    Children’s podcast recommendations

    I’ve emailed my list to enough friends that I should really just post it. Podcasts have been a big part of Lily’s life since around age 4. Before that, she spent a lot of her time demanding of any available adult, “READ. READ TO ME” (once she literally as…

    via The whole sky October 11, 2020

    Collections: Iron, How Did They Make It, Part IVa: Steel Yourself

    This week, we continue our four(and a half)-part (I, II, III, IVa, IVb) look at pre-modern iron and steel production. Last week, we looked at how a blacksmith reshapes our iron from a spongy mass called a bloom first into a more workable shape and then fi…

    via A Collection of Unmitigated Pedantry October 9, 2020

    High-Speed Rail and Cities

    When preparing various maps proposing high-speed rail in Germany, I was told that it looks nice but it overfocuses on the largest cities and not about connecting the entirety of the country. I’ve seen such criticism elsewhere, asserting that high-speed ra…

    via Pedestrian Observations October 8, 2020

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact