Fedora 10 & ffmpegthumbnailer

I’ve recently upgraded from F7 to F10 and was surprised to see that ffmpegthumbnailer hasn’t made it into the yum repo’s yet!

As I use ffmpegthumbnailer for PS3 Video thumbnails I needed to find a solution to this.

If I had the time I’d knock up a .spec file & rpm, but for the time being I thought I’d post my bodge…. NUMBER ONE, if you’ve never typed “configure;make;make install” before you need to install the development tools.

sudo yum groupinstall “development tools”

Next pick up a couple of extra dependencies…

sudo yum install libpng libpng-devel ffmpeg ffmpeg-devel

You should now find that, if you download the source, unpack it – gunzip ffmpegthumbnailer-1.5.0.tar.gz;tar -xvf ffmpegthumbnailer-1.5.0.tar and cd ffmpegthumbnailer-1.5.0 hopefully you can complete ./configure without any errors.

If you try make at this point it’ll probably fail with errors, this is how I fixed that….


cd /usr/include/ffmpeg/
ln -s libavcodec/avcodec.h ./
ln -s libavformat/avformat.h ./
ln -s libswscale/swscale.h ./
ln -s libavformat/avio.h ./

Now you can… get back to the build


cd ~/ffmpegthumbnailer-1.5.0
make
sudo make install

If all has gone well you should have a working install :)

Windows Key on Fedora, Thank you Ruben

I’ve been running compiz fusion on Fedora 8 for a while and found that my windows key short-cuts only work half the time; well I found that if I…

add Option "XkbOptions" "altwin:super_win" to the InputDevice section of my /etc/X11/xorg.conf

It works every time. I’ve logged in and out of my laptop a few times over the last couple of days and had no problems since.

Thank you Ruben :D

Fedora HP Compaq nc6320: Overheating CPU

I’ve been having issues with my laptop overheating recently, in fact ever since loading fedora the cpu has run hot. According to CoreTemp when in windows my CPU idles at 56ºC ( i.e. I’ve logged into windows opened outlook and walked away) considering my AMD Desktop machine runs at 40ºC with two users logged and the CPU peaking at 100%, means that my laptop cooks. In Fedora I’ve found that the CPU actually Idles at around 70ºC which is a joke, it means that the fan is kicking out hot air causing my desk and everything around it to get proper hot – don’t leave any chocolate bars near me!

I need to get some colleagues to run coretemp for a while to see if my laptop is broken or if it’s normal for this model of latop to run hot; in the meantime I thought I’d post some tips on what I’ve done to cool my laptop down. I’ve managed to get Fedora to idle at around 58ºC which is much closer to my windows base-line.

CPUSpeed is a service/daemon which controls what the processor is doing, i.e. if you’re not running a lot it scales down the processor to run slower and use less power, thus runs cooler. I found that my daemon was actually crashing at boot up….

#/etc/init.d/cpuspeed status
cpuspeed dead but subsys locked	
#

The config file for cpuspeed is /etc/sysconfig/cpuspeed, I’ve changed the govenor from blank (default: auto detect) to GOVERNOR=ondemand which seems to have solved my crashing issue. The second thing I’ve changed is IGNORE_NICE=1 (default: 0) which is now restricting which processes can scale up the CPU. The only performance impact I’ve seen is that this setting now stops VMWARE from consuming my CPU, and since I’m a patient man this is no bad thing :)

Whilst comparing my windows temp to my linux one it occurred to me that it wasn’t entirely fair, in linux I’ve got compiz graphics enabled, and a load of gnome applets which tell me information about networking, cpu speed, cpu temperature, the weather etc…. since windows has none of these it’s fair to say that my linux desktop should run a little hotter…. so the “other” trick I’ve done to bring the temperature down is to renice the applets to a lower priority…

ps ax | grep "applet" | grep -v grep|cut -c 1-5|xargs sudo renice 1

This seems to have done the trick, anything called “applet” now runs at nice 1 rather than 0, the net effect is these processes are queued up behind the “important” ones rather than continuously scaling up the processor.

I’m happy with the results so far, the desk is a lot cooler!

Fedora 7 to 8

As it’s quiet at work (due to the usual x-mas madness) I decided on Friday to upgrade from Fedora 7 to 8, now this was a bit of a risk for me since I have F7 running perfectly. The fedora release notes advise a clean install over an upgrade, so it’s important when you do this to backup /etc so that you can restore anything you need later.

As with all fedora installs it’s always two steps forward and one step back, my reasons for upgrading were:

Unfortunately so far I’ve had a couple of issues (my steps back),

It’s a shame that beagle still doesn’t index my evolution exchange account other than that all looks good, the wallpaper that changes on the time of day is a neat feature; I recommend the following resources to anyone looking to upgrade or use fedora.

Fixing Some Life Irritating Bugs….

As Christmas draws closer, time becomes more of a premium, as a result blog activity suffers… I’ve thought about using twitter for my blog category, in the mean-time I’m using it with googletalk & facebook, so we’ll see if that develops.

I’ve had a chance to fix some annoying bugs with my laptop/life, and thought I’d share them here, they’ll pop-up in delicious when I get a chance to go thought my shared list, but until then here are some links….

Fedora: Java Clobbers/Breaks File Associations in Gnome/Nautilus
Gmail: Can’t enable IMAP, because it’s not available in UK English.
WMA to MP3: Converted some old tracks I found in a backup.
Gnome: Changed the colour of tooltips as doing it in the theme file didn’t work
Eye Candy: Fixed my CPU Temp Gauge (by typing sensors-detect, and following the instructions!)

Enjoy!

Fedora 7: Theming the Gnome Screensaver Lock Dialogue

Fedora 7 Flying High Locked Theme

I stumbled across this the other day, I’ve no idea why the fedora team would go to the effort of making a really nice theme for the lock dialogue for gnome screen saver then leave it “disabled by default”. After a quick google I found the ubuntu guys have been up to something similar, so here a quick how to enable the fedora art work on the gnome-screensaver lock screen.

To enable paste this into a terminal (NOT root, as your normal user).

gconftool-2 -s --type=string /apps/gnome-screensaver/lock_dialog_theme system

To switch it back:

gconftool-2 -s --type=string /apps/gnome-screensaver/lock_dialog_theme default

The only “downer” is that your avatar isn’t shown, but for my work laptop I prefer this theme, much cooler fedora advocate when I’m not at my desk ;)

Security updates only for Fedora 7 / RHEL & Centos 5

I found this on redhat.com the other day….

It is now possible to limit yum to install security updates only. To do so, simply install the yum-security plugin and run the following command:

yum update –security

Hopefully this will allow fedora users to have the option of running a “stable” install :)

USB Networking with Fedora 7 & n800

There are times where you cannot use WiFi, for example my workplace’s WLAN uses LEAP, which maemo doesn’t support. I found that setting up USB networking on my n800 was a bit of a pain since there isn’t a single document… if you check my del.icio.us feed you’ll see I bookmarked all I could find with a usbnet tag.

These are the steps I ran through to enable usb networking between my nokia n800 and my fedora 7 laptop.

First we’ll start with the basic setup… I’ll assume you’ve read a getting started article similar to mine and already have root & xterm. By default n800 has a usb interface configured, you just need to enable it, so on your n800 type:

sudo gainroot
insmod /mnt/initfs/lib/modules/2.6.18-omap1/g_ether.ko
ifup usb0

The default settings add an interface with a static ip of 192.168.2.15/24 with a default gateway of 192.168.2.14.

Now lets set up something similar on Fedora, you need to create a file in /etc/sysconfig/network-scripts called ifcfg-usb0 with the following…

DEVICE=usb0
BOOTPROTO=static
IPADDR=192.168.2.14
BROADCAST=192.168.2.255
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=no
MII_NOT_SUPPORTED=no

Now plug the usb cable into both devices, and on your fedora box (as root) type

ifup usb0

You now have connectivity, of course if you have a default fedora install pinging 192.168.2.15 will fail because of the firewall, it is probably best to temporarily disable the firewall (/etc/init.d/iptables stop) to see if it works, if so move onto configuring your firewall correctly (/etc/init.d/iptables start starts it again) :) You may also get usb conflicts, you can try

rmmod uhci_hcd

but it will disable any USB devices, you have been warned.

With this basic connectivity setup you’ll have two issues; you only have connectivity between fedora & n800 nothing else works, and opening any application on n800 causes it to try and connect to your wifi, so lets look at those….

I’m going to assume you used system-config-securitylevel to configure your firewall, its worth noting that any changes you make now will be overwritten by any future use of system-config-securitylevel so it’s probably best to take a backup of /etc/sysconfig/ipatbles now and later when you’re finished.

So as root type:

iptables -I RH-Firewall-1-INPUT 2 -i usb -j ACCEPT
iptables -I FORWARD 1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -I FORWARD 1 -s 192.168.2.0/24 -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth0 -s 192.168.2.0/24 -j MASQUERADE
/etc/init.d/iptables save

This will allow all connectivity in from the usb interface allowing the n800 to send packets into the fedora box whilst the firewall is running, it will also NAT any traffic from the usb network hiding the n800 behind fedora so that you get onward connectivity. To get the NAT to work you need to enable ip forwarding, this allows fedora to pass pakets between interfaces, to do that type

echo 1 > /proc/sys/net/ipv4/ip_forward

and to get it to survive a reboot update /etc/sysctl.conf with

net.ipv4.ip_forward = 1

The final part is to enable name resolution (DNS), on n800, I updated /etc/resolv.conf with the opendns servers…

nameserver 208.67.222.222
nameserver 208.67.220.220

All things being equal you should now be able to ping www.google.com from your n800 :cool:

To get applications to connect, I found on the latest version of ITOS that the DUMMY IAP didn’t work, so I stumbled across this solution.

Create an “ad hoc” wifi connection with static IPs… anything it doesn’t matter, and when that’s connected in xterm (as root) type ifconfig wlan0 down , you should now be able to connect to the web with your browser / skype etc over your usb network… sweet!