linux-wifi-hotspot
linux-wifi-hotspot copied to clipboard
Gtk error when starting a wifi via GUI
I open the GUI as follows:
~ $sudo wihotspot
I then enter the following settings, and click "Create hotspot".
This produces the following error:
(wihotspot-gui:6110): GLib-GObject-WARNING **: 16:54:53.307: invalid cast from 'GtkEntry' to 'GtkTextView'
(wihotspot-gui:6110): Gtk-CRITICAL **: 16:54:53.307: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed
(wihotspot-gui:6110): GLib-GObject-WARNING **: 16:54:53.308: invalid (NULL) pointer instance
(wihotspot-gui:6110): GLib-GObject-CRITICAL **: 16:54:53.308: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
sh: 1: pkexec: not found
Command not found or exited with error status
pkexec --user root create_ap wlp0s20f3 wlp0s20f3 'username' 'password' --mkconfig /etc/create_ap.conf --freq-band 2.4
sh: 1: pkexec: not found
Command not found or exited with error status
sh: 1: pkexec: not found
Command not found or exited with error status
sh: 1: pkexec: not found
Command not found or exited with error status
(wihotspot-gui:6110): Gtk-WARNING **: 16:55:03.357: gtk_widget_size_allocate(): attempt to allocate widget with width 849 and height -4
However, I can copy the command being run without getting errors:
~ $sudo create_ap wlp0s20f3 wlp0s20f3 'username' 'password'
Config dir: /tmp/create_ap.wlp0s20f3.conf.yBu3BVnf
PID: 6177
Network Manager found, set ap0 as unmanaged device... DONE
wlp0s20f3 is already associated with channel 6 (2437 GHz)
multiple channels supported
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlp0s20f3.conf.yBu3BVnf/hostapd_ctrl
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED
So am I successfully creating the hotspot in the latter case? And why do I get the error on the GUI?
Update: I was able to connect with my phone, and go to websites, so the CLI-version seems to work fine.
Additional context: I installed this program a few days ago on Linux Mint Cinnamon without issues. The issue above occured today, on a very fresh Debian 12.2 install.
I was able to solve the problem! I googled the error pkexec: not found
, and came across this stackexchange post about sudo being broken. One of the comments said to run the following:
sudo apt install policykit-1
This does not remove the errors about GTK, but it does fix the subsequent errors, which importantly is what caused the hotspot not to be created.
I am not sure if this issue should be closed, seeing as the GTK errors remain. Also, the error-codes to be more friendly. Perhaps we could look for pkgexec
, and print the fix if it is not found?
I have the same problem, I tried sudo apt install policykit-1 but its installed and Wifi Hotspot GUI doesn't work.
I have the same problem, I tried sudo apt install policykit-1 but its installed and Wifi Hotspot GUI doesn't work.
What do you get? can you try to execute via shell and put the output? ~ $sudo wihotspot
Same issue here. Ubuntu 22.04.3 LTS. policykit-1 installed:
(wihotspot-gui:13742): GLib-GObject-WARNING **: 09:03:58.283: invalid cast from 'GtkEntry' to 'GtkTextView'
(wihotspot-gui:13742): Gtk-CRITICAL **: 09:03:58.283: gtk_text_view_get_buffer: assertion 'GTK_IS_TEXT_VIEW (text_view)' failed
(wihotspot-gui:13742): GLib-GObject-WARNING **: 09:03:58.285: invalid (NULL) pointer instance
(wihotspot-gui:13742): GLib-GObject-CRITICAL **: 09:03:58.285: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed Segmentation fault (core dumped)