Tagged “linux”
-
Ubuntu 11.10
I switched to Ubuntu 11.10. The upgrade went flawlessly. Well, kind of. Gnome 2 doesn't seem to work anymore. At least, not straight off the bat. I'm running Gnome 3 (with the new Gnome shell). Looks better than the last time I ran it.
-
USB Drive issues in Linux
I was having drive problems with a USB drive in Ubuntu Linux. It was working just fine, then it started mounting the drive as read only. Looking at the results of mount looked like:
/dev/sdc on /media/50B5-FF5D type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
I did a file check, and it gave me some errors:james@bossk:~/scripts$ sudo fsck /dev/sdb1 [sudo] password for james: fsck from util-linux-ng 2.17.2 dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN Seek to 499365376:Invalid argument
Looking around online said 'try mounting and unmounting it' and 'try formatting it'. Unmounting and mounting did nothing for me, however, formatting it got rid of the seek error. I have heard things that after so many file read/write cycles, you may get this error. This disk is used constantly, writing and erasing files to it, although this is in subdirectories, not the root. So I still have no idea what went wrong, but formatting the drive fixed it. -
Converting mp4 or m4v files for Sansa Fuze on Ubuntu
I have a number of mp4 (actually, m4v) files that my daughter wanted to have on her Sansa Fuze. Unfortunately, the application for Ubuntu (video4fuze) would not accept some of the files. I got around this by running a command like:
ffmpeg -i "input video.mp4" -r 25 ~/output_video.avi
This would convert the mp4 file to avi, as well as force a frame rate. Without the "-r" parameter, sometimes there would be fast sound and slow video (unsynchronized). After doing this, run video4fuze with the other file, and you will have a new file to upload to your Fuze.
-
NaNoWriMo with Open Office
For those of you who have participated in National Novel Writing Month, and are Linux people who use Open Office, here is a short script that I wrote that does a word count and makes a scrambled output file to submit.
odt2txt Novel.odt | gawk '{ gsub( /[a-z]/,"a" ); print $0 }' > out.txt cat out.txt | gawk '{ x = x + NF } END { print x " words" }'
The problem I had with the Open Office word count is that it gave me a too-high number. This script matched how the NaNoWriMo site counts their words. -
Ubuntu 10.10
I've upgraded to Ubuntu 10.10. After a typical update (pretty painful, losing network, getting it back again, and then having to do lots of 'sudo apt-get dist-update/upgrade/update' cycles, I finally got it running.
The only surprise so far is that gnome-do has been separated from the docky look. Now, you have to 'sudo apt-get install docky' and run that as a separate application. See this blog post for some further details.
Time to see what else is broken.
-
Running Handbrake on Ubuntu 9.10 (Karmic Koala)
For you Handbrake fans, I found a .deb file created by Fraser Murray that fixes all of the various problems with upgrading. You can download it here. To run, do:
cd /data/usr/local/bin ghb
I think it's being installed in the incorrect directory, but it seems to work pretty good. The new Handbrake seems to be quite speedy compared to the old version, though I haven't checked out how the encoding fares yet. -
Download
IsnyBlog
For those of you interested in using this blogging software, here is the source. Let me know if you have any question/ideas/suggestions. No complaints! No guarantees! Code is GPL, so if you change it, publish the source.
Please note that the release is pretty out of date, and there are much newer versions available. Please mail me if you are interested; otherwise, the older version is below.
Features
-
Written in PHP
-
Flat files - no SQL database required
-
Picture uploading and embedding
-
Comments
-
Tagging
-
Static pages with Wiki style-dynamic page adding
-
Multiple user support
Download
-
-
Bulk file renaming in Linux
I wanted to rename a bunch of files in Linux (m4v to mp4), but couldn't find any tools that I really liked, or understood. So, I wrote a quick script to rename files recursively. Here is the script:
find * | gawk -f ren_mp4.awk > runme ./runme
If you want to test it out, comment out or delete the './runme' line. The ren_mp4.awk file is:
/m4v/ { name = $0; newname = $0; gsub( "m4v", "mp4", newname ); cmd = "mv '" name "' '" newname "'"; print cmd }
Not terribly beautiful, but understandable. The 'gsub' command replaces occurrences of 'm4v' with 'mp4'. -
Gnome-Do: Fixing Twitter
I had a problem with using Gnome Do to post to Twitter (not that I did it a whole heck of a lot). It said 'failed' everytime, but it would post anyways. Also, the popups at the top of the screen stopped working. Clearing out the Gnome Do plugins and restarting (logoff and back on again) fixed it.
To clear the plugins, do:
rm -rf ~/.local/share/gnome-do/plugins-*
You may be able to just restart Gnome Do, but I found it easier just to log off and back on again. -
Ubunty Jaunty - Intel graphics driver woes
With the Intel graphics problem yesterday, I went back to the 2.4 Xorg Intel Driver. The speed seems back to the way it was, at least. Oh well, so much for being on the cutting edge of things. I guess you have to know where to draw the line.
-
Ubuntu Jaunty Slow
I "upgraded" to the pre-release version of Ubuntu Jaunty. Unfortunately for me, my laptop, which runs the Intel Graphics Media Accelerator 950, became dog slow on graphics (more like my dog, and not like a fast greyhound). The solution I found online was:
sudo aptitude purge xserver-xorg-video-i740
Although this seems to be totally unrelated to my problem, the graphics got a lot more responsive. I still think it's a bit slow, but at least I'm past the initial hurdle.
For this and many other reasons, I'm still suspicious that Ubuntu is ready for the general user, unless it's preinstalled on a machine.
-
Ubuntu: Automatically reconnecting a wireless connection
I have an old cordless phone. A phone that, once it rings, causes my local wireless network to go down. Windows seems to repair itself, but Ubuntu just hangs there dead until I manually reconnect it. Here is a solution that checks the network every minute. If there is a failure (30 seconds or so after checking), the network is restarted.
First, make a file called check_network in the /root directory by using 'sudo vi /root/check_network'. In it, put the following code:
wget -q -O /dev/null "http://www.google.com" || ( /etc/init.d/networking restart )
This checks the connection (in this case, against Google). If it doesn't, it causes the network to restart. Now, add this to the root user's crontab file by running 'sudo crontab -e'. The crontab file should look like:
`
m h dom mon dow command #
-
-
-
-
- /root/check_network `
-
-
-
This means, every minute, run the check_network script. I wish there was a better way of doing this. Actually, if there could be a tie-in to the icon that shows the connectivity in the toolbar, that would be an even better solution.
-
-
Installing a custom USB controller for Frets on Fire on Ubuntu
Last year, I made a custom USB controller out of a piece of wood and a broken joystick for Frets on Fire, a Guitar Hero type game for Windows and Linux. Since I moved to Ubuntu Linux, I wanted to get the controller working again. Here's what I did:
-
'sudo apt-get install joystick' to install the joystick software
-
'sudo apt-get install joy2key' to install the conversion software
-
'sudo ln -s /dev/input/js0 /dev/js0' to create a soft link to the device driver. I think this may be skipped (see last step).
-
Created a '.joy2keyrc' file (see below)
-
'joy2key -dev /dev/js0 -config fretsonfire'. I think maybe '-dev /dev/input/js0' works as well, but it hasn't been consistent for me. Oftentimes, I have to press control-C to exit out of this program when it says 'select a window'...however, it still seems to work fine.
The contents of .joy2keyrc are:
START fretsonfire -thresh 0 0 0 0 0 0 0 0 -X -buttons q w e r t
I then ran Frets on Fire, and configured the 'key' settings for the appropriate frets.
I'm not sure if the instructions above are really perfect, but they worked enough so I could rock a bit!
Update: I've been having problems getting /dev/input/js0 to show up, even if I plug in and unplug the guitar (joystick). It seems if I go up and search for new hardware, none is found. However, this seems to sometimes trigger the driver (or whatever) to be loaded. Maybe there's a better way.
-
-
Phoogle - Google maps for PHP - Broken
While working on my Bike to Work Week web site, it suddenly appeared that Phoogle, the Google maps generator that I use, stopped working. Thankfully, a fix was issued for the "Cannot use string offset as an array" error. In short, the fix is:
add:
if(!trim($data)) return;
as the new first line of the characterData function.
It also appears that you have to replace the instances of [Response] with ['Response']. Fortunately, I fixed that issue myself along the way.
-
GoDaddy, 110mb DNS problems
I host my website on the free 110mb.com. It works great, but I've had issues trying to get my DNS A record to point to the right server (box 13, or whatever box you happen to use) with GoDaddy. However, you may have a similar problem, no matter what domain service you use. Here's the easy way I used to fix this problem:
-
Locate your address (i.e. ghofulpo.110mb.com)
-
Ping it (ping ghofulpo.110mb.com)
-
Change the address in the A record to whatever IP address was returned.
Hopefully, this will solve somebody else's problem, as well as mine, when I break it again accidentally.
-
-
3-D photography with Linux
Plascolin is a nice tool for Linux to create 3-D anaglyph (red-blue) images from two jpeg photographs. However, I couldn't find easy-to-use instructures (for me at least) on the net. Here is how I got it to work on Ubuntu:
-
Install automake: sudo apt-get install automake
-
Look in the /usr/share directory for a directory called automake. Relink all bad links to the appropriate file in /usr/share/automake-xxxx (see your dist) by executing ln -s /usr/share/automake-xxx/file file
-
Install lib gtk+: sudo apt-get install libgtk2.0-dev
-
Install libjpeg: sudo apt-get install libjpeg62-dev
-
Run ./configure to configure the system
-
Run make to make the program
-
Run sudo make install to install it
-
Run plascolin to run it
After you have taken a set of pictures, rename them from whatever filename the camera saves them as to xxx-l and xxx-r (for the left and right pictures, respectively). You can then use Plascolin to switch back and forth between sets of pictures.
-
-
Intel Easy PC Webcam in Ubuntu - Blue Images
Here's what I did to get the colors to show up correctly (they would be tinted blue).
In /etc/modprobe.d/options, add:
-
options gspca force_rgb=1
- options spca50x force_rgb=1
- options spca5xx force_rgb=1
I'm really not sure which driver I'm using, so I tried the "shotgun approach" and it seemed to work ok after rebooting the machine.
-
See all tags.