Page 2 of 4

DIY Eee PC Laptop digital picture frame with YouTube videos

 

IMG_4922

I have always wanted to make a custom digital picture/multimedia frame showing things like beautiful earth porn videos from YouTube. For this you need a computer, like a Raspberry PI and an LCD monitor.
LCD monitors can be bought on ebay but they get a bit pricey if you want a bit of size (10″+), and you often need custom HDMI controllers for them. I had a couple of old EEEPCs lying around, and I figured an EEEPC would be a good fit. It has everything you need. Big slim LCD screen, slim motherboard, integrated WIFI and will boot off an SD card, and it’s environmentally friendly to recycle old stuff.

I made an HTML/js script that plays a youtube playlist randomly in fullscreen with an embedded player. Running chromium under incognito solves some problems, like preventing some caching and preventing crash message when not closed properly. Safebrowring causes periodic download of large files, which we do not want. –kiosk causes fullscreen.

Hardware

Rip apart EEE PC and extract mainboard + LCD (well obviously don’t rip, but screw apart)
Careful with WIFI antenna, LCD cable and flatcables connected to the motherboard
Disconnect anything that is not needed. (camera, touchpad, keyboard, ++)
Solder a couple of wires with a push-button onto the existing power button pins.

IMG_3698
IMG_3728
IMG_3729
IMG_3730
IMG_3726

I built a wooden case for my frame which holds the motherboard towards the back wood plate with some screws, keeping the heatsink metal plate that sat behind the keyboard in the Eee. The screen is screwed into the front frame which is fastened to the wooden supports on the sides.

I left big gaps in top & bottom in order to get air circulation, because I have removed the fan so there will be no active cooling.

Software
Installed Ubuntu 14.04 (x86) on an SD card (using a Live USB created by UNetbootin)
During install add user admin, and ensure auto login is selected.

I set CPU to powersaving to keep the temp down, because I have no active cooling anymore. And disabled bluetooth (rfkill 1). Add the following to /etc/rc.local:
echo powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 0 > /sys/class/rfkill/rfkill1/state
su - admin -c 'cd /home/admin && nodejs . &> /dev/null &'

Ubuntu’s default ondemand boot script overrides our setting. Disable it. Run as root:
update-rc.d ondemand disable
apt-get install openssh-server chromium-browser nodejs npm iptables-persistent
iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 8080

In /etc/fstab, append option “noatime” to root partition.

In /etc/default/apport, set enabled=0

Set power button action to shutdown (prevents showing a dialog.) Run as root:
sudo su - admin
DISPLAY=:0 gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown
gconftool -s --type bool /apps/update-notifier/auto_launch false
mkdir .ssh

On your main computer:

scp ~/.ssh/id_rsa.pub admin@IP_OF_EEEPC:.ssh/authorized_keys
git clone https://github.com/mifi/digital-media-frame.git
cd digital-media-frame.git
./deploy.sh admin@IP_OF_EEEPC

On eeepc, run as root:
sudo su - admin
npm install

GUI settings

System Settings -> Brightness & Lock
Disable Dim Screen
Turn off screen: Never
Lock: Off
Disable Require password when waking from suspend

Startup Applications
Add
nodejs /home/admin/runner_script/index.js

Startup Applications
Add
xrandr --display :0 --output LVDS1 --rotate inverted

Commands for checking health
cat /sys/class/thermal/thermal_zone0/temp
hddtemp /dev/sda
# Check for processes doing lots of IO:
iotop -P -a -o
# Check for processes using files (SD wear):
fatrace | grep 'W'

TODO
disable browser updates
ubuntu disable compiz
chrome screen tearing

Inspiration/references
https://github.com/mifi/digital-media-frame
http://awooga.nl/the-eee-pc-digital-picture-frame
http://unix.stackexchange.com/questions/86875/determining-specific-file-responsible-for-high-i-o
http://ubuntuhandbook.org/index.php/2014/11/install-real-ubuntu-os-usb-drive/
http://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card

Levitron Ion Revolution Platform “Ez Float” teardown

I bought this fun toy, but it had a misaligned LED so i had to disassemble it to fix it. I took some pictures to share with the world, in case someone is curious about the components or inner workings of this alien anti-gravity technology.

IMG_3576.jpg IMG_3575.jpg IMG_3568.jpg IMG_3565.jpg IMG_3563.jpg IMG_3561.jpg IMG_3560.jpg IMG_3559.jpg

Apple photos corrupted import from iPhone

Screen Shot 2015-12-04 at 20.13.02

I was importing my photos from my iPhone to my MacBook running El Capitan, and I got errors saying some files were in an unrecognised format, and some pictures turned out completely weird.

What’s sad is that the Photos app though that the pictures got successfully imported (apparently there was no integrity check), and so it reported back to iPhone that it could delete the photos after the “successful” import (according to the checkbox in the import dialog.)

Guess I’ll have to manually delete each photo on the iPhone after manually checking that all photos are in fact imported successfully now…

 

Personal Hotspot not working

Personal Hotspot disappeared from settings on iPhone when using a new SIM card? Googled for a solution but I didn’t find one. Seems that the problem was that the APN for personal hotspot wasn’t configured.

Go to Settings -> Mobile Data -> Mobile Data Network
Set the same settings under section “Personal Hotspot” as section “Mobile Data”

FinnPluss – filtrer fellesutgifter/mnd på finn.no

En ting som jeg syns mangler på finn.no er å kunne filtrere bort boligere med høye fellesutgifter, så jeg slang sammen en Chrome extension for å legge til ekstra funksjoner i finn, og forhåpentligvis spare deg og meg litt tid.

Installer FinnPluss

Super simple “VPN” over SSH (Mac and Linux)

There is a cute litte program called sshuttle for shuttling IP subnet traffic over and SSH connection, like a VPN but doesn’t require any setup on the remote end.

As far as i understand, it will add a firewall rule to the client saying which destinations to tunnel (the specified netmask), and will forward these packets using a python script through an ssh pipe to a python script in the other end that will spit out the packets into the target network.

Turns out in Yosemite Apple removed ipfw and moved over to pf, so in order to get it to work you need the newest version of sshuttle, from here (which supports pf):

https://github.com/sshuttle/sshuttle

Sources:
https://ariejan.net/2012/07/11/vpn-too-complicated-use-a-ip-over-ssh-tunnel-instead/

Mac Photos Library on a NAS

I struggled a bit to find out how to store my Photo Library on a NetGear ReadyNAS. SMB did not work, and SSHFS did not work either. I was unable to get AFP working too, and I saw that it was discouraged.

The solution was to mount the drive using NFS. Then I created a sparse bundle disk image with a Mac OS Extended (Journaled) partition with an Apple Partition Map, on the NFS mounted partition, and moved my “Photos Library.photoslibrary” onto the mounted image. Everything seems to be running fast and smoothly. (I’m on a gigabit LAN.)

It should be noted that I use ext4 for my NAS partitions, don’t know if it matters.

Time Machine backup to NTFS without installing anything

Here’s a way to use an NTFS drive for Time Machine backups, even though it is used for other purposes too.

Find out the NTFS drive volume’s UUID:
diskutil info /Volumes/DRIVENAME | grep UUID

sudo echo "UUID=ENTER_UUID_HERE none ntfs rw,auto,nobrowse" >> /etc/fstab

(Replace ENTED_UUID_HERE with the one you found from the previous command.)

Eject, plug out and back in. MAKE SURE THE DRIVE WAS SAFELY REMOVED FROM WINDOWS, or it will not mount RW in Mac (See dmesg when plugging in).

Find your RW mounted volume
open /Volumes

Now we will create a Mac OS disk image on the NTFS volume.

  1. Open “Disk Utility”
  2. Click “New Image”
  3. Select a large enough size
  4. Format: Mac OS Extended (Journaled)
  5. Partitions: Single Partition – Apple Partition Map
  6. When done, mount this image

 

Now we will tell Time Machine to use this disk. It does not show up in the list of available drives, so we will use a command:
sudo tmutil setdestination /Volumes/MOUNTED-DISK-IMAGE
(Replace MOUNTED-DISK-IMAGE with the disk image you created, NOT the NTFS drive)

Now just test backing up and see that it works.

Resources:
http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/
http://basilsalad.com/how-to/create-time-machine-backup-network-drive-lion/

I use this for backing up to my NAS via SMB/NFS

Mac OS X preferences and config tricks

So I bought a MacBook Pro and wanted to start using Mac OS X as my primary OS. I’m used to Windows/Linux so I have some preferences as to behaviour. There are some things that are kind of annoying, many of which can be fixed. Also there are some tricks that make me more productive.

Command line settings

  • Disable trackpad acceleration:
    defaults write .GlobalPreferences com.apple.trackpad.scaling -1
  • If you have an external mouse, you have to disable its acceleration separately:
    defaults write .GlobalPreferences com.apple.mouse.scaling -1
  • Always show Finder path bar
    defaults write com.apple.finder ShowPathbar -bool true
  • Always show Finder status bar
    defaults write com.apple.finder ShowStatusBar -bool true
  • Show full path in Finder title:
    defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES; killall Finder
  • Dock instant hide/show (disable Dock animation):
    defaults write com.apple.dock autohide-time-modifier -float 0.00; killall Dock
  • Disable character picker
    defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
  • Speed up animation
    defaults write NSGlobalDomain NSWindowResizeTime -float 0.03
  • Don’t prompt for TimeMachine when plugging devices
    defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
  • Disable two finger swipe back/forward in browser etc.
    defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE
  • Disable local time machine (I have an external backup)
    sudo tmutil disablelocal
  • Disable SpotLight (saves space and CPU)
    sudo mdutil -a -i off

Finder tricks

  • Go to path:
    Cmd+Shift+G
  • cd ..
    Cmd+Cursor Up
  • cd / “Run” file
    Cmd+Cursor Down

Keyboard re-mappings:
I use the application “Karabiner” to remap keys.

I like to have the Ctrl-key all the way to the left like on most computers so i swap the Fn and Ctrl keys.

Because I am a developer I also like to use the standard F1-F12 keys without having to press the Fn-key. So when I press the Fn-key I get the Mac key functions instead.

In karabiner:

Change Control_L Key (Left Control)
–> Check Control_L to Fn
Change Fn Key
–> Check Fn to Control_L

Change F1..F19 Keys & Funct …
–> Change Functional Key (Brightness, Volume, …)
—–> Functional Keys to F1..F12
——–> CHECK ALL
–> For PC keyboards
—–> Change fn-f1…f12 to brightness control, volume control, etc.
——–> Check fn-f1…f2: Brightness control, fn-f3: Mission control, …

In Mac system preferences->keyboard->Use F1,F2 as standard function keys

Other:

Cmd+Shift+4 then press space to print the whole screen or make a selection

http://osxdaily.com/2013/03/01/9-simple-tricks-improve-finder-mac-os-x/

http://osxdaily.com/2011/07/28/turn-off-auto-correct-in-mac-os-x-lion/
https://gist.github.com/lexrus/081fa687d8b2475d3367
https://github.com/divio/osx-bootstrap/blob/master/core/defaults.sh

Ghetto 3D printer external spool

It is not recommended to use the internal spool bay on the m3d, so i use the spool externally as a telephone cord.
image2

« Older posts Newer posts »

© 2017 Mikael Finstad

Theme by Anders NorenUp ↑