[SOLVED] lxterminal as local user "fail on bind, permission denied"

LXTerminal is the standard terminal emulator of LXDE - http://wiki.lxde.org/en/LXTerminal
Locked
Brett
Posts: 3
Joined: Thu Oct 11, 2018 12:44 pm

[SOLVED] lxterminal as local user "fail on bind, permission denied"

Post by Brett »

Apologies if this is the wrong forum, but as LXTerminal seems to be the only app having this problem I thought it a reasonable place to start asking questions.

Background: I'm running LXDE on several gentoo linux installations. The problem first appeared a couple of upgrades back (my current lxterminal version is 0.3.1). At first I only knew that autostart of lxterminal failed. When subsequent upgrades failed to correct the problem and extensive google searches failed to find anyone else reporting the same difficulty I started poking around and now know what's happening, but not why (or how to fix it).

Specifically when started from xterm as root lxterminal runs fine. When started as a normal user over ssh it also runs fine. Attempts to start from xterm as a normal local user returns: WARNING **: Bind on socket failed: Permission denied

What seems to be happening is that attempts to start lxterminal as a normal user creates a socket file in /var/run/user/0 which that instance cannot access. Instances started over ssh correctly create a localhost socket file in /var/run/user/1000 and so work fine, and root, of course, has no permission problems with /var/run/user/0.

It seems unlikely that I'm the only one having this problem and the lack of any reference to it online likely means I'm missing something obvious, but I can't imagine what it is.

If more info on my systems is required let me know..

Any information, assistance or pointers would be greatly appreciated.


Brett K. Heath
Last edited by Brett on Sat Apr 27, 2019 9:58 pm, edited 1 time in total.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: lxterminal as local user "fail on bind, permission denied"

Post by drooly »

Brett wrote:What seems to be happening is that attempts to start lxterminal as a normal user creates a socket file in /var/run/user/0 which that instance cannot access. Instances started over ssh correctly create a localhost socket file in /var/run/user/1000 and so work fine, and root, of course, has no permission problems with /var/run/user/0.
did you also look at the permissions of these directories?
Brett
Posts: 3
Joined: Thu Oct 11, 2018 12:44 pm

Re: lxterminal as local user "fail on bind, permission denied"

Post by Brett »

Post by drooly » Fri Oct 12, 2018 10:30 am

Brett wrote:
What seems to be happening is that attempts to start lxterminal as a normal user creates a socket file in /var/run/user/0 which that instance cannot access. Instances started over ssh correctly create a localhost socket file in /var/run/user/1000 and so work fine, and root, of course, has no permission problems with /var/run/user/0.


did you also look at the permissions of these directories?

/var/run/user/0 is root:root drwx------
/var/run/user/1000 is login:root drwx------

I hadn't noticed the group ownership of /var/run/user/1000, is that significant?
Brett K. Heath
Brett
Posts: 3
Joined: Thu Oct 11, 2018 12:44 pm

Re: [SOLVED] lxterminal as local user "fail on bind, permission denied"

Post by Brett »

I finally found someone else with the same problem on gentoo forums, which is probably where I should have asked in the first place. Sorry about that.
The ultimate cause is apparently a known bug that has been identified and fixed upstream but hasn't yet propagated to my distribution The gentoo discussion and solution can be found here:.

https://forums.gentoo.org/viewtopic-t-1 ... f504fd7288

After applying the solution lxterminal starts and runs correctly, although it still warns about failure to bind on socket. It's not clear if this will help those
having this issue on a non-gentoo distro but it might give them a hint or two.

Thanks to all for trying to help, and for not yelling at me for posting in the wrong place.

Brett K. Heath
Locked