Bug 101731 - nfs shares are not shown
Summary: nfs shares are not shown
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: media (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-17 20:10 UTC by Tobias Powalowski
Modified: 2005-07-14 17:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Powalowski 2005-03-17 20:10:14 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Linux

in media:/, storage applet ignores them and on desktop they are also not shown even if they are activated.
i use dbus and hal.
hope this can be solved soon.

uh don't know if i should do a wish but smb shares would also be something that is nice to have.

greetings from archlinux maintainer
Comment 1 Kevin Ottens 2005-03-25 23:52:24 UTC
Hmmm... I guess this one is related to the fact that you use HAL and it says
nothing about nfs or smb shares.

Please try to stop HAL and relaunch your KDE session. In this case, does it
work as expected for the network shares? If yes I could find a fix for it,
but I really don't know if we shouldn't add this feature to HAL itself instead.
Comment 2 C. Dominik Bódi 2005-03-26 11:11:35 UTC
Stopping HAL does make it work, the network shares are displayed again.
Comment 3 Tobias Powalowski 2005-03-31 08:47:51 UTC
yes can confirm that, stopping hal make nfs shares reappear.
Comment 4 Ing. Jozef Sakalos 2005-06-03 00:32:45 UTC
Yes, if I stop HAL NFS shares appear in kicker media applet. But, if I unmount one of them all NFS shares disappear and the only way to make them appear again is to restart kicker (kill and start again).

Also, if HAL is not running, my USB key storage doesn't appear in kicker - usb storage devices are handled by subfs. Neither CDROM (subfs) appear in kicker applet when HAL is not running.

Further, konqueror's media:/ doesn't honor my view - I use mainly multicolumn view when I click on a hdd/cdrom/nfs icon.

The solution could be to let HAL handle devices it cat handle and to bypass HAL when checking for nfs/samba shares.

I run SuSE 9,3 with KDE updated to 3.4.1 from KDE site.
Comment 5 Fabio Erculiani 2005-06-30 21:05:47 UTC
any patches? kde 3.4.1 on gentoo 32bit and 64. With 3.4.0 I saw NFS shares, now with 3.4.1, they flown away.
Comment 6 Marc Bianciotto 2005-06-30 23:19:47 UTC
 Le Jeudi 30 Juin 2005 21:05, Fabio Erculiani a écrit :
[bugs.kde.org quoted mail]

> ---------------------------------------------------------------------------
>------------ Wanadoo vous informe que cet  e-mail a ete controle par
> l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete
> detecte.

Comment 7 Marc Bianciotto 2005-06-30 23:23:26 UTC
Le Jeudi 30 Juin 2005 21:05, Fabio Erculiani a écrit :
[bugs.kde.org quoted mail]

I have no patch. One could switch from seeing nfs shares to see usb mount by 
stopping hald (that seems to be enabled by default on 3.4.1). hald doesnt 
seem to have a proper support for nfs shares rigth now.

Regards,

	Marco
Comment 8 Kevin Ottens 2005-07-14 17:42:31 UTC
SVN commit 434569 by ervin:

Since HAL doesn't take care of network shares, introduce a "Network Shares
Only" mode in the fstab backend, and load it with HAL.

BUG:101731



 M  +13 -5     fstabbackend.cpp  
 M  +2 -1      fstabbackend.h  
 M  +1 -0      mediamanager.cpp  


--- trunk/KDE/kdebase/kioslave/media/mediamanager/fstabbackend.cpp #434568:434569
@@ -34,8 +34,8 @@
 
 
 
-FstabBackend::FstabBackend(MediaList &list)
-	: QObject(), BackendBase(list)
+FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly)
+	: QObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly)
 {
 	KDirWatch::self()->addFile(MTAB);
 	KDirWatch::self()->addFile(FSTAB);
@@ -86,7 +86,7 @@
 	}
 }
 
-bool inExclusionPattern(KMountPoint *mount)
+bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly)
 {
 	if ( mount->mountType() == "swap"
 	  || mount->mountType() == "tmpfs"
@@ -102,6 +102,14 @@
 	  || mount->mountPoint() == "/dev/swap"
 	  || mount->mountPoint() == "/dev/pts"
 	  || mount->mountPoint().find("/proc") == 0
+
+	  // We might want to display only network shares
+	  // since HAL doesn't handle them
+	  || ( networkSharesOnly
+	    && mount->mountType().find( "smb" ) == -1
+	    && mount->mountType().find( "cifs" ) == -1
+	    && mount->mountType().find( "nfs" ) == -1
+	     )
 	   )
 	{
 		return true;
@@ -127,7 +135,7 @@
 		QString mp = (*it)->mountPoint();
 		QString fs = (*it)->mountType();
 
-		if ( ::inExclusionPattern(*it) ) continue;
+		if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
 
 		QString id = generateId(dev, mp);
 		new_mtabIds+=id;
@@ -205,7 +213,7 @@
 		QString mp = (*it)->mountPoint();
 		QString fs = (*it)->mountType();
 
-		if ( ::inExclusionPattern(*it) ) continue;
+		if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
 
 		QString id = generateId(dev, mp);
 		new_fstabIds+=id;
--- trunk/KDE/kdebase/kioslave/media/mediamanager/fstabbackend.h #434568:434569
@@ -33,7 +33,7 @@
 Q_OBJECT
 
 public:
-	FstabBackend(MediaList &list);
+	FstabBackend(MediaList &list, bool networkSharesOnly = false);
 	virtual ~FstabBackend();
 
 	static void guess(const QString &devNode, const QString &mountPoint,
@@ -51,6 +51,7 @@
 	static QString generateName(const QString &devNode,
 	                            const QString &fsType);
 
+	bool m_networkSharesOnly;
 	QStringList m_mtabIds;
 	QStringList m_fstabIds;
 #ifdef Q_OS_FREEBSD
--- trunk/KDE/kdebase/kioslave/media/mediamanager/mediamanager.cpp #434568:434569
@@ -82,6 +82,7 @@
 		if (hal_backend->InitHal())
 		{
 			m_backends.append( hal_backend );
+			m_backends.append( new FstabBackend(m_mediaList, true) );
 			// No need to load something else...
 			return;
 		}