Category Archives: Arch Linux

Vim colorscheme tuneup

I hadn’t thought about it for awhile but today I updated by Vim colorscheme for the first time in about two years. In the process I found a few that were notable:

rdark-terminal

vcs_1_rdark-terminal

link

gruvbox

vimcs_2_gruvbox

link

synic

vcs_4_synic

I think this one is based on neon. link

kolor

vcs_5_kolor

link

jellybeans blueberry

vcs_7_jellybean-blueberry

This is what I decided on. It’s jellybeans with a twist. I put this in my ~/.vimrc for the adjustments:

colorscheme jellybeans
" Jellybeans colorscheme edits (not working)
"let g:jellybeans_overrides = {
"\   'Normal': { 'ctermbg': '242' }, 
"\   'CursorLine': { 'ctermbg': '238' },
"\}
highlight Normal     ctermbg=323232
highlight Normal     ctermbg=303030
highlight CursorLine ctermbg=238
highlight Visual     ctermbg=240

Others may have different results though as the theme alters dynamically as per background (mine is #323232 btw).

Download

I got these from a collection today and have put them in the AUR

xuserrun – Run a command on the currently-active user’s X.org server display

xuserrun is a bash script to run a command on the active X.org server display.  This is primarily necessary if from within another environment  (different user, console, cron, boot script…).  xuserrun gathers DISPLAY and user environmental variables via systemd and passes them on to be able to dothis. xuserrun is designed for use with only a single user X.org server display. Running it is basic:

xuserrun xclock -digital

Tto put out a notification:

xuserrun notify-send "Hello, Dave."

It’s available for Arch users in the AUR and is also downloadable on github.

Firefox: Defining font type and size

roystonlodge_Alternate_Mozilla_Browser_Icon

What a professional typesetter knows is the importance of a good font. For centuries typesetters have evolved fonts to provide ease of reading that we know today. Having the text look good in the web browser is a nice bonus; choosing the right type and size can make a big difference to how well we read, especially if used quite a bit.

Font installation

To make a web page feel right — as the designer had in mind — the fonts should be on your system that a page requires. On some Linux systems, only the basic fonts are installed. Installing missing fonts usually adds nice touches that may have not been realized before. To help discover missing fonts, the Context Font add-on will display font type and size of a selected font. Many sites define their fonts as Arial, or sometimes, Verdana, or Georgia; these fonts can be added by installing Microsoft’s core fonts; a few define theirs with Apple fonts, and a few less with others. These font packages contain the most popular fonts (for Arch Linux):

arpa -i otf-bitter otf-exo ttf-bitstream-vera ttf-dejavu ttf-inconsolata ttf-lato ttf-liberation ttf-mac-fonts ttf-opensans ttf-win7-fonts

Font size

To get a good idea on good font size to use, look at a book. The size there that feels comfortable will likely feel comfortable on the monitor too. When choosing font size also think about making the various typefaces the same size (i.e. serif, sans-serif, and monospace).

Font type

Being able to define one’s own font can help readability quite a bit; however,keep in mind, tastes differ. In Firefox, the settings that can be defined are generic typefaces of: serif, sans-serif, and monospace (additionaly, the minimum font size can be set). It should be known though, that many sites still force a specific font type and size; however, gradually, a greater number of sites are using generic typeface definitions. In the future this means that personalizing fonts will be of greater availability. When choosing a font type, keep in mind to pick one that helps improve readability rather than one that grabs ones attention.

Font tests

Here is a basic test of what Firefox’s base-defined font types and sizes look like (click to view):

Font test: Type and size (based defined). (click to view)

Font test: Type and size (based defined).

Here are what a few of the common font groups look like (click to view):

Font test: Common webfonts group 1. (click to view)

Font test: Common webfonts group 1.

Font test: Common webfonts group 2. (click to view)

Font test: Common webfonts group 2.

What did I choose?

After adding all the new fonts and testing them, I found out I like a varied group; they read beautifully and scale good. Ultimately I came up with these:

Typeface Font Size
Serif Bitter 13
Sans-serif Open Sans 13
Monospace DejaVu Sans Mono 12
Minimum 10

DejaVu Sans Mono and Open Sans are good fonts and, for me, hard to beat. Rather than just define them in Firefox, I prefer to define my serif, sans-serif, and monospace fonts system-wide. This allows me to have a consistent overall look to me desktop. Here is my Fontconfig configuration (note: fonts are listed preferential/available first): fonts.conf.

For GNOME the fonts sizes are:

Setting Font
Window Titles Cantarell Bold 11
Interface Cantarell 11
Documents Cantarell 11
Monospace Monospace 10

What they look like:

Font type and size.

Font type and size.

Common webfont groups 1

Common webfont groups 1

Desktop

Desktop

Related

External monitor as Discrete

I use my laptop primarly at home with an external monitor as discrete, meaning that I have the laptop monitor turned off and I only use it. At times this is also called a dedicated monitor. GNOME can be set to disable the laptop monitor and enable the external but it wasn’t able to hotplug the monitor after I returned the laptop, and at times wouldn’t do so after resuming from sleep. Also in the proccess I discovered that the X.org server DPI setting wasn’t being done correctly and that GNOME’s text scaling needed to be adjusted. So I decided to do it in a script and it turned out to be pretty easy.

I wrote the basic script that toggles monitors depending if the external monitor is present, then it detects correct physical size dimension of the screen so the the correct DPI can be set. After this, I added a startup script (.desktop file), a pm-utils script to runafter resuming, and a udev script to detect andset the monitor when plugged in. The udev rule is generic but appears to be working for a lot of people, it relys on Kernel Mode setting (KMS) so doesn’t work for me wiht the catalyst driver, but every thing else works great. I put it on github for any who like to look at it.

The bash script cannot be used right away instead a couple bit will need to be directed:

 The package cannot be installed directly and be expected to work, some edits
 will need to be made.  First, in the resume script '80_discretemon' a username 
 will need to be defined; next, the monitor names will need to be defined as
 created by the driver in 'discretemon'.

Also, the monitors can be defined in xorg.conf but the fix for after resume from sleep, remains.

Section "Monitor"
  Identifier  "0-LVDS"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Acer Aspire Laptop Screen"
  Option      "DPMS" "true"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "true"
  DisplaySize  344 194 # only works with xrandr disabled.

EndSection

Section "Monitor"
  Identifier  "0-DFP1"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Samsung SyncMaster SA350"
  Option      "DPMS" "true"
  Option      "PreferredMode" "1920x1080"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "false"
  DisplaySize  476 268 # only works with xrandr disabled.
  Option      "DPI" "102 x 102"
EndSection

Catalyst Driver, a Journey Taken… Better than I’d Known

I previously read about (a good number of times) people not having the best experiences with AMD’s proprietary driver. However, with my new laptop I decided that no matter how much I love the open-source driver (bought it because AMD opened the specs to it), that realistically it would take a few years before I’d be able to play games with it. The AMD/ATI website says 7xxxM series is supported so I decided to try it.

Prepare for Installing Catalyst

Removed open-source Radeon driver options, commented /etc/X11/xorg.conf.d/20-radeon.conf.

Installing Catalyst Driver

Using Vi0l0’s excellent catalyst repository, I added it to /etc/pacman.conf:

[catalyst] Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch

Add Vi0l0 key:

sudo pacman-key -r          NUM
sudo pacman-key --lsign-key NUM

Installed (using pacman shortcuts script (pm):

pm y
pm i linux-headers catalyst-hook catalyst-utils lib32-catalyst-utils

Using catalyst-hook here to have the module put into initramfs when kernel versions areupgraded (provides catalyst driver).

X.org Server-Configuration

sudo aticonfig --initial 

Added module to load at boot:

echo '# Load AMD Catalyst driver
fglrx' | sudo tee /etc/modules-load.d/fglrx.conf

Disabled Mode Setting: Added GRUB_CMDLINE_LINUX="nomodeset" (for GRUB2) to /etc/default/grub), then:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Testing

Reboot, and driver loaded properly (lsmod | grep fglrx), and direct rendering is enabled (glxinfo | grep direct).

Configuring Display

Created root .desktop for ATI Catylyst Control Center:

cp /usr/share/applications/amdcccle.desktop ~/.local/share/applications/
sed -i 's/Exec=amdcccle/Exec=gksudo amdcccle/' ~/.local/share/applications/amdcccle.desktop
chmod +x ~/.local/share/applications/amdcccle.desktop

Color

  • Color Temperature: Use display’s settings

Display Manager

  • Selected down arrow for both monitors to change to correct settings.

Logout/Login: Gnome 3 crash, extensions disabled
Login: Monitor settings lost, both on lower resolution (open-source radeon driver and catalyst define monitors differently so Gnome using xrandr flubs the first time after.

DTV

  • Pixel Format: RGB 4:4:4 (Full RGB)
  • Adjustments: Overscan 0%

Switchable Graphics

Catalyst driver does not recognize discrete GPU properly, thinks integrated GPU is discrete GPU:

Show GPUs:

aticonfig --list-adapters
* 0. 00:01.0 AMD Radeon HD 6520G          # * Default
  1. 01:00.0 AMD Radeon HD 7600M Series

But…:

aticonfig --px-list
PowerXpress: Discrete GPU is active (High-Performance mode).

I tried using sudo aticonfig --px-igpu to switch to integrated to see if it would switch but got an X.org server hang. Also tried sudo aticonfig --px-dgpu to see if aticonfig --px-list was in error but no luck. Tried using discrete GPU BusID (BusID "PCI:1:0:0") in xorg.conf but that didn’t work either. The catalyst driver doesn’t properly recognize the 7670M GPU as discrete GPU. Entered bug.

GNOME bug

When I first started with GNOME mouse clicks would miss at times and sometimes keypresses did too, I added export CLUTTER_VBLANK=none to ~/.bash_profile and it fixed this. Oddly, I commented it later because I thought it might be related to another bug (it was not) and forgot to enable it again, but I haven’t seen the problem since.

Conclusion

Hard to believe there is not official AMD Catalyst bugzilla (odd how their website points to the unofficial one) so I’m a bit worried about the near future but think all will be fine.

The driver works good. I’m getting a consistent 50fps on Urban Terror and tried Doom and it looks pretty good. Disappointed about not being able to use the discrete GPU, would have been nice. Gonna keep using catalyst, its working good.

Here’s a script i built called gpuswitch I plan to use when gaming later. Night.

Resources

systemd transfer… Done!



Well, after being throughly put off, I dived into systemd and have done a complete (pure) systemd installation; and I can tell you, I think its pretty nice.

I had no plans to change Arch’s initialization system, but I needed to switch to systemd because parts of GNOME 3 require it. Its been a long time a coming but systemd is a good thing for Linux, a real good thing. Arch’s init system was legendary. It’s what I believed what attracted a lot of people about Arch. Being so pulled to for me was it’s basic, straight-forward setup, so I wasn’t exactly excited about having to switch to systemd. systemd setup isn’t quite as easy as Arch’s rc system but I like it and found it has good logic. The best thing about systemd though will be its unification between other distros. This means that setting up a good number of programs will be similar no matter what distribution documentation is read. Also systemd will save a good amount of developers time as many of the distribution-based init scripts will no longer have to be specifically written (and will rather be included in the application). Plus it inclusion of D-BUS makes it a good deal more powerful.

Here’s what it looks like. It’s not quite as nice looking as Arch’s, but oh well:

systemd is the future… yeeeaaahh! A more unified Linux front.

A basic detail of my systemd install can be found on my GNOME 3 Setup page. Even better to read the whole page on the wiki which is really well done.

GNOME 3 Setup



I’d been fortunate lately to have time to work on my GNOME 3 setup and I got it working and looking pretty good; so… I thought I’d share it from beginning to end. GNOME 3 is shaping up real nice and with the extension support provides great customibility. There’s still a little work that needs to be done, but I am nearly 100% happy with it. Any thoughts, additions, comments, would be appreciated.

A couple notes to explain some of my design reasoning: I have a laptop so a few things apply just to that; I use my pacman/aurhelper script to install so here it will be viewed as ‘pm i‘ instead of say ‘pacman -S‘ (for example); finally to install all programs at once and then configure them, the all-as-one command is at the bottom.

Clean

Dirty

Table of Contents

Security General
General
Bootloader (GRUB2)
Initialization System
Hardware
Desktop Environment
Security Firefox
Preferences
Under the hood
Program Setups
Other Programs
Install all as one
ToDo

Security General

Install firewall, edit config, add to startup daemons:

pm i arno-iptables
sudo rc.d start arno-iptables-firewall

Create dummies for insecure webkit (libwebkit and libwebkit3).

Block problem packages:

sudo sed -i "/^IgnorePkg/ a libwebkit3 libwebkit qtwebkit flashplugin" /etc/pacman.conf

General

Update pacman mirrors to best available with script.

Update System (initilize pacman first):

pm y && pm i pacman
sudo pacman-key --init; pacman-key --populate archlinux
pm u

Bootloader (GRUB2)

mv /boot/grub /boot/grub-legacy
dd if=/dev/sda of=/boot/grub-legacy/grub-mbr bs=512 count=63
pm i grub2-bios
sudo grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --no-floppy --recheck --debug /dev/sda
sudo grub-mkconfig -o /boot/grub/grub.cfg

Add Windows menu entry:

pm i ntfs-3g  # Then mount partition
sudo grub-probe --target=fs_uuid /run/media/todd/Windows/bootmgr
echo '
menuentry "Windows" --class windows {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --no-floppy --set=root C8BC2300BC22E8A0
ntldr /bootmgr
}' | sudo tee -a /etc/grub.d/40_custom

Hibernation define partition, add resume hook to /etc/mkinitcpio.conf:

sudo sed -i 's|^GRUB_CMDLINE_LINUX=""|GRUB_CMDLINE_LINUX="resume=/dev/sda7"|' /etc/default/grub
sudo sed -i '/^HOOKS/ s/ filesystems / resume filesystems /' /etc/mkinitcpio.conf

GRUB2 Arch Linux Theme:

pm i grub2-theme-archxion
sudo cp -r /usr/share/grub/themes/Archxion /boot/grub/themes/
GRUB_THEME="/boot/grub/themes/Archxion/theme.txt" to /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo mkinitcpio -p linux

Initialization System

Replace Arch’s init system with systemd (required by GNOME).

Pure systemd install:

pm i systemd systemd-arch-units systemd-ui-git
sudo gpasswd -a todd adm #For admin work with systemd

Define to bootloader (in /etc/default/grub):

GRUB_CMDLINE_LINUX_DEFAULT=" and remove quiet. GRUB_CMDLINE_LINUX="resume=/dev/sda7"

sudo grub-mkconfig -o /boot/grub/grub.cfg

Necessary settings:

echo "aspire" | sudo tee /etc/hostname
echo 'America/New_York' | sudo tee /etc/timezone
echo 'KEYMAP=us
FONT=lat9w-16
FONT_MAP=8859-1_to_uni' | sudo tee /etc/vconsole.conf
echo 'LANG=en_US.UTF-8
LC_COLLATE=C' | sudo tee /etc/locale.conf
echo '# Load card reader module
sdhci' | sudo tee /etc/modules-load.d/sdhci.conf
echo '# Set Radeon graphic card to dynamic power method
w /sys/class/drm/card0/device/power_method - - - - dynpm
w /sys/class/drm/card1/device/power_method - - - - dynpm' | sudo tee /etc/tmpfiles.d/radeon_power-method.conf

Enable units (i.e. daemons, services…; Arno’s iptables firewall service):

sudo systemctl enable arno-iptables-firewall.service avahi-daemon.service cups.service dbus.service dcron.service dnsmasq.service gdm.service gpm.service NetworkManager.service syslog-ng.service

Remove Arch init system:

pm r systemd-arch-units initscripts sysvinit
pm i systemd systemd-sysvcompat
sudo reboot

Hardware

Hardware-specific settings.

CPU

AMD processor firmware update:

pm i amd-ucode

Graphic Card

Set Radeon video card to dynamic power save method on resume:

echo '#!/bin/sh
# Set Radeon graphic card to dynamic power method

case "$1" in
  resume | thaw )
echo dynpm > /sys/class/drm/card0/device/power_method
echo dynpm > /sys/class/drm/card1/device/power_method
;;
esac' | sudo tee /etc/pm/sleep.d/97_radeon_dyn_power_method
sudo chmod +x /etc/pm/sleep.d/97_radeon_dyn_power_method

Printer

Canon Linux Info (Select Product > Linux)

pm i cnijfilter-mg5200 scangearmp-mg5200 cups-bjnp

Had to add manually to CUPS:

Address: bjnp://192.168.1.80
Name: Canon_Pixma_MG5220
Network: Home Network

Add static IP to router and direct to printer MAC address.

Sound

Install ALSA tools, set sound level:

pm i alsa-utils
alsamixer
alsactl store

Set default sound card.

Wireless

Only proprietay driver available at this time for Broadcom chip BCM43227. Reported that open source brcmsmac/brcmfmac will supported in the future.

pm i broadcom-wl
sudo modprobe wl
sudo depmod -a
sudo sed -i '/^MODULES/ s/)/ wl)/' /etc/rc.conf

Desktop Environment

Install desktop (Xorg server, ATI/AMD Radeon driver, and GNOME):

pm i xorg-server xorg-xinit xorg-server-utils
pm i xf86-video-ati
pm i gnome          # Choose apps
pm i gnome-extra

Ubuntu fonts:

pm i cairo-ubuntu

Security Firefox

Put Firefox in a sandbox:

pm i sandfox firefox gksu
sudo chmod ugo-wx ~/.adobe ~/.macromedia
sudo sed -i 's_^hide=/home/\\$user/.adobe.*$_bindro=/home/\\$user/.adobe      # bind folder read-only_g' /usr/bin/sandfox
sudo sed -i 's_^hide=/home/\\$user/.macromedia.*$_bindro=/home/\\$user/.macromedia # bind folder read-only_g' /usr/bin/sandfox
IgnnorePkg sandfox in pacman.conf
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/firefox-sandfox.desktop ~/.local/share/applications/firefox-sandfox.desktop
chmod +x ~/.local/share/applications/firefox-sandfox.desktop

Change Exec line in firefox-sandfox.desktop to:

gksudo –disable-grab “sandfox –profile firefox firefox”

Remove previous sandboxes on boot:

echo '[Unit]
Description=Remove Sandfox previous sandboxes

[Service]
Type=oneshot
ExecStart=/bin/sh -c "sandfox --user todd --closeall && /bin/rm -rf /mnt/sandfox/*"

[Install]
WantedBy=multi-user.target' | sudo tee /etc/systemd/system/sandfox-rm.service
sudo systemctl enable sandfox-rm.service

Preferences

Display

Add ICC profile to ~/.local/share/icc so recognized by GNOME’s System Settings > Color (done through QuickGamma through Windows 7, Windows 7 calibrated ICC proviles are not recognized. Windows 7 profiles are stored in 32).

Fix for improper display size detection and to set brightness.

Laptop Specific

Touchpad (System Settings > Mouse and Touchpad):

  • Uncheck: Enable mouse clicks with touchpad (uncheck)
  • Check: Two-finger scrolling
  • Change scroll speed

Desktop Settings

Install advanced settings editor ():

pm i gnome-tweak-tool
  • In Advanced Settings in menu: Enable desktop icons and right-click menu, hide Home folder, Computer, and Trash icons; or, from command line:
    gsettings set org.gnome.desktop.background show-desktop-icons true
    gsettings set org.gnome.nautilus.desktop   home-icon-visible false
    gsettings set org.gnome.nautilus.desktop   computer-icon-visible false
    gsettings set org.gnome.nautilus.desktop   trash-icon-visible false
  • Add maximize and minimize buttons
    gsettings set org.gnome.shell.overrides button-layout close,minimize,maximize:

Date and Time (GNOME to handle NTP), enable in System Settings > Date and Time > Network Time > On; set clock to AM/PM.

Nautilus single click: Nautilus > Edit > Preferences > Behavior >

Save Desktop Session: (Options tab > Automatically remember…)

gnome-session-properties

Suspend preferences (via command line):

  • Power button press suspend type
  • Battery suspend type
  • Battery lid-close suspend type
  • Battery duration until suspend
  • AC lid-close suspend type
  • AC duration until suspend
  • Dim Screen for AC
  • Dim Screen time
  • Disable lock when resuming from sleep
gsettings set org.gnome.settings-daemon.plugins.power button-power hibernate
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type hibernate
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action hibernate
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1740
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action suspend
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 10800
gsettings set org.gnome.settings-daemon.plugins.power idle-dim-ac true
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 1200
gsettings set org.gnome.desktop.lockdown disable-lock-screen true

Shortcuts: (System settings > Keyboard > Shortcuts)

  • Suspend (Add in Custom Shortcuts > + then assign key Ctrl+Alt+S), uses pwr script):
    /home/todd/.scripts/pwr s
  • Blank Screen (Add in Custom Shortcuts > + then assign key Ctrl+Alt+B), uses pwr script):
    /home/todd/.scripts/pwr b
  • Show Desktop (Navigation > Hide all… > Ctrl+Alt+D)

Defualt Screenshot directory as Desktop:

gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/todd/Desktop

Numlock on when GDM starts:

pm i numlockx
sudo sed -i 's|^exit 0.*$|# Enable numlock\nif [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on; fi\n\nexit 0|' /etc/gdm/Init/Default

Graceful Shutdown of non-session supported Gnome window applications (doesn’t work for all applications):

sudo sed -i 's|^exit 0.*$|# Exit these GNOME non-session-supported windows gracefully on logout\necho " Closing selected windows programs gracefully"\nexport DISPLAY=:0\nsu todd -c "wmctrl -c "Mozilla Firefox""\nsu todd -c "wmctrl -c "Geany""\n\nexit 0|' /etc/gdm/PostSession/Default

Login Noise:

~/.local/share/sounds/desktop-login.wav

Gnome Shell Extensions:

Extensions in the AUR:

pm i \
gnome-shell-extension-alternate-tab-git
gnome-shell-extension-alternative-status-menu-git \
gnome-shell-extension-axe-menu \
gnome-shell-extension-common-git \
gnome-shell-extension-drive-menu-git \
gnome-shell-extension-extended-volume-indicator-git \
gnome-shell-extension-inhibit-suspend-git \
gnome-shell-extension-move-clock \
gnome-shell-extension-noa11y \
gnome-shell-extension-user-theme-git \
gnome-shell-extension-weather-git \
gnome-shell-extension-windowoverlay-icons-git \
gnome-shell-google-calendar-xat59-git

From website:

Extension Settings

weather:

gsettings set org.gnome.shell.extensions.weather woeid USTN0454
gsettings set org.gnome.shell.extensions.weather unit fahrenheit
gsettings set org.gnome.shell.extensions.weather wind-speed-unit mph
gsettings set org.gnome.shell.extensions.weather show-sunrise-sunset true
gsettings set org.gnome.shell.extensions.weather use-symbolic-icons true

GNOME shell google calendar:

su -c "/usr/share/gnome-shell-google-calendar/gnome-shell-google-calendar.py toddrpartridge@gmail.com $(cat /home/todd/.sitepass-com.txt)" todd
cp /usr/share/gnome-shell-google-calendar/gnome-shell-google-calendar.desktop ~/.config/autostart/
gsettings set org.gnome.desktop.default-applications.office.calendar exec "firefox 'https://www.google.com/calendar'"

Axe Menu Custom Applications Menu icon:

sudo cp ~/Designs/arch-legacy-blue1-toon-symbolic-01.svg /usr/share/icons/Faience/places/scalable/start-here-archlinux-toon-symbolic.svg

CPUFreq Control (none exist, gnome-shell-cpufreq is per processor) using jupiter instead:

pm i jupiter rfkill
sudo gpasswd -a todd jupiter

Under the hood

Cron (dcron because I know it).

Root settings:

sudo mv /root/.bashrc{,.bck}
sudo ln -s ~/.{bashrc,bash_profile,vimrc,vim} /root
sudo mkdir /root/.config/
sudo cp -r ~/.config/geany/ /root/.config/
sudo rm -rf /root/.config/geany/geany_socket*

Match filesystem check times multiple partitions:

sudo tune2fs -c 33 -C 0 -i 6m -T now /dev/sda5
sudo tune2fs -c 33 -C 0 -i 6m -T now /dev/sda6

SMART

pm i gsmartcontrol
sudo sed -i 's/^DEVICESCAN.*$/DEVICESCAN -a -n standby,q -m toddrpartridge@gmail.com -M test/' /etc/smartd.conf
pm i msmtp-mta msmtp
sudo ln -s ~/.msmtprc /root/
sed -i "s|^password.*$|password $(cat ~/.sitepass-com.txt)|" ~/.msmtprc
sudo systemctl enable smartd.service
sudo systemctl start  smartd.service

Escalate privileges for certain programs (link).

Filter Advertisements (Ad-blocker script).

Discover the package a command belongs to on the command line (bash-completion broke):

pm i pkgfile-git
  • Add to .bashrc:
    source /usr/share/doc/pkgfile/command-not-found.bash

Program Setups

Gedit

Open (Edit > Preferences > Tab):

View: Display right margin at column 80: Check
Highlight current line
Editor: Tab width: 2
Insert space instead of tabs Check
Create a backup copy of files before saving Uncheck
Autosave file every 10 minutes Check
Font&C: Theme Oblivion
Plugin: Save Session

Gnome Terminal:

General: Terminal Bell > uncheck
Use custom default terminal size: 80 x 24
Colors: Use colors from system theme > uncheck
Text color: #D4CFD3
Background color: #2E3436
Built-in schemes: Tango
Scrolling: Scrollback > 1024

Other Programs

General:

pm i abiword acpi ario aspell-en bc cd-discid curl dnsmasq dos2unix dosfstools gcolor2 geany-git geany-plugins-git gedit-plugins gimp gnumeric gpart gparted grilo-plugins gstreamer0.10-bad-plugins gstreamer0.10-ffmpeg gstreamer0.10-ugly-plugins hardinfo hwinfo id3v2 imagemagick inkscape iotop irssi lame libdvdcss libdvdnav libdvdread librsvg links lsof meld mesa-demos minidlna mlocate mp3gain mpd mplayer2 msmtp mtools nautilus-open-terminal networkmanager-dispatcher-ntpd ntp ntfsprogs openjdk6 openssh oneshot p7zip pacman-color perl-html-parser perl-rename pwgen python-libxml rsync ruby sdcv shotwell tidyhtml transmission-gtk ttf-google-webfonts ttf-microsoft-consolas tree unrar vlc xclip xorg-xdpyinfo

CVS systems keep around:

pm e bzr cmake git intltool mercurial subversion

General, AUR programs:

pm i arachnophilia aurup g9led geany-themes-git gist-git gnome-gmail mailnot-git mp3diags pacaur pastebinit perl-mp3-tag ripit

Themes:

pm i atolm-gtk3 cheser-icon-theme elementary-gtk-theme elementary-icons-bzr elements-theme faenza-icon-theme faience-icon-theme gnome-shell-theme-atolm gnome-shell-theme-default-mod gnome-shell-theme-london-smoke gtk-theme-grayday gtk-theme-hope mediterraneannight-theme orion-gtk-theme sammy-themes youtube-viewer zukitwo-themes

dnsmasq

dnsmasq for faster DNS queries:

sudo sed -i 's:^#listen-address=:listen-address=127.0.0.1:' /etc/dnsmasq.conf
sudo sed -i 's:^#bind-interfaces:#bind-interfaces:' /etc/dnsmasq.conf
echo '#!/bin/bash
# Prepend localhost to resolv.conf for dnsmasq
if [[ ! $(grep 127.0.0.1 /etc/resolv.conf) ]]; then
  sed -i "0,/^nameserver/inameserver 127.0.0.1" /etc/resolv.conf
fi' | sudo tee /etc/NetworkManager/dispatcher.d/localhost-prepend
sudo chmod +x /etc/NetworkManager/dispatcher.d/localhost-prepend

Mouse (G9)

Setup

Geany (use nightly repository)

  echo -e '\n[geany]
Server = http://geany.nightlybuilds.org/archlinux/x86_64' | sudo tee -a /etc/pacman.conf
  pm y
  pm i geany-git geany-plugins-git geany-themes

Configure

Gnome Gmail (Gmail as default mail app)

Enable: Applications > Internet > Gnome Gmail System Settings > Details > Default Applications, Mail

MiniDLNA

Setup

MPD

Setup

Vim

cp /etc/vimrc /etc/vimrc.bak
cp /usr/share/vim/vim73/vimrc_example.vim /etc/vimrc

VLC

Set as default:

System Settings > Details > Removable Media > DVD Video : VLC media player

System Settings > Details > Default Applications > Video: VLC media player

Use /dev/sr0 instead of /dev/dvd in ~/.config/vlc/vlcrc.

Set mimetypes:

cp /usr/share/applications/vlc.desktop ~/.local/share/applications/
sed -i 's|^Mimetype.*$|MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;|' ~/.local/share/applications/vlc.desktop
chmod +x ~/.local/share/applications/vlc.desktop

Install all as one:

Install Java independently as not recognized as a dependency:

pm i jre7-openjdk # Needed as not recognized as dependency

Keep Version Control Systems (VCS) around:

pm e bzr cmake git intltool mercurial subversion
pm i alsa-utils gksu grub2-bios grub2-theme-archxion ntfs-3g systemd systemd-sysvcompat sandfox firefox cnijfilter-mg5200 scangearmp-mg5200 cups-bjnp gnome-tweak-tool numlockx pkgtools wmctrl \
arachnophilia aurup g9led gist-git gnome-gmail mailnot-git mp3diags pastebinit perl-mp3-tag ripit  \
abiword acpi ario aspell-en bc cd-discid curl dnsmasq dos2unix dosfstools gcolor2 geany-git geany-plugins-git geany-themes-git gedit-plugins gimp gnumeric gpart gparted grilo-plugins gstreamer0.10-bad-plugins gstreamer0.10-ffmpeg gstreamer0.10-ugly-plugins hardinfo hwinfo id3v2 imagemagick inkscape iotop irssi lame libdvdcss libdvdnav libdvdread librsvg links lsof meld mesa-demos minidlna mlocate mp3gain mpd msmtp mtools nautilus-open-terminal networkmanager-dispatcher-ntpd ntp ntfsprogs openssh oneshot p7zip pacaur pacman-color perl-html-parser perl-rename pwgen python-libxml rsync ruby sdcv shotwell tidyhtml transmission-gtk ttf-microsoft-consolas tree unrar vlc xclip xorg-xdpyinfo \
atolm-gtk3 cheser-icon-theme elementary-gtk-theme elementary-icons-bzr elements-theme faenza-icon-theme faience-icon-theme gnome-shell-theme-atolm gnome-shell-theme-default-mod gnome-shell-theme-london-smoke gtk-theme-grayday gtk-theme-hope mediterraneannight-theme orion-gtk-theme sammy-themes youtube-viewer zukitwo-themes \
gnome-shell-extension-alternate-tab-git gnome-shell-extension-alternative-status-menu-git gnome-shell-extension-axe-menu gnome-shell-extension-common-git gnome-shell-extension-drive-menu-git gnome-shell-extension-extended-volume-indicator-git gnome-shell-extension-inhibit-suspend-git gnome-shell-extension-move-clock gnome-shell-extension-noa11y gnome-shell-extension-user-theme-git gnome-shell-extension-weather-git gnome-shell-extension-windowoverlay-icons-git gnome-shell-google-calendar-xat59-git

ToDo

  • No GNOME extension for: gmail; printer; cpufreq control, color picker
  • Try Extensions: Shell OSD, Remove bottom panel, Notification button top bar
  • cronie
  • CPUFreq Control, laptop mode tools
  • Expand sda5?
  • Does ripit work?, abcde
  • XDGDIRS
  • for i in *.svg; do ln -s pwd / i $pwd/{16,22,24,32,48,64}/; done
  • Resize svg
  • gtkpod
  • gnome-globalmenu-git globalmenu-extension
  • gnash lightspark
  • libreoffice
  • mplayer 1.1?
  • Spyder3pro and dispcalgui
  • How to add dynamic address for printer? Printer does have listed: Printer Name and Bonjour service.

Download Package Source Files

I wanted a way to easily download source files for quick editing. Sure abs and numerous AUR-helpers do it but I wanted a simple all-together program/script that could do it, and it turned out to be pretty easy. I wanted to be able to define the repository, and then the package and I did it!

pacpull extra/a52dec

aur/ can be used here as well as the other repositories. I set up /etc/abs.conf and $XDG_CONFIG_HOME/cower/config to use my pkgbuilds directory ~/.arch/pkgbuild (ABSROOT="/home/todd/.arch/pkgbuild", TargetDir = /home/todd/.arch/pkgbuild/aur respectively) so it looks pretty nice:

ls
aur  extra  own  testing

If the repository is wrong it will list the available repositories:

pacpull extar/a52dec
 Not a valid repository:
  core
  extra
  community
  multilib
  testing
  community-testing
  multilib-testing

And it’s nice and it’s basic:

Arch Linux Legacy Blue1 Toon Logo

I created this because I liked the legacy logo and was inspired by Encelo’s Arch toon logo. It needs help on the gradient. To do a curved gradient, I had to rely on a blur (because Inkscape does not appear to be able to do curved gradients) and it bleeds a bit. But otherwise, I think it turned out pretty good. Under the CC license so be free to do what you want with it.

makepkg Shortcuts Script

This one is not as important as the pacman related script but I find I use it often too. I maintain several packages in the AUR and it comes in handy to quickly refer to common tasks related to makepkg. The md5sum function still needs a bit of work (i.e. it requires the build function in the PKGBUILD be able to place the md5sums nicely). Otherwise it’s pretty ready. Here’s what it does:

 mp <option> - common makepkg building tasks
  b - build package (install dependencies if required)
  m - update md5sums
  r - remove previous build directories
  s - create source files for upload, prompts for submission to the AUR
  t - create PKGBUILD template

(ar)ch (pa)ckages – a generic package tasks script for Arch Linux

I once saw a wrapper-script for pacman in the forums that was basically a short-hand version of common pacman tasks. I thought this was a good idea and over the last couple years, I’ve expanded on it. It does just about everything I need it to. It’s real basic and I call it arpa. Here is a basic synopsis:

arpa [option] [*package] - a generic package tasks wrapper script
  -e, --explicit - install a package as explicit
  -g, --get      - get/download package upgrade(s)    : -G get pkg upgrades all
  -i, --install  - install a package                  : -I install as dependency
  -l, --list     - list package files                 : -L list pkgs installed
  -o, --owns     - owning package of a file
  -q, --query    - query for an installed package     : -Q query w/ description
  -r, --remove   - remove a pkg and its deps          : -R force, no argue orphs
  -s, --search   - search for a package               : -S search w/ description
  -u, --upgrade  - upgrade system                     : -U upgrade AUR
  -y, --sync     - sync package db

Good for me to have this around so I can remember everything :), and it is in the AUR.

Follow

Get every new post delivered to your Inbox.

Join 52 other followers