18

Recently I changed the hostname of my computer and now every time I start a qt program i get a message that says

_IceTransSocketUNIXConnect: Cannot connect to non-local host [My old hostname]

Qt: Session managment error: Could not open network socket

But the program still works fine. It just is slow to start up. I am using ubuntu 9.04. Any idea how I can solve this problem?

2 Answers 2

13

In bash you can do

export -n SESSION_MANAGER
5
  • 2
    Could you also explain your answer and add references to the (official) documentation if possible.
    – m7913d
    Commented Jul 16, 2020 at 8:51
  • Thank you, I am using GNOME with Ubuntu 20.04, and this actually fixed my issue with the network socket. Though with that said, I would love to know how this command fixed it? Commented Dec 9, 2021 at 6:31
  • 1
    Just type in a terminal help export, it will show (among other things) ... -n remove the export property from each NAME. Commented Dec 10, 2021 at 14:08
  • It has fixed my issue with running an application with flatpak. However it's not clear why it has worked out, I agree with @m7913d
    – Onkeltem
    Commented Jan 28 at 15:53
  • 1
    @MariusMatutiae help export will never explain why we have to remove this property to resolve the OP's issue.
    – m7913d
    Commented Apr 3 at 8:24
9

I suspect you have an old session being saved by your window manager (typically GNOME or KDE) that still references the previous hostname (dev3).

Disposing of that session file might solve your problem. Under KDE these are stored in "~$USER/.kde/share/config/session/". There are also directories based upon hostname in ~$USER/.kde/(cache|socket|tmp)-$hostname which you can delete the old ones for the previous hostname. I'm assuming Linux/BSD platform for directory paths, adjust as necessary for other platform targets.

I'm not sure of GNOME session file placement. find ~$USER/ -name "*session*" might be a good start.

7
  • I had the problem even with the same hostname. I removed entire .kde and it fixed it. Thanks! Commented Oct 28, 2009 at 19:23
  • 2
    is it safe to remove the entire .kde? I removed the files in "~$USER/.kde/share/config/session/" and I still have the same problem.
    – Barnabe
    Commented Apr 23, 2015 at 16:00
  • 8
    Try doing this "unsetenv SESSION_MANAGER" Commented Jan 5, 2016 at 5:40
  • 2
    Is there really a folder called ~$USER somewhere, or do you mean just $HOME or ~ maybe?
    – ph_0
    Commented Oct 2, 2020 at 14:02
  • 1
    Is this maybe some special alias or something system specific? When I say echo ~$USER on my linux it translates to ~philipp (which does not exist), while echo ~ and echo $HOME both translate to my correct home directory /home/philipp. The command you wrote in your answer: find ~$USER/ -name "*session*" gives me find: '~philipp/': No such file or directory.
    – ph_0
    Commented Jan 22, 2021 at 12:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.