Wiki - README‎ > ‎Computers‎ > ‎


Qubes OS Project [link]
"a reasonably secure operating system"

Librem 13: A laptop that respects your rights [link]

usb authentication [link]

unix tricks [link]

purge memory [link]

recover from shutdown during upgrade [link]
sudo dpkg --configure -a
sudo apt-get update
sudo dpkg --configure -a
sudo dpkg --configure -a --abort-after=99999
sudo apt-get dist-upgrade
sudo apt-get -f install
sudo apt-get dist-upgrade

ramdisk [link]
mkdir /home/ram
mkfs -q /dev/ram1 8192
mount /dev/ram1 /home/ram
chown usr.grp /home/ram

change keyboard layout [link]

get script's location, regardless from where its called!!! [link]

memusage [link]
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
# Author: Jaeho Shin <>
# Created: 2010-08-16
set -um

# check input
[ $# -gt 0 ] || { sed -n '2,/^#$/ s/^# //p' <"$0"; exit 1; }

# TODO support more options: peak, footprint, sampling rate, etc.

pgid=`ps -o pgid= $`
# make sure we're in a separate process group
if [ $pgid = $(ps -o pgid= $(ps -o ppid= $)) ]; then
    set -- "$0" "$@"
    for a; do cmd+="'${a//"'"/"'\\''"}' "; done
    exec bash -i -c "$cmd"

# detect operating system and prepare measurement
case `uname` in
    Darwin|*BSD) sizes() { /bin/ps -o rss= -g $1; } ;;
    Linux) sizes() { /bin/ps -o rss= -$1; } ;;
    *) echo "`uname`: unsupported operating system" >&2; exit 2 ;;

# monitor the memory usage in the background.
    while sizes=`sizes $pgid`
        set -- $sizes
        let peak="sample > peak ? sample : peak"
        sleep 0.1
echo "memusg: peak=$peak" >&2
) &

# run the given command
exec "$@"

tar gzip follow symlinks
tar czhf file.tgz file0 file1
tar xzf file.tgz

avoid duplicates in bash history [link]
# add to ~/.bashrc export HISTCONTROL=ignoredups # colon-separated list. # ignorespace: command beginning with space is not added to history # ignoredups : does not add to history if last entry is same # ignoreboth : short for ignorespace:ignoredups # erasedups : removes same entries in history before adding

execute scripts on network? [link]

restart kde [link]
kbuildsycoca4 && kquitapp plasma-desktop && kstart plasma-desktop

configured nano
$ cat /usr/local/bin/n
nano -xzcSimT 4 $@

$ cat /usr/local/bin/np
nano -xzEcSimT 4 $@

ubuntu-one cloud storage [link] [link] setup ssl [link]
deja dup [link]

restricted shell [link]
# useradd -m -d /home/didi -s /usr/bin/rssh didi
# usermod -s /usr/bin/rssh old-user-name
# usermod -s /usr/bin/rssh vivek
# chsh -s /usr/bin/rssh vivek

auto-mute on startup [link]

apache [link]

ubuntu release upgrade
do-release-update -d

get public key [link]
gpg --keyserver --recv [key]
gpg --export --armor [key] | sudo apt-key add -
sudo apt-get update

Console: find how-to (link)

unofficial upgrades (link)

deb lucid main
gpg key (link)

ATI Control Center
kdesu amdcccle

Peppermint OS (link)
Portable VBox (link)
Linux Live USB (link): prefabbed linux + portable vbox

upgrade 9.10 to 10.04 Beta (link)

make gnome look like xp (link) (tar attached)

use freedos to flash bios (link)

installing nx on linux (link)
edubuntu, linux terminal and thin clients (link)

compose keyboard shortcut settings
system settings->region and layout->keyboard layout->advanced->compose key position

Mount SMB Shares (link)
$ sudo apt-get install samba smbfs
$ sudo nano /etc/fstab

# add the following line
# servername is IP (unless defined in /etc/hosts)
//servername/sharename /mountdirectory smbfs username=windowsuserename,password=windowspassword 0 0

++ backup and recovery tools
[* 21 of the best free linux backup tools]
[* diino]

++ change timezone
[* link]

change login keyboard layout (link)
$ sudo gedit /etc/default/console-setup

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

++ add user to admin (sudo) [[code]] sudo usermod -a -G admin username [[/code]] ++ kill kdm [[code]] /etc/init.d/kdm stop [[/code]] ++ get version of (k)ubuntu [[code]] cat /etc/issue [[/code]] ++ compiling kernel stuff [[code]] sudo apt-get install build-essential sudo apt-get install linux-headers-'uname -r' [[/code]] ++ tar [* from] [[code]] tar -zcvf archive_name.tar.gz directory_to_compress tar -zxvf archive_name.tar.gz tar -zxvf archive_name.tar.gz -C /tmp/extract_here/ [[/code]] ++ environment vars [* link] [[code]] PATH=$PATH:/data/myscripts [[/code]] in ~/.bash_profile (or ~/.profile, /etc/.profile), [[code]] PATH=$PATH:/data/myscripts export PATH [[/code]] ++ plasma start plasma [[code]] kstart plasma [[/code]] ++ wine [* Install Photoshop CS4] to remove the patched wine... [[code]] dpkg -r wine [[/code]] ++ look into this! * ++ install kde 4.3 on jaunty * ++ google gears [* talking about gears on 64b linux with ff 3.5] [* gears x86-64] ++ add key for apt-get use the last 8 chars [[code]] sudo apt-key adv --recv-keys --keyserver 8AC93F7A [[/code]] ++ software install skype, 64b [[code]] wget -O skype-install.deb; sudo dpkg -i skype-install.deb [[/code]] ++ attempts to get stuff working on dv7 +++ suspend to ram status - - - - - - - - - - - - - not working +++ sound status - - - - - - - - - - - - - sound: yes headphones: no mic: not tested RangerX_308 says that they have sound //mostly// working. > -Add the following to etc/modprob.d/alsa-base.conf > options snd-hda-intel model=hp-m4 enable=1 index=0 > options snd-hda-intel enable_msi=1 > -Upgrade ALSA to 1.0.19 per another link to check out [* Simple Guide to Sound Solutions for Hardy, Intrepid, Jaunty Users] [* OpenSUSE: HP dv7 no sound] [* OpenSUSE: HP dv7 no sound] [* another] [* UbuntuForums: no sound after upgrade to 9.04] this user got sound working (no headphone) [* link] [* UbuntuForums: How it works, SOUND] ++ rsync [[code]] rsync --progress --stats --compress -e ssh --recursive --times --perms --links ~/documents2/ /home/jonhome/documents/ [[/code]] ++ ACPI [* How to suspend and hibernate a laptop under Linux] (older article) ++ Printer Sharing sudo nano /etc/cups/cupsd.conf [[code]] # # # Sample configuration file for the Common UNIX Printing System (CUPS) # scheduler. See "man cupsd.conf" for a complete description of this # file. # # Log general information in error_log - change "info" to "debug" for # troubleshooting... LogLevel warning # Administrator user group... SystemGroup lpadmin # Only listen for connections from the local machine. #Listen localhost:631 # commented by jon #Listen /var/run/cups/cups.sock # commented by jon

Listen 631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
#Browsing Off # commented by jon
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
Order allow,deny
Allow From 192.168.2.* # added by jon

# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny

# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny

# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an administrator...
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-$
Require user @OWNER @SYSTEM
Order deny,allow

# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-$
AuthType Default
Require user @SYSTEM
Order deny,allow

# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job H$
AuthType Default
Require user @SYSTEM
Order deny,allow

# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow

<Limit All>
Order deny,allow


sudo /etc/init.d/cups restart

++ NetBeans and JavaDoc
To get Java Documentation into NetBeans, download from Sun's website. Unzip to a folder(*). In NetBeans, Tools->Java Platforms. Select the JavaDoc tab. Click Add ZIP/Folder..., browse to the folder (*) and click OK. Move the folder up in the list. Close.

++ VMWare 64b
modifier keys and extended keys (arrows, home, etc.) not working...
add to /etc/vmware/config
xkeymap.nokeycodeMap = true

++ Server: Web + SSL + Cert, SVN
* [* Apache Web Server Tutorial for Linux]
* [* How to create self-signed SSL certs with OpenSSL]
* [* SVN Tutorial for Unix]
svnadmin create --fs-type fsfs /var/svn/repositoryname
svn ls file:///var/svn/repositoryname
svn import /path/to/project/ file:///var/svn/repositoryname/project/trunk -m 'Initial import'

++ installing nvidia driver on new install
log in
sudo pkill kdm
sudo apt-get install libc6-dev
sudo apt-get install
sudo ./NVIDIA

++ fix ati screwup
Turn back to the default dirver of ati card of ubuntu 9.04 after frozed by the proprietary driver .

Form Jun 27, 2009 5:36pm GMT
step1 Reboot;
step2 Choose "Recovery Mode" at grub menu;
step3 sudo apt-get autoremove xorg-driver-fglr, and choose "yes";
step4 Reboot again; Choose "Recovery Mode",Choose "xfix ...";
step5 After "xfix ..." Resume Normal Boot


++ setting up svn
* *
* *
* *
* Another, but not as good *

++ Linux Quickref
[[collapsible show="+ show quickref" hide="- hide Linux Quickref"]]
[[iframe frameborder="0" scrolling="no" width="600px" height="510px"]]
[[collapsible show="+ details" hide="- details"]]
[* link]
[[code type="html"]]
<html><head><title>Scribd: Linux Quickref</title></head><body>
<object codebase=",0,0,0" id="doc_311716596500277" name="doc_311716596500277" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"> <param name="movie" value=""> <param name="quality" value="high"> <param name="play" value="true"> <param name="loop" value="true"> <param name="scale" value="showall"> <param name="wmode" value="opaque"> <param name="devicefont" value="false"> <param name="bgcolor" value="#ffffff"> <param name="menu" value="true"> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="salign" value=""> <embed src="" quality="high" pluginspage="" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_311716596500277_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" height="500" width="100%"></embed> </object>
Jonathan Denning,
Apr 9, 2010, 7:34 PM