Skip to content

Instantly share code, notes, and snippets.

Schlomo Schapiro schlomo

View GitHub Profile
View lspci.txt
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.2 PCI bridg
View rpi-image-creator sd card.log
schlomo@brho:~/src/rpi-image-creator$ ./rpi-image-creator /dev/sdd
Switching over to run as root
Fetching http://downloads.raspberrypi.org/raspbian/images/raspbian-2015-02-17/2015-02-16-raspbian-wheezy.zip
Checksum of download/2015-02-16-raspbian-wheezy.zip: OK
Loop-back mounting temp/2015-02-16-raspbian-wheezy.img
Raspbian Image Details:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p1 56M 15M 42M 26% mnt/img_root/boot
/dev/mapper/loop0p2 2.9G 2.3G 462M 84% mnt/img_root
Modifying Image
View rpi-image-creator chroot.log
schlomo@brho:~/src/rpi-image-creator$ ./rpi-image-creator --chroot
Switching over to run as root
Fetching http://downloads.raspberrypi.org/raspbian/images/raspbian-2015-02-17/2015-02-16-raspbian-wheezy.zip
Checksum of download/2015-02-16-raspbian-wheezy.zip: OK
Loop-back mounting temp/2015-02-16-raspbian-wheezy.img
Raspbian Image Details:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p1 56M 15M 42M 26% mnt/img_root/boot
/dev/mapper/loop0p2 2.9G 2.3G 462M 84% mnt/img_root
Modifying Image
View config_for_repo
APT::FTPArchive::Release::Origin "Schlomo";
APT::FTPArchive::Release::Label "Schlomo Stable";
APT::FTPArchive::Release::Architectures "amd64 armhf armel i386";
APT::FTPArchive::Release::Description "Private Packages";
View putinrepo.sh
#!/bin/bash
#
# Trivial DEB repo management
#
# Written by Schlomo Schapiro
# Licensed under the GNU General Public License, see http://www.gnu.org/licenses/gpl.html for full text
set -e -E -u
if [[ ! "${REPO_BASE_DIR:-}" ]] ; then
ME_DIR="$(dirname "$(readlink -f "$0")")"
for CHECK_DIR in "$ME_DIR" "$ME_DIR"/../repo "$ME_DIR"/repo ; do
@schlomo
schlomo / auto.sh
Created Feb 7, 2015
Ubuntu guest session configuration. This script runs as the guest user and should be installed as /etc/guest-session/auto.sh
View auto.sh
gsettings set org.gnome.desktop.lockdown disable-user-switching true
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set com.canonical.indicator.session suppress-restart-menuitem true
gsettings set com.canonical.indicator.session suppress-shutdown-menuitem true
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L']"
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'de+deadgraveacute'), ('xkb', 'il')]"
gsettings set com.canonical.indicator.datetime show-day true
gsettings set com.canonical.indicator.datetime show-seconds true
gsettings set com.canonical.indicator.datetime show-date true
gsettings set com.canonical.indicator.datetime show-week-numbers true
@schlomo
schlomo / prefs.sh
Created Feb 7, 2015
Ubuntu guest session customization. Install as /etc/guest-session/prefs.sh
View prefs.sh
touch "$HOME"/.skip-guest-warning-dialog
if [[ -r /usr/share/applications/google-chrome.desktop ]] ; then
mkdir -p "$HOME"/.local/share/applications
sed -e '/Exec/s/google[a-z-]\+/& --password-store=basic/' -e '/^Name=/s/=/&Guest /' \
< /usr/share/applications/google-chrome.desktop > "$HOME"/.local/share/applications/google-chrome.desktop
fi
mkdir -p "$HOME"/.config/autostart
for service in blueman.desktop deja-dup-monitor.desktop indicator-bluetooth.desktop indicator-power.desktop light-locker.desktop vino-server.desktop nm-applet.desktop ; do
if [[ -e /etc/xdg/autostart/$service ]] ; then
@schlomo
schlomo / disable-suspend-and-hibernate.pkla
Created Feb 7, 2015
PolicyKit Local Authority policy to disable suspend and hibernate for all users. Should be installed into /var/lib/polkit-1/localauthority/90-mandatory.d or /etc/polkit-1/localauthority/90-mandatory.d
View disable-suspend-and-hibernate.pkla
[Completely disable suspend and hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend;org.freedesktop.upower.hibernate;org.freedesktop.login1.suspend*;org.freedesktop.login1.hibernate*
ResultAny=no
ResultInactive=no
ResultActive=no
@schlomo
schlomo / guest-lockdown.pkla
Created Feb 7, 2015
PolicyKit Local Authority policy to lockdown Ubuntu guest session from modifying the system. Should be installed into /var/lib/polkit-1/localauthority/90-mandatory.d or /etc/polkit-1/localauthority/90-mandatory.d
View guest-lockdown.pkla
[Allow harmless stuff]
Identity=unix-user:guest-*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;com.canonical.indicator.sound.AccountsService.ModifyOwnUser;org.freedesktop.accounts.change-own-user-data
ResultActive=yes
[Allow handling removable media]
Identity=unix-user:guest-*
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.eject-media;org.freedesktop.udisks2.ata-standby;org.freedesktop.udisks2.power-off-drive;org.freedesktop.udisks2.modify-device;org.freedesktop.udisks2.cancel-job;org.freedesktop.udisks2.rescan;org.freedesktop.udisks2.encrypted-unlock;org.freedesktop.udisks2.encrypted-change-passphrase
ResultActive=yes
@schlomo
schlomo / secure-umask.sh
Created Feb 7, 2015
Set umask to prevent world readable access
You can’t perform that action at this time.