GitHub SSH Keys
There are two ways to import GitHub SSH Keys - manually, using the ssh-import-id python script - alternatively, load the keys dynamically using the AuthorizedKeysCommand in the sshd config.
This latter approach is packaged for Debian.
Logitech K400
Press the Fn key and the left mouse button to toggle between touch tap disable and enabled. You can also press the left mouse click button at the top-left of the keyboard to perform a click or comfortable two-handed navigation. You can also tap the touchpad surface to perform a click.
Use nala from local install
nala is an improved from end for the apt package manager in Debian and ubuntu. If installed in a user directory, use
sudo -Eand a qualified name.
pip3 install --user git+https://github.com/volitank/nala
sudo -E .local/bin/nala
Download from both a torrent and HTTP mirror
An occasionally useful feature of the
aria2cdownloader:
aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"
Disable Suspend
For systems which should never attempt any type of suspension, these targets can be disabled at the systemd level with the following:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
How to Fix "Authentication is required to create a color profile/managed device"
The safest fix to get rid of these popups is to create a new configuration file in /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
.
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
Paste in the following:
/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile") &&
subject.isInGroup("{users}")) {
return polkit.Result.YES;
}
});
Save and exit (press CTRL
+ X
, press Y
and then press ENTER
)
This tells Polkit to continue without requiring the authentication prompt over RDP.
Now reboot Ubuntu and try logging in again over RDP / Windows Remote Desktop and the popups should be gone.
Configuring a monitor with non-standard resolutions
First, use gtf
to calculate the mode line
gtf 1024 600 60
Then, create a new mode, add it to the output device, and activate it.
xrandr --newmode "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
xrandr --addmode HDMI-A-0 "1024x600_60.00"
xrandr --output HDMI-A-0 --mode "1024x600_60.00"
Mirroring from s3 to ftp
- Launch ec2 node
- in same region as bucket, for free transfer
- Need not be too large, this will be IO/network bound
- Mount s3 bucket using s3fs
- Tricky if there is a dot in the bucket name, must
use_path_request_style
- If not in us-east-1, most override region
- Set umask or only root will have permissions
s3fs -o use_path_request_style -o iam_role -o url=https://s3-us-west-2.amazonaws.com -o umask=022 -o endpoint=us-west-2 <bucketname> <mountpoint>
- Tricky if there is a dot in the bucket name, must
- recursive copy using
ncftp
mput -R .
USB HDMI capture
sudo apt install guvcview
guvcview
to start video capture- For audio, there seems to be quite a bit of lag when muxing with video. Instead, open the two streams independently.
- Find source in
pactl list sources | grep name
- Open pulse audio stream in VLC:
vlc pulse://alsa_input.usb-VXIS_Inc_FHD_Capture-02.iec958-stereo
- Find source in
ClamAV from source
- Get tarball and install:
./configure
make
sudo checkinstall
- choose 'don't copy' for files in build and home dir
sudo ldconfig /usr/local/lib
sudo cp /usr/local/etc/freshclam.conf{.sample,}
- Edit
- make shared folder:
sudo mkdir /usr/local/share/clamav
sudo chgrp 130 /usr/local/share/clamav
sudo chmod 776 /usr/local/share/clamav
sudo freshclam
to update virus defs
Cisco AnyConnect VPN
sudo apt install network-manager-openconnect-gnome
- Start
nm-applet
- this may require the gnome-tweak to show indicators - Better debugging:
sudo nmcli general logging level TRACE
journalctl -u NetworkManager --since '2 minutes ago'
FoxyProxy config
- Add New Proxy
- host - "localhost"
- port - 9999
- Socks Proxy checked, SOCKS v5 selected
- Add rule neal-nuc
- ssh -D 9999 nfultz@neal.nuc
- visit http://neal-nuc:8787 from chrome
Enable Bluetooth at boot
- From TomTom:
- Add to /etc/udev/rules.d/10-local.rules :
# Set bluetooth power up
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
Fix crackling audio on HDMI
- From Gav:
- Edit /etc/pulse/default.pa :
# add tsched=0 to udev-detect
load-module module-udev-detect tsched=0
- Other people indicate this might affect ATI specifically.
Awesome CLI tools
- epr
- An epub reader.
pip3 install --user git+https://github.com/wustho/epr.git
- ranger
- An file browser for the terminal
pip3 install --user ranger-fm
- pdfbook
- convert a pdf into a booklet for (double-sided) printing
apt install texlive-extra-utils
- savepagenow
- saves url to wayback machine
pip3 install --user savepagenow
- youtube-dl
- scrapes video from youtube
pip3 install --user youtube-dl
- ledger
- plain text double-entry accouting
apt install ledger
- horcrux
Old awesome commands
pv -qL #
Plays a pipe at # bpsfiglet
Large wordsboxes
crawl
Better than nethackmc
Good ole midnight commander file managermocp
Midnight commander for musictidy
markdown
freecell
http://www.linusakesson.net/software/freecell.phpcolorout
http://nojhan.github.io/colout/
Openvpn
sudo apt install network-manager-openvpn network-manager-openvpn-gnome
Need to reboot!
Grepping for user cron
journalctl | grep --line-buffered -Ei "cron\[[0-9]*\]:\s*\($USER\)"
use --line-buffered
to avoid double-buffer delay.
Conferences
Old Crunchbang notes
CrunchBang, at crunchbang.org was a [[Debian]]-based [[Linux]] distribution.
It is built with low overhead in mind, making it ideal for modest PCs such as [[netbooks]].
At it's core, it is really just a debian install with good defaults for
[[OpenBox]] - window manager
[[tint2]] - panel
[[conky]] - system info dashboard - Crunchbang lists the OB shortcuts
A eulogy to CrunchBang, the Linux distro that time passed by | PCWorld
Creating USB
Default "Create startup USB" in ubuntu did not worked, installed unetbin, which did.
Set up on laptop. Flash and wireless worked out of box.
Iceweasel
- Set up quicksearches, changed homepage to ddg,
- get delicious bookmarklet
- Get extensions:
- RightBar
- Scrollbar Anywhere
- TreeStyle Tab
- Tab History Redux in about:config set browser.tabs.loadDivertedInBackground to false.
- Elite proxy switcher is decent too for SOCKS 5 proxy over ssh.
SSD Notes
Since using an ssd, I did not install a swap partition.
- Therefore, remove the swap line from .conkyrc
Wlan tweak
Added wlan0 status to conkyrc:
ESSID: $alignr ${wireless_essid wlan0} ${wireless_link_qual_perc wlan0}%
Wallpaper Hack
~/bin/rotate2
is a script for switching desktops
#/bin/sh
DIR=${1:-~/images/wallpapers}
FILE=$DIR/$(ls -1tr $DIR | head -n 1)
touch "$FILE"
nitrogen --set-zoom-fill "$FILE"
nitrogen
is obviously the command which does the desktop
It is invoked by conky:
${execi 222 ~/bin/rotate2}
10/28 : Need this line for conky for fixing background problems.
own_window_argb_visual yes
Also added battery meter.
Minor stuff
-
Set panel to autohide:
edit .config/tint2, set autohide = 1
-
Move notify to bottom right.
gconftool-2 -s /apps/notify-osd/gravity --type=int 3
then logout and back in. from : http://crunchbanglinux.org/forums/topic/15819/how-to-set-up-notifyosd-in-debian-squeeze-stable/
Notes from Setting up desktop
Setting up SSD was major pain in the ass, BIOS was defaulting to IDE emulation and the drive was failing inconsistently eg ldconfig failures (Invalid ELF; missing magic bytes) and and segfaulting iceweasel, flash, vim, xterm, everything.
Went through several reinstalls to get it working right. Trick was to switch it to AHCI.
Fstab editing
Because I wanted to still use my old hard drive, two problems came up:
-
mount it automatically to ~/prev-drive
-
have #! use the HDD swap partition instead of the SSD
Both are accomplished by adding the devices to fstab along with mount points.
Since the last time I did this, things have changed, now you refer to drives by UUID, which you can get out of blkid
Grub Editing
Also, GRUB added all the old drives Ubuntu entries to the the list, there was ~30 of them. To get rid of them I commented them out from /boot/grub/grub.cfg; and to make sure they don't come back, I removed execute permission from /etc/grub.d/30_os_probe
sudo chmod -x /etc/grub.ed/30_os_probe
There might be a better way to do this. Also, I had to run the grub update script once with os probing to get settings for windows, which I then copied into a diff file (40_win)
###Mcabber
This didn't seem to work until installing TLS libraries.
###Latex
To install Lecture Notes in CS Springer style, unzip llncs2e.zip to
/usr/share/texlive/texmf-dist/tex/latex/llncs2e/
and then rebuild the style database:
$sudo mktexlsr
I installed the uclathes template there similiarly, by git clone-ing it into the above directory and rebuilding.
###SSH Shared Keys
first, generate the key
$ ssh-keygen
then, add it to ssh-agent
$ ssh-add
check that it is there
$ ssh-add -L
finally, send it on over
$ ssh-copy-id remote
Make sure that .ssh is chmod 700 and .ssh/id_rsa is chmod 66
Make sure public key auth is turned on in /etc/ssh/sshd_config
Text Utils
A couple utils I like for text:
- boxes
- figlet
- pv -pipe view
Stripping shoutcast streams
git://src.thregr.org/fIcy
make and then copy to ~/bin
Old SUSE Notes
Start with server text only install
Follow these:
http://l3net.wordpress.com/2013/04/24/lightweight-opensuse-lxde-desktop-from-scratch/
# zypper install xorg-x11 xorg-x11-server
# startx
# zypper install openbox
need Mesa-GL, x drivers for ati and evdev, xorg-video-drivers
http://en.opensuse.org/SDB:Administer_with_sudo
# zypper in sudo
# visudo
// add line %sudo ALL=(ALL) ALL
# groupadd sudo
# usermod -a -G sudo neal
I don't have man pages, wtf
sudo zypper in --no-recommends man
apparently man reccomends ghostscript, which is not needed right now.
zypper ar http://download.opensuse.org/repositories/X11:/lxde/openSUSE_12.3/X11:lxde.repo
zypper in slim
? reccommends ImageMagic ??
zypper in yast2-sysconfig yast2-runlevel
edit /etc/logins.def, remove offending LASTLOG_ENAB
in yast2-runlevel, enable xdm
however, changing systemd default runlevel is a bit more involved:
ln -sf /usr/lib/systemd/system/multi-user.target \
/etc/systemd/system/default.target
zypper in pulseaudio pavucontrol
zypper in MozillaFirefox
zypper in flash-player
zypper in mercurial
zypper in hg-git
http://susestarter.blogspot.com/2011/03/get-yer-subpixel-hinted-fonts.html
htop
mutt abook
newsbeuter
lynx
moc
ranger from rpm
conky
vlc from videolan.org
libdvdcss from community repo
make
stow from rpm
ncurses-devel
yast2-sshd
autoconf automake
dependencies for st:
libX11-devel fontconfig-devel freetype2-devel libXft-devel libXext libXext6 liberation2-fonts
enable ssh : http://en.opensuse.org/SDB:Configure_openSSH#SSHD_.E2.80.93_The_server
and firewall in yast
patch
screen with caption patch and 256 color patch
install zathura from github manually, + girara and poppler plugin
install libwebkit, compile tabbed and surf
install R from tumbleweed, install colorout
did a dist upgrade to tumbleweed
Make a motd
hostname | figlet | boxes | sudo tee /etc/motd
Old Notes
Revisiting How We Put Together Linux Systems
Why do we use the Linux kernel's TCP stack? - Julia Evans
vmtouch - the Virtual Memory Toucher
Portable file system cache diagnostics and control --- Hoytech
Linux devices manager for the Logitech Unifying Receiver. --- Solaar
How to switch to Compton for beautiful tear free compositing in XFCE: duncanlock.net
How to Boot Linux ISO Images Directly From Your Hard Drive
smxi sgfxi svmi :: How to Install the Scripts
IMO Power user = knowledge of differences between consumer distros, desktop ricing, and exotic scripts for like media control or home automation Sysadmin = could do the above but more likely just drinks in between deployments/ fires/ paychecks --- How to tell the level of a Linux book? : linux
The Definitive Guide to Linux System Calls
Links
A broad overview of how modern Linux systems boot
Theme generator - wpgtk
WebDAV
WebDAV is a read/write extension to HTTP.
To mount a WebDAV share on linux, download the davfs2 package and run:
$ mount -t davfs http://example.com /mnt/dir
https://github.com/pimutils/vdirsyncer
GNOME
Set an Always on Top keyboard shortcut on GNOME desktop
from https://www.linuxuprising.com/2020/12/how-to-use-keyboard-shortcut-to-toggle.html
GNOME doesn't have a default keyboard shortcut for Always on Top any more (it used to have Alt + Space, then t), but there is an option to set your own keyboard shortcut for this window feature. The option is not exposed in Settings - > Keyboard Shortcuts though.
Dconf Editor Always on Top
To access the option that allows setting a keyboard shortcut for Always on Top, open Dconf Editor and go to /org/gnome/desktop/wm/keybindings. There, set a keyboard shortcut for always-on-top in this form (example): ['