You are not logged in.
If I point the mouse cursor at a panel and right-click, a menu appears like this:
Properties
Move
Remove
Panel -> Add New Items...
Panel Preferences...
Log Out
Help
About
How can I stop users from selecting any of these 3 items:
Remove
Panel -> Add New Items...
Help
Thanks,
Paul
Last edited by Paul Parsons (2023-05-10 09:44:22)
Offline
Hello and welcome.
Xfce has a kiosk mode that might help. The code for this hasn't been worked on in a while so you may get mixed results, but give it a try to see if it works for you.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hello and welcome.
Xfce has a kiosk mode that might help. The code for this hasn't been worked on in a while so you may get mixed results, but give it a try to see if it works for you.
Thanks for your response.
I did try using kiosk mode, following the instructions in the wiki, but it didn't seem to have an effect. Either I did it wrong or it doesn't work properly.
Offline
Which distro and version of Xfce are you running?
Can you post back the contents of your /etc/xdg/xfce4/kiosk/kioskrc and ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml files?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Which distro and version of Xfce are you running?
Can you post back the contents of your /etc/xdg/xfce4/kiosk/kioskrc and ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml files?
Thanks for your response.
I've created a VM in Oracle VM VirtualBox and installed RHEL 8.7
xfce4-about tells me this:
OS Name: Red Hat Enterprise Linux 8.7 (Ootpa)
OS Type: 64-bit
Xfce4 Version: 4.16
CPU: 12th Gen Intel Core i5-1245U x 4
Memory: 7.8 GiB
$ cat /etc/xdg/xfce4/kiosk/kioskrc
[xfce4-panel]
CustomizePanel=NONE
$
$ cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="dark-mode" type="bool" value="false"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=8;x=960;y=1082"/>
<property name="length" type="uint" value="100"/>
<property name="position-locked" type="bool" value="true"/>
<property name="icon-size" type="uint" value="0"/>
<property name="size" type="uint" value="28"/>
<property name="plugin-ids" type="array">
<value type="int" value="14"/>
<value type="int" value="1"/>
<value type="int" value="4"/>
<value type="int" value="6"/>
<value type="int" value="2"/>
<value type="int" value="7"/>
<value type="int" value="12"/>
<value type="int" value="3"/>
</property>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-2" type="string" value="tasklist">
<property name="grouping" type="uint" value="1"/>
</property>
<property name="plugin-4" type="string" value="pager"/>
<property name="plugin-10" type="string" value="notification-plugin"/>
<property name="plugin-12" type="string" value="clock"/>
<property name="plugin-14" type="string" value="actions">
<property name="items" type="array">
<value type="string" value="-lock-screen"/>
<value type="string" value="-switch-user"/>
<value type="string" value="-separator"/>
<value type="string" value="-suspend"/>
<value type="string" value="-hibernate"/>
<value type="string" value="-hybrid-sleep"/>
<value type="string" value="-separator"/>
<value type="string" value="-shutdown"/>
<value type="string" value="-restart"/>
<value type="string" value="-separator"/>
<value type="string" value="-logout"/>
<value type="string" value="+logout-dialog"/>
</property>
<property name="appearance" type="uint" value="0"/>
</property>
<property name="plugin-1" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="16812081921.desktop"/>
</property>
</property>
<property name="plugin-6" type="string" value="separator">
<property name="expand" type="bool" value="false"/>
<property name="style" type="uint" value="1"/>
</property>
<property name="plugin-7" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-3" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="16836291621.desktop"/>
</property>
</property>
</property>
</channel>
$
Offline
Just spent some time trying to get it to work unsuccessfully. Looks like we're not alone:
- https://gitlab.xfce.org/xfce/libxfce4util/-/issues/13
- https://gitlab.xfce.org/xfce/libxfce4util/-/issues/14
- https://gitlab.xfce.org/xfce/xfconf/-/issues/15
There do appear to be some mixed results (that last link) plus this thread from a few years back where it was still successfully used.
Not sure what to suggest here. It looks like the developers are looking for someone to maintain the kiosk code.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Just spent some time trying to get it to work unsuccessfully. Looks like we're not alone:
- https://gitlab.xfce.org/xfce/libxfce4util/-/issues/13
- https://gitlab.xfce.org/xfce/libxfce4util/-/issues/14
- https://gitlab.xfce.org/xfce/xfconf/-/issues/15There do appear to be some mixed results (that last link) plus this thread from a few years back where it was still successfully used.
Not sure what to suggest here. It looks like the developers are looking for someone to maintain the kiosk code.
Ah - OK.
Do you perhaps know of a way of editing the popup menu displayed when I right-click on a panel?
Last edited by Paul Parsons (2023-05-09 15:47:42)
Offline
Ah - OK.
Do you perhaps know of a way of editing the popup menu displayed when I right-click on a panel?
Unfortunately its not possible without editing and recompiling the code.
However, interestingly, this worked for me. Can you try those instructions (somewhat similar to the previous thread linked)? Basically it involves moving a pre-configured xml file to a global location and editing that file to lock it.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Paul Parsons wrote:Ah - OK.
Do you perhaps know of a way of editing the popup menu displayed when I right-click on a panel?Unfortunately its not possible without editing and recompiling the code.
However, interestingly, this worked for me. Can you try those instructions (somewhat similar to the previous thread linked)? Basically it involves moving a pre-configured xml file to a global location and editing that file to lock it.
Thanks for pointing me to that thread. I've tried following it and my initial reaction is that it works. Thank you!
I deleted the kioskrc file I created previously. It wasn't needed.
For the record, this is what I did:
1. Set up a user with the panel the way it needs to be. I called this user "template". Bear in mind that if there are items in the panel which have been set up for that user, they might appear as empty launcher items for others.
2. sudo cp ~template/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
3. sudo vi /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
4. Changed a line
from:
<channel name="xfce4-panel" version="1.0">
to:
<channel name="xfce4-panel" version="1.0" locked="*" unlocked="root">
5. REBOOT
For all users, when I right-click on the panel, I get this:
Panel > Log Out
Help
About
... which means that the user can't change the panel.
Also, if the user is somehow able to run the Panel settings GUI, a dialog is displayed saying:
"Modifying the panel is not allowed.
Because the panel is running in kiosk mode, you are not allowed to make changes to the panel configuration as a regular user."
This is exactly what I was trying to achieve.
Last edited by Paul Parsons (2023-05-10 10:07:42)
Offline
Bear in mind that if there are items in the panel which have been set up for that user, they might appear as empty launcher items for others.
Any custom launchers would be in ~/template/.config/xfce4/panel and would also need to be copied over. You could copy that path/directory to /etc/skel so that the files are copied over during a new user creation event.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Paul Parsons wrote:Bear in mind that if there are items in the panel which have been set up for that user, they might appear as empty launcher items for others.
Any custom launchers would be in ~/template/.config/xfce4/panel and would also need to be copied over. You could copy that path/directory to /etc/skel so that the files are copied over during a new user creation event.
Good idea. Thanks
Offline
[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 631.38 KiB (Peak: 648.23 KiB) ]