Skip to content

Instantly share code, notes, and snippets.

View DennisLfromGA's full-sized avatar
🏠
Working from home

DennisL DennisLfromGA

🏠
Working from home
  • SOHO
  • GA
  • 13:59 (UTC -12:00)
View GitHub Profile
@DennisLfromGA
DennisLfromGA / startcr
Last active December 22, 2015 04:38
A crouton tool to search and prompt for a Desktop Environment (I.E.) gnome, xbmc, xfce4, etc. in a specified chroot based upon the contents of the '(chroot)/etc/crouton/targets' file. Also allows checking the 'crouton' version and optionally updating all targets in a chroot.
#!/bin/sh
echo_e='/bin/echo -e'
#######################
## Declare Variables ##
#######################
APPLICATION="${0##*/}"
Chroot_loc=/usr/local/chroots
[ -d /var/crouton/chroots ] && Chroot_loc='/var/crouton/chroots'
[ ! -d "$Chroot_loc" ] && Chroot_loc=''
Chroot_par="$(dirname "${Chroot_loc}")"
@DennisLfromGA
DennisLfromGA / crouton.conf
Last active July 17, 2020 17:27
A ChromeOS upstart script to kick-off a crouton chroot desktop environment.
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
## Filename: /etc/init/crouton.conf
## NOTE: 'rootfs' verification needs to be removed.
## crouton chroot - Start session
##
## This will start a (crouton) chroot Desktop Environment session
@DennisLfromGA
DennisLfromGA / rw-rootfs
Last active July 31, 2022 10:17
A script that asks to make the root filesystem read-writable for subsequent changes and additions by the user.
#!/bin/sh -e
##!! PLEASE USE THIS SCRIPT WITH CAUTION - AND AT YOUR OWN RISK !!##
##!! IT HAS BEEN KNOWN TO CAUSE RESETS AND WIPE DATA ON SOME CHROMEBOXES !!##
APPLICATION="${0##*/}"
ANSWER=''
SUDO=''
USAGE="
$APPLICATION [no options]
@DennisLfromGA
DennisLfromGA / vts
Created November 25, 2013 21:14
Lookup current & active vt's (graphical chroots) in a Chromebook / Crouton environment.
curtty="`cat /sys/class/tty/tty0/active`"
echo "tty's on vt's are:"
ps -CX -CXorg -otname= | sort | nl | sed "s/$curtty/$curtty <--/"
@DennisLfromGA
DennisLfromGA / screenfetch.sh
Last active December 30, 2015 12:29
A bash script to fetch system and theme settings for screenshots in most mainstream Linux distributions with some slight, preliminary changes to include ChromeOS.
#!/usr/bin/env bash
# screenFetch
# Script to fetch system and theme settings for screenshots in most mainstream
# Linux distributions.
# Copyright (c) 2010-2012 Brett Bohnenkamper < kittykatt AT archlinux DOT us >
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
@DennisLfromGA
DennisLfromGA / sme.mount
Last active January 1, 2016 06:29
A shell script to mount or unmount your SMEStorage Cloud Provider folders for local access.<p>Refer to http://storagemadeeasy.com/ for features and details.
#!/bin/sh -e
# Mount SMEStorage Cloud folders locally
Bname="${0##*/}"
Crosh_Loc=''
Local_User="$(id -un)"
SMEmount=''
Umount=''
USAGE="
${Bname} [options]
@DennisLfromGA
DennisLfromGA / screencast
Last active January 3, 2016 09:19
A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider. This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#!/bin/bash -e
## A script to capture a 'screencast' on your Chromebook via 'crouton' (http://goo.gl/fd3zc) by David Schneider.
#+ This is a modified version of the original script 'screencast.sh' (http://goo.gl/UmWAta) by Francois Beaufort.
#+ This 'screencast' modified source (and author) can be found here - (https://gist.github.com/DennisLfromGA/8441689)
# Needs to run in bash so do it.
if [ -z "$BASH_VERSION" ]; then exec bash -e "$0" "$@"; fi
APPLICATION="${0##*/}"
ARGNUM="$#"
@DennisLfromGA
DennisLfromGA / crv
Created March 20, 2014 00:14
A shell script to display the 'crouton' version in the host and optionally update it. If a local version of 'crouton' cannot be found it downloads & installs one. Also, optionally displays the croutonversion and architecture ([-s option]) and other info. ([-v option]) about all [default] or given chroots.
#!/bin/sh
###
### Set Variables
APPLICATION="${0##*/}"
CHECK_IT=''
CHROOT_LOC=/usr/local/chroots
[ -d /var/crouton/chroots ] && CHROOT_LOC='/var/crouton/chroots'
[ ! -d "$CHROOT_LOC" ] && CHROOT_LOC=''
CHROOT_NAME=''
@DennisLfromGA
DennisLfromGA / mnt-crouton.conf
Created April 19, 2014 02:30
A Chromebook init script to mount the CROUTON partition - made possible via @drinkcat's crouton/separate_partition branch
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "mount CROUTON on /var/crouton"
author "drinkcat & DennisLfromGA"
start on starting boot-services
task
script
@DennisLfromGA
DennisLfromGA / enable-vmx.sh
Last active May 5, 2017 00:35
ChromeOS script to re-write the current kernel configuration to enable VT-x extensions and lsm.module locking for virtualbox/virtualization. Based on steps provided by @zwxfzzzjr on the crouton github site here - https://github.com/dnschneid/crouton/issues/675#issuecomment-40567742
#!/bin/sh -e
C_ROOT=''
C_KERNEL=''
##
## Exits the script with exit code $1, spitting out message $@ to stderr
error() {
local ecode="$1"
shift
echo "$*" 1>&2
exit "$ecode"