FreeBSD 11 Development Desktop on Dell XPS13
Graphical Interface Installation
Xorg - Display Manager
Xorg is the default display on UNIX and compatible systems.
- pkg install xorg
There are no further configuration steps needed to run Xorg, but the default window manager, called TWM, will not be to everyone's taste. This guide will install Openbox as an alternative window manager, see the openbox section for futher configuration.
This installation of Xorg will include XTerm a basic, though very useful, terminal emulator. To make it a little more useful for users, when you add any, follow these steps.
- vi /usr/share/skel/dot.Xresources
Add the following lines to the file. NOTICE comment lines start with '!'.
! Use a nice truetype font and size by default... xterm*faceName: Liberation Mono xterm*faceSize: 11 ! Every shell is a login shell by default (for inclusion of all necessary environment variables) xterm*loginshell: true ! I like a LOT of scrollback... xterm*savelines: 4096 ! double-click to select whole URLs :D xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48 ! DOS-box colours... xterm*foreground: rgb:64/94/ed xterm*background: rgb:00/00/00 xterm*color0: rgb:00/00/00 xterm*color1: rgb:a8/00/00 xterm*color2: rgb:00/a8/00 xterm*color3: rgb:a8/54/00 xterm*color4: rgb:00/00/a8 xterm*color5: rgb:a8/00/a8 xterm*color6: rgb:00/a8/a8 xterm*color7: rgb:a8/a8/a8 xterm*color8: rgb:54/54/54 xterm*color9: rgb:fc/54/54 xterm*color10: rgb:54/fc/54 xterm*color11: rgb:fc/fc/54 xterm*color12: rgb:54/54/fc xterm*color13: rgb:fc/54/fc xterm*color14: rgb:54/fc/fc xterm*color15: rgb:fc/fc/fc ! right hand side scrollbar... xterm*rightScrollBar: true xterm*ScrollBar: true ! stop output to terminal from jumping down to bottom of scroll again xterm*scrollTtyOutput: false ! Set a slightly larger terminal window. xterm*vt100*geometry: 80x50
Including the setting from the .Xresources file requires the running of the xrdb command below. This will be finally configured during the Openbox installation.
- xrdb -merge ~/.Xresources
Conky - System Information Monitor
Conky is a system monitor which display system information on the desktop wallpaper. To install it.
- pkg install conky
Configure it for new users.
- vi /usr/share/skel/dot.conkyrc
Add the following lines.
conky.config = { alignment = 'bottom_right', gap_x = 75, background = true, default_color = 'FFFFFF', double_buffer = true, font = "Liberation Mono:size=10", format_human_readable = true, update_interval = 1.0, use_xft = true, pad_percents = 2, use_spacer = left, -- Use own window own_window = true, own_window_transparent = true, own_window_type = 'normal', own_window_class = 'conky-semi', own_window_hints = 'undecorated, below, sticky, skip_taskbar, skip_pager', background = true, minimum_width = 360, -- Drawing default_bar_width = 150, default_bar_height = 5, default_graph_width = 150, default_graph_height = 12, default_gauge_width = 20, default_gauge_height = 20, -- Color color1 = 'AABBFF', color2 = 'FF993D', color3 = 'AAAAAA', -- Layout template0 = [[${font Liberation Sans:bold:size=11}${color2}\1 ${color3}${hr 2}${font}]], template1 = [[${color1}\1]], template2 = [[${color}${alignr}]], template3 = [[${color}]], }; conky.text = [[ ${template0 System} ${template1 Hostname} ${template2}${nodename} ${template1 ${sysname}} ${template2}${kernel}-${machine} ${template1 Uptime} ${template2}${uptime_short} ${template1 CPU} ${template2}${freq_g}GHz ${template1 CPU\ Temperature} ${template2}${acpitemp}°C ${template0 Processors} ${template1 Load} ${template2}${loadavg 1} ${template2}${loadgraph} ${template1 Core1} ${template2}${cpu cpu1} ${template2}${cpubar cpu1} ${template1 Core2} ${template2}${cpu cpu2} ${template2}${cpubar cpu2} ${template1 Core3} ${template2}${cpu cpu3} ${template2}${cpubar cpu3} ${template1 Core4} ${template2}${cpu cpu4} ${template2}${cpubar cpu4} ${template1 Top} ${template3}${top name 1} ${template2}${top cpu 1} ${template3}${top name 2} ${template2}${top cpu 2} ${template3}${top name 3} ${template2}${top cpu 3} ${template0 Memory} ${template1 Memory} ${template2}${memperc}% used ${template2}${mem} / ${memmax} ${template2}${membar} ${template1 Top} ${template3}${top_mem name 1} ${template2}${top_mem mem_vsize 1} ${template3}${top_mem name 2} ${template2}${top_mem mem_vsize 2} ${template3}${top_mem name 3} ${template2}${top_mem mem_vsize 3} ${template0 Filesystem} ${template1 /} ${template2}${fs_free /} free ${template2}${fs_used /} / ${fs_size /} ${template2}${fs_bar /} ${template1 IO\ Read} ${template2}${diskio_read} ${template2}${diskiograph_read} ${template1 IO\ Write} ${template2}${diskio_write} ${template2}${diskiograph_write} ${template0 Network} ${template1 IP} ${template2}${addr re0} ${template1 Download} ${template2}${downspeed re0} ${template2}${downspeedgraph re0} ${template1 Upload} ${template2}${upspeed re0} ${template2}${upspeedgraph re0} ${template1 Total Down/Up} ${template2}${totaldown re0}↓ / ${totalup re0}↑ ${template0 Info} ${template1 Date} ${template2}${color3}${time %a,}${color}${time %e %B %G} ${template1 Time} ${template2}${time %T} ]];
Openbox - Window Manager
Openbox is a stable, fast, configurable window manager with good looks and low system requirements.
- pkg install openbox feh tint2 gsimplecal numlockx openbox-themes obconf
This installs openbox, the window manager, along with:
- feh
- Graphics program used to set the desktop wallpaper.
- tint2
- Simple panel to keep track of running applications.
- gsimplecal
- Simple calendar application used by tint2.
- numlockx
- Application to turn numlock on and off during startup.
- openbox-themes
- Openbox themes to customise the look and feel.
- obconf
- Openbox configuration GUI application. Allows user to choose themes.
To make openbox the default window manager for new users add an .xinitrc file to the user skeleton directory and a .config/openbox directory. Note that the 'dot' prefix will be skipped when setting up a user.
- mkdir -p /usr/share/skel/dot.config/openbox
- vi /usr/share/skel/dot.xinitrc
This is the startup configuration file for Xorg, to make openbox start when Xorg does add the following content to the file.
#!/bin/sh userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/usr/local/etc/X11/xinit/.Xresources sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap # merge in defaults and keymaps if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi # User setup # Turn off the audible bell. xset b off # Set layout to UK and Danish with alt+shift switch. setxkbmap -layout gb,dk -option grp:alt_shift_toggle # Set mouse accelleration. xset m 1/1 0 # Start openbox exec openbox-session
This file will merge settings from the .Xresources file, turn off the beep bell, set the default language to be English with the option of using Danish with a press of Alt + Shift, set a nice mouse accelleration and start openbox.
When Openbox is started it executes the commands in .config/openbox/autostart, so we add that file with the commands we wish to start automatically.
- vi /usr/share/skel/dot.config/openbox/autostart
Add the following commands to the file.
# Setup Desktop Background ~/.fehbg # Load Tint2 Panel /usr/local/bin/tint2 & # Turn Numlock Off - this is a laptop. /usr/local/bin/numlockx off # Start Conky /usr/local/bin/conky &
The file ~/.fehbg does not exists yet. It would be created automatically by feh if run under X, but Xorg has yet to run so create it manually. Assuming your wallpaper is stored as /data/images/wallpaper.png.
- echo '#!/bin/sh' > ~/.fehbg
- echo "feh --bg-fill '/data/images/wallpaper.png'" >> ~/.fehbg
- chmod 774 ~/.fehbg
Finally, configure the tint2 panel.
- mkdir -p /usr/share/skel/dot.config/tint2
- vi /usr/share/skel/dot.config/tint2/tint2rc
Add the following commands to the file.
rounded = 0 border_width = 1 background_color = #181818 85 border_color = #303030 85 background_color_hover = #181818 85 border_color_hover = #303030 85 background_color_pressed = #303030 85 border_color_pressed = #606060 85 # Background 2: Active taskbar rounded = 0 border_width = 1 background_color = #404040 85 border_color = #808080 85 background_color_hover = #404040 85 border_color_hover = #808080 85 background_color_pressed = #404040 85 border_color_pressed = #808080 85 # Background 3: Active task rounded = 0 border_width = 1 background_color = #cfcfcf 50 border_color = #e7e7e7 50 background_color_hover = #cfcfcf 50 border_color_hover = #e7e7e7 50 background_color_pressed = #cfcfcf 50 border_color_pressed = #e7e7e7 50 # Background 4: Urgent task rounded = 0 border_width = 1 background_color = #cfcfcf 80 border_color = #e7e7e7 80 background_color_hover = #cfcfcf 90 border_color_hover = #e7e7e7 90 background_color_pressed = #cfcfcf 50 border_color_pressed = #e7e7e7 50 # Background 5: Default task, Iconified task, Launcher icon, Normal task rounded = 0 border_width = 1 background_color = #cfcfcf 0 border_color = #e7e7e7 0 background_color_hover = #cfcfcf 30 border_color_hover = #e7e7e7 30 background_color_pressed = #cfcfcf 70 border_color_pressed = #e7e7e7 70 # Background 6: Tooltip rounded = 0 border_width = 1 background_color = #181818 85 border_color = #303030 85 background_color_hover = #181818 85 border_color_hover = #303030 85 background_color_pressed = #181818 85 border_color_pressed = #303030 85 #------------------------------------- # Panel panel_items = LTSBC panel_size = 100% 36 panel_margin = 0 0 panel_padding = 0 0 2 panel_background_id = 0 wm_menu = 1 panel_dock = 0 panel_position = center right vertical panel_layer = top panel_monitor = 2 primary_monitor_first = 1 autohide = 0 autohide_show_timeout = 0.3 autohide_hide_timeout = 2 autohide_height = 2 strut_policy = follow_size panel_window_name = tint2 disable_transparency = 0 mouse_effects = 1 font_shadow = 0 mouse_hover_icon_asb = 100 0 10 mouse_pressed_icon_asb = 100 0 25 #------------------------------------- # Taskbar taskbar_mode = multi_desktop taskbar_padding = 0 0 1 taskbar_background_id = 1 taskbar_active_background_id = 2 taskbar_name = 0 taskbar_hide_inactive_tasks = 0 taskbar_hide_different_monitor = 0 taskbar_always_show_all_desktop_tasks = 0 taskbar_name_padding = 0 0 taskbar_name_background_id = 0 taskbar_name_active_background_id = 0 taskbar_name_font = Liberation Sans Bold 10 taskbar_name_font_color = #000000 100 taskbar_name_active_font_color = #000000 100 taskbar_distribute_size = 0 taskbar_sort_order = none task_align = left #------------------------------------- # Task task_text = 1 task_icon = 1 task_centered = 0 urgent_nb_of_blink = 65535 task_maximum_size = 34 34 task_padding = 0 0 2 task_font = Liberation Sans 10 task_tooltip = 1 task_font_color = #e7e7e7 80 task_normal_font_color = #e7e7e7 80 task_active_font_color = #e7e7e7 86 task_urgent_font_color = #e7e7e7 100 task_iconified_font_color = #e7e7e7 66 task_icon_asb = 90 0 0 task_normal_icon_asb = 90 0 0 task_active_icon_asb = 100 0 0 task_urgent_icon_asb = 100 0 10 task_iconified_icon_asb = 35 0 0 task_background_id = 5 task_normal_background_id = 5 task_active_background_id = 3 task_urgent_background_id = 4 task_iconified_background_id = 5 mouse_left = toggle_iconify mouse_middle = close mouse_right = maximize_restore mouse_scroll_up = toggle mouse_scroll_down = iconify #------------------------------------- # System tray (notification area) systray_padding = 5 5 1 systray_background_id = 1 systray_sort = ascending systray_icon_size = 24 systray_icon_asb = 100 0 0 systray_monitor = 1 #------------------------------------- # Launcher launcher_padding = 5 5 1 launcher_background_id = 1 launcher_icon_background_id = 5 launcher_icon_size = 24 launcher_icon_asb = 100 0 0 launcher_icon_theme_override = 0 startup_notifications = 1 launcher_tooltip = 1 launcher_item_app = xterm.desktop #------------------------------------- # Clock time1_format = %m-%d time2_format = %H:%M time1_font = Liberation Sans 8 time1_timezone = time2_timezone = time2_font = Liberation Sans Bold 10 clock_font_color = #e7e7e7 82 clock_padding = 1 1 clock_background_id = 1 clock_tooltip = %Y-%m-%d %H:%M:%S clock_tooltip_timezone = clock_lclick_command = gsimplecal clock_rclick_command = gsimplecal clock_mclick_command = gsimplecal clock_uwheel_command = clock_dwheel_command = #------------------------------------- # Battery battery_tooltip = 1 battery_low_status = 10 battery_low_cmd = notify-send -u critical "Battery low" bat1_font = Liberation Sans 10 bat2_font = Liberation Sans 10 battery_font_color = #e7e7e7 82 battery_padding = 1 1 battery_background_id = 1 battery_hide = 101 battery_lclick_command = battery_rclick_command = battery_mclick_command = battery_uwheel_command = battery_dwheel_command = ac_connected_cmd = notify-send -u normal "AC connected" ac_disconnected_cmd = notify-send -u normal "AC disconnected" #------------------------------------- # Tooltip tooltip_show_timeout = 0 tooltip_hide_timeout = 0 tooltip_padding = 3 3 tooltip_background_id = 6 tooltip_font_color = #e7e7e7 82 tooltip_font = Liberation Sans 10