FreeBSD: Moving to PC-BSD

After testing NetBSD and being a bit disappointed due to problems to install all apps I need with “pkgsrc” I decided to give another chance to PC-BSD and FreeBSD. Yes, I know, FreeBSD is really a good OS but.. not as ready for the desktop as Linux. FreeBSD was my OS during much more time I’m able to remember, installed in an old Thinkpad T21 and in a T23 too. Well, in that days, using APM, my laptops worked fined with FreeBSD and they were able to suspend and resume. Never more… until FreeBSD 8.1 amd64 installed in Thinkpad R61. ‘Suspend-and-resume’ is, in my opinion, a basic feature for all OS resident in laptops, and necessary for me (I can’t waste my work only because of an old battery).

Well, having PC-BSD installed in my R61 and able to suspend and resume fine (only one hang until now), the next step was to install Gnome. Why? It’s a good question I’d ask to the KDE people. In my opinion, putting aside the question of the appearance, KDE is a resource eater. My computer is not the faster one in the world, and having Xorg sucking always the 30% of the cpu, scaling up the cpu frequency only because the mouse is over a folder in the desktop… well… I prefer to dedicate cpu to the applications, no to the OS. I’m used to Gnome in Linux and NetBSD. Gnome is very big, but much less than KDE, and it doesn’t consume resources. I love XFCE, but I’m used to Gnome. It runs fine with Compiz, and it seems faster (with compiz) than XFCE (for example repainting the screen after a workspace switch, or when it has to repaint the Terminal area).

Gnome packages can be installed with ‘pkg_add -r gnome2’, but at least in FreeBSD 8.1 there’s a bug in metacity (I think), and only one workspace is available, not permitting adding new ones. The alternative to get Gnome is to install it from ports. Simply:

cd /usr/ports/x11/gnome2
make install;make clean

Compiz is equally easy:

cd /usr/ports/x11-wm/compiz-fusion
make install;make clean

If you like ’emerald’ as a window decorator:

cd /usr/ports/x11-wm/emerald
make install;make clean

To launch Compiz from Gnome Desktop, open a terminal and execute:

LIBGL_ALWAYS_INDIRECT=1 compiz –replace –ignore-desktop-hints –indirect-rendering  ccp &
emerald –replace &

In the previous image you can see my desktop. The bottom app is conky with a theme I found in the internet (I forgot the address). This theme was customized for Linux, so I had to modify it for FreeBSD. It contains references to ‘acpi_ibm’ to read, for example, the fan speed.

The complete ‘conkyrc’ is:

# Locale, fonts and font sizes.
use_xft yes
xftfont Droid Sans:size=8
override_utf8_locale yes

# Conky performance
update_interval 1
total_run_times 0
double_buffer yes
no_buffers yes
net_avg_samples 2
text_buffer_size 1024

# Execute it in its own window
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Borders, margins.
draw_borders no
border_margin 1

# Own window color
own_window_colour 393834

# Font colors
default_color B7B2AD
#default_color EFEEED

# Text shadows
draw_shades no

# Header colors
color0 DD3A21

# Minimum dimensions
minimum_size 1440 0

# Conky positioning.
alignment bottom_left
gap_x 0
gap_y 0

# Output
${font}${color}${font Droid Sans:style=Bold:size=10}${color0}$nodename ${color}$sysname $kernel ${font}${color}
${font}${color}${font Droid Sans:style=Bold:size=10}${color}$machine ${font}${color} ${font Droid Sans:style=Bold:size=12}${color0}${goto 256}Disks:${goto 512}Network:${goto 768}Temperatures:${goto 1024}Time and Date:${font}${color}
${goto 256}Root (/):${goto 380}${fs_used /} / ${fs_size /}${goto 512}lagg0 Up: ${goto 612}${upspeedgraph lagg0 10,80 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9}  ${upspeed lagg0}${font}${goto 768}CPU1: ${goto 868}${execi 60 sysctl hw.acpi.thermal.tz0.temperature | cut -d: -f2} ${goto 1024}${time %H:%M}  ${time %d/%m/%Y}
${goto 15}Kernel: ${goto 100}${kernel}${goto 380}${fs_bar 10,100 /}${goto 512}lagg0 Down: ${goto 612}${downspeedgraph lagg0 10,80 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9}  ${downspeed lagg0}${font}${goto 768}CPU2: ${goto 868}${execi 60 sysctl hw.acpi.thermal.tz1.temperature | cut -d: -f2} ${goto 1024}${time %A}, ${time %d} ${time %B} ${time %Y}
${goto 15}CPU1: ${goto 100}${cpubar cpu1 10,100}${font Droid Sans:style=Bold:size=9}  ${cpu cpu1}%${font}${goto 256}Usr (/usr):${goto 380}${fs_free /usr} / ${fs_size /usr}${goto 512}tun0 Up: ${goto 612}${upspeedgraph tun0 10,80 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9}  ${upspeed tun0} ${font}${goto 768}Fan: ${goto 868}${execi 60 sysctl dev.acpi_ibm.0.fan_speed| cut -d: -f2} rpm
${goto 15}CPU2: ${goto 100}${cpubar cpu2 10,100}${font Droid Sans:style=Bold:size=9}  ${cpu cpu2}%${goto 380}${fs_bar 10,100 /usr} ${goto 512}${font}tun0 Down: ${goto 612}${downspeedgraph tun0 10,80 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9}  ${downspeed tun0} ${font}${goto 768}Frequency: ${goto 868}${execi 5 sysctl dev.cpu.0.freq| cut -d: -f2} rpm
${goto 15}RAM: ${goto 100}${membar 10,100}${font Droid Sans:style=Bold:size=9}  $memperc%${font}
${goto 15}SWAP:${goto 100}${swapbar 10,100}${font Droid Sans:style=Bold:size=9}  $swapperc%${font}${goto 512}Total Uploaded: ${goto 612}${totalup lagg0}
${goto 15}Uptime: ${goto 100}${uptime} ${goto 512}Total Downloaded: ${goto 612}${totaldown lagg0}
${goto 512}lagg0 Ip: ${goto 612}${execi 6000 ifconfig lagg0|grep ‘netmask’|awk -F’inet’ ‘{ print $2 }’| cut -d’ ‘ -f 2 }
${font}${goto 512}tun0 IP: ${goto 612}${execi 6000 ifconfig tun0|grep ‘netmask’|awk -F’inet’ ‘{ print $2 }’| cut -d’ ‘ -f 2 }
${font}${goto 512}GW: ${goto 612}${execi 6000 netstat -rn |grep default|awk -F’ ‘ ‘{ print $2 }’ }

${voffset -120}
${goto 1024}${font Droid Sans:style=Bold:size=12}${color0}Processes${font}${color}
${goto 1024}${color grey}Name${goto 1140}PID   CPU%   MEM%
${goto 1024}${color lightgrey} ${top name 1} ${goto 1140}${top pid 1} ${top cpu 1} ${top mem 1}
${goto 1024}${color lightgrey} ${top name 2} ${goto 1140}${top pid 2} ${top cpu 2} ${top mem 2}
${goto 1024}${color lightgrey} ${top name 3} ${goto 1140}${top pid 3} ${top cpu 3} ${top mem 3}
${goto 1024}${color lightgrey} ${top name 4} ${goto 1140}${top pid 4} ${top cpu 4} ${top mem 4}
${goto 1024}${color lightgrey} ${top name 5} ${goto 1140}${top pid 5} ${top cpu 5} ${top mem 5}

That’s all for now…


About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, FreeBSD, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s