PDA

View Full Version : [ubuntu] 8.04 usb drive mount (nautilus?) timing issue



greghk
December 3rd, 2008, 06:23 AM
I share data between my Ubuntu 8.04 desktop and Xandros EEE with an SD card USB drive (media/CARD1). I'm now trying to share applications with the SD card as well. I've started by putting jEdit on the card. jEdit is in the Gnome sessions start list. This worked fine when jEdit was on a traditional hard drive. It now fails to start with this error message in xsession-errors (indicated in bold with >>>>>):

/etc/gdm/Xsession: Beginning session setup...
Setting IM through im-switch for locale=en_CA.
Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default.
SESSION_MANAGER=local/greg-desktop:/tmp/.ICE-unix/5970
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL front:0
Shutdown failed or nothing to shut down.
xrdb: "*Label.background" on line 220 overrides entry on line 150
xrdb: "*Text.background" on line 226 overrides entry on line 191
xrdb: "*Label.foreground" on line 232 overrides entry on line 151
xrdb: "*Text.foreground" on line 238 overrides entry on line 192
Checking for Xgl: not present.
Detected PCI ID for VGA: 01:00.0 0300: 1002:5961 (rev 01) (prog-if 00 [VGA controller])
Checking for texture_from_pixmap: not present.
Trying again with indirect rendering:
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Comparing resolution (1280x1024) to maximum 3D texture size (2048): Passed.
Checking for nVidia: not present.
Checking for FBConfig: present.
Checking for Xgl: not present.
>>>>>Unable to access jarfile /media/CARD1/prog/jedit/4.3pre16/jedit.jar
Initializing nautilus-share extension
seahorse nautilus module initialized

After Gnome initializes I can manually start jEdit by opening a terminal and pasting in the Gnome session startup command for jEdit.
jEdit also starts when restarting X with control-alt-backspace which suggests it isn't a file or file system permissions problem.
I put an invalid file system, KARD1, in the startup command and got the same error message in xsession-errors
Unable to access jarfile /media/KARD1/prog/jedit/4.3pre16/jedit.jar
which also indicates it's not a permissions error.

edit 2
still have the same symptoms after switching from the sun jre to the open jre

gedit for a test file on /media/CARD1
- works at Gnome session startup
- works when restarting X with control-alt-backspace
- works when pasting manually into a command line
/edit 2

edit 3
I ran gconf-editor and disabled:
/apps/nautilus/preferences/media_automount
/apps/nautilus/preferences/media_automount_open
and /media/CARD1 was not mounted at startup. This confirms that Gnome nautilus mounts the USB media/CARD1 filesystem at startup. It still appears that Nautilus mounts media/CARD1 after it or some other piece of Gnome tries to run the jEdit command, but am not sure how to debug further.

I also recreated the problem on a fresh install of 8.10.
/edit 3

edit 2
may be related to the java command as different commands seem to react differently to usb drives at startup time
/edit 2

edit 4
I put the jedit command in a bash script and added a sleep command:


#!/bin/bash
sleep 10 #give Nautilus time to mount CARD1, 5 seconds too short on my machine
java -jar /media/CARD1/prog/jedit/4.3pre16/jedit.jar -settings=/media/CARD1/prog/.jedit

chown -x to mark the script executable
then ran the bash script in the Gnome startup programs.

jedit started from the SD card!!!
If nautilus puts mount notifications on dbus, then a more sophisticated solution would be for the script to wait for a notification from nautilus.
/edit 4

Any suggestions appreciated.

Greg