Recipe for MCP Laptops

  • base netinst install of jessie - deselect everything from tasksel
    • hostname laptop-equipment or laptop-classroom – domain mcp.lcl
    • auto-partition layout (EFI) on SSD (discard, noatime)
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude install ssh (this will pull in xauth, but that's okay)
  • aptitude install net-tools man-db less fbset screen rsync psmisc file patch ethtool strace tcpdump vim bzip2 xz-utils
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • adduser tdobes systemd-journal
  • aptitude install dbus (probably not necessary - gets pulled in by task-laptop)
  • sed -i -e 's/^deb.* main$/& contrib non-free/g' /etc/apt/sources.list
  • aptitude update && aptitude forget-new
  • aptitude install intel-microcode
  • aptitude install firmware-iwlwifi # for Intel wireless - Latitude E6540
  • aptitude install firmware-linux-nonfree # for ATI video card - Latitude E6540
  • aptitude install firmware-ipw2x00 # for older Intel wireless - Inspiron 6000
  • aptitude install ifplugd
  • sed -i -e 's/^INTERFACES=""/INTERFACES="eth0"/g' /etc/default/ifplugd
  • sed -i -e 's/^allow-hotplug eth0/#allow-hotplug eth0/g' /etc/network/interfaces
  • # this takes care of the two DHCP interfaces fighting over resolv.conf:
    aptitude install resolvconf
    systemctl enable resolvconf
    systemctl start resolvconf
  • aptitude install wpasupplicant ifmetric iw wireless-tools
    
    echo 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev' > /etc/wpa_supplicant/mcp.conf
    echo 'update_config=1' >> /etc/wpa_supplicant/mcp.conf
    echo >> /etc/wpa_supplicant/mcp.conf
    echo 'network={' >> /etc/wpa_supplicant/mcp.conf
    echo '  ssid="mcp-5.8"' >> /etc/wpa_supplicant/mcp.conf
    echo '  scan_ssid=1' >> /etc/wpa_supplicant/mcp.conf
    echo '  key_mgmt=WPA-PSK' >> /etc/wpa_supplicant/mcp.conf
    echo '  psk="**PASSWORD**"' >> /etc/wpa_supplicant/mcp.conf
    echo '  id_str="mcp"' >> /etc/wpa_supplicant/mcp.conf
    echo '  priority=10' >> /etc/wpa_supplicant/mcp.conf
    echo '}' >> /etc/wpa_supplicant/mcp.conf
    echo >> /etc/wpa_supplicant/mcp.conf
    echo 'network={' >> /etc/wpa_supplicant/mcp.conf
    echo '  ssid="mcp-2.4"' >> /etc/wpa_supplicant/mcp.conf
    echo '  scan_ssid=1' >> /etc/wpa_supplicant/mcp.conf
    echo '  key_mgmt=WPA-PSK' >> /etc/wpa_supplicant/mcp.conf
    echo '  psk="**PASSWORD**"' >> /etc/wpa_supplicant/mcp.conf
    echo '  id_str="mcp"' >> /etc/wpa_supplicant/mcp.conf
    echo '  priority=9' >> /etc/wpa_supplicant/mcp.conf
    echo '}' >> /etc/wpa_supplicant/mcp.conf
    chmod 600 /etc/wpa_supplicant/mcp.conf # protect password
    echo >> /etc/network/interfaces
    echo 'allow-hotplug wlan0' >> /etc/network/interfaces
    echo 'iface wlan0 inet manual' >> /etc/network/interfaces
    echo '  wpa-roam /etc/wpa_supplicant/mcp.conf' >> /etc/network/interfaces
    echo >> /etc/network/interfaces
    echo 'iface mcp inet dhcp' >> /etc/network/interfaces
    echo '  metric 1' >> /etc/network/interfaces
  • # For Inspiron 6000, change to mcp-2.4 instead of mcp-5.8 and eth1 instead of wlan0
  • <code> aptitude –without-recommends install ntp echo '[Unit]' > /etc/systemd/system/ntp.service echo 'Description=Network Time Protocol daemon' » /etc/systemd/system/ntp.service echo 'After=network.target' » /etc/systemd/system/ntp.service echo » /etc/systemd/system/ntp.service echo '[Service]' » /etc/systemd/system/ntp.service echo 'ExecStart=/usr/sbin/ntpd -n -g -u ntp:ntp' » /etc/systemd/system/ntp.service echo » /etc/systemd/system/ntp.service echo '[Install]' » /etc/systemd/system/ntp.service echo 'WantedBy=multi-user.target' » /etc/systemd/system/ntp.service systemctl enable ntp.service </code>
  • mkdir -p /etc/systemd/system/ssh.socket.d
    echo '[Socket]' > /etc/systemd/system/ssh.socket.d/port-2222.conf
    echo 'ListenStream=2222' >> /etc/systemd/system/ssh.socket.d/port-2222.conf
    systemctl disable ssh.service && systemctl enable ssh.socket
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • systemctl mask networking.service # we use ifplugd instead
    echo 'D /run/network 0755 root root' > /etc/tmpfiles.d/debian-networking.conf
    echo 'F /run/network/ifstate 0644 root root - lo=lo' >> /etc/tmpfiles.d/debian-networking.conf
  • aptitude purge acpid acpi-support-base # systemd-logind takes care of this
  • systemctl mask keyboard-setup.service
    systemctl mask console-setup.service
    systemctl mask rc-local.service
  • aptitude --without-recommends install irqbalance
  • # don't go into sleep mode when we close the laptop lid:
    sed -i -e 's/^#HandleLidSwitch=.*$/HandleLidSwitch=ignore/g' -e 's/^#LidSwitchIgnoreInhibited=.*$/LidSwitchIgnoreInhibited=no/g'  /etc/systemd/logind.conf
  • aptitude install xserver-xorg-video-intel xserver-xorg-input-evdev # Inspiron 6000
  • aptitude install xserver-xorg-video-intel xserver-xorg-video-ati xserver-xorg-input-evdev # Latitude E6540
  • aptitude install xinit xinput xdotool x11vnc x11-xserver-utils
  • sed -i -e 's/^use-ssh-agent$/#use-ssh-agent/g' /etc/X11/Xsession.options
  • aptitude install alsa-utils fonts-freefont-ttf
  • aptitude install ntfs-3g exfat-fuse
  • adduser tdobes dialout
  • aptitude install etherwake
  • chmod u+s /usr/sbin/etherwake
  • aptitude install python-serial picocom
  • aptitude install xserver-xorg-input-synaptics
  • aptitude install x11-apps mesa-utils xfonts-100dpi xfonts-75dpi xfonts-scalable
    aptitude install lightdm xfce4 xfce4-goodies # deselect colord, xscreensaver, at-spi2-core
    aptitude install evince-gtk iceweasel mousepad vlc audacity
    aptitude install rdesktop xtightvncviewer
    aptitude install chromium # chromium-inspector
    # aptitude install flashplugin-nonfree pepperflashplugin-nonfree
    aptitude install ttf-dejavu ttf-mscorefonts-installer
    aptitude install hunspell-en-us hyphen-en-us libreoffice libreoffice-gtk libreoffice-help-en-us mythes-en-us libreoffice-pdfimport libreoffice-ogltrans
    aptitude --without-recommends install cifs-utils smbclient
    # aptitude install icedtea-7-plugin
    aptitude install sshfs
    aptitude install tmux git
  • sed -i -e 's/"syntax on/syntax on/g' -e 's/"set background=dark/set background=dark/g' -e 's/"set showcmd/set showcmd/g' -e 's/"set showmatch/set showmatch/g' -e 's/"set ignorecase/set ignorecase/g' -e 's/"set smartcase/set smartcase/g' -e 's/"set incsearch/set incsearch/g' -e 's/"set autowrite/set autowrite/g' -e 's/"set hidden/set hidden/g' -e 's/"set mouse=a/set mouse=nic/g' /etc/vim/vimrc
  • vi /etc/vim/vimrc # – and uncomment autocmd block for jumping to last position
  • alsamixer # unmute master and PCM, bring both up to unity; bring beep up to -6 dB
  • systemctl start alsa-store
  • systemctl start lightdm
  • log in as tdobes, then:
    • tell XFCE to use the default config
    • Start → Settings → Window Manager Tweaks
      • Workspaces tab: disable Use the mouse wheel on the desktop to switch workspaces
      • Compositor tab: enable display compositing
      • Compositor tab: enable show shadows under popup windows
      • Compositor tab: Opacity of inactive windows: click downward on scrollbar twice
    • Terminal → Edit → Preferences
      • General tab: Scrollback = 100000
      • Appearance tab: Font = Monospace 10
      • Appearance tab: Background = Transparent 0.80
    • right-click Start → Properties
      • turn off Show Button Title
    • right-click clock → Properties
      • format: HH:MM PM
    • right-click top panel → Panel → Panel Preferences
      • Appearance tab: Leave Opacity = 50
      • Items tab: add Power Manager Plugin between Action Buttons and Notification Area
      • Items tab: add CPU Graph between Action Buttons and Power Manager Plugin
    • right-click bottom panel → Panel → Panel Preferences
      • Display tab: enable Automatically show and hide the panel
    • right-click CPU graph → Properties
      • Appearance tab: change background to #000000
      • Appearance tab: change Color mode to Gradient
      • Advanced tab: width = 50
      • Advanced tab: don't show frame
      • Advanced tab: don't show border
      • Advanced tab: don't show current usage bars
    • Start → Settings → Power Manager
      • General tab: When laptop lid is closed - on battery suspend, plugged in switch off display
      • Display tab: 60 minutes for all three display management sliders when plugged in
    • right-click desktop → Desktop Settings
      • Background tab: Image = None
      • Background tab: Colors = Solid color
      • Background tab: change first color to #000000
    • Start → Settings → Appearance
      • Style tab: Select Xfce-dusk
      • Fonts tab: Enable anti-aliasing (make sure it's checked, not the indeterminate dash)
      • Fonts tab: Hinting = Full
    • x11vnc -storepasswd
    • sed -i -e 's/#force_color_prompt=yes/force_color_prompt=yes/g' -e "s/#alias grep='grep --color=auto'/alias grep='grep --color=auto'/g" ~/.bashrc
    • echo 'set -g mouse on' > ~/.tmux.conf
    • # TLP power management:
      echo 'deb http://ftp.us.debian.org/debian/ stretch-backports main' > /etc/apt/sources.list.d/backports.list
      echo 'deb-src http://ftp.us.debian.org/debian/ stretch-backports main' >> /etc/apt/sources.list.d/backports.list
      
      aptitude update && aptitude forget-new
      # no recommends because we definitely don't want network-manager (which is a hard dep of tlp-rdw)
      aptitude --without-recommends -t stretch-backports install tlp linux-cpupower powermgmt-base smartmontools && aptitude markauto linux-cpupower powermgmt-base smartmontools

Tom's Laptop additions

  • aptitude install audacious
  • aptitude install jackd darkice meterbridge
  • # Pull in backport of mpd: 0.19.1 in Jessie has an AAC stream decoding bug
    echo 'deb http://ftp.us.debian.org/debian/ jessie-backports main' > /etc/apt/sources.list.d/backports.list
    echo 'deb-src http://ftp.us.debian.org/debian/ jessie-backports main' >> /etc/apt/sources.list.d/backports.list
    
    echo 'Package: mpd' > /etc/apt/preferences.d/mpd-backport
    echo 'Pin: release a=jessie-backports' >> /etc/apt/preferences.d/mpd-backport
    echo 'Pin-Priority: 999' >> /etc/apt/preferences.d/mpd-backport
    
    aptitude update && aptitude forget-new
  • aptitude install mpd mpc ncmpc
  • aptitude --without-recommends install openvpn
computer/mcp_laptops.txt · Last modified: 2018/07/19 01:38 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS