Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support Us

Top Posters

Custom minimal ubuntu desktop install

aktsakts Registered
[size=large]SpectrWM + ubuntu minimal install[/size]

Recently, I bumped into linuxbbq and saw a version with spectrwm, but now discontinued. This document is for anyone who wants SpectrWM as their only way to X.
Therefore, this tutorial is stricly for cli ... ie no gtk apps will be installed. Yeah, i'm talking anti-gtk!!! Somebody stop me :cool:

[size=small]OUR AIM:[/size]
To get a ubuntu based desktop featuring only spectrWM and some basic cli apps.

[size=small]STEPS:[/size]
1. Got to ubuntu minimal iso section, download the mini iso, and install it on your machine. Note: An internet connection is needed. If you want a guide here is one, follow the 15 steps he did.

2. Now that we have finished and booted into our new system, time to install some basic system stuff, login and type away
sudo apt-get install xorg alsa-base  volumeicon-alsa suckless-tools hal acpi

Check if X works by typing startx at the commandline. If O.k continue,otherwise get it fixed.

3. Now its time to install our desktop and apps. For our desktop issue
sudo apt-get install spectrwm dmenu libxtst-dev dzen2 conky-all
and for the apps issue
sudo apt-get install  mpd mpc ncmpcpp moc weechat-curses centerim mcabber vim mc w3m w3m-img elinks htop ttyload iotop bmon feh iftop hnb rtorrent newsbeuter mutt alpine screen tmux calcurse cmatrix cnetworkmanager

4. SpectrWM configs

.spectrwm.conf place it in your home
color_focus            = rgb:65/7b/83
color_unfocus            = rgb:00/2b/36

# bar settings
bar_enabled            = 1
bar_border_width        = 1
bar_border[1]            = rgb:12/12/12
bar_color[1]            = rgb:12/12/12
bar_font_color[1]        = rgb:ff/ff/ff
bar_font            = -*-termsyn.icons-medium-r-normal-*-12-*-*-*-*-*-*-*
bar_at_bottom            = 0
#bar_action            = conky
#bar_justify            = right
bar_action            = /home/akts/bin/baraction.sh
bar_delay            = 2
stack_enabled            = 1
clock_enabled            = 0
title_name_enabled        = 0
title_class_enabled        = 0
window_name_enabled        = 1
focus_mode            = default
disable_border            = 1
border_width            = 1

# spawn app
program[term]            = urxvtcd
program[screenshot_all]	 = screenshot -a
program[screenshot_wind] = screenshot -w
program[lock]		     = xscreensaver-command -lock
program[initscr]	     = initscreen.sh
program[menu]            = dmenu_run -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_font_color -sf $bar_color -p exec:
spawn_term               = urxvtcd

# dialog box size ratio .3 >= r < 1
dialog_ratio            = 0.3

# Split a non-Xrandr dual head setup into one region per monitor
# (non-standard driver-based multihead is not seen by spectrwm)
# region		= screen[1]:1280x1024+0+0
# region		= screen[1]:1280x1024+1280+0

# Launch applications in a workspace of choice
# autorun		= ws[1]:x-terminal-emulator
# autorun		= ws[2]:xxxterm http://www.openbsd.org

# workspace layout
# layout		= ws[1]:4:0:0:0:vertical
# layout		= ws[2]:0:0:0:0:horizontal
# layout		= ws[3]:0:0:0:0:fullscreen

# mod key, (windows key is Mod4) (apple key on OSX is Mod2)
# modkey = Mod1

# Clear key bindings and load new key bindings from the specified file.
# This allows you to load pre-defined key bindings for your keyboard layout.
#keyboard_mapping        = ~/.spectrwm_fr.conf

# quirks
# remove with: quirk[class:name] = NONE
# quirk[MPlayer:xv]			= FLOAT + FULLSCREEN + FOCUSPREV
# quirk[OpenOffice.org 2.4:VCLSalFrame]	= FLOAT
# quirk[OpenOffice.org 3.0:VCLSalFrame]	= FLOAT
# quirk[OpenOffice.org 3.1:VCLSalFrame]	= FLOAT
# quirk[Firefox-bin:firefox-bin]		= TRANSSZ
# quirk[Firefox:Dialog]			= FLOAT
# quirk[Gimp:gimp]			= FLOAT + ANYWHERE
# quirk[XTerm:xterm]			= XTERM_FONTADJ
# quirk[xine:Xine Window]			= FLOAT + ANYWHERE
# quirk[Xitk:Xitk Combo]			= FLOAT + ANYWHERE
# quirk[xine:xine Panel]			= FLOAT + ANYWHERE
# quirk[Xitk:Xine Window]			= FLOAT + ANYWHERE
# quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT
# quirk[pcb:pcb]				= FLOAT

# EXAMPLE: define firefox program and bind to key
# program[firefox]	= firefox http://spectrwm.org/
# bind[firefox]		= MOD+Shift+b

# default keybinds
program[ranger]     = urxvtcd -e ranger
program[vim]        = urxvtcd -e vim
program[mocp]       = urxvtcd -e mocp
program[mixer]      = urxvtcd -e alsamixer
bind[ranger]        = Mod4+r
bind[vim]           = Mod4+e
bind[mocp]          = Mod4+z
bind[mixer]         = Mod4+v

baraction.sh place it as per spectrwm config
#!/bin/sh
conky | dzen2 -fg "#ffffff" -bg "#121212" -ta right -w 700 -h 14 -x 600 -y 0 -fn -*-termsyn.icons-medium-r-normal-*-12-*-*-*-*-*-*-* &
exit 0

.conkyrc Place it in your home
out_to_x no
out_to_console yes
update_interval 1.0
total_run_times 0
use_spacer none
TEXT
${if_mpd_playing}^i(/usr/share/icons/stlarch_icons/note3.xbm) ${mpd_title}${endif} ^i(/usr/share/icons/stlarch_icons/arch1.xbm) ${uptime_short} ^i(/usr/share/icons/stlarch_icons/mem1.xbm) $mem ^i(/usr/share/icons/stlarch_icons/cpu1.xbm) ${cpu}% ^i(/usr/share/icons/stlarch_icons/clock2.xbm) ${time %l:%M%P - %m/%d/%y} ^i(/usr/share/icons/stlarch_icons/batt1full.xbm) ${battery_short}

5. Time for some eye candy, since we'll be working from a terminal why not make it look good. This is my .Xresources file
.Xresources

! ~/.Xresources configuration file
!-----------------------------------------------------------------------
! colors
! link
*colorUL: #507F24
! black
*color0:  #3D4041
*color8:  #545653
! red
*color1:  #9D2121
*color9:  #B33A3A
! green
*color2:  #507F24
*color10: #75AB40
! yellow
*color3:  #998221
*color11: #BAAF51
! blue
*color4:  #005885
*color12: #66819F
! purple
*color5:  #68526C
*color13: #8A6E87
! cyan
*color6:  #247D7F
*color14: #40ABAB
! white
*color7:  #A2A49F
*color15: #B2B2B0

! dzen2 ----------------------------------------------------------------
dzen2.font:         Droid Sans Mono-9
dzen2.foreground:   #005885
dzen2.background:   #222222

! Xft settings ---------------------------------------------------------
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.antialias: 1
Xft.rgba: rgb
Xft.hinting: 1
Xft.hintstyle: hintfull

! xterm ----------------------------------------------------------------
xterm*saveLines: 1000
xterm*AllowIconInput: on
xterm*background: #222222
xterm*foreground: #BFBFBF
xterm*border: #BFBFBF
xterm*DeiconifyWarp: off
xterm*Font: -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*
xterm*InternalBorder: 1
xterm*MarginBell: off
xterm*MenuFont: fixed8
xterm*Mouse: yellow
xterm*TitleFont: vtbold
xterm*charClass: 33:48,37:48,45-47:48,64:48
xterm*colorAttrMode: true
xterm*colorMode: true
xterm*curses: on
xterm*cutNewline: off
xterm*jumpScroll: on
xterm*multiClickTime: 500
xterm*multiScroll: on
xterm*reverseWrap: off
xterm*scrollBar: off

! urxvt config ---------------------------------------------------------
URxvt.termName: rxvt-unicode
URxvt.imLocale: fr_FR.UTF-8
URxvt.saveLines: 5000
URxvt.cursorBlink: true
URxvt.foreground: #BFBFBF
URxvt.background: #222222
URxvt.cursorColor: #e0e080
URxvt.highlightColor: #343434
URxvt.fadecolor: #222222
URxvt.fading: 40
URxvt.transparent: false
URxvt.tintColor: #BFBFBF
URxvt.visualBell: false
URxvt.urgentOnBell: true
URxvt.font: -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*
!URxvt.font: xft:Droid Sans Mono:pixelsize=11
!URxvt.font: -*-snap-normal-*-*-*-10-*-*-*-*-*-*-*
URxvt.scrollBar: false
URxvt.scrollBar_right: false
URxvt.urlLauncher: firefox
URxvt.matcher.button: 1
URxvt.perl-ext-common: default,matcher
!URxvt.perl-ext-common: default,tabbed,matcher !uncomment = autotabs in URxvt
URxvt.tabbed.tabbar-fg: 4
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 7
URxvt.tabbed.tab-bg: 4

6. Since we don't have a display manger, we simply type in startx to get X. But before we do that create .xinitrc in your home with these contents
#! /bin/bash

source ~/.bashrc
## D-Bus ##
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
        eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi

## clean-up conky deamon ##
#killall conky &
#killall conkyd &

## trackpad ## tapbutton off by default ##
if egrep -iq 'touchpad' /proc/bus/input/devices; then
    synclient VertTwoFingerScroll=1
    synclient HorizTwoFingerScroll=1
    synclient TapButton1=0
fi

## read ~.Xresources file ##
xrdb -merge ~/.Xresources

## enable snap font ##
xset fp+ /usr/share/fonts/artwiz_fonts/artwiz-latin1/
xset fp rehash
#############Add more lines for fonts like termsyn here ########


## launch screensaver ##
xscreensaver-command -exit
xscreensaver -no-splash &

## set cursor ##
xsetroot -cursor_name left_ptr

## set ctrl_alt_bksp as session-killer ##
setxkbmap -option terminate:ctrl_alt_bksp

## startup-wall - customize your start-screen ##
feh --no-xinerama --bg-fill </path/to/wallpaper/foo.png>

#-----------------------------------------------------------------------

## launch spectrwm ##
exec ck-launch-session spectrwm

Also give the spectrwm man page a read. Get familiarized with the default key bindings.

7. In my configs I used stlarch_icons and termsyn fonts. Get them from here and here. Both zip files contain READMEs about their installations.

Winding up

Visit dotfiles.org, dotshare.it or pastebin.org to get some nasty configs up on your terminal machine. Also visit the arch forums, #! forums they also provide good configs and documentations.

This is what my desktop currently looks like

foo.jpg

Have fun and post back with results.

~akts

Comments

  • If you use dropbox, I'd suggest my script for taking screenshots, uploading them to dropbox and clipboarding for the link to make easy to share if you're interested in that. It's under bash scripts in the forums. Cool desktop, thanks for sharing ^^
  • ValtamValtam Registered
    Thanks for the tutorial akts :)
  • aktsakts Registered
    @Valtam: Hey, thanks a bunch. Any one up for posting your "only WM desktop screens" and their configs(*cough*armageddon *cough*).

    @Army: Hey anything related to bash from you is a + from me. Thank man.
Sign In or Register to comment.