By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 3027

Summary: TDE doesn't open in Arch Linux when libice-1.0.10-1 package is installed
Product: TDE Reporter: Lucas dos Santos <lucasrodrigo>
Component: tdebaseAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: critical CC: bugwatch, buingoc67, lucasrodrigo, mrmazda, roma251078, rossi.f, schnet, slavek.banko, trin
Priority: P1    
Version: R14.0.x [Trinity]   
Hardware: amd64   
OS: Linux   
URL: https://gitlab.freedesktop.org/xorg/lib/libice/issues/8, https://bugzilla.opensuse.org/show_bug.cgi?id=1142530
Compiler Version: TDE Version String: 14.0.5-1
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 3010    
Attachments: libICE6-1.0.9-4.7.i586.rpm
libICE6-1.0.9-4.7.x86_64.rpm

Description Lucas dos Santos 2019-07-23 11:58:03 CDT
STEPS TO REPRODUCE IT:

1. Install Arch Linux;

2. Add Trinity Repository to /etc/pacman.conf file:

# cat << "EOF" >> /etc/pacman.conf
[trinity]
Server = https://repo.nasutek.com/arch/contrib/trinity/x86_64
EOF

3. Refresh package databases and upgrade the system:

# pacman -Syu

4. Install tde-tdecore and tde-tdebase packages (and all its dependencies):

# pacman -S tde-tdecore tde-tdebase

5. Download and install additional unofficial packages needed by Trinity:

# pacman -S base-devel
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/lcms.tar.gz
$ tar -xvf lcms.tar.gz
$ cd lcms
$ makepkg -si
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/mariadb-mainline-noconflict.tar.gz
$ tar -xvf mariadb-mainline-noconflict.tar.gz
$ cd mariadb-mainline-noconflict
$ sed -i '15 s/https:\/\/ftp.heanet.ie\/mirrors\/mariadb/http:\/\/ftp.hosteurope.de\/mirror\/archive.mariadb.org/g' PKGBUILD
$ makepkg -s
# pacman -U libmariadbclient-mainline-noconflict-10.3.12-2-x86_64.pkg.tar.xz

6. Update $PATH variable:

PATH=/opt/trinity/tqt3/bin:/opt/trinity/bin:/opt/trinity/games:/opt/trinity/tqt3/bin:/opt/trinity/bin:$PATH

7. Copy /etc/X11/xinit/xinitrc to your home directory:

$ cp /etc/X11/xinit/xinitrc ~/.xinitrc

8. Add starttde to ~/.xinitrc file:

$ cat << "EOF" >> ~/.xinitrc
exec starttde
EOF

(If necessary, remove or comment out the lines regarding TWM)

9. Start X:

$ startx

EXPECTED BEHAVIOR: Trinity Desktop Environment should start normally.

WHAT ACTUALLY OCCURS:

Graphical interface opens and the following message is shown:

-----------
There was an error setting up inter-process communications for TDE.
The message returned by the system was:

Could not read network connection list.
/home/username/.DCOPserver_hostname__0

Please check that the "dcopserver program is running!
----------

After click 'OK', the TDE's splash screen appears, but the first icon
keeps blinking infinitely and the above mentioned message appears again
underneath them. When I click on splash screen, it disappears and when
I click in OK again, X exits to tty.

The same occurs if you try to open a TDE Application (e.g. Konsole) from another Desktop Environment.

If you start another Desktop Environment and issue "starttde" command in a terminal window, you will get the following output:

$ starttde
[starttde] Starting starttde.
[starttde] This script is /opt/trinity/bin/starttde
[starttde] TDE version is R14.0.5
[starttde] TDE base directory is /opt/trinity
[starttde] TDEHOME is not set.
[starttde] Set TDEHOME to /home/lucas/.trinity.
[starttde] Setting TDEROOTHOME to /root/.trinity.
[starttde] XDG_DATA_DIRS: /opt/trinity/share:/usr/local/share:/usr/share
gpg-agent: a gpg-agent is already running - not starting a new one
[starttde] TDEDIR: /opt/trinity
[starttde] TDEDIRS: 
[starttde] Starting Trinity...
[starttde] Trinity hardware control dbus daemon running.
[tdeinit] Launched DCOPServer, pid = 744 result = 0
/usr/bin/iceauth:  creating new authority file /run/user/1000/ICEauthority
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] DCOPServer self-test failed.
[tdeinit] DCOPServer could not be started, aborting.
[starttde] TDE_FULL_SESSION: true
[starttde] TDE_SESSION_UID: 1000
[tdeinit] Launched DCOPServer, pid = 759 result = 0
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] DCOPServer self-test failed.
[tdeinit] DCOPServer could not be started, aborting.
[starttde] tdeinit started successfully.
[tdeinit wrapper] Warning: socket connection failed: : Connection refused
[tdecore-tdeapplication] Found visual with alpha support
[tdecore-tdeapplication] Found visual with alpha support
[tdeinit] Launched DCOPServer, pid = 769 result = 0
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] ICE Connection rejected!
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
[dcopserver] DCOPServer self-test failed.
[tdeinit] DCOPServer could not be started, aborting.
[KSMServer] Could not register with DCOPServer. Aborting.
ERROR: Couldn't attach to DCOP server!
[starttde] Shutting down Trinity...
[tdeinit wrapper] Warning: socket connection failed: : Connection refused
[tdeinit wrapper] Error: Can't contact tdeinit!
[starttde] Running Trinity shutdown scripts...
[starttde] Running /opt/trinity/shutdown/agent-shutdown.sh.
[starttde] Trinity shutdown complete.

WORKAROUND: In order to get able to start TDE you need to downgrade libice package to a previous version:

# pacman -U https://archive.archlinux.org/packages/l/libice/libice-1.0.9-2-x86_64.pkg.tar.xz

CONCLUSION: If you have libice-1.0.10-1 installed in your system you are unable to use Trinity.
Comment 1 Slávek Banko 2019-07-23 13:23:28 CDT
Can you just try to rebuild Trinity packages with this new version of libice on a board?
Comment 2 Lucas dos Santos 2019-07-23 16:30:12 CDT
(In reply to Slávek Banko from comment #1)
> Can you just try to rebuild Trinity packages with this new version of libice
> on a board?

Unfortunately I don't have the required knowledge to do this.

But, another user just figured out what is wrong: http://trinity-users.pearsoncomputing.net/?0::15847
Comment 3 Felix Miata 2019-07-24 10:31:50 CDT
I reported this upstream. Stefan Dirsch in the openSUSE bug asks anyone to bisect in 5 steps libICE6's 31 commits between 1.0.9 and 1.0.10.
Comment 4 Slávek Banko 2019-07-24 11:04:39 CDT
(In reply to Felix Miata from comment #3)
> I reported this upstream. Stefan Dirsch in the openSUSE bug asks anyone to
> bisect in 5 steps libICE6's 31 commits between 1.0.9 and 1.0.10.

Stefan mean finding this commit?

https://cgit.freedesktop.org/xorg/lib/libICE/commit/?id=b484311c92
Comment 5 David C. Rankin 2019-07-24 18:12:26 CDT
This issue was also confirmed on opensuse/KDE3 on Tumbleweed. There is apparently a libice issue. The bug report there is:

https://bugzilla.opensuse.org/show_bug.cgi?id=1142530
Comment 6 David C. Rankin 2019-07-24 18:26:55 CDT
Slávek,

  Looking at the commit you reference, what the heck is:

+    const char  *ICEauthority_name = ".ICEauthority";

and then

+    /* If it's in the XDG_RUNTIME_DIR, don't use a dotfile */
+    if ((name = getenv ("XDG_RUNTIME_DIR")))
+	ICEauthority_name++;

If that occurs, ICEauthority_name now points to next address in the .rodata sction where who knows what is stored. ICEauthority_name cannot be both a string-literal and have the pointer incremented as ICEauthority_name++.

That certainly looks suspicious.
Comment 7 Slávek Banko 2019-07-27 08:22:48 CDT
(In reply to David C. Rankin from comment #6)
> Slávek,
> 
>   Looking at the commit you reference, what the heck is:
> 
> +    const char  *ICEauthority_name = ".ICEauthority";
> 
> and then
> 
> +    /* If it's in the XDG_RUNTIME_DIR, don't use a dotfile */
> +    if ((name = getenv ("XDG_RUNTIME_DIR")))
> +       ICEauthority_name++;
> 
> If that occurs, ICEauthority_name now points to next address in the .rodata
> sction where who knows what is stored. ICEauthority_name cannot be both a
> string-literal and have the pointer incremented as ICEauthority_name++.
> 
> That certainly looks suspicious.

Because ICEauthority_name is defined as a pointer to char, then the increment should result in it then referring to the next character => omitting the leading dot in the filename.
Comment 8 Slávek Banko 2019-09-27 05:33:53 CDT
*** Bug 3044 has been marked as a duplicate of this bug. ***
Comment 9 Slávek Banko 2019-11-16 18:16:14 CST
Although it might seem that if the same KDE3 problem in openSUSE is already solved, it will be possible to use the same TDE patch, it is not possible - the patch is inappropriate. The openSUSE-KDE3 patch fixes compatibility with libice >= 1.0.10, but it breaks compatibility with libice < 1.0.10. That's why we need a proper patch.
Comment 10 Felix Miata 2019-11-16 19:54:29 CST
Today I upgraded my 3 TW/TDE systems to TW20191112/14.0.6. Hosts gx620 and k8mmv suffered this problem after they were upgraded to libICE6-1.0.10-1.1, but I was able to work around by reverting to libICE6-1.0.9-4.7. On host gx78b, the upgrade to libICE6-1.0.10-1.1 is failing to cause the problem only if I login as root instead of normal user. As yet I've been unable to isolate any material difference between gx78b and the other two hosts. What should I be looking for?
# pinxi -SM
System:    Host: gx78b Kernel: 5.2.14-1-default x86_64 bits: 64 Desktop: Trinity R14.0.6
           Distro: openSUSE Tumbleweed 20191112
Machine:   Type: Desktop System: Dell product: OptiPlex 780 v: N/A
           Mobo: Dell model: 03NVJ6 v: A01 BIOS: Dell v: A15 date: 08/06/2013
# rpm -qa | grep libICE
libICE6-1.0.10-1.1.x86_64
# set | grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=Trinity
XDG_DATA_DIRS=/opt/trinity/share:/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/0
XDG_SEAT=seat0
XDG_SESSION_CLASS=greeter
XDG_SESSION_DESKTOP=tde
XDG_SESSION_ID=1
XDG_SESSION_TYPE=x11
XDG_VTNR=7
    local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions);
    for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share};

# inxi -SM
System:    Host: k8mmv Kernel: 5.2.14-1-default x86_64 bits: 64 Desktop: IceWM 1.5.4
           Distro: openSUSE Tumbleweed 20191112
Machine:   Type: Desktop Mobo: MICRO-STAR model: MS-7142 v: 1.00 serial: N/A BIOS: Phoenix v: 6.00 PG
           date: 06/27/2006
# rpm -qa | grep libICE
libICE6-1.0.10-1.1.x86_64
# set | grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=ICEWM
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/0
XDG_SEAT=seat0
XDG_SESSION_CLASS=greeter
XDG_SESSION_DESKTOP=icewm
XDG_SESSION_ID=3
XDG_SESSION_TYPE=x11
XDG_VTNR=7
    local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions);
    for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share};
Comment 11 Felix Miata 2019-11-18 21:54:38 CST
(In reply to Lucas dos Santos from comment #2)
> But, another user just figured out what is wrong:
> http://trinity-users.pearsoncomputing.net/?0::15847

This is the relevant part of that URL:

[quote]A workaround is to simply set an ICEAUTHORITY environment variable...

export ICEAUTHORITY=/home/yourname/.ICEauthority

I just added that variable to the top of my ~/.xinitrc file that I use with startx

export ICEAUTHORITY=/home/grogan/.ICEauthority
exec starttde[/quote]

How can this be automated so that every user on every system doesn't have to discover the need and apply it to his own login configuration?
Comment 12 Felix Miata 2019-11-18 22:45:38 CST
The following is copied and pasted from the related openSUSE bug report:

[copy]I believe the issue is in DCOP not using libice, but hardcode ICEAUTHORITY file instead.

http://bugs.pearsoncomputing.net/show_bug.cgi?id=3044

explains how to fix this using libice. I wasn't able to find dcop, let alone the sources for it. Probably this died together with KDE3. 

https://en.wikipedia.org/wiki/DCOP[/copy]
Comment 13 Roman 2019-11-19 09:56:26 CST
(In reply to Felix Miata from comment #12)
> The following is copied and pasted from the related openSUSE bug report:
> 
> [copy]I believe the issue is in DCOP not using libice, but hardcode
> ICEAUTHORITY file instead.
> 
> http://bugs.pearsoncomputing.net/show_bug.cgi?id=3044
> 
> explains how to fix this using libice.
>


Unfortunately this will not work.
The dcop/KDE-ICE/authutil.c file contains the IceAuthFileName function of the same name. 
Here the difficulty lies in the compatibility of the DCOP header files with the libice header files.
I think the implementation was not thought out. Theoretically, this can be made much simpler using ready-made libice functions and header files.
Unfortunately, a lot of changes will be required to implement this.
Comment 14 Slávek Banko 2019-11-28 12:58:54 CST
Please, what is the XDG_RUNTIME_DIR path on your distributions?

On Debian, /run/user/$UID is used, and I have no idea whether this is the standard for all distributions or whether other ways of building a path are used on other distributions.
Comment 15 Felix Miata 2019-11-28 20:10:39 CST
/run/user/$UID for openSUSE Tumbleweed, Fedora 29 and Mageia 7.
Comment 16 Christian 2019-11-30 12:09:44 CST
Hello everyone,
I have this problem on a opensuse tumbleweed. As soon as i update the system.
The export on .xinitrc not work, but plasma works fine. (fine is a way of say, i didnt like plasma)

I dont know how revert the package libice
Comment 17 Felix Miata 2019-11-30 12:37:16 CST
Created attachment 2934 [details]
libICE6-1.0.9-4.7.i586.rpm

To install on openSUSE TW 32 bit, download, then as root:
rpm -Uvh --oldpackage libICE6-1.0.9-4.7.i586.rpm
Comment 18 Felix Miata 2019-11-30 12:37:26 CST
Created attachment 2935 [details]
libICE6-1.0.9-4.7.x86_64.rpm

To install on openSUSE TW 64 bit, download, then as root:
rpm -Uvh --oldpackage libICE6-1.0.9-4.7.x86_64.rpm
Comment 19 Felix Miata 2019-11-30 12:41:33 CST
Following installation of libICE6, the next zypper dup will upgrade it to the current version unless prior you lock it:
zypper al libICE6.
Comment 20 Felix Miata 2019-12-02 02:10:14 CST
*** Bug 3053 has been marked as a duplicate of this bug. ***
Comment 21 Christian 2019-12-02 11:54:23 CST
Dear, Thanks you. Now is Working.
I will do not update Tumbleweed until tde gets fixed. And hope that get fixed soon
Best regards, and thanks you
Christian
Comment 22 Slávek Banko 2019-12-02 17:35:14 CST
The major patches for solving this problem can be found in TGW as pull requests TDE/tdelibs#55 and TDE/tdebase#103:

https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/pulls/55
https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/pulls/103

Since libice 1.0.10 is already a part of Ubuntu 19.10 (Eoan), this has made it easier for me to verify the correct behavior of both libice >= 1.0.10 and libice < 1.0.10.

Please, who can, test the patches in your distribution.
Comment 23 Roman 2019-12-03 09:27:20 CST
OS Gentoo.
I applied these patches to TDELIBS and TDEBASE packages.
It works with the libice-1.0.10 package.
Comment 24 Slávek Banko 2019-12-03 10:33:58 CST
(In reply to Roman from comment #23)
> OS Gentoo.
> I applied these patches to TDELIBS and TDEBASE packages.
> It works with the libice-1.0.10 package.

Great, thank you for testing.
Comment 25 Slávek Banko 2019-12-03 11:27:02 CST
Pull request merged. Building updated packages for PSB and PTB repositories is in progress. RPM packages will be updated by François.
Comment 26 Christian 2019-12-11 13:53:45 CST
Sorry for ask. Do you know witch time will take to reach the next TW update?
Thanks you
Comment 27 Slávek Banko 2019-12-11 15:15:09 CST
(In reply to Christian from comment #26)
> Sorry for ask. Do you know witch time will take to reach the next TW update?
> Thanks you

Unfortunately, I don't know when François will update packages. However, very soon we plan to freeze for R14.0.7, so building packages will certainly follow for official release.