Linux
The backup disk is an NTFS disk (I never got round to changing to ext
Problem was that the backup disk wasn't being automatically mounted fr all users, so when I try to run my backup script as a user it would fail miserably.
I could mount the disk through the X system explorer without problem. But if I booted the machine and hadn't explicitly/manually mounted the backup disk my script would fail. This becomes a problem when trying to access that disk either from a remote ssh connection or through an automated process (eg cron backup).
After a bit of reading I ended up sorting the problem by adding an entry to the /etc/fstab file. This tells the system how to mount the disks.
Using gparted (a partitioning tool in Gnome) I was able to find the references for my disks that the system understood....
/dev/sdb1 - is the 1st partition on the disk labelled sdb, this is my boot partition
/dev/sdb2 - is the 2nd partition on the disk labelled sdb, this is the system + /home partition
/dev/sda1 - is the backup disk. It's before the other disk (sdA vs sdB) I think because the backup disk is on the old style ATA connector, the main disk is SATA.
I added the following line to /etc/fstab:
/dev/sda1 /media/backup ntfs-3g defaults 0 0
- "/dev/sda1" is telling system this line is about that disk partition.
- "/media/backup" is telling the system at what point to mount the partition, meaning users should be able to access the drive by navigating to /media/backup
- "ntfs-3g" is a reference to the software that should read the disk. I think this is like a driver for the filesystem, but don't quote me on that!
So, as root:
$ mkdir /media/backup
That dir gets created as root, meaning users can't write to it. So when I run my backup script as my user it fails. Not ideal.
So with my limited Linux knowledge I have 2 options:
set permissions to write for everyone set the group to one my user is a member of
I went for option 2, setting the group to my user group. In reality the backup drive will only be used by my user.
I should probably change it to a group that all users are a members of to do it properly. No doubt someone that knows more about *nix than I do will tell me of a better way to do things!
All done. Now when I log in I can read from the backup disk that appears to live at /media/backup. More importantly I can run my backup script (rsync).
Some more details here:
http://en.wikipedia.org/wiki/Fstab
Including some info on some of the options available in the last 3 columns I haven't explained (as I used defaults).
19-April-2010 and Motorola Dext
My Motorola Dext fstab entry now reads:
UUID=3732-6131 /media/droid vfat defaults,user 0 0
Where UUID is the ID of the memory card, /media/droid is the mount point in the system, vfat is the filesystem driver. The important bit is the options field of the fstab file which reads 'defaults, user' meaning "use the defaults" (I don't know what they are!) and "user" to tell fstab that all users can mount this drive.
I shall be adding 'user' to the options for the NTFS backup drive in my fstab shortly!
- Details
Having had partial success syncing my N85 to Evolution on Fedora 11 64 bit I'm putting some notes here for me to refer to at home when trying to get it work on my FC10 32bit machine.
This has been working for Calendar and Contact databases. Not tried adding Notes into the equation yet....
At some point I might get round to putting these notes together into instructions to make some sense!
Since making these notes, it has stopped working for some unfathomable reason.
I now get an error when I try to sync, I suspect Evolution is at fault as it fails same way with N85 and the Google Calendar plugin mentioned at end of this page:
Member 1 of type evo2-sync just sent all changes
Member 2 of type google-calendar had an error while getting changes: Helper exited abnormally
Member 1 of type evo2-sync just disconnected
Member 2 of type google-calendar just disconnected
All clients have disconnected
The sync failed: Unable to read from one of the members
Error while synchronizing: Unable to read from one of the members
Evolution-> N85 was working for a while using notes below.
Install stuff...
yum install multisyncyum install multisync-plugin-evolution
yum install multisync-tools
yum install libopensync-devel glib-devel libsyncml-devel wbxml2-devel libopensync-plugin-evolution2 libopensync-plugin-kdepim libopensync-plugin-file
yum install opensync
Determine USB interface phone is connected to...
syncml-obex-client -u
Run the sync from CLI (using multisync-gui for config changes, but not syncing)
msynctool --sync mobileadd --conflict n to tell msynctool to always use entry with newest timestamp
So...
"msynctool --conflict n --sync mobile"
As ever, check the (msynctool) man pages for for hints.
http://ubuntuforums.org/archive/index.php/t-260676.html
http://en.opensuse.org/OpenSync/SyncML-OBEX-Client#Nokia
http://www.ask.com/bar?q=fedora+syncml+nokia+usb&page=1&qsrc=2417&ab=1&u=http%3A%2F%2Fwww.harald-hoyer.de%2Flinux_and_syncml_multisync_with_nokia_6280
http://www.opensync.org/wiki/releases/0.2x/syncml-guide
Group config...
[dafoot@fatbeast group1]$ pwd/home/dafoot/.opensync/group1
[dafoot@fatbeast group1]$ ls
1 2 change.db changelog.db filter.conf syncgroup.conf
[dafoot@fatbeast group1]$ cat syncgroup.conf
mobile 0
[dafoot@fatbeast group1]$ cat filter.conf
Evolution sync file...
[dafoot@fatbeast 1]$ pwd/home/dafoot/.opensync/group1/1
[dafoot@fatbeast 1]$ cat evo2-sync.conf
default default
Config file for phone
[dafoot@fatbeast 2]$ pwd/home/dafoot/.opensync/group1/2
[dafoot@fatbeast 2]$ cat syncml-obex-client.conf
0 PC Suite 1 1 5 0 0 0 0 0 Contacts Calendar
Adding google calendar
Installed 'libopensync-plugin-google-calendar'Created a new group with evolution and google calendar members.
Need to change stuff in google conf file to include an account ID. This is either email address at gmail or a long string I found in GCalendar->calendar details->private address. Until I have it working I'm not sure which, suspect the latter as that is what the google page suggests.
- Details
I'm still not sure I fully understand the advantages of this system over using regular symlinks, but I'm trying to get in the habit of using alternatives in the hope I will get a better understanding of why it is preferable to symlinks maintained by me in /usr/bin. Alternatives does not attempt to change that but adds a series of links to /etc.
It is then possible at a later date to use alternatives to switch between programs for a given link in /usr/bin.
So, for using different Java SDKs and switching easily/quickly....
Starting Java config in alternatives:
[root@fatbeast java]# alternatives --config java
There is 3 program that provides 'java'.
Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
+ 3 /usr/lib/jvm/jdk1.6.0_14/jre/bin/java
Enter to keep the current selection[+], or type selection number:
So we see the alternatives system is currently aware of 3 possible 'java' commands, each from a different SDK. I want to use the Sun official SDK, so download and unpack to /usr/loca/java/<jdk_x_x_>/
Having unpacked the binary download I need to setup alternatives so I can switch the java command to refer to the Sun JDK instead of one provided from the Fedora repositories via yum.
[root@fatbeast java]# alternatives --install /usr/bin/java java /usr/local/java/jdk1.5.0_22/bin/java 2000
Have a look at the man page of alternatives to understand what the command does above in full, but in short I provide the name of the symlink, the name of this setup and where to link to in that order.
Of course there are some other handy java related tools provided in the SDK, so let's set those up too while we're at it.
[root@fatbeast java]# alternatives --install /usr/bin/javac javac /usr/local/java/jdk1.5.0_22/bin/javac 2000
[root@fatbeast java]# alternatives --install /usr/bin/javaw javaw /usr/local/java/jdk1.5.0_22/bin/javaw 2000
Now I should be able to use alternatives to change the java command to reference the Sun SDK:
[root@fatbeast java]# alternatives --config java
There is 4 program that provides 'java'.
Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
+ 3 /usr/lib/jvm/jdk1.6.0_14/jre/bin/java
4 /usr/local/java/jdk1.5.0_22/bin/java
Enter to keep the current selection[+], or type selection number: 4
Selecting 4 means any subsequent CLI calls to java call the command in the JDK I installed:
[root@fatbeast java]# java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)
- Details
The following was originally written using and works on:
- Fedora Core 10
- Banshee 1.4.2
- Generic USB thumb drives
Updated for:
- Fedora 21
- Banshee 2.6.2
- USB drives, SD cards, mobile phone (mass storage mode)
I use Banshee as my music manager on my desktop. Banshee is the best manager/player I have found yet for my Fedora/Gnome Linux install and so far.
Banshee music player/music manager seems to do a decent job of everything I ask of it.
One quirk I have been bothered by is transferring data to devices plugged in as mass storage. Banshee doesn't seem to pick them up to display in it's interface to allow easy copying of media.
A few minutes on the Linux forums and it seems that adding a file named ".is_audio_player" to the root of the device causes Banshee to recognise it as an audio device.
Being Linux, this setup is of course configurable. In that file (.is_audio_player) it seems there are a few options that can be set to cause things to behave as you want them to.
So, in an effort to get Banshee to recognise my USB thumbdrives, I added a simple .is_audio_player file to the root dir of those drives.
Content of the .is_audio_player file on my USB drives:
folder_depth=2
output_formats=audio/wav,audio/mp3,audio/wma,application/ogg
playlist_formats=audio/x-mpegurl,audio/mpeg-url
playlist_path=_1_playlists/
That .is_audio_player tells Banshee the device (a usb drive, sd card etc) can use make use of the types of file defined by output_formats.
The playlist_path is also worth noting. This is where on the device Banshee should write playlists to. I have set the playlist_path attribute in my .is_audio_device file to start with an underscore, meaning when I plug in my SD card to my car my playlists are stashed in a folder at the top of the directory listing so are easy to find.
Refs:
- http://www.nabble.com/Documentation-for-.is_audio_file-td22235886.html
- http://old.nabble.com/Documentation-for-.is_audio_file-td22235886.html
- http://www.floccinaucinihilipilification.net/wiki/index.php/.is_audio_player_file_format
- http://wiki.banshee-project.org/
- http://banshee-project.org/support/guide/
- http://mail.gnome.org/archives/banshee-list/2007-January/msg00002.html
- Details
[root@fatbeast ~]# yum install audacity
[root@fatbeast ~]# yum remove audacity
A little judicious searching leads me to the Audacity-freeworld package which allegedly does include mp3 support.
[root@fatbeast ~]# yum install audacity-freeworld
A bit of fiddling and hey presto...sample extracted as mp3 for my phone!
At some point I'll add some instructions/screengrabs here if I remember!
- Details