Bug 494160 - A default user's polkit-auth settings are empty by default
Summary: A default user's polkit-auth settings are empty by default
Status: VERIFIED NORESPONSE
: 447932 (view as bug list)
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: KDE4 Workspace (show other bugs)
Version: Final
Hardware: i586 openSUSE 11.0
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-11 00:49 UTC by Mark Van De Vyver
Modified: 2009-09-30 22:39 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
KDE4 stable repo error dialog (11.43 KB, image/png)
2009-04-21 04:36 UTC, Mark Van De Vyver
Details
KDE4 stable repo details that generate error on update (29.54 KB, image/png)
2009-04-21 04:38 UTC, Mark Van De Vyver
Details
KDE4 stable repo choking on itself (kdebase4-workspace-plasmoids) (199.00 KB, image/png)
2009-04-21 04:40 UTC, Mark Van De Vyver
Details
Changes to the default sysconfig settings after installing KDE4 as only desktop. (29.93 KB, image/png)
2009-04-21 04:44 UTC, Mark Van De Vyver
Details
Changes made to sysconfig to use xfce (29.94 KB, image/png)
2009-04-21 04:46 UTC, Mark Van De Vyver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Van De Vyver 2009-04-11 00:49:04 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032600 SUSE/3.0.8-1.1 Firefox/3.0.6, Ant.com Toolbar 1.3

Default user accounts are not permitted to mount or eject removable media.

There are many bug reports, forum posts and blog posts advising people to edit xml files or otherwise wrestling with USB/DVD/CDROM drive behavior,
e.g.
http://sathyasays.com/2008/08/20/how-to-enable-auto-mounting-of-external-drives-in-opensuse-11/

Instead openSUSE hal settings should just work.

There is a suggested fix for removable media, but what else should be properly set.....?

Please can we have a patch for all openSUSE systems, not just 11.2 that sets the 'correct policies' for a user to have a fully functional installation?


Reproducible: Always

Steps to Reproduce:
1. As an ordinary user run:
# polkit-auth
2.
3.
Actual Results:  
empty

Expected Results:  
AT LEAST:

org.freedesktop.hal.storage.mount-removable
org.freedesktop.hal.storage.eject


Suggested fix:

  # sudo polkit-auth --grant org.freedesktop.hal.storage.mount-removable --user <user_name>

  # sudo polkit-auth --grant org.freedesktop.hal.storage.eject --user <user_name>
Comment 1 Marcus Meissner 2009-04-11 15:15:48 UTC
is this really 11.0 or 11.1?


did you install all online updates?
Comment 2 Mark Van De Vyver 2009-04-12 13:20:39 UTC
11.0 with updates and KDE4 from the 11.0 STABLE repo.

Many forum and blog posts report this issue with removable media.

Most suggest editing some policy kit xml file but the suggested fix seems safer.
Comment 3 Ludwig Nussel 2009-04-14 07:18:02 UTC
please attach the output of 'resmgr dump' as root
Comment 4 Ludwig Nussel 2009-04-14 07:18:56 UTC
ah, and the output ck-list-sessions too please
Comment 5 Mark Van De Vyver 2009-04-18 02:15:09 UTC
# resmgr dump
### begin dump
class audioplayer
class pda
class scanner
class modem
class camera
class usb
class floppy
class cdrom
class input
class video
class sound
class v4l
class dvb
class remote-x-desktop
class desktop
class desktop includes dvb
class desktop includes v4l
class desktop includes sound
class desktop includes video
class desktop includes input
class desktop includes cdrom
class desktop includes floppy
class desktop includes usb
class desktop includes camera
class desktop includes scanner
class desktop includes pda
class desktop includes audioplayer
login "mv" :0
grant "mv" desktop
grant "mv" dvb
grant "mv" v4l
grant "mv" sound
grant "mv" video
grant "mv" input
grant "mv" cdrom
grant "mv" floppy
grant "mv" usb
grant "mv" camera
grant "mv" scanner
grant "mv" pda
grant "mv" audioplayer
### end dump

Still as root
# ck-list-sessions

And as normal user
> ck-list-sessions


i.e. both return nothing, and var/log/messages only shows:
  
  Apr 18 12:11:30 HOST0013ce478e38 su: (to root) mv on /dev/pts/5


Hope that helps?
Comment 6 Ludwig Nussel 2009-04-20 06:52:30 UTC
so your displaymanager (I guess kdm4 in this case) doesn't register your user at policykit. => kde problem
Comment 7 Ludwig Nussel 2009-04-20 06:52:57 UTC
s/policykit/consolekit/ of course. the dm needs to tell consolekit.
Comment 8 Lubos Lunak 2009-04-20 15:53:59 UTC
Does it work if you use other displaymanager then KDE from KDE4 (/etc/sysconfig/displaymanager DISPLAYMANAGER)?
Comment 9 Lubos Lunak 2009-04-20 16:00:07 UTC
*** Bug 447932 has been marked as a duplicate of this bug. ***
Comment 10 Mark Van De Vyver 2009-04-21 04:32:40 UTC
Actually, it is not the display manager value in /etc/sysconfig that is the problem.... it is the window manager value.

The suggested default value of kde gives the behavior seen so far.

Set DEFAULT_WM to kwin instead of kde then:

 # resmgr dump
### begin dump    
class audioplayer 
class pda         
class scanner     
class modem       
class camera      
class usb         
class floppy      
class cdrom       
class input       
class video
class sound
class v4l
class dvb
class remote-x-desktop
class desktop
class desktop includes dvb
class desktop includes v4l
class desktop includes sound
class desktop includes video
class desktop includes input
class desktop includes cdrom
class desktop includes floppy
class desktop includes usb
class desktop includes camera
class desktop includes scanner
class desktop includes pda
class desktop includes audioplayer
login "mv" :0
grant "mv" desktop
grant "mv" dvb
grant "mv" v4l
grant "mv" sound
grant "mv" video
grant "mv" input
grant "mv" cdrom
grant "mv" floppy
grant "mv" usb
grant "mv" camera
grant "mv" scanner
grant "mv" pda
grant "mv" audioplayer
### end dump

 # ck-list-sessions
Session2:
        uid = '1000'
        realname = 'Mark Van De Vyver'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2009-04-21T03:56:43Z'

You end up in the ('broken'?) situation leading to the bug report if you install kde4 from the stable repos.  Even if you fully un-install the KDE3 desktop pattern.

The steps to this are quite involved.  To me the KDE4 stable repo had bizarre internal contradictions and conflicts.

I'll post the details in a separate comment.

Would appreciate you indicating if you agree that some of these behaviors/effects are bugs, then I'll open separate bug reports.

I think the (broken?) KDE4 stable repo might be why people using 11.0 are getting them selves into this pickle.

It is also not established that using kwin as the default WM value will eliminate the need for the polkit-auth commands to be run on 11.0 at least.
I think this would need to be confirmed via an installation of KDE3 on 11.0, updated to KDE4 from the stable repo first.

Is that correct?
Comment 11 Mark Van De Vyver 2009-04-21 04:36:16 UTC
Created attachment 286989 [details]
KDE4 stable repo error dialog
Comment 12 Mark Van De Vyver 2009-04-21 04:38:51 UTC
Created attachment 286990 [details]
KDE4 stable repo details that generate error on update
Comment 13 Mark Van De Vyver 2009-04-21 04:40:40 UTC
Created attachment 286991 [details]
KDE4 stable repo choking on itself (kdebase4-workspace-plasmoids)
Comment 14 Mark Van De Vyver 2009-04-21 04:44:44 UTC
Created attachment 286992 [details]
Changes to the default sysconfig settings after installing KDE4 as only desktop.
Comment 15 Mark Van De Vyver 2009-04-21 04:46:27 UTC
Created attachment 286993 [details]
Changes made to sysconfig to use xfce
Comment 16 Mark Van De Vyver 2009-04-21 04:50:42 UTC
Steps leading up to the observation in comment #10
Also shows unexpected KDE4 stable repo behavior that likely leads to people experiencing the original bug or, at the very least, having ck-list-settings return empty.

# cat /etc/sysconfig/displaymanager|grep -i displaymanager
## Description: settings to generate a proper displaymanager config
# all changes in this file require a restart of the displaymanager
DISPLAYMANAGER="kdm3"
DISPLAYMANAGER_REMOTE_ACCESS="no"
# that root can never login if DISPLAYMANAGER_SHUTDOWN is "auto" and
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"
# Let the displaymanager start a local Xserver.
DISPLAYMANAGER_STARTS_XSERVER="yes"
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="no"
DISPLAYMANAGER_AUTOLOGIN=""
# DISPLAYMANAGER_AUTOLOGIN is empty.
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"
DISPLAYMANAGER_AD_INTEGRATION="no"
# displaymanager), "auto" (follow
DISPLAYMANAGER_SHUTDOWN="all"
# If set to "auto", DISPLAYMANAGER_RANDR_MODE_auto is used on laptops, and
# DISPLAYMANAGER_RANDR_MODE_auto), the mode is defined and set.
DISPLAYMANAGER_RANDR_MODE_VGA="auto"
# Mode to use for laptops for DISPLAYMANAGER_RANDR_MODE_* on laptops only,
DISPLAYMANAGER_RANDR_MODE_auto="1024x768_60 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync"
# displaymanager (kdm/gdm/xdm) on Xgl on top of Xorg.
DISPLAYMANAGER_XSERVER=Xorg
DISPLAYMANAGER_XGL_OPTS="-accel glx:pbuffer -accel xv:pbuffer"
## Description: settings to generate a proper displaymanager config
DISPLAYMANAGER_KDM_THEME="SUSE"
DISPLAYMANAGER_KDM_LOCALARGS=""

** So kde3 is indicated as the window manager ***

Which should be impossible since not only have I updated from the KDE4:STABLE 
repos.  TO Confirm this I'll describe what happens when I try to reinstall
from the KDE4 stable repo.  Details follow.

To make sure I was using as pure KDE4 as I could, given 11.0, I had previously 
un-installed everything KDE3 that I could (I still require some KDE3 packages):

rpm -qa --queryformat "%-30{NAME} %-20{VERSION}\n" |grep -i kde.*3\.5
kdelibs3                       3.5.9
kdelibs3-default-style         3.5.9

Enabled repo listing:

# zypper lr -u|grep -i "| Yes     | Yes     |"
10 | repo-oss                     | openSUSE-11.0-Oss                      | Yes     | Yes     | http://download.opensuse.org/distribution/11.0/repo/oss/
11 | KDE:KDE4:STABLE:Desktop      | KDE:KDE4:STABLE:Desktop                | Yes     | Yes     | http://download.opensuse.org/repositories/KDE:/KDE4:/STABLE:/Desktop/openSUSE_11.0/
14 | openSUSE-11.0-Updates        | Updates for 11.0                       | Yes     | Yes     | http://download.opensuse.org/update/11.0/
15 | KDE:KDE4:STABLE:Extra-Apps   | KDE:KDE4:STABLE:Extra-Apps             | Yes     | Yes     | http://download.opensuse.org/repositories/KDE:/KDE4:/STABLE:/Extra-Apps/openSUSE_11.0/
20 | KDE_4.0_Community            | KDE:KDE4:Community                     | Yes     | Yes     | http://download.opensuse.org/repositories/KDE%3a/KDE4%3a/Community/openSUSE_11.0
34 | repo-non-oss                 | openSUSE-11.0-Non-Oss                  | Yes     | Yes     | http://download.opensuse.org/distribution/11.0/repo/non-oss/

Under the section "STABLE KDE Project (KDE 4.1.3)" on the page:
http://en.opensuse.org/KDE4
Select the basic desktop for 11.0, accept the repos and software the one-click
installer proposes to add:

http://download.opensuse.org/repositories/KDE:/KDE4:/STABLE:/Desktop/openSUSE_11.0/ (KDE:KDE4:STABLE:Desktop)-
http://download.opensuse.org/repositories/devel:/tools:/building/openSUSE_11.0/ (devel:tools:building)
http://download.opensuse.org/update/11.0/ (openSUSE:11.0:Update)Running 

Software to be installed:
kde4-dolphin
kde4-kdepasswd
kde4-kdialog
kde4-keditbookmarks
kde4-kfind
kde4-kio_sysinfo-branding-openSUSE
kde4-kmix
kde4-konqueror
kde4-konsole
kde4-kwin
kde4-kwrite
kdebase4
kdebase4-openSUSE
kdebase4-session
kdebase4-workspace
kdebase4-workspace-branding-openSUSE
kdebase4-workspace-plasmoids

Select Next, then yes, login as root.
Error dialog (screenshot attached, yast2-000.png) appears.
Select try again.
Repo details screen is presented(screenshot attached, yast2-001.png) .
Enter Repository Name: "openSUSE-11.0:Devel:Tools".
Select OK.
Import devel:tools OBS key when prompted.
Warning about workspace plasmoids appears (screenshot yast2-002.png).

*** Yast@ wants to, not install, deinstall or downgrade to to KDE 4.0.4, 
    a total of 65 packages!!!  ***

The 11.0 update repo seems to be the source of this error.
The one click install clearly indicates 4.1.3 is going to be installed, but 
instead it looks like you can easily be downgraded to 4.0.4
  
**** The 11.0 updates repo and workspace plasmoids package are _both_ added by 
     the oneclick installer ****
Specifically, kdebase4-workspace-plasmoids package was not installed previously.

So the choices are:
 a) Abort and moveon.org
 b) Accept the first choice (deinstall, not install, downgrade)
 c) Don't install/update kdebase4-workspace-plasmoids, 
 d) Ignore dependencies
 e) Abort, disable the 11.0 updates repo, try again, in which case you'll go 
    around in circles....

This is a bug?  if so in....
 - update repo?
 - STABLE:KDE4 repo?
 - one click installer?
 - elsewhere?

Which is the recommended solution?

Then I'll open a bug report for the above and update the wiki page to add a 
clear warning to:
http://en.opensuse.org/KDE4

In the meantime I chose c)
Interestingly this adds some "branding" packages clearly labeled 11.1.....  
None of the repos are 11.1 repos :)
Installation was successful.
Logout.
Ctl+Atl+Backspace+Backspace to retart the windowsystem.

The logon screen splash indicates I'm using KDE4.1

Sooooo, _now_ what display manager does sysconfig say I am using?

# cat /etc/sysconfig/displaymanager|grep -i displaymanager
## Description: settings to generate a proper displaymanager config
# all changes in this file require a restart of the displaymanager
DISPLAYMANAGER="kdm3"
DISPLAYMANAGER_REMOTE_ACCESS="no"
# that root can never login if DISPLAYMANAGER_SHUTDOWN is "auto" and
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"
# Let the displaymanager start a local Xserver.
DISPLAYMANAGER_STARTS_XSERVER="yes"
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="no"
DISPLAYMANAGER_AUTOLOGIN=""
# DISPLAYMANAGER_AUTOLOGIN is empty.
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"
DISPLAYMANAGER_AD_INTEGRATION="no"
# displaymanager), "auto" (follow
DISPLAYMANAGER_SHUTDOWN="all"
# If set to "auto", DISPLAYMANAGER_RANDR_MODE_auto is used on laptops, and
# DISPLAYMANAGER_RANDR_MODE_auto), the mode is defined and set.
DISPLAYMANAGER_RANDR_MODE_VGA="auto"
# Mode to use for laptops for DISPLAYMANAGER_RANDR_MODE_* on laptops only,
DISPLAYMANAGER_RANDR_MODE_auto="1024x768_60 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync"
# displaymanager (kdm/gdm/xdm) on Xgl on top of Xorg.
DISPLAYMANAGER_XSERVER=Xorg
DISPLAYMANAGER_XGL_OPTS="-accel glx:pbuffer -accel xv:pbuffer"
## Description: settings to generate a proper displaymanager config
DISPLAYMANAGER_KDM_THEME="SUSE"
DISPLAYMANAGER_KDM_LOCALARGS=""

Is this not a bug?  Specifically, uninstalling KDE3 leaves display and window 
manger settings in /etc/sysconfig populated with kde3 values.
The reults of the commands:
> sudo resmgr dump
> ck-list-sessions
Are as before.

Changed sysconfig settings, via YaST2, as shown in screenshot yast2-003.png.
logout, Ctl+Atl+Backspace+Backspace, login
The reults of the commands:
> sudo resmgr dump
> ck-list-sessions
Are as before.

Okay, so now install the "XFCE Desktop Environment" pattern using YaST2

Change window manager and desktop manager to use xfce as shown in screenshot 
yast2-004.png.
Logout, Ctl+Atl+Backspace+Backspace, login
Login crednetials accepted for root and normal user, but unable to login.  
No errors just grey screen with Cameleon image 'in relief' style.

Ctl+Alt+F7, login as root:
init 3 &
edit sysconfig to set 
display manager: kdm4 
window manager: kwin (_not_ the suggested value of kde)
init 5 &
exit

Log in.
Start bash shell as root:
# resmgr dump
### begin dump    
class audioplayer 
class pda         
class scanner     
class modem       
class camera      
class usb         
class floppy      
class cdrom       
class input       
class video
class sound
class v4l
class dvb
class remote-x-desktop
class desktop
class desktop includes dvb
class desktop includes v4l
class desktop includes sound
class desktop includes video
class desktop includes input
class desktop includes cdrom
class desktop includes floppy
class desktop includes usb
class desktop includes camera
class desktop includes scanner
class desktop includes pda
class desktop includes audioplayer
login "mv" :0
grant "mv" desktop
grant "mv" dvb
grant "mv" v4l
grant "mv" sound
grant "mv" video
grant "mv" input
grant "mv" cdrom
grant "mv" floppy
grant "mv" usb
grant "mv" camera
grant "mv" scanner
grant "mv" pda
grant "mv" audioplayer
### end dump

# ck-list-sessions
Session2:
        uid = '1000'
        realname = 'Mark Van De Vyver'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2009-04-21T03:56:43Z'

SOOOO, it seems the problem is that in /etc/sysconfig:

##############################################################################
##############################################################################

 kwin _must_ be set as the window manger (DEFAULT_WM), and _not_ the current 
 default value of kde.  Then ck-list-sessions will return some (correct?)
 data

##############################################################################
##############################################################################
Comment 17 Mark Van De Vyver 2009-04-24 13:02:48 UTC
The broken KDE4 update repo reported in comment #16 has now been reproduced and submitted as Bug 497971.
Comment 18 Mark Van De Vyver 2009-04-25 02:37:07 UTC
Furthermore as an ordinary user I now see:

> polkit-auth
org.freedesktop.hal.killswitch.bluetooth
org.freedesktop.hal.killswitch.wlan
org.freedesktop.hal.killswitch.wwan
org.freedesktop.hal.storage.mount-removable
org.freedesktop.hal.storage.eject
org.freedesktop.hal.storage.crypto-setup-removable
org.freedesktop.hal.power-management.shutdown
org.freedesktop.hal.power-management.reboot
org.freedesktop.hal.power-management.set-powersave
org.freedesktop.hal.power-management.suspend
org.freedesktop.hal.power-management.hibernate
org.freedesktop.hal.power-management.standby
org.freedesktop.hal.power-management.cpufreq
org.freedesktop.hal.power-management.lcd-panel
org.freedesktop.hal.power-management.light-sensor
org.freedesktop.hal.power-management.keyboard-backlight
org.freedesktop.hal.dockstation.undock
org.freedesktop.hal.wol.enabled
org.freedesktop.hal.wol.enable
org.freedesktop.hal.wol.supported
org.freedesktop.consolekit.system.stop
org.freedesktop.consolekit.system.restart
org.freedesktop.hal.lock


I'm still working out if setting kwin as the window maanger is enough to get removable media functionality or if the pol-kit commands are still required....
Comment 19 Mark Van De Vyver 2009-09-30 22:39:27 UTC
Haven't tried reproducing moving from kde 3 -> kde 4.3.
kde 4.2 - > kde 4.3 seems to go fine.

> cat /etc/sysconfig/windowmanager |grep WM
DEFAULT_WM="kwin"