onsdag den 11. november 2015

Arch Linux on the Orange Pi .. I like it



So about a month ago i ordered an Orange Pi development board. At the time it was $12 + shipping from mainland China. And i just got it a few days ago. I have been buying up used Raspberry Pi's for the past year hoping to build a cluster at some point, and i have several boards in use for various projects and media centers at home.

The Orange Pi had a low price. 1024 MB RAM and a Allwinner Quad Core 1.6GHz CPU. For $12 that is a steal. The fact that it sports a Allwinner CPU, this device will at best deliver partial hardware accelerated video playback using the CedarX multimedia library, and i have no idea if it is supported or not. For my use i couldn't care less about video playback. I had been eyeing the RPi2 for the specifications to use for a few more demanding tasks that needed the boost in specification.

The documentation for the boards is really bad, and the instructions to get a board up and running is actually so bad the if you follow them, you will not end up with a board running anything.

I was planning to use the Debian image for the board, but when i spotted an Arch Linux image just above the Debian one, i was sold. I love the efficiency of Arch and the AUR, and as a long time Arch user, i was aboard. After running $ dd to write the image to my SD card, i was left with a prebuild Arch install and a BOOT directory containing kernels and resolution scripts that i had to further narrow down to fit the device i got.

After that, i spend about an hour setting up the yaourt package manager, that was a bit more tricky to do on the ARM7 platform than it is on my x86 devices.

First of all. When adding the yaourt repository to /etc/pacman.conf i usually add this:

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
However. For the arm platform i added:
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/arm

After that i manually downloaded and build both the yaourt package and the package-query package it has among it's dependencies.

package-query and then yaourt:

$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
$ tar xfz package-query.tar.gz
$ cd package-query  &&  makepkg
$ sudo pacman -U package-query*.pkg.tar.xz  
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
$ tar xzf yaourt.tar.gz
$ cd yaourt  &&  makepkg 


And Finally:


$ sudo pacman -U yaourt*.pkg.tar.xz

onsdag den 26. august 2015

Adding the Arch Assault repo to pacman.conf



After getting gpg related errors when trying to add the Arch Assault repository to my pacman.conf i came upon this solution.

the error message read:

gpg: keyserver receive failed: No dirmngr

So it was a missing directory. And a gpg directory non the less.

Searching the mighty interwebs i came upon a gpg mailing list mentioning bug in which the dirmngr was not being created for the root user in the arch linux architecture for obvious reasons.

But there seems to be conflicting arguments whether the bug is related to gpg or to arch linux itself, since that the root user in arch should not have to have a .gnupg dir, but never the less needs one for certain operations.

So. As root create the directory:

dirmngr </dev/null

Afterwards, still as root. You can now add the repo to pacman.conf and the arch assault keys with --noconfirm (safe right?):

echo "[archassault]" >> /etc/pacman.conf && \ echo "Server = http://repo.archassault.org/archassault/\$repo/os/\$arch" >> /etc/pacman.conf && \ pacman-key -r CC1D2606 && \ pacman-key --lsign CC1D2606 && \ pacman -Sy --noconfirm archassault-keyring archassault-mirrorlist


onsdag den 1. juli 2015

why VIM uses "h,j,k,l" for navigation

The UNIX equivalent to race wars can be found in terminal text editors. And even though i have been using both nano and VIM for a fair amount of time, it was not until today that i actually learned that the navigation keys in VIM of h,j,k,l was not implemented to create some sort of hipster elite, but rather it came to be due to the fact that VIM used the keyboard layout from the "ADM-3A" terminal that had secondary arrow keys mapped to the h,j,k,l keys.


mandag den 9. marts 2015

makepkg 4.2 killed --asroot.

A dirty fix that works from the yaourt github thread.
Edit /usr/bin/makepkg
Add asroot to OPT_LONG (line 3366). 
Search for "OPT_LONG".
OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg'
          'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild'
          'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'pkg:' 'repackage'
          'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps'
          'verifysource' 'version' 'asroot')
Remove EUID check (line 3577).
Search for "EUID".
if (( ! INFAKEROOT )); then
    if (( EUID == 0 )); then
        #error "$(gettext "Running %s as root is not allowed as it can cause permanent,\n\
#catastrophic damage to your system.")" "makepkg"
        #exit 1 # $E_USER_ABORT
        plain "$(gettext "Running as root restored by Orc ;)")"
    fi

 This dirty fix helped me install snort on my pi once again. Remember running makepkg as root will make baby jesus cry.

søndag den 1. marts 2015

Archbang login manager

Now i am in no way fluent in linux, but i have been using it for years, and i want to start writing down the solution to some of the problems i encounter during my usage. I may embarrass myself with how i frame the problem, but i will at least include a solution that has worked for me.

Now. Punching the Arch philosophy in the face, i choose to skip a few steps from time to time, and install Arch Bang, instead of pure Arch. Now calm yourself down. i have installed Arch from scratch several times, so i know exactly what it is i want to skip over if i need to save some time in order to get a fully functional system. 

So i just spend some time to figure out how to kill off the login manager that came with Archbang. That will teach me not to control every aspect of the install.

Now the Arch Bang Wiki is not the Arch Wiki, which is close to being the most thorough and well written guide i have ever encountered. It is close, since the end result of installing Arch Bang is Arch, but looking at the package list of Arch Bang the login manager looks to be Slim.


Searching my system i could not find a single reference to Slim. It took me way to long to think about taking a look at the systemd processes enabled on my system, but running the following command listed every enabled process.

systemctl list-units -t service --all

This command revealed that the login manager was in fact "lxdm"

Good times. Now i can disable the process by running:

systemctl disable lxdm

And there was much rejoicing ..


  

tirsdag den 30. december 2014

Launching applications using a certain theme on Arch

So i have been busy with midterm exams and basically just not writing anything somewhat related down. i have abandoned Windows on everything but my mid spec gaming rig, but with steam os in the making, i am hoping to ditch windows soon enough.

That have left me distro hopping all around, but i keep coming back to Linux Mint since 15 and up to 17.1, i'm on debian and ubuntu for my servers, and switched over to Arch Linux on my laptop a few months back. Talk about a distribution that will force you to learn, patch and learn some more about your system.

I have been meaning to write down a few things here, mainly to remind myself somewhere down the line if i run into the same problem.

One thing i have found helpful as a workaround for problems with customizing my own OS themes, and having applications break from GTK errors and the like, is launching a program using a specific theme. In my case i have used the Adwaita theme, for it's basic allround functionality.

So to run a custom command launching a program using the Adwaita theme i do:

GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc agave
where "agave" is my application name to be replaced with whatever you want to launch.

For launching a application using its gtk3 theme simple structure the command as such:

GTK_THEME=Adwaita agave


edit: you need to include a export statement to your bashrc

export GTK_PATH="$GTK_PATH:/usr/share/themes/"

fredag den 31. oktober 2014

Fixing the glibc 2.14 'not found " error in Wheezy



Now i know that other people have had this problem with other applications and i honestly don't know if this way of fixing it will work for those applications, but in theory it should.

I encountered the error message after Bitcasa updated their Linux headless client, without notifying any users that they did.

They now include a "bitcasa2" package in their repository. i wanted to mount my Bitcasa drive on my server to setup Rsync using SSH to backup my files. My server is running Debian Wheezy and threw the error of the missing glibc 2.14 library at me when i tried to mount my Bitcasa drive.

I had to spend quite some time on solving the issue so i thought that i would share my solution.

First thing i did was to add experimental builds to my sources.list:

nano /etc/apt/sources.list

Then added:

deb http://ftp.debian.org/debian experimental main
deb http://ftp.debian.org/debian sid main


I then ran and update and installed "libc6-dev":


apt-get update
apt-get -t experimental install libc6-dev

Once done, check the version:


/lib/x86_64-linux-gnu/libc.so.6

That was it for me. I could then run Bitcasa with the latest Bitcasa2 addition.