Modifying both mine and my wife's ubuntu Desktop machines (both running 9.04 at the time of this writing) to mount our music folder (on the MythTV box on the lounge room) locally.
The music is on the media box (called mythty) in the lounge room, at /media/ourmusic
Using NFS, to mount manually it's:
sudo mount mythty:/media/ourmusic /media/ourmusic
(That's servername:serverpath localpath)
Edited /etc/fstab to add:
mythty:/media/ourmusic /media/ourmusic nfs rw rsize=8192,wsize=8192
Friday, June 26, 2009
Sunday, April 19, 2009
Using True Type Fonts with Ubuntu
My wife does a fair bit of crafty stuff, and often finds weird and wonderful fonts to use with her creations. Often they're Windows TTF font files, which aren't linux native.
I simply get her to copy the fonts into a particular directory, and then run the following script.
It simply copies the files into a folder I created to hold installed TTF fonts, (/usr/share/fonts/truetype/username/) which will work for everyone, and then move the filed from the "todo" folder into a backup folder for reference. ( /home/username/Fonts/installed/ )
You'll have to restart any apps (Such as open office) to see the new fonts, but there's no need to log out or reboot.
Note, I commented on this issue a while back, here's the previous post.
I simply get her to copy the fonts into a particular directory, and then run the following script.
sudo cp *.ttf /usr/share/fonts/truetype/username/You can get all the bacground and other information you'll need in this article on the Ubuntu Wiki, which is where I got a lot of the info for this post.
sudo cp *.TTF /usr/share/fonts/truetype/username/
mv *.ttf /home/username/Fonts/installed/
mv *.TTF /home/username/Fonts/installed/
sudo fc-cache -f -v
It simply copies the files into a folder I created to hold installed TTF fonts, (/usr/share/fonts/truetype/username/) which will work for everyone, and then move the filed from the "todo" folder into a backup folder for reference. ( /home/username/Fonts/installed/ )
You'll have to restart any apps (Such as open office) to see the new fonts, but there's no need to log out or reboot.
Note, I commented on this issue a while back, here's the previous post.
Wednesday, February 18, 2009
Ubiquity
I've been playing around with Mozilla labs ubiquity plug in in recent weeks. It's still in beta, and far from fully featured, but even so it's quite impressive.
Tonight I was reading comments on a boing boing post where a few of the commenters had used ROT13 to obscure spoilers. There are plenty of good sites to do the conversion for you (I'm too old/lazy to do that sort of thing in my head these days) but I thought to myself that this would be a perfect for for a ubiquity command.
I know the world isn't really crying out for a ROT13 utility, but I thought it would be a good way for me to test the waters in writing some browser code. My javascript-fu is far from strong, but it was surprisingly easy. I spent far more time futzing about with publishing it than I did writing the code itself.
You can check out my notes here. Even if you've no interest in my almost embarrassingly trivial utility, check out ubiquity for it's own sake. If you're a power web-user, you won't regret it.
Tonight I was reading comments on a boing boing post where a few of the commenters had used ROT13 to obscure spoilers. There are plenty of good sites to do the conversion for you (I'm too old/lazy to do that sort of thing in my head these days) but I thought to myself that this would be a perfect for for a ubiquity command.
I know the world isn't really crying out for a ROT13 utility, but I thought it would be a good way for me to test the waters in writing some browser code. My javascript-fu is far from strong, but it was surprisingly easy. I spent far more time futzing about with publishing it than I did writing the code itself.
You can check out my notes here. Even if you've no interest in my almost embarrassingly trivial utility, check out ubiquity for it's own sake. If you're a power web-user, you won't regret it.
Monday, November 10, 2008
Broken Windows Updates
This post was inspired by a folder cleanup in which I found a note to myself from earlier in the year (May 27, 2008). I'm putting it here as a quick reference, as it's the sort of thing that happens once in a while, and filtering through all the google hits can be time consuming when you just need to fix something now. *
Symptom: Neither Windows Update or Microsoft Update would complete. The machine in question in this instance was a vanilla P4 somethingorother, running XP pro. Before finding this solution I tried a bunch of things, including an install of Service Pack 3.
You can read the full thread on the techarena forums. I found it via a google search, I'm not familiar with this forum in general. The bit that I needed is from post 3 in the thread:
These steps repaired the problem.
* Caveat: This sort of stuff does change from time to time, but it should still serve as an indication of the sorts of problems you should look for if you have similar symptoms. At the very least, you might include some of the relevant terms in your search to speed things up.
Symptom: Neither Windows Update or Microsoft Update would complete. The machine in question in this instance was a vanilla P4 somethingorother, running XP pro. Before finding this solution I tried a bunch of things, including an install of Service Pack 3.
You can read the full thread on the techarena forums. I found it via a google search, I'm not familiar with this forum in general. The bit that I needed is from post 3 in the thread:
Start regedit.exe and delete the following key (contains the WU
service configuration):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\wuauserv
Do a reboot now!
Then run this command line (from a command prompt of from Start/Run, it
installs the AutoUpdate service (line will wrap in the newsreader!):
%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall
132 %SystemRoot%\inf\au.inf
(it must be a space between DefaultInstall and 132)
If it asks for your OS CD-ROM to get some files, just point it to the
folder %windir%\System32 (%windir% is typically C:\Windows).
Then run the following commands:
regsvr32.exe wuaueng.dll
regsvr32.exe wuapi.dll
regsvr32.exe wups.dll
regsvr32.exe wucltui.dll
Do a reboot again.
Then check if you can start and stop the Automatic Updates service
successfully from services.msc
These steps repaired the problem.
* Caveat: This sort of stuff does change from time to time, but it should still serve as an indication of the sorts of problems you should look for if you have similar symptoms. At the very least, you might include some of the relevant terms in your search to speed things up.
Sunday, October 12, 2008
Resizing the swap partition size after install
I just increased the amount of RAM in an Ubuntu web server from 256 MB to 1 GB. I wanted to increase the size of the swap file accordingly. There are various schools of thought as to how big the swap file should be, I went with 2 GB which is almost certainly overkill, but there you go.
My procedure was as follows:
Text editing with multiple files on the command line
To make my life easier, and considering that my web server doesn't have a GUI I first saved the output of the ls command to a text file, and edited that so that it contained just a single line containing the UUID
I then opened fstab
There are plenty of good tutorials and command summaries for vi / vim around on the web if you need them. (here's one, and another). I admit I'm somewhat conditioned to using graphical editors, but one doesn't always have a choice.
My procedure was as follows:
- Boot to using the Ubuntu8.04 live CD.
- Use the partition editor to shrink the primary partition, and grow the the swap file partition and volume.
- Write the changes to the disk.
- Reboot to the server command line.
- Determine the swap volume's new UUID using:
ls -l /dev/disk/by-uuid
- Edit /etc/fstab and change the UUID for the swap partition to the correct value
- reboot
- Check that the partition is correctly mounted with the "free" command. Don't mind that you may not be using any of the swap at present, but you can at least tell that it's there for when you do need it.
Text editing with multiple files on the command line
To make my life easier, and considering that my web server doesn't have a GUI I first saved the output of the ls command to a text file, and edited that so that it contained just a single line containing the UUID
I then opened fstab
sudo vim /etc/fstaband then, at the end of fstab, I inserted the file I'd created with the command:
:r /home/john/uuid.txtI copied the UUID to the appropriate spot, deleted the line at the end and saved the file.
There are plenty of good tutorials and command summaries for vi / vim around on the web if you need them. (here's one, and another). I admit I'm somewhat conditioned to using graphical editors, but one doesn't always have a choice.
Wednesday, August 6, 2008
VMWare server on Ubuntu
I recently allowed my Ubuntu 8.04 desktop machine to do some upgrades, including some kernel updates. Everything went fine, except that my VMWare server would no longer run, it would start, I'd see the "Starting VMWare Server" block on the panel, but then it'd disappear.
It turns out that VMWare server installations are coupled quite closely with a particular kernel. This sounds sensible, after the fact, but all it really does is point out how shallow my *nix knowledge is in some areas.
Anyway, this fixed things just right, accepting all of the default options along the way:
Edited to fix spelling, and add that I had to repeat this exercise again after another Kernel upgrade 15/08/2008. Trivial after the last time, although still somewhat annoying.
It turns out that VMWare server installations are coupled quite closely with a particular kernel. This sounds sensible, after the fact, but all it really does is point out how shallow my *nix knowledge is in some areas.
Anyway, this fixed things just right, accepting all of the default options along the way:
sudo vmware-config.pl
Edited to fix spelling, and add that I had to repeat this exercise again after another Kernel upgrade 15/08/2008. Trivial after the last time, although still somewhat annoying.
Saturday, May 31, 2008
Amarok setup
On Susanne's PC:
Installed MySQL client from repos
Edit /etc/mysql/my.cnf, adding this line to stanzas [client] and [mysqld]:
default-character-set = utf8
sudo /etc/init.d/mysql restart
installed mysql server
had to enter password
susanne@arwen:~$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45-Debian_1ubuntu3.3-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
set password for root@localhost = password('xxxxxxx');
mysql> CREATE DATABASE amarok;
Query OK, 1 row affected (0.02 sec)
mysql> USE amarok;
Database changed
mysql> GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD'
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> Aborted
susanne@arwen:~$
Installed MySQL client from repos
Edit /etc/mysql/my.cnf, adding this line to stanzas [client] and [mysqld]:
default-character-set = utf8
sudo /etc/init.d/mysql restart
installed mysql server
had to enter password
susanne@arwen:~$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45-Debian_1ubuntu3.3-log Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
set password for root@localhost = password('xxxxxxx');
mysql> CREATE DATABASE amarok;
Query OK, 1 row affected (0.02 sec)
mysql> USE amarok;
Database changed
mysql> GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD'
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> Aborted
susanne@arwen:~$
Subscribe to:
Posts (Atom)