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.



søndag den 7. september 2014

Finally found a useful fanless device that is affordable. The Cubox-i2 eX from SolidRun

At this point i have have been using XBMC for some years now, and i have been through countless devices looking for a device that could fulfill my fairly simple media center needs.



As my main device i have been using a aging Acer Revo R3600 with OPENELEC. Nothing has been able to beat that. But i have been looking. My problem was the fan, it was fairly loud and would sometimes drown out the audio from whatever i was watching if the volume was turned down. It did work like a charm. During the past years i have been trying out a lot of different devices trying to find a device that would offer the usage experience of my low end Acer Revo, but be without the fan and enough low power to be on all the time.

My first purchase was the REF16 Smart TV box, that was some obscure chinese product sporting AMLogic M3, 1 GB RAM and a 1.2 GHz CPU. I purchased on of these boxes due to a breakthrough one of the XBMC devs had in getting hardware accelerated video playback working on the AMLogic M3 platform. it worked, and still does actually, works great. All development for it has stopped though leaving it unsupported and on a Beta 2 version of XBMC 12.

My next attempt was to setup one of my Raspberry Pi’s with the OPENELEC build, and it is what is still in use now. Rock solid, stable, best developed XBMC distro for the Pi. The UI is a bit slow, and not due to the OPENELEC build, but simply due to the limitations of the RPi specifications. Loading remote content takes a while and navigating is obviously slower than on a higher specification platform.

My next purchase was the Odroid U3 from Hardkernel that offers an amazing 1.7GHz Quad-Core Processor and 2 GB RAM. From what i understand a lot of people are using the devices from Hardkernel without problems, i had trouble finding a usable power plug that seemed to differ from the specifications they mentioned on the info sheet, that ended up taking me almost 4 weeks finding a plug i could use. I used a high end class 10 micro SD card for running OS’s, Micro SD cards that clocked in at 30 Mb/s on a PC and ran everything from other operating systems on other platforms to general speedy usage on phones and tablets, on the Odroid however every point of navigation in every single OS i tried out resulted in a wait of anywhere in between 5 to 20 seconds rendering the device utterly useless. Playback was fairly flawless with 1080p streaming from LAN server on Android 4.2 with libstagefright rendering, but was unable to stream anything beyond 720p on Debian Wheezy or any other Linux based distribution i tried.

I sold my Odroid U3 and when i read on the OPENELEC blog that support was coming for the Cubox-i devices, i opt in and purchased a Cubox-i2 eX from SolidRun, with a dual core 1 GHz CPU and 1 GB RAM. It arrived about 10 days ago, and i set it up with Kodi 14.0 “Helix” alpha 2. Navigating the user interface works flawlessly without delay, even when accessing remote content. It has passed all my usual tests with 1080p files and at this point it has not been restarted a single time and have not thrown a single error at me. It completely matches up to the usage experience, stability and supportability of the x86 experience. And in a few places of navigating XBMC/Kodi it surpasses my Acer Revo computer.

If it is the optimized version of Kodi or better hardware alone i have no idea. But the device is nothing short of amazing, and with support of OPENELEC it falls into the high end category of low price devices that offers a hardware accelerated media experience with great support and development. The device offers a 10/100/1000 Mbps ethernet connection for an actual speedy connection, HDMI 1080p with CEC controls, (although i don’t think CEC is working in the alpha build) and it even offers support for 3D if someone actual is odd enough to enjoy that.

It is powered by 5V meaning that it could be powered by the USB slot on my TV. I am looking forward to trying out the CEC functions, but even at this point it beats every other low priced device i have ever tried out.