Tagged: fail to start, sudo, synaptic
- This topic has 44 replies, 7 voices, and was last updated Apr 29-9:37 pm by dukester.
-
AuthorPosts
-
April 26, 2023 at 2:45 pm #105458Member
dukester
inxi -S
System:
Host: antixbox.org Kernel: 4.9.235-antix.1-amd64-smp arch: x86_64 bits: 64
Desktop: Fluxbox v: 1.3.7 Distro: antiX-19.3_x64-full Manolis Glezos 15
October 2020sudo synaptic
Unable to init server: Could not connect: Connection refused
Failed to initialize GTK.Probably you’re running Synaptic on Wayland with root permission.
Please restart your session without Wayland, or run Synaptic without root permissionSo I tried to re-install synaptic:
blah blah
…
Processing triggers for man-db (2.9.4-2) …
Processing triggers for menu (2.1.48) …
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Writing Menu: icewm(desktop-menu:3636): Gtk-CRITICAL **: 08:29:52.209: gtk_icon_theme_get_for_screen: assertion ‘GDK_IS_SCREEN (screen)’ failed
Traceback (most recent call last):
File “/usr/local/bin/desktop-menu”, line 328, in <module>
build_menu()
File “/usr/local/bin/desktop-menu”, line 300, in build_menu
process_menu(menu)
File “/usr/local/bin/desktop-menu”, line 134, in process_menu
icon = find_icon(entry) or default_folder_icon
File “/usr/local/bin/desktop-menu”, line 105, in find_icon
if icon_theme.lookup_icon(appicon, icon_size, 0):
AttributeError: ‘NoneType’ object has no attribute ‘lookup_icon’The above issue occurred out of nowhere it seems. I have not messed with anything lately, let alone any GTK stuff.
Not to my knowledge anyway. How would I re-install GTK? And what’s this “Unable to init server: Could not connect: Connection refused” issue? Never had that one pop up before!! TIA …--
dukesterApril 26, 2023 at 4:27 pm #105465Member
sybok
::My wild guess – there must have been a recent update (see ‘/var/log/apt/history.log’) that messed things up (or your system got corrupted).
You could downgrade the package that caused this, mark it as held (to prevent upgdate) and wait till things are resolved on the Debian|antiX side (wherever the cause lies), then remove the hold (i.e. “unmark” the package).Please post synaptic version (e.g. using ‘apt-cache policy synaptic’) and output of ‘inxi -r’.
April 26, 2023 at 4:58 pm #105471Member
dukester
::Thx Sybok for your reply!
apt-cache policy synaptic
synaptic:
Installed: 0.90.2+antix1
Candidate: 0.90.2+antix1
Version table:
*** 0.90.2+antix1 500
500 http://ftp.cc.uoc.gr/mirrors/linux/mx/antix/buster buster/main amd64 Packages
100 /var/lib/dpkg/status
0.84.6 500
500 http://debian.otenet.gr/debian buster/main amd64 Packagesinxi -r
Repos:
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/antix.list
1: deb http://ftp.cc.uoc.gr/mirrors/linux/mx/antix/buster/ buster main nonfree nosystemd
No active apt repos in: /etc/apt/sources.list.d/balena-etcher.list
No active apt repos in: /etc/apt/sources.list.d/bullseye-backports.list
Active apt repos in: /etc/apt/sources.list.d/buster-backports.list
1: deb http://deb.debian.org/debian/ buster-backports main contrib non-free
No active apt repos in: /etc/apt/sources.list.d/crystal.list
No active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://debian.otenet.gr/debian/ buster non-free contrib main
2: deb http://security.debian.org/ buster/updates non-free contrib main
No active apt repos in: /etc/apt/sources.list.d/miktex.list
No active apt repos in: /etc/apt/sources.list.d/onion.list
No active apt repos in: /etc/apt/sources.list.d/smlsharp.list
No active apt repos in: /etc/apt/sources.list.d/various.listI looked at the log file. The only recent entry that might have caused the issue was a recent icewm update/upgrade. How would I downgrade that culprit?
--
dukesterApril 26, 2023 at 5:04 pm #105473Forum Admin
anticapitalista
::Although it is disabled (now), this worries me (amongst other repos you now have disabled) as you may have installed something from this/(those) repo that has broken your buster based install.
No active apt repos in: /etc/apt/sources.list.d/bullseye-backports.listPhilosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 26, 2023 at 5:15 pm #105474Member
dukester
::Maybe! However, I’ve never had this problem in the past! I’ve had a few GTK warnings when running `mupdf’, but it always ran OK. I’m almost sure that it’s that bloody icewm update. It seems that there’s an “atk-bridge” issue on my system. Any ideas there? Thanks for your input.
--
dukesterApril 26, 2023 at 6:43 pm #105482Forum Admin
anticapitalista
::icewm update on my antiX-19 system does not cause any issues.
It must be something else.Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 26, 2023 at 7:46 pm #105483Member
dukester
::Right! But what do these lines refer to?
Processing triggers for menu (2.1.48) …
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Writing Menu: icewmUnable to init which server? Is this a network issue? Or a local daemon refusing to connect because of permissions?
--
dukesterApril 27, 2023 at 4:16 am #105488MemberRJP
::Graphical applications should not run with sudo, because it messes privileges. Use gksu instead of sudo.
To fix privileges run
sudo chown -Rc $USER:$USER $HOME… after that try to open Synaptic
gksu synapticCheck also if there is enough room
df -h / /home- This reply was modified 1 week, 5 days ago by RJP.
- This reply was modified 1 week, 5 days ago by RJP.
- This reply was modified 1 week, 5 days ago by RJP.
April 27, 2023 at 4:33 am #105493Member
dukester
::Thx RJP! Ran chown as suggested!
gksu synaptic
Failed to initialize GTK.
Probably you’re running Synaptic on Wayland with root permission.
Please restart your session without Wayland, or run Synaptic without root permission--
dukesterApril 27, 2023 at 5:15 am #105494MemberRJP
April 27, 2023 at 5:28 am #105498Member
sybok
::Strange.
I do run ‘sudo synaptic’ without problems (did so in the past, can do on my *testing* based on antiX-21_x64-full with synaptic version 0.91.3+antix2).
It works in ‘fluxbox’ which @dukester uses.
I know that there was a change in su[do] dealing with environments.
Could you try the following command
sudo -E synaptic
instead (man sudo: -E, –preserve-env)?Unable to init server: Could not connect: Connection refused
My guess is that sudo is a kinda “ssh [-X] to another user” and when the graphics privileges are set differently, an error occurs.
Similar warnings|errors are reported when I ssh to another system and upgrade there – something about (GTK and Python) icon and NoneType.I searched the interweb for the warning|error @dukester mentioned, it is often mentioned when ‘ssh’ to another machine.
Someone suggested a fix for ssh and running as root though I cannot comment on whether it could do more harm (in security?) than good:
https://techoverflow.net/2023/02/06/how-i-fixed-ssh-x11-forwarding-sudo-unable-to-init-server-could-not-connect-connection-refused/Also, I found this:
https://superuser.com/questions/1657180/x11-forwarding-unable-to-init-server-could-not-connect-connection-refused-wh <– ssh, xauth missing on the target machine
https://forum.qubes-os.org/t/qubes-users-debian-10-vm-unable-to-init-server-could-not-connect-connection-refused/2916 <– full disc as @RJP asked to checkPS: There was a synaptic issue in the past (2018: Wayland vs. X11, not working in Wayland) causing quite an upheaval.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897348
I doubt that this one is related.April 27, 2023 at 7:01 am #105501MemberRJP
::An another “dirty” way launch Synaptic could be
su -c 'x-terminal-emulator -e synaptic' rootApril 27, 2023 at 1:01 pm #105532Member
dukester
::Could you try the following command
sudo -E synaptic
instead (man sudo: -E, –preserve-env)?That solved the problem my friend!! Merci-danke-muchias gracias-thanks a bunch!!
I have plenty of room on my HDD:
df -h / /home
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 458G 236G 199G 55% /
/dev/sda1 458G 236G 199G 55% /So what could have gone wrong all of a sudden? ssh!? I hardly ever use it, and certainly haven’t in the last few months.
Anyway, you supplied a solution and I’m grateful!
Thank you and every respondent for your input!--
dukesterApril 27, 2023 at 1:08 pm #105533Member
sybok
::I would not blame ‘ssh’ which I used as an analogy of my (poor?) understanding of ‘sudo’.
This is something about environment variables not being set correctly for synaptic to run when invoked with simple ‘sudo’ (some crucial information about the environment does no longer survive when calling ‘sudo’) but the switch ‘-E’ saves the day.I experienced something similar when running ‘sudo mc’ (to be able to copy to some root-mounted device) did not remember my aliases designed to switch to several directories easily. When ‘mc’ was invoked with ‘sudo -E’, the aliases (defined in my user environment) became available again.
April 27, 2023 at 1:11 pm #105534Member
dukester
-
AuthorPosts
- You must be logged in to reply to this topic.