Category Archives: GNOME

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

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.

Gmail Icons

Warning: I got the base design from a Google+ website. I’m not sure if these are tradmarked logos and if Google in that case if they will have a problem with them. If they do, they will be removed.

I was hoping to use this for a Gmail notification icon but it didn’t turn out that way. I saw the Gmail icon but I couldn’t find it in scalable form, so I rebuilt it. Turned out pretty good. It’s under the CC license so be free to use it, however if you like to use it in a program please ask me and give attribution. Download.

Gmail (Red)

Gmail (Blue)

Gmail (Grayscale)

Gmail – Unread (Symbolic)

Gmail – Read (Symbolic)

gedit to Geany

I’ve decided lately to switch from gedit to Geany as the default editor. I had done this before and really liked it (I didn’t want to set it up again because I didn’t remember all the settings I had changed). Geany is more religious how it handles text and I can’t really define it better than that. All I remember is that there were some odd quirks when I adjusted to gedit like selecting text; also Geany just runs beautiful, real light. Geany is a actually an IDE (an integrated development environment) so it’s more than a text editor but it can be pruned down to feel like a basic text editor and it just runs very very nice.

Settings

To get Geany to behave and feel like gedit a number of setting changes will need to be made. To make changes open up the preferences (Edit > Preferences) and change these settings in the Tabs:

General : Startup

  • Uncheck: Load virtual terminal support

General : Miscellaneous

  • Check: Always wrap search

Interface : Interface

  • Uncheck: Show sidebar
  • DropDwn: Font size for Editor: Same as system

Interface : Toolbar : Customize Toolbar Button

  • Removed: Revert, Close
  • Added: Undo and Redo
  • Removed: Back and Forward Location (Unknown use)
  • Removed: Compile, Execute, and Build
  • Removed: Color Chooser
  • Removed: Goto, Jump to (Using Ctrl + L instead)
  • Removed: Quit

Editor : Features

  • Check: Line Wrapping
  • Uncheck: Code folding (I like to see all the text)
  • Check: Newline strips trailing spaces (I find it hard remembering empty spaces)
  • Set: Line breaking column to 80 (Good for readability, more oft use)

Editor : Indentation

  • Set: Width 2 (Two space tabs break up content well without learing the eye overly)
  • Type: Spaces (Spaces translate look as expected)

Editor : Display

  • Uncheck: Show line numbers (Don’t often need to know)
  • Uncheck: Show markers margin
  • Set: Long line marker > Column to 80
  • Set: Long line marker > Color to #98A8B6

Files

  • Check: Strip trailing spaces and tabs # For a consistent, expected feel
  • Check: Replace tabs by space

After setting these preferences remove the Message Pane by unchecking View > Show Message Window.

Automatic Save

gedit has a useful feature in one of its’ options of being able to autosave files at certain intervals. To get the same functionality in Geany do:

Tools > Plugin Manager

  • Check: Save Actions
  • Select: Preferences
  • Check: Auto Save: Enable & Save all open files
  • Check: Backup Copy: Enable

Geany as Default Text Editor

xdg-mime default geany.desktop $(grep MimeType /usr/share/applications/geany.desktop | sed 's/MimeType=//' | sed 's/;/ /g')

Use Generic Text Editor Icon

Ubuntus’ icon theme has a generic text editor icon that gets tied to gedit. To be able to use it with Geany do:

cp /usr/share/applications/geany.desktop ~/.local/share/applications/
sed -i 's/^Icon=.*$/Icon=accessories-text-editor/g' ~/.local/share/applications/geany.desktop
sed -i 's/=Geany/=Text Editor/g' ~/.local/share/applications/geany.desktop
nautilus ~/.local/share/applications/

From nautilus, drag geany.desktop to Launcher

Change Colorscheme

Note: To get colorscheme support to work properly it may be necessary to install the latest version of Geany. If I understand correctly this is part the development (a.k.a. master?)‘ branch. Nightly builds for various systems can be found here.

Colorscheme support in Geany is still rudimentary. Thankfully a fellow named codebrain has done a lot of the work and it is easy. Much appreciate the work codebrain, thank you.

gny_cnf_dir=~/.config/geany															# define config dir
[ ! -d $gny_cnf_dir ] && mkdir $gny_cnf_dir             # create config dir
cd $gny_cnf_dir
[ -d $gny_cnf_dir/colorschemes ] && \
mv $gny_cnf_dir/colorschemes{,_$(date +%F-%R)}          # backup original
git clone git://github.com/codebrainz/geany-themes.git  # get repository
mv $gny_cnf_dir/geany-themes $gny_cdf_dir/colorschemes

To Do

  • Remove line wrap arrows? – I learned how to do this before from a developer and lost it; afraid to ask again.

Firefox 3 Quick Review and Setup Guide

After a few library dependency checks and a Firefox beta 5 build later, my update is 1.0 final, six day later and… phew! It’s good though since I haven’t touched my system with an update for six months.

Those that are regular viewers of this blog know that I’m a regular Epiphany user. Firefox 2 is a good browser but on my older laptop, I just found it too sluggish and resource greedy. Epiphany took alot of the fat that is the Firefox 2 frontend and put it in a lightweight GTK interface. Firefox 3 beta 5 would really need a good show for me to replace it, and it did and more. This is more of a setup guide than a review though I tossed in some pretty pictures. I’ll let the viewers decided how good Firefox 3 is.

Setting fonts

A good way to setup fonts is to use the css font value “medium” tag. The default font size set in the browser will reflect this value. I like to look at an array of font sizes to get an understanding of what font size to set. Take a look at these css samples to get a good idea of font and minimum font sizes to set.

For LCDs below 100 dpi I pretty much forget about setting a serif font. Serif fonts have many details and just aren’t easily readable unless there are enough dpi available.

Preferred Applications

I prefer to open new windows in tabs. As long as this is set in Firefox and the Preffered Applications control panel is set to use Firefox’s default, other applications opening a web page in Firefox will also use a new tab. I prefer to have the behavior of all new tabs open in the same manner though – in the background. This can be done in “about:config”(type in location bar), use the filter to find “browser.tabs.loadDivertedInBackground” and set this to true.

“about:config” yarn. I thought was pretty funny. :)

Epiphany Bookmarks Import

Firefox 3 won’t understand Epiphany’s bookmark file if imported directly. Therefore the rdf (bookmarks.rdf in ~/.gnome2/epiphany/) file will need to be converted. Thankfully the good people at Epiphany have created a translator.

Then I had select Bookmarks > Organize Bookmarks in the menu and then click the import-button. It may take a minute for the information to enter the database and may even need a restart before the bookmarks are recognized.

New Bookmarks and Location Bar

It’s going to be interesting to see just what people think of Firefox’s new location/bookmark/tag bar. The folks at Firefox are calling it the “Amazing Bar” and it is pretty cool. The tagging feature of Firefox three looks like it would be beneficial though I have no idea how to use it. I also like this idea of quick bookmarks:

Firefox 3 Quick Review and Setup Guide

Clicking the star on the right side of the location bar will bookmark the site. Unfortunately, the bookmark will not show up in the drop-down Bookmarks Menu, it’s put in a different category and isn’t seen unless the bookmarks are reorganized. I wonder if Firefox 3 is complicating bookmarking by adding this extra level.

Already a few posts I have seen had say that they don’t like the expanded all-in-one location bar. No problem and easy enough to disable: in “about:config” preference name “browser.urlbar.maxRichResults”. Also an original location bar plugin is available.

GTK Scrolling… Held back a year

Firefox developers did a good deed and implemented a scrolling system into Firefox. Mousewheel scrolling can be adjusted in “about:config”. First flip “mousewheel.withnokey.sysnumlines” to false and then tell “mousewheel.withnokey.numlines” how many lines to scroll with each click.

Prefetching

I turn fetching off because it uses fewer resources. Flip “network.prefetch-next” to false.

Final Thoughts

“Parting is such sweet sorrow”
– Shakespeare Romeo And Juliet Act 2, scene 2, 176–185

Bye-bye Epiphany, at least for… now. Sounds funny but I’m going to miss it. Epiphany is a good browser but in almost every area Firefox 3 bests it. Firefox 3 looks to be a heck of a browser: it’s fast, uses less resources, and I do like it location bar function. Though, I am going to miss Epiphany’s integrated location bar/search bar. Why there are different bars for location and search I’m just not sure. Otherwise, I think I’m good for awhile.

  • + fast, and light
  • + very very compatible on all the websites I tested
  • + location location location – location bar rocks
  • – bookmark layout
  • ? Is addons.mozilla.org run my the president of Firefox’s nephew?
  • Related Links

Using Feh as the Default Picture Browser

Using Feh as the Default Picture BrowserI schmoozed yesterday about Feh being a very proficient picture browser for a lightweight desktop. Feh though is twiggy and needs some lovin’ to work well on the desktop.

Feh’s functions are used from the command line, there is no desktop entry for it. Feh can be specified as the default browser in the typical Gnome/XFCE fashion, by right-clicking on the file, then Properties, then what application to open Feh with. Feh will not show up in the preferred application dialog so select “custom command” and enter feh manually. For example feh and the settings I use:

feh --auto-zoom --geometry 500x375 --sort filename --fontpath /usr/share/fonts/consolas --menu-font CANDARA/9

This uses feh’s auto zoom mode which zooms the image’s size to fit the window. To view the picture’s normal size just middle click on it. Double clicking though will only open feh in single-browser mode so I guess we’re kinda screwed. Not really. :) We can build a bash script to use through nautilus as the next best thing.

#!/bin/bash

feh --auto-zoom --geometry 500x375 --sort filename --fontpath /usr/share/fonts/consolas --menu-font CANDARA/9 *.[p,j,g][n,p,i][g,f]

Put the script in ~/.gnome2/nautilus-scripts/ and now right clicking and selecting the script will load Feh in browser-mode.

The action is similiar for Thunar (XFCE’s file manager). In Thunar select Edit then Custom Actions. Thunar has some built in script abilities. So the above line can just be pasted in. That’s it enjoy Feh.

Gnome to abandon GTK+ framework for QT

Gnome to abandon GTK+ framework for QTNote: The following is an April Fool’s day joke and as some people pointed out – a bad one :) . Don’t break your headband or get mad at your grandparents.

Gnome announced today it it will be abandoning it’s application framework GTK+ in favor of QT, sources inside Gnome say. “The incredible reliability and robustness of QT” has been admired by Gnome developers for years one developer told me, “and we can’t see not leveraging that for the benefit of our users.” Discussions in #gnome have been heated at best as developers point out that the “browse as root button” in KDE has no similar equivalent in Gnome and the entire task bar can be made transparent in KDE while not all parts of the panel can be in Gnome. Other developers have been upset that GTK+ apps don’t display enough options or don’t use enough screen real estate.

All Gnome applications will be ported to QT as soon as “reasonably possibly” quotes Gnome’s ice cream man. “while other GTK+ heavy apps may be abandoned” to their QT brethren. How long will the transition take? Vincent says, “All in all most GTK+ apps will be ported by Gnome 2.24, with a few stragglers left behind.” The reason for the quick transition? “Most Gnome developers have been thinking about this for years and have already begun the process.” So good news for desktop users in Linux in the near future.

Lightweight Linux – A Look at Fbpanel.

As I’ve been working on my desktop, I’ve been steadiy decreasing my use of Gnome applications. Gnome is still a lighter-weight desktop, heck I’m using it on a 300MHz laptop, but some items are less responsive than I’d like.

I’ve wrote before about replacing Gnome’s Nautilus file-browser with XFCE’s Thunar and about a Gnome Terminal Replacement. I’ve thought about going to a full fluxbox setup but am pretty picky about the ergonomics and fung-shui-ness of my desktop which Gnome is particularly good at.

Fbpanel is a basic lightweight panel. I decided to try fbpanel not because I didn’t like or had inherant disastisfaction with Gnome panel but because of my dissatisfaction with the Gnome Menu Bar.

Lightweight Linux - A Look at Fbpanel

Fbpanel does have a configure control panel but some parts will still need to be put in by hand:

cp /usr/share/fbpanel/default ~/.fbpanel/

And edit to taste.

Fbpanel has support for launchers, hiding applications, notification area, and it’s own menu. To replace gnome-panel with fbpanel gnome-session will need to release gnome-panel, and notification apps will need to be restarted.

gnome-session-remove gnome-panel && fbpanel && zim && nm-applet --sm-disable

Putting this in the ~/.xinitrc should do the job to have Gnome start this way.

Fbpanel is really well written (in C nonetheless) and responds that way. In fact, gnome-panel was written on fbpanel. Memory footprints though aren’t dramatically different with gnome-panel using 5.3MB and fbpanel 4.9. The really beautiful part of fbpanel is its menu which perfectly responsive and by far the best I’ve seen of any Linux menu yet.

Another Look at Gnome Menu Bar Alternatives

Header

After reading a post yesterday that talked about replacing the Gnome’s built-in menu applet, I began thinking why not try out the replacements for my lead-weighted Gnome Menu Bar. One of the few expectancies I have of Gnome or any other UI is to respond nearly instantly to menu selections, and to have all common selections in one interface. Gnome Menu Bar has a hiccup to it so I’d thought I’d take a look at what else is being developed.

Reading Johan’s Blog it’s pointed out that there are really only two alternatives to Gnome’s Menu Bar: slab from Novell/Suse (aka Gnome Main Menu) and Gimmie, but there is also a third: Ubuntu System Panel.

Gimmie

Gimmie reminds me alot of an application called dragthing way back on Mac OS:

To install for Gentoo users, Gimmie has an ebuild that’s handy to build Gimmie with. Those that don’t want the extaraneous crud that comes with Gentoo’s gnome-python-desktop, emerging “gnome-python-desktop --nodeps -1” isn’t a problem. Gimmie installed fine after adding four or five dependencies.

Gimmie can be used as a panel applet or a separate dock, but the dock I found obstructive and too big so I’m just covering the panel applet.

Gimmie comes by default colored like a Miami night club, “Hello ladies.” But I’m glad there’s an option to not always have it on. They still hover green, blue, pink… but no big deal I guess.

The People and Library tabs contain contacts and the documents most often used. I didn’t look into these very much as I have my own way of organizing ppl and files but they seem like they can be pretty handy.

The Programs tab is what I would most use Gimmie for and it’s categorized conviently like Gnome Menu Bar.

The Linux tab contains everything else, control panels, places, devices and media.

Gimmie has about everything I need and is fast though not as fast as I would like as the rollover effects hang a bit.

  • + quick responsive
  • + nice variation of features
  • - rollover slight drag
  • - big big
  • ? “Linux Tab”?
  • ? Tomboy Notes support?

Slab a.k.a Gnome Main Menu

Suse’s custom Gnome menu has an ebuild for it too. I downloaded the ebuild (and all the patches), and updated 02-configure.in-remove-gtk-doc.patch which was outdated.

Gnome Main Menu feels like a trimmed down version of Gimmie and works exactly as it was designed to do: a lighter replacement for Gnome’s Menu Bar. It does take the same load time though (5 to 10 seconds) but once it does it’s nice and responsive. Gnome Main Menu has no applications setup by default – favorites must be added manually. I was hoping applications would get added by the frequency they are used but no luck. So I added my favorites and found that its really nice to be able to start these applications as quickly as I did. Despite this feature being really useful it also becomes a crutch as any applications that are not favorites had to be opened through launching a second window. Gnome Main Menu also creates a folder called Documents in my home directory. Not good. I have my own way of organizing my documents so this didn’t make me happy.

GMM is good in the basics. I like GMM’s hover buttons that give one click behavior over Gimmies double click one. Also, GMM has no preferences which surprisingly didn’t’ disturb me at all as it was well configured.

  • + Light, fast, mean and trim.
  • + easy to learn and use
  • - big size
  • - Document folder – oh boy.

Ubuntu System Panel

I haven’t tried USP but some people really like it. I’ll refer you to makeuseof for the review.

Conclusion

If I were to choose between the two, it would depend on my situation. Gimmie could be useful to beginners who could be sedated by finding most of what they need in the menu while GMM just works nice for basic (8-10) app users that don’t need the frills and likes the speed.

For now though… I’m sticking with Gnome’s Menu Bar. Though it doesn’t preload the menu and sometimes loses the cached icons its still the quickest way I can get to all the apps I need.

Quick Tip: Gnome Menu Bar has a built-in delay when sliding over categories. Add to or create a ~/.gtkrc-2.0 file and add:

vim ~/.gtkrc-2.0
gtk-menu-popup-delay = 0"| tee -a .gtkrc-2.0

for a lower menu delay (does cause a harmless gtk warning)

Quick Tip – Gnome Color Chooser – Color Chart

Gnome Color Chooser - Color ChartI wrote about configuring the Gnome Color Chooser last week and got my fixing eyes and fingers more into it. The degree to how customizable the Gnome desktop is really incredible if not a bit overbearing. So, I’ve made a reference chart too help me in the future to quicken the process.

For customizing, I use freakcode’s Si Pack here – customizations may vary depending on the theme used.

gnome-color-chooser-color-chart.png

Matched Colors

To carry the theme, these are the colors I matched.

In the Normal section:

I matched the hover fg to Entry hover fg.

In the Entry Fields section:

I matched selected bg to Normal selected fg, selected fg and alt.
selected fg to Normal hover bg.

The alt selected bg matches Normal hover fg.

And the disabled bg also matches the Normal disabled bg.

Sidenote

I’m testing vimpress to write and publish this post. I’ve been studying
this week on vim and this is all very very interesting.

Follow

Get every new post delivered to your Inbox.

Join 52 other followers