Wednesday, August 19, 2015

KDE is awesome!



It has been a while since I have posted anything. I have been working on getting FreeBSD working on my iBook G4 and will be posting on that shortly. I wanted to share my thoughts on running a higher end DE in Linux. Most of my posts have been on PowerPC. These machines are older and are better ran more lightweight DEs such as LXDE, XFCE, or even MATE. Running DEs such as GNOME or KDE really do not make much sense on a G4 machine that the most it can have is 2GB of RAM.

However, if you have a more modern machine with good specs then you could go for a more powerful DE. GNOME has been my DE of choice for a while. It is also the DE that my wife really enjoys. One of the features that I really like about GNOME is the keyboard integration. GNOME make it really easy to launch apps and move between workspaces with a few hits on the keyboard. It just has a really clean to look to it. However I have always wanted to try out KDE. So a few days ago a grabbed a Kubuntu 14.04 and 15.04 ISO and went on my way. I was blown away.

The first thing that I noticed right about KDE was how beautiful of a DE it is. Everything from the panel layouts, how notifications are displayed, and the look of the application really show that a lot of work has gone into making KDE aesthetically pleasing. It is also one of the most customizable DE I have seen. Some people would say that is way too customizable and I can how you can get lost in all the options. However, for me I it is not an annoyance at all. It also has a lot of compiz like features built into its window manager, kwin.

If you decide you want to give it a try I would suggest going with Kubuntu 14.04. Normally I would prefer Debian, but the current stable release does not have all the plugins for KDE. So for example I the KDE network-manager applet is not in Jessie so you need to the GNOME applet. If you are using Sid then the plugin is there.

I am currently running Kubuntu 15.04 on my 2009 MacBook Pro and even on this older machine KDE runs well. Now 15.04 is running the newer Plasma5 version of KDE. It is still pretty experimental, which is why I recommend the 14.04 version. One drawback I have found with Kubuntu is using Kontact on a Mac that is a little outdated. It is a productivity suite that manages email, contacts, and calendar. It is very resource intensive so I choose not to use to manage my email.

If you are running KDE in Debian you can choose not to install this suite if you desired. This is an advantage that Debian has over Kubuntu. However Kubuntu does give you an more straightforward out of the box experience. This may be important if someone does not want to spend time installing packages to get the DE working.

Below is a screenshot enjoy!





Saturday, June 27, 2015

Ubuntu-MATE fits my MacBook Pro nicely


I have been an OS X users for years. I was always happy how it performed. Then came Yosemite and all changed. It was just one issue after another. Safari performance was poor, my garmin would no longer work. Then came the news that iPhoto was being replaced with Photos. This new change meant that syncing photos from the iPhone to the MacBook will now require sending your picture to iCloud. No longer was there direct sync from phone to machine.

It was then I decided to move to Linux on my MacBook. Now I have been using Linux on my PowerPC machines, but kept my MacBook running OS X. So now came the decision of what distro to use.

I first started Ubuntu 15.04, but I was not happy with Unity. There was issues that made some web pages barely readable, software center was having css issues and suspend was not working well on Apple hardware. Then I went to Ubuntu-GNOME and still the same issues. Then finally I went with Ubuntu-MATE.

Ubuntu-MATE  works great on this machine. All the issues I had with the previous flavors of Ubuntu were gone. Plus all the features that Ubuntu-MATE team have added like one-click compiz activation and multi panel layout so if you are looking for OS X or Windows layout setting it up is pretty simple. The performance has been great so far. I could not recommend this flavor of Ubuntu more highly. Thanks to Martin Winpress and the team.

Tuesday, June 9, 2015

A simple TrueCrypt alternative on Linux


A lot of people who were security conscious use TrueCrypt for disk encrytion. Sadly it was discovered to contain security vulnerabilities and for a while now it has been deemed unsafe to use. Thankfully there is an effort to audit the code. So hopfully this may be resolved in the future. Till then there is a really simply way to get portable disk encryption under Linux.

First verify that the package cryptsetup is installed. If not then install it, sudo apt-get install cryptsetup. Once this is installed use the command fallacate to create a file of a paticular size (for example 100M).


rican-linux@lubuntu-powerpc:~/Public$ fallocate -l 100M test.img
rican-linux@lubuntu-powerpc:~/Public$ du -h test.img
100M test.img


What the command did was creat the file test.img and allocate 100M of disk space to it. The extension is really not needed you create a drive without it. The next steps will be to use the disk utility that comes with the Linux desktop you installed to make this file into a loopback drive then create and encrpyted partion using LUX.


First open the disk utility and select attach image.




Then goto the directory where the file is located. Before you select the file uncheck the read-only option on the bottom, then select attach. The file should now be seen as a loopback drive in the disk utility.












Once mounted use disk utility to format the loopback device with ext4.









Once the device is formated to created your encrypted partition select create new parttion.


 

Then enter the passphrase used to encrypt the volume. Be sure to make it complicated! Now you have a portable encrypted filesystem.















Saturday, May 30, 2015

Running VMs on G4 machines with LXC

It is really fun testing out different distributions. You get to see their differences and their strength/weaknesses. The one drawback is the need to keep installing ISO over and over again. I have seen people with G5 machine run qemu to host VM guests. However on G4 machine I do not think there are enough resources to really to this with taking some type of perfomance hit. Then I came across using Linux Containers (lxc) and it was exactly what I needed! So what lxc offers is virtualazation at OS level rather than on the hardware level via hypervizors. QEMU, Zen, KVM,and VB all viritalize the hardware, meaning each VM has its own dedicated hardware. Now if you have more than one core and few Gigs of RAM than this is no issue. However G4 machines at the max have 2G of ram and most are single CPU. This greatly limits what can be accomplished using hypervizors. Since lxc virtualizes on the OS level you guests will share your resources. On my iBook G4 with a single 1.42 GHz cpu and 1.5G of RAM running an instance of Debian as an lxc container performed really well. Below I will walk you through the install and set of lxc on PowerPC.

Install and Initial Setup

The following packages were the ones I used to get lxc working.
sudo apt-get install lxc bridge-utils libvirt-bin debootstrap
These will get you lxc working and allow to connect to your home network. Once you have these package installed there are somethings you need to check. First you want to be sure your kernel has all the correct configuration for lxc. The command to use is lxc-checkconfig. This will verify your kernel configuration. The output should be same as below,
rican-linux@iBookG4-Debian9:~$ sudo lxc-checkconfig
[sudo] password for rican-linux:
Kernel configuration not found at /proc/config.gz; searching…
          kernel-configuration-found-at-/boot/config-3.16.0-4-powerpc
Namespaces —-
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enablede
Multiple /dev/pts instances: enabled
—- Control groups —-
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
—- Misc —-
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
rican-linux@iBookG4-Debian9:~$
All the settings should show enabled. LXC comes with predefined templates that you can use to install containers. These templates can be found in the /usr/share/lxc/templates directory. Since this is on a PowerPC machine you can only install templates that support this architecture. Which leaves you with Debian, Ubuntu, Gentoo, and OpenSUSE. Right now I have been able to successfuly create containers for Debain and Ubuntu. There are some issue with the other two that I am looking into. Now to create a container the command to run is lxc-create. So to create a Debian container this is they syntax to use,
sudo lxc-create -n container_name -t debian
One the proces is complete a root password will be given that you should change one you launch the container and login. Before that step you should set up the networking so that you container can access the internet.

Networking

The process I used to manage my network connections is libvirt. It basically creates a vitual bridge so your VMs in the LXC containers can access the network. If you have libvirt already installed then to see if you bridge is ready run this command sudo virsh net-info default. The output should be as below,
rican-linux@iBookG4-Debian9:~$ sudo virsh net-info default
[sudo] password for rican-linux:
Name: default
UUID: d57736ba-96cc-4798-aefa-1a046fdb1de8
Active: yes
Persistent: yes
Autostart: no
Bridge: virbr0
If the active field is set to no then enable the bridge with this command virsh net-start default. The field should be now set to yes and you should see the interface if you run sudo ifconfig -a.
rican-linux@iBookG4-Debian9:~$ sudo ifconfig -a
….
virbr0 Link encap:Ethernet HWaddr 52:54:00:4a:83:be
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:454898 errors:0 dropped:0 overruns:0 frame:0
TX packets:897541 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:77865967 (74.2 MiB) TX bytes:1259670602 (1.1 GiB)
virbr0-nic Link encap:Ethernet HWaddr 52:54:00:4a:83:be
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
….
The ip address shown is controlled by this configuration file, /var/lib/libvirt/network/default.xml. This file also controls the dhcp scope of the virtual network and where you can set static reservations. You can read more on this on the Debian Wiki here.

LXC running and VNC setup

Now that lxc is install, a Debian container is created, and the networking is set,it is time to run the container and set up VNC. The command to start a container is the following,
sudo lxc-start -F -n container_name
The -F option puts you in the console on your terminal session. Once you login you want to be sure you have an ip address and can reach the internet. Once that is verified, next is to run sudo apt-get update && sudo apt-get upgrade so that the latest packages are installed. Then install the DE you want to login to. The best choice that does consume too much resources is LXDE. The command to install is simply sudo apt-get install lxde for Debain or sudo apt-get install lubuntu-desktop for Ubuntu. Finally it is time to install the VNC server. Follow the steps below,
Install the server
sudo apt-get install vnc4server
create a non-privilaged user
adduser test
su test
as the user start and stop the server
vnc4server :1 -geometry 800x600 -depth 24
vnc4server -kill :1 -geometry 800x600 -depth 24
edit the xstartup file
nano ~/.vnc/xstartup
add at the end (Debian)
/usr/bin/lxsession -s LXDE &
add at the end (Ubuntu)
/usr/bin/lxsession -e LXDE -s Lubuntu &
restart the server
vnc4server :1 -geometry 800x600 -depth 24
The server will ask for a password when it is launch for the first time. The password will be used to login via the VNC client. On the host there are a few choices for a vnc client. There are two good command line client vncviewer and vnc4viewer. When they are installed to start the session using vncviewer by entering the following,
vncviewer ip address:1
enter password
The session should open in a window and you are done! If you want a gui client then remmina is a great choice. Below are some screenshots. If you want more info on lxc check out the Debian Wiki here




Tuesday, May 12, 2015

Noobslabs is an awesome site!

I am currently running Debian Testing (Stretch) on my iBook G4. I posted a brief review of the install here.  I like spending time tweaking it out. Putting in new wallpapers, themes, and icons. Another tool I love is conky. This tool is light system monitor that displays statistics on your desktop. It is very customizable and people have shared their configurations for people to use. Sometimes these configurations are hard to implement and require some tweaking. I do not mind tinkering but sometimes I just want something to work on install. Well I came accross Noobslab and found my answer! This site is designed for people who new to Linux specifically Debian based distros like Ubuntu and Mint. They have PPAs to install themes and icon sets which make setting up themes on your Ubuntu or Mint install so much easier. They also have great start up scripts for conky as well that work any distro. They have some really great designs to choose from and you can download a wired or wireless setup depending on which interface you wish to monitor. Getting this working on my iBook was extremely simple. If you are looking for a nice conky set up then this is definitely a place to check out!.


Tuesday, April 28, 2015

Ubuntu fustrations

There is has been a growing frustration over at the Ubuntu Forums over support for PowerPC. Lubuntu 14.04 LTS is exremely buggy. There are serious issues with firefox, and video playback software like vlc and mpv. Bug reports have been placed here and here. The latest 15.04 release is completely unusable . I installed Ubuntu-MATE 15.04 on my iBook G4 and yaboot failed to install complete making my system unbootable. 15.04 is only a standard release an not LTS, so why not say we are not releasing a PowerPC version for this release cycle till these bugs are resolved? It will at least show there is a desire to get a working PowerPC image out there. I am not trying to bash Ubuntu, I really do want to see Ubuntu produce a reliable PowerPC version. Right now Debian is the most stable PowerPC distribution of Linux. I am typing this from iBook G4 running Debian Testing (Strech).
Nevertheless, I understand the a lot of these issues could be upstream related. I know some guys with G5 machines that are having issues not only with Ubuntu but with Debian Jessie as well. This really saddens me because Jessie works great on G4 machines. The G5s are just as good as a lot modern machines today. I really do hope Ubuntu can get some these issue squared away. Ubuntu-MATE is a great distro and would I love to see a fully working PowerPC version.


UPDATE I: It looks like the firefox issue has been resolved. The most recent updates comes with firefox 38. This version fix all the firefox issue htat have previousl reported. I running Ubuntu-MATE 14.04.2 on PowerMac G4 and so far firefox is running great. I plan on posting a walkthrough on how I set up my PowerMac. Christian Zigotzky has done some great work with Linux on PowerPC. He was able with some hacking to Ubuntu-MATE 15.04 PPC working with some great Compiz action.

PowerBook gave up the ghost

Well this morning I finished manually upgrading my PowerBook G4 to Jessie. I verified all was good then I rebooted. The boot loaded showed everything was fine, then black screen...nothing. Hmm so I thought maybe I did something wrong? So I turned it off and tried to reboot but it would not even go to POST..no apple chime. So I unplugged waited for some time and tried again...still no chime. I fear that my faithful PowerBook has breathed its last...