Comments (8)
Same problem here. Running Linux Mint Cinnamon 20.2 version. When I connect over XRDP to the machine, I get the errors:
Running gufw in XRDP session gets the following error:
$ sudo gufw
/usr/bin/gufw: line 2: [: =: unary operator expected
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gdk-CRITICAL **: 09:11:30.990: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.990: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.991: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.991: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(gufw.py:74571): Gtk-CRITICAL **: 09:11:30.991: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
/usr/bin/gufw-pkexec: line 10: 74571 Segmentation fault (core dumped) python3 ${LOCATIONS[${i}]} $1
The session is X11:
echo $XDG_SESSION_TYPE
x11
The first error is unrelated. When running the first line in /bin/gufw
makes the test in the if brackets fail:
echo $(loginctl show-session $(loginctl|grep $(whoami) |awk '{print $1}') -p Type)
Type=x11 Type=x11 Type=x11
I was able to start the gufw preserving the environment (the unary operator error is still there, but the app launched):
sudo -E gufw
/usr/bin/gufw: line 2: [: =: unary operator expected
from gufw.
from gufw.
Hi, I would say it is because of Wayland. I can't do anything about it. Could you try x.org? Thanks. -- Costales.
I am using x.org since xrdp supports only x.org, no Wayland. Also, Wayland doesn't support RDP through PipeWire yet.
from gufw.
There's a bug filed with Ubuntu itself, we'll see which one gets more traction. There are two issues here:
- startup script parses output of
loginctl
and it breaks if there are more than one lines (which is expected on xrdp connection). To solve that the second line of/bin/gufw
needs a smallhead -1
change:
from:
if [ $(loginctl show-session $(loginctl|grep $(whoami) |awk '{print $1}') -p Type) = "Type=wayland" ]; then
to
if [ $(loginctl show-session $(loginctl|grep $(whoami) |awk '{print $1}') -p Type | head -1 ) = "Type=wayland" ]; then
- Step 1 will not solve segfault, that's caused by polkit policy not having the correct path. Adjust
/usr/share/polkit-1/actions/com.ubuntu.pkexec.gufw.policy
and change:
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gufw-pkexec</annotate>
To:
<annotate key="org.freedesktop.policykit.exec.path">/bin/gufw-pkexec</annotate>
Hope that helps folks looking for a solution, and it makes it into Ubuntu's repos. As it stands, both 20 and 22 are affected.
from gufw.
I can't believe I missed it earlier, the issue is caused by Ubuntu's decision to symlink /bin
to /usr/bin
. With /bin/
being earlier in $PATH, this means /bin/gufw-pkexec
is executed and fails.
from gufw.
from gufw.
from gufw.
A small update. The issue ultimately lies with xrdp not reading /etc/environment
and having wrong order of elements in $PATH
. It was identified by upstream, and fixed in newer versions of Debian and Ubuntu (22 only).
To fix this on earlier versions of Ubuntu, /etc/pam.d/xrdp-sesman
will need to include two additional directives (line 2 & 3), the full file should look like this:
#%PAM-1.0
auth required pam_env.so readenv=1
auth required pam_env.so readenv=1 envfile=/etc/default/locale
@include common-auth
@include common-account
@include common-session
@include common-password
from gufw.
Related Issues (20)
- Cannot run HOT 2
- Gufw 21.04.0 - Log section Empty? HOT 3
- 22.04 /usr/share/gufw/gufw/gufw.py - missing HOT 25
- Is this a Bug? Profiles Just Merge All Rules -- So, What's the Point of Profiles? HOT 1
- Port for SMPlayer to ChromeCast HOT 1
- [Help] VPN Killswitch Rules
- Not able to add individual apps to rules. HOT 1
- gufw on debian bullseye "Could not determine the accessibility bus address" HOT 1
- LM 20.3 /usr/bin/gufw: line 2: [: too many arguments HOT 1
- How to apply multi-profile? HOT 1
- Installer does not work in Kali HOT 1
- Status toggle button wipes out gufw rules from the profile, and reloads them from ufw HOT 3
- IP address only? Why not computer name/device name? HOT 1
- /usr/bin/gufw-pkexec: line 2: 3603393 Segmentation fault HOT 1
- Thanks for Gufw! I just released a visual indicator for the gnome status bar which plays nice with it HOT 1
- Profiles are reset after deactivated HOT 6
- Add PI hole profile HOT 1
- Missing "DEV_extra_translations" from 24.04 release HOT 1
- Unable to add port range HOT 8
- Firewall
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gufw.