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. 

søndag den 24. august 2014

Odroid U3

So I was hoping to get a new media center device that had just a bit more power than my raspberry pi and did not have a fan like my aging Acer Revo 3600. So I decided on the Odroid U3 from Hardkernel.

The device shipped from South Korea and I sadly ended up paying the same amount in taxes and fees that I had originally payed for the device itself. In my rush I had not learned that the U3 is NOT USB powered like the raspberry pi is, so I had not chosen to buy a power supply along with it. Big mistake.

The power plug size listed seemed fairly standard, it did however take me 3 weeks to track down the right size as the size listed in the specifications is not that standard around here.

I then threw Debian wheezy on a class 10 micro SD card, and that let me run a Xbmc build that could play back up to 720p without to much trouble. I did get some constant UI freezes that made the simple fact of using the device pretty horrible. I sprung for a micro SD card twice the price but still class 10, as I have before had problems with SD cards claiming to be high quality being.. Well anything but.

Same problem with UI freezing up and me having to wait anywhere from 5 to 20 seconds before the U3 became responsive again. I then tried out a Android jelly bean build that let me boot straight into a full screen, libstagefright supported xbmc version that could playback 1080p, with a bit of lag here and there. And what was worse. The same UI freezing persisted. When I asked around the hardkernel community, I was told that the devices could not really run OS from micro SD and that I should purchase a emmc memory module to use for the OS.

I have been running anything from servers to flawless xbmc versions from sd and flash memory so I was not about to purchase anything like that. My RPi runs without the UI freezing up from the very same micro SD. And the Odroid U3 sports a 1.7GHz Quad-Core processor and 2GB Ram so I am really surprised it was such a poor experience for me. I have no idea if it was a faulty device or something similar. But I sold it again.

And are now awaiting the arrival of a Cubox-i2eX that sports slightly lower specifications but has support for OPENELEC xbmc builds, that imo is the bees knees if you need a device for media playback only. My experience is that the stable builds are beyond rock solid and by far the most amazing builds out there.

fredag den 11. april 2014

upgraded my server. awesomeness followed



So i was getting a bit tired of my two aging NAS servers was fighting me every bit of the way, when ever i wanted to use them for something else than what the manufacturers intended, so i upgraded to a HP Proliant Microserver N40L that could contain the 4 drives from my Netgear Duo and Zyxel NSA 320.

Right away i installed plain Debian headless, and at this point i have finally been able to make a setup to sooth my needs without having to dig through german forums hoping that google translate would not trick me into running commands that would screw up a installation.

Owncloud, Plex, SMB shares, Bittorrent Sync, SubSonic SSH tunneling, vsftpd server. I am living the dream here, and in the process learning a lot that is not restricted to one single model of one simple tweak for some store brand NAS server. Here is a platform that lets me use my simple knowledge of Linux, while learning so many awesome things in the process that i can also use in other parts of my digital life, from my Linux Mint Laptop, to general database structure for programming.

Next up is a LAMP install to run projects from, and setting up SNORT. Good times. 

onsdag den 8. januar 2014

Using a Raspberry Pi as a medium between external server and local NAS, using Bittorrent Sync



So i managed to sell my server build in bits and pieces. And for the money i purchased a 2 bay Zyxel NSA320, despite having an unfortunate name, it is a small form factor standard NAS. 1.2 GHz processor and 512 MB RAM. It is close to official with support for the Fonz Fun Plug, and if using from USB stick it is fairly fool proof as the NAS OS is left untouched, unless you want to kill it. The NAS is pretty loud and as far as i can tell there is no way, system wise, to lower the RPM's. S.M.A.R.T. spins the drives down, but the chassis main fan spins at full speed no matter what. I took it apart and it looks like control of the fan has been disabled by hardware. Next to the fan plug is what looks like a controlled fan mount, but soldering on this device based on a theory is further than i am willing to go at this point. Instead i bought a Fan Mate 2 physical resistance controller, that i have yet to install.

#Update. The Fan Mate can be installed but have no effect what so ever on the fan.





First thing i did was to throw the ARM build of Bittorrent Sync on it to sync it up with my remote server, and it was up and running within 15 minutes. After a reboot, btsync was nowhere to be found. And i had made sure i placed it in the permanent storage. Btsync would run and be forked to the background, but gui was unresponsive no matter what. I cleaned out every bit of btsync from .sync to license.txt but no matter what, a install would work, but gui would not. i then tried a manual install by compiling every bit of btsync to try to change the listening port as some users had reported 100% cpu use and unresponsive gui from using port 8888. In my case it did not work. Btsync still runs, but gui remained unreachable from any browser.



Now btsync is actually fairly easy to set up using the bash command line and since it really only needs to be set up very rarely it would be pretty straight forward. I however choose to utilize a Raspberry Pi, that had been sitting on a shelf since i upgraded my media player. I flashed Raspbian on a 8 GB SD card, and to keep from plugging in a HDMI monitor and controllers i used SSH to login to the RPi using the default "pi" and "raspberry" credentials and then run


# sudo apt-get install tightvncserver

# tightvncserver


That gave me a headless control of the RPi using the tightvnc application. From my Windows 8 computer i then ran the tightvnc viewer and connected to the IP. In a quick and dirty move in the /home/ directory i ran


# wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz

# sudo tar -xzf btsync_arm.tar.gz

# sudo rm btsync_arm.tar.gz

# sudo ./btsync


That worked straight away. All i had to do now was mount the NAS cifs share as a drive for btsync to download to. in /mnt/ i created a directory


# sudo mkdir nas320


the cifs utilities should come with most distros, but if needed run


# Sudo apt-get install cifs-utils


I then navigated to the /etc/ directory and ran a command to edit the fstab file



# sudo nano fstab



Below the proc, boot and main partition i added a referal to my NAS cifs share:

(keep in mind the following is on the same line in the same tabbed formatting that the already existing drives are)



# //192.168.1.88/sync/video

# /mnt/nas320

# cifs

# credentials=username=your_username,password=your_password,iocharset=utf8

# 0

# 0


Now this is a pretty dirty and unsafe way to do things. For a bit more security i would recommend creating a .smbcredentials file using



# sudo touch .smbcredentials


Where you want to keep the file. This would mean you would have to change the credential part of the line you added in the /etc/fstab file.


instead you would now add


# credentials=/path/to/.smbcredentials,iocharset=utf8


This makes makes the mount persistent and will be mounted upon reboot.

I still need to manually start up btsync, but adding the auto run script is fairly easy, but must wait a few days.