Authentication is needed to run `/bin/csh' as the super user

I know,but your idea didn't work. Please read again what happened when I tried :

? OK, let's try a simpler example:
Code:
marietto@marietto:/usr/home/marietto/Desktop $ su root 
Password:
# thunar

Note how your shell's prompt changes to indicate that you're running a command as root. Yes, you're running TWO commands, not one. Sometimes, it's simpler to do that than trying to string EVERYTHING into one command with flags, pipes, and running the risk of incorrect syntax. And THIS is what I meant by my suggestion in post #11...
 
? OK, let's try a simpler example:
Code:
marietto@marietto:/usr/home/marietto/Desktop $ su root
Password:
# thunar

Note how your shell's prompt changes to indicate that you're running a command as root. Yes, you're running TWO commands, not one. Sometimes, it's simpler to do that than trying to string EVERYTHING into one command with flags, pipes, and running the risk of incorrect syntax. And THIS is what I meant by my suggestion in post #11...

Code:
marietto@marietto:/usr/home/marietto/Desktop $ su root
Password:

root@marietto:/usr/home/marietto/Desktop # thunar

ok now thunar runs as a root,but this is not what I want. I would like that thunar will be launched automatically as soon as I've been authenticated,creating a desktop icon.
 
Code:
marietto@marietto:/usr/home/marietto/Desktop $ su root
Password:

root@marietto:/usr/home/marietto/Desktop # thunar

ok now thunar runs as a root,but this is not what I want. I would like that thunar will be launched automatically as soon as I've been authenticated,creating a desktop icon.
are you serious? this whole thread was about trying to run thunar through pkexec and root... wow.

If you want to run Thunar on XFCE's startup, the place to look for is XFCE's .conf files, and don't mess with root-related stuff. And certainly don't try funny stuff with command line.
 
are you serious? this whole thread was about trying to run thunar through pkexec and root... wow.

If you want to run Thunar on XFCE's startup, the place to look for is XFCE's .conf files, and don't mess with root-related stuff. And certainly don't try funny stuff with command line.

Never played with XFCE's configuration. It always worked Out Of the Box. I'm not sure if I should do that.
 
Never played with XFCE's configuration. It always worked Out Of the Box. I'm not sure if I should do that.
First make sure XFCE launches, and that you can log in.

If you want Thunar to launch as soon as you log in, that's perfectly possible, just look into XFCE-related .conf files on xfce.org or something like that.

Now that I think about it, it's probably something that ~/.login can handle, as well... but I'd still recommend XFCE-specific config files, rather than the complex stuff you've been trying so far.
 
---> If you want Thunar to launch as soon as you log in

I don't want this. I want to launch thunar as root when I want,clicking on the relative desktop icon. In the beginning I used gksu and it worked,but later this tool has been removed. So I started using pkexec and it always worked.
 
can you share some nice tutorial that explains how to create that policy ?
Don't have one, sorry. All I know of dbus/consolekit/polkit is that you can use it for some fine-grained control on what a user or group can and cannot do. I looked into it a long time ago, when HAL was still being used. You can create policies to allow certain groups or users things that would normally require root access. It was pretty complex back then, it's gotten even more so over the last few years. The idea behind polkit is to allow linux admins to set policies, in a similar vein to active directory's grouppolicy on Windows.

ArchLinux has a decent howto (of course they do!): https://wiki.archlinux.org/title/Polkit

On FreeBSD the directory you're looking for would be /usr/local/etc/polkit-1/rules.d/.
 
---> If you want Thunar to launch as soon as you log in

I don't want this. I want to launch thunar as root when I want,clicking on the relative desktop icon. In the beginning I used gksu and it worked,but later this tool has been removed. So I started using pkexec and it always worked.
was that on FreeBSD?

I recall that mechanism working on Linux many years ago. Last time I tried to do that kind of thing (like adjusting system time via KDE's kcm module, and that kind of thing requiring root access), the graphical part didn't work for me. I didn't want to deal with the complexity of PolicyKit, so I just learned to adjust the time via command-line. Of course, that took reading man date to figure out the syntax.

Besides, it's kind of dangerous to be able to easily launch something as root.
 
Code:
# pkaction -v

local.kcron.crontab.save:
  description:       Write Crontab
  message:           Write into the system crontab file
  vendor:            Crontab Actions
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.accounts.change-own-password:
  description:       Change your own user password
  message:           Authentication is required to change your own user password
  vendor:            
  vendor_url:        
  icon:              stock_person
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   auth_admin

org.freedesktop.accounts.change-own-user-data:
  description:       Change your own user data
  message:           Authentication is required to change your own user data
  vendor:            
  vendor_url:        
  icon:              stock_person
  implicit any:      yes
  implicit inactive: yes
  implicit active:   yes

org.freedesktop.accounts.set-login-option:
  description:       Change the login screen configuration
  message:           Authentication is required to change the login screen configuration
  vendor:            
  vendor_url:        
  icon:              stock_person
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   auth_admin_keep
  annotation:        org.gnome.gconf.defaults.set-mandatory.prefix -> /apps/gdm/simple-greeter

org.freedesktop.accounts.user-administration:
  description:       Manage user accounts
  message:           Authentication is required to change user data
  vendor:            
  vendor_url:        
  icon:              stock_person
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   auth_admin_keep

org.freedesktop.color-manager.create-device:
  description:       Create a color managed device
  message:           Authentication is required to create a color managed device
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.create-profile:
  description:       Create a color profile
  message:           Authentication is required to create a color profile
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.delete-device:
  description:       Remove a color managed device
  message:           Authentication is required to remove a color managed device
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.delete-profile:
  description:       Remove a color profile
  message:           Authentication is required to remove a color profile
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.device-inhibit:
  description:       Inhibit color profile selection
  message:           Authentication is required to disable profile matching for a device
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.install-system-wide:
  description:       Install system color profiles
  message:           Authentication is required to install the color profile for all users
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   auth_admin_keep
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.modify-device:
  description:       Modify color settings for a device
  message:           Authentication is required to modify the color settings for a device
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.modify-profile:
  description:       Modify a color profile
  message:           Authentication is required to modify a color profile
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.color-manager.sensor-lock:
  description:       Use color sensor
  message:           Authentication is required to use the color sensor
  vendor:            System Color Manager
  vendor_url:        https://www.freedesktop.org/projects/system-color-manager/
  icon:              application-vnd.iccprofile
  implicit any:      auth_admin
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.owner -> unix-user:colord

org.freedesktop.consolekit.system.hibernate:
  description:       Hibernate the system
  message:           System policy prevents hibernating the system
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.freedesktop.consolekit.system.hibernate-multiple-users:
  description:       Hibernate the system when multiple users are logged in
  message:           System policy prevents hibernating the system when other users are logged in
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.consolekit.system.hybridsleep:
  description:       Hybrid sleep the system (sleep + hibernate)
  message:           System policy prevents hybrid sleeping the system
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.freedesktop.consolekit.system.hybridsleep-multiple-users:
  description:       Hybrid sleep the system (sleep + hibernate) when multiple users are logged in
  message:           System policy prevents hybrid sleeping the system when other users are logged in
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.consolekit.system.restart:
  description:       Restart the system
  message:           System policy prevents restarting the system
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.freedesktop.consolekit.system.restart-multiple-users:
  description:       Restart the system when multiple users are logged in
  message:           System policy prevents restarting the system when other users are logged in
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.consolekit.system.stop:
  description:       Stop the system
  message:           System policy prevents stopping the system
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.freedesktop.consolekit.system.stop-multiple-users:
  description:       Stop the system when multiple users are logged in
  message:           System policy prevents stopping the system when other users are logged in
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.consolekit.system.suspend:
  description:       Suspend the system
  message:           System policy prevents suspending the system
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.freedesktop.consolekit.system.suspend-multiple-users:
  description:       Suspend the system when multiple users are logged in
  message:           System policy prevents suspending the system when other users are logged in
  vendor:            
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.freedesktop.policykit.exec:
  description:       Run a program as another user
  message:           Authentication is required to run a program as another user
  vendor:            The polkit project
  vendor_url:        http://www.freedesktop.org/wiki/Software/polkit/
  icon:              
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   auth_admin

org.kde.filesharing.samba.addtogroup:
  description:       Add User to Samba's Usershare Group
  message:           Adding user to Samba's usershare group to edit Samba usershares
  vendor:            KIO Samba Sharing
  vendor_url:        https://www.kde.org
  icon:              preferences-system-network-share-windows
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin

org.kde.filesharing.samba.createuser:
  description:       Creating New Samba User
  message:           Creating new Samba user
  vendor:            KIO Samba Sharing
  vendor_url:        https://www.kde.org
  icon:              preferences-system-network-share-windows
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin

org.kde.filesharing.samba.isuserknown:
  description:       Is Samba User Known
  message:           Checking if Samba user exists
  vendor:            KIO Samba Sharing
  vendor_url:        https://www.kde.org
  icon:              preferences-system-network-share-windows
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.fontinst.manage:
  description:       Manage system-wide fonts.
  message:           Modifying the system-wide font configuration requires privileges.
  vendor:            Font Installer
  vendor_url:        
  icon:              preferences-desktop-font-installer
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.kde.kalarm.rtcwake.settimer:
  description:       Set RTC wakeup time
  message:           Set RTC wake-from-suspend time
  vendor:            KAlarm
  vendor_url:        
  icon:              kalarm
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.kde.kcontrol.kcmclock.save:
  description:       Save the date/time settings
  message:           System policies prevent you from saving the date/time settings.
  vendor:            Date and Time Control Module
  vendor_url:        
  icon:              preferences-system-time
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.kcontrol.kcmkwallet5.save:
  description:       Save wallet configuration
  message:           Allow saving wallet configuration settings
  vendor:            KDE Wallet system
  vendor_url:        
  icon:              kwalletmanager
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_self_keep

org.kde.kded.smart.smartctl:
  description:       Read SMART Report Details
  message:           Read storage device SMART report to check the device's health
  vendor:            Plasma SMART
  vendor_url:        https://www.kde.org
  icon:              preferences-smart-status
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.kinfocenter.dmidecode.systeminformation:
  description:       System Information
  message:           Read system information from system's Desktop Management Interface (DMI)
  vendor:            Desktop Management Interface
  vendor_url:        https://www.kde.org
  icon:              computer
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.ksysguard.processlisthelper.changecpuscheduler:
  description:       Change CPU Scheduler and priority
  message:           Change which CPU scheduler is to schedule the running of a given process
  vendor:            KSysGuard
  vendor_url:        
  icon:              utilities-system-monitor
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.ksysguard.processlisthelper.changeioscheduler:
  description:       Change IO Scheduler and priority
  message:           Change how the read and writes of a given process are prioritized
  vendor:            KSysGuard
  vendor_url:        
  icon:              utilities-system-monitor
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.ksysguard.processlisthelper.renice:
  description:       Change the priority of a process
  message:           Change the niceness of a given process
  vendor:            KSysGuard
  vendor_url:        
  icon:              utilities-system-monitor
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.ksysguard.processlisthelper.sendsignal:
  description:       Kill or stop etc a process
  message:           Sends a given signal to a given process
  vendor:            KSysGuard
  vendor_url:        
  icon:              utilities-system-monitor
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.ktexteditor.katetextbuffer.savefile:
  description:       Save Document
  message:           Root privileges are needed to save this document
  vendor:            Document Actions
  vendor_url:        
  icon:              
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin

org.kde.powerdevil.backlighthelper.brightness:
  description:       Get brightness
  message:           System policies prevent you from getting the brightness level.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.powerdevil.backlighthelper.brightnessmax:
  description:       Get maximum brightness value
  message:           System policies prevent you from getting the brightness level.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.powerdevil.backlighthelper.setbrightness:
  description:       Set brightness
  message:           System policies prevent you from setting the brightness level.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.kde.powerdevil.backlighthelper.syspath:
  description:       Get syspath
  message:           System policies prevent you from getting the syspath
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.powerdevil.chargethresholdhelper.getthreshold:
  description:       Get current battery charge limit
  message:           System policies prevent you from getting the current battery charge limit.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: yes
  implicit active:   yes

org.kde.powerdevil.chargethresholdhelper.setthreshold:
  description:       Set battery charge limit
  message:           System policies prevent you from setting a battery charge limit.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: no
  implicit active:   auth_admin_keep

org.kde.powerdevil.discretegpuhelper.hasdualgpu:
  description:       Check existence of discrete gpu
  message:           System policies prevent you from checking the existence of discrete gpu.
  vendor:            KDE
  vendor_url:        
  icon:              kde
  implicit any:      no
  implicit inactive: no
  implicit active:   yes

org.xfce.mousepad:
  description:       Run Mousepad as root
  message:           Authentication is required to run Mousepad as root.
  vendor:            Mousepad
  vendor_url:        https://xfce.org/
  icon:              org.xfce.mousepad
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin
  annotation:        org.freedesktop.policykit.exec.path -> /usr/local/bin/mousepad
  annotation:        org.freedesktop.policykit.exec.allow_gui -> true

org.xfce.power.backlight-helper:
  description:       Modify the laptop display brightness
  message:           Authentication is required to modify the laptop display brightness
  vendor:            XFCE Power Manager
  vendor_url:        http://goodies.xfce.org/projects/applications/xfce4-power-manager
  icon:              battery
  implicit any:      no
  implicit inactive: no
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/local/sbin/xfpm-power-backlight-helper

org.xfce.power.xfce4-pm-helper:
  description:       Suspend or hibernate the system
  message:           Authentication is required to place the system in suspend or hibernate mode
  vendor:            XFCE Power Manager
  vendor_url:        http://goodies.xfce.org/projects/applications/xfce4-power-manager
  icon:              battery
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/local/sbin/xfce4-pm-helper

org.xfce.session.xfsm-shutdown-helper:
  description:       Shutdown, restart, suspend, or hibernate the system
  message:           Authentication is required to shutdown, restart, suspend, or hibernate the system.
  vendor:            XFCE Session Manager
  vendor_url:        http://xfce.org/
  icon:              xfce4-session
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/local/lib/xfce4/session/xfsm-shutdown-helper

org.xfce.thunar:
  description:       Run Thunar as root
  message:           Authentication is required to run Thunar as root.
  vendor:            Thunar
  vendor_url:        https://xfce.org/
  icon:              org.xfce.thunar
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin
  annotation:        org.freedesktop.policykit.exec.path -> /usr/local/bin/thunar
  annotation:        org.freedesktop.policykit.exec.allow_gui -> true
 
Just a FYI:
Tried sudo thunar as a user in wheel group and thunar started fine.
Note that sudo is not in FreeBSD base and needs to be installed as security/sudo. And it is "stop all" basis by default, so editing ${LOCALBASE}/etc/sudoers (just commented out one line to allow members of group wheel to execute any command) is needed.
 
I've restored my old 13.2 that was previously damaged. Now the error is changed :

Code:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:eek:rg.freedesktop.PolicyKit1.Error.Failed: 
No session for cookie
 
Back
Top