You are not logged in.

#1 2014-08-14 19:13:47

gay
Member
Registered: 2012-12-16
Posts: 93

[SOLVED] lxterminal failing to start shell

I have encountered a strange problem with lxterminal. Calling lxterminal opens the lxterminal window (including all the controls), but no shell is launched, the window is simply empty/black and does not react to keyboard inputs.

This is the same for every user except for root (i.e. "sudo lxterminal" works fine). However, copying root's lxterm config, /root/.config/lxterminal/lxterminal.conf , to the users' lxterm configs, /home/<user>/.config/lxterminal/lxterminal.conf , and chowning it to the respective user, does not help.

Deleting all lxterminal config files (/home/<user>/.config/lxterminal/lxterminal.conf, /usr/share/lxterminal/lxterminal-preferences.ui, /usr/share/lxterminal/lxterminal.conf) does not help.

Reinstalling (or uninstalling and and reinstalling) lxterminal does not help.

The problem does not depend on what window manager is used, occurs for both enlightenment and LXDE

journalctl -xb is silent about the problem.

Since I did not use lxterminal in a while, I have no idea since when the problem exists; might be since an update in February 2014, but I'm not sure.

I conclude that 1. the package is generally fine (it works for root), 2. the lxterminal specific configuration files are not the cause of the problem (removing the configs does not help; copying root's lxterminal.conf does not help), 3. the reason is probably some configuration that interferes with applications (systemd?,  mime?, ...)

Normally, I'd run the faulty program in strace or something, but since the window manager forks the proces when it creates a new window strace exits cleanly with exit code 0 and I'm still left with no idea what's happening.

Any suggestions on what might be the cause of this - or on how to approach this problem are greatly appreciated.

Edit: Marked solved.

Last edited by gay (2014-08-23 14:03:15)


We are exactly the people our parents always warned us about.

Offline

#2 2014-08-14 21:04:55

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] lxterminal failing to start shell

Does the same happen with lxterminal-git? Do you export anything unique in your profile sources? Do you use a composition manager? Could you test if the terminal is not taking any input by trying to play a sound? just write a command or an alias to play a sound. If it plays, lxterminal runs the terminal, but does not display it properly.

Last edited by emeres (2014-08-14 21:13:47)

Offline

#3 2014-08-14 22:23:41

gay
Member
Registered: 2012-12-16
Posts: 93

Re: [SOLVED] lxterminal failing to start shell

thanks, emeres, for the ideas.

Replacing lxterminal with lxterminal-git has no effect.

Removing ~/.bashrc and ~/.bash_profile has no effect, hence it should not be related to anything in the profile sources.

I do not use a composite manager.

Lxterminal does not play any sounds either.
In fact, ps aux reveals that it does not start a shell. instead it apparently starts an application gnome-pty-helper (to some otherwise known as the angel of death amongst the linux programs). I tried to look into what this program does and what it means. For details, see below, but I doubt that this is the reason for the current problem.

On sane systems (where lxterminal works fine, I have another system here to verify this) the lxterminal first starts a gnome-pty-helper instance and then (pid incremented by 2 more) finally the bash. On the system in question here, the latter step does not happen. As there are any numper of things that could potentially go wrong, it would be very desirable to be able to debug this, to reroute the STDERR and/or STDOUT of lxterminal into another shell or into an output file. But I have no idea how to do that (or anything similar).


Regarding gnome-pty-helper:

This program (gnome-pty-helper) resides in /usr/lib/vte/, according to the internet it helps to set environment variables for virtual shells and apparently also to keep track of how many virtual shells are open and what the currently highest allocated id number is (I'm not sure if this is correct). According to strace, the program does very little apart from sticking its nose everywhere (including into /etc/passwd and /etc/nsswitch.conf) and trying to close 2^10 non-existing files and collecting 2^10 times EBADF ('Bad file descriptor') from the kernel. Also, if you start it manually, it does not return cleanly, even on sane systems; you have to shoot it down with the SIGKILL signal. (However, killing the gnome-pty-helper instances started by lxterminal does not help making the lxterminals functional either; nor does it kill the lxterminals on sane systems, it just seems to have no effect at all.)

Last edited by gay (2014-08-14 22:25:16)


We are exactly the people our parents always warned us about.

Offline

#4 2014-08-14 22:30:04

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] lxterminal failing to start shell

Then I would go deeper into the dependencies: vte, gtk2, vte-common and so on. So I guess you also checked ~/.profile should it exist and /etc/profile[.d].

Offline

#5 2014-08-15 00:13:50

gay
Member
Registered: 2012-12-16
Posts: 93

Re: [SOLVED] lxterminal failing to start shell

~/.profile does not exist. Removing both /etc/profile and /etc/profile.d does not make a difference.

vte is a simple virtual terminal emulator (essentially what is started in lxterminal windows). It shows the exact same behavior as described for lxterminal above. It can be run in strace. Doing

strace -o vte.trace vte

for the sane and the not-so-sane system and comparing

cat vte.trace|grep open

reveals that in the latter case the last few files, it tries to access are

/usr/lib/libcanberra-0.30/libcanberra-pulse.la     (ENOENT)
/usr/lib/libcanberra-0.30/libcanberra-pulse.so     (ENOENT)
/usr/lib/libcanberra-0.30/libcanberra-alsa.la
/usr/lib/libcanberra-0.30/libcanberra-alsa.so
/etc/ld.so.cache
/usr/lib/libasound.so.2
/var/lib/dbus/machine-id
/home/<user>/.cache/event-sound-cache.tdb.<some long hex number>.i686-pc

In the other case, it never tries to access any files related to sound but proceesd to (try to) read /home/<user>/Xdefaults, a point to which it never gets on the system with broken lxterminal. My best guess would therefore be that gtk or vte (or something related) forces it to load/include/import/whatever something very unimportant that is related to sound at which point it hangs forever or fails. (I may be wrong with this.) Is there a way to prevent gtk from interfering with sound (in order to investigate this possibility)?

Thanks so far ...


We are exactly the people our parents always warned us about.

Offline

#6 2014-08-15 12:13:21

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] lxterminal failing to start shell

Do you use pulseudio? When I 'strace -e trace=file -o /tmp/vte.log vte' it does not look for canberra or asound libraries.

Offline

#7 2014-08-19 10:50:48

gay
Member
Registered: 2012-12-16
Posts: 93

Re: [SOLVED] lxterminal failing to start shell

sorry. I did not have internet access for a couple of days. sorry for the delay.

no, I use alsa, not pulseaudio. that's why it doesn't find the libcanberra-pulse libraries and returns ENOENT (bad file descriptor). it does apparently find and load the libcanberra-alsa libraries.

as said before, on the sane system, it does not attempt to accass any sound libraries at all. since I think audio support is not crucial for a terminal emulator, my next strategy would be to try to prevent it from using audio. since this can apparently not be configured at the lxterminal level, it inherits this apparently from gtk or something. I have, however, no idea which configs are responsible for this (and also if the reasoning behind this approach is correct).


We are exactly the people our parents always warned us about.

Offline

#8 2014-08-19 12:25:31

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] lxterminal failing to start shell

Do you see anything sound related in vte or vte-common PKGBUILD/'configure --help' output? I think this is something from outside, maybe desktop environment related? You mentioned gtk, take a look at 'pactree -d3 lxterminal'.

Offline

#9 2014-08-19 13:56:45

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] lxterminal failing to start shell

This might be a long shot, but use some kind of command runner to run "lxterminal -e sh," then check the output of the date command. I've seen this problem before, when the system clock and filesystem metadata aren't in sync.

Offline

#10 2014-08-21 00:52:34

gay
Member
Registered: 2012-12-16
Posts: 93

Re: [SOLVED] lxterminal failing to start shell

thanks emeres & ANOKNUSA.

lxterminal -e sh does not succeed in starting the shell either (therefore, there is no way to run the date command)

I do not have vte and vte-common from AUR - I have the standard packages. (Therefoe I don't have sources, configure, and PKGBUILD for these packages ... to my knowledge at least). Also since it works on other Archs, there should be nothing wrong with the standard vte / vte-common packages.

pactree -d3 lxterminal

gtk2
--atk
----glib2
--pango
----libthai
----cairo
----libxft
----harfbuzz
--libcursor
----libxfixes
----libxrender
--libxinerama
----libxext
----libxrender
----randrproto
--libxi
----libxext
----inputproto
--libxcomposite
----libxfixes
----compositeproto
--libxdamage
----libxfixes
----damageproto
--shared-mime-info
----libxml2
----glib2
--cairo
----libpng
----libxrender
----libxext
----fontconfig
----pixman
----glib2
----mesa
----mesa-libgl provides libgl
----bash provides sh
----lzo
--libcups
----openssl
----libtiff
----libpng
----krb5
----avahi
--gtk-update-icon-cache
----gdk-pixbuf2
----hicolor-icon-theme
fontconfig
--expat
----glibc
--freetype2
----zlib
----bzip2
----bash provides sh
----libpng
----harfbuzz
libx11
--libxcb
----xcb-proto
----libxdcmp
----libxau
--xproto
--kbproto
glib2
--pcre
----gcc-libs
----readline
----zlib
----bzip2
----bash
--libffi
--glibc
vte
--gtk2
--vte-common
----glibc

We are exactly the people our parents always warned us about.

Offline

#11 2014-08-23 14:02:40

gay
Member
Registered: 2012-12-16
Posts: 93

Re: [SOLVED] lxterminal failing to start shell

The problem has solved itself. No, actually it was solved by removing an old devpts entry from /etc/fstab

It seems to have been the same issue as was discussed here and here. Thanks everyone.

Last edited by gay (2014-08-23 14:04:01)


We are exactly the people our parents always warned us about.

Offline

Board footer

Powered by FluxBB