Bug 49293 - Mount point not correctly created in .desktop file for CD-ROM devices
Summary: Mount point not correctly created in .desktop file for CD-ROM devices
Status: RESOLVED NOT A BUG
Alias: None
Product: kio
Classification: Unmaintained
Component: devices (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-17 18:13 UTC by David C Maurer
Modified: 2005-02-05 19:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David C Maurer 2002-10-17 18:13:17 UTC
Version:            (using KDE KDE 3.0.3)
Installed from:    Compiled From Sources
Compiler:          GCC 3.2 
OS:          Linux

The default CD/DVD-ROM Device .desktop entry created by default on KDE 3.0.3 install or first-run does not create the correct mount point entry.  In the ~/Desktop/CD%2fDVD-ROM Device file, the MountPoint= entry is blank when it should be /mnt/cdrom or wherever it's mount is located.  This causes Konqueror to try and load the link:

http://navigation.realnames.com/resolver.dll?action=navigation&realnam=file%3A&charset=iso-8859-1&providerid=180&fallbackuri=http%3A//www.google.com/search%3Fq%3Dfile%253A

Without the MountPoint entry being filled in when the file is created at KDE install or first run time, the cd-rom will not get mounted when the icon is clicked.  Only right-clicking on the icon and selecting Mount from the menu will the icon mount the cdrom.  Once the cdrom is mounted, clicking the icon will open the correct /mnt/cdrom directory in Konqueror.

This bug also shows up when right clicking on the desktop to create a new CD/DVD-ROM Device.  The new properties window under the device tab has a dropdown box to type in the /dev/ name of the device, but no dropdown or entry box to type in or select the mount point.  I'm assuming the tool is supposed to read the mount point from /etc/fstab when the device name is entered.  But it's not updating the mount point field when a /dev/ entry is manually typed in.  Only when selecting a device from the dropdown list will the mount point be updated correctly.  The option to edit the mount point or the ability to manually enter the mount point should exist in the device tab window.
Comment 1 mark 2003-01-18 20:19:15 UTC
Addressing the first bug here: "MountPoint missing by default", I can report "works for 
me", on a system was installed as KDE 3.0.4 from the Knoppix Debian Linux 3.1 CD.  
 
However, I can confirm the second issue "no way to edit mount point for custom mount 
devices". I found no way to specify the mount point besides busting out the command 
line.  
 
  Mark 
Comment 2 David Faure 2003-12-15 11:57:23 UTC
Subject: Re:  New: Mount point not correctly created in .desktop file for CD-ROM devices

On Thursday 17 October 2002 18:13, David C Maurer wrote:
> The default CD/DVD-ROM Device .desktop entry created by default on KDE 3.0.3 
> install or first-run does not create the correct mount point entry.  
Ah, this must be the kio_devices stuff then. I'll reassign once the question below is resolved.

> This bug also shows up when right clicking on the desktop to create a new CD/DVD-ROM Device.  
> The new properties window under the device tab has a dropdown box to type in the /dev/ name of the device, 
> but no dropdown or entry box to type in or select the mount point.  
> I'm assuming the tool is supposed to read the mount point from /etc/fstab when the device name is entered.  
> But it's not updating the mount point field when a /dev/ entry is manually typed in. 
Hmm, indeed. Fixed.

> Only when selecting a device from the dropdown list will the mount point be updated correctly.  
> The option to edit the mount point or the ability to manually enter the mount point should exist in the device tab window.      
I thought that only root was allowed to mount an arbitrary device onto an arbitrary mountpoint?
A user can only do this if the "user" option exists in fstab, so the entry needs to be in
fstab in the first place, right?
Or is this different on some systems?

Comment 3 David Faure 2003-12-15 11:57:54 UTC
Subject: kdelibs/kio/kfile

CVS commit by faure: 

Update mountpoint label when device is changed with keyboard
CCMAIL: 49293@bugs.kde.org


  M +14 -0     kpropertiesdialog.cpp   1.289
  M +1 -0      kpropertiesdialog.h   1.100


--- kdelibs/kio/kfile/kpropertiesdialog.cpp  #1.288:1.289
@@ -2642,4 +2642,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( 
   connect( unmounted, SIGNAL( iconChanged( QString ) ),
            this, SIGNAL( changed() ) );
+
+  connect( device, SIGNAL( textChanged( const QString & ) ),
+           this, SLOT( slotDeviceChanged() ) );
 }
 
@@ -2656,8 +2659,19 @@ KDevicePropsPlugin::~KDevicePropsPlugin(
 void KDevicePropsPlugin::slotActivated( int index )
 {
+  // Update mountpoint so that it matches the device that was selected in the combo
   device->setEditText( m_devicelist[index] );
   mountpoint->setText( d->mountpointlist[index] );
 }
 
+void KDevicePropsPlugin::slotDeviceChanged()
+{
+  // Update mountpoint so that it matches the typed device
+  int index = m_devicelist.findIndex( device->currentText() );
+  if ( index != -1 )
+    mountpoint->setText( d->mountpointlist[index] );
+  else
+    mountpoint->setText( QString::null );
+}
+
 bool KDevicePropsPlugin::supports( KFileItemList _items )
 {

--- kdelibs/kio/kfile/kpropertiesdialog.h  #1.99:1.100
@@ -636,4 +636,5 @@ public:
 private slots:
   void slotActivated( int );
+  void slotDeviceChanged();
 
 private:


Comment 4 Matt Rogers 2004-04-15 05:03:08 UTC
yes, only root is allowed to mount arbitrary devices at arbitrary mountpounts. So, in order for a user to mount the drive, it'd have to be in fstab anyway with the user option and AFAIK it works this way on all systems.

Perhaps it's time for that reassignment to kio_devices...
Comment 5 Martin Koller 2005-02-05 19:11:39 UTC
KDE 3.4 has no default CD-ROM Icon installed.
The other mentioned problem (manual entering) was fixed long ago.
Also, in 3.4 the devices:/ ioslave no longer exists and was replaced with media:/