openbox --exit dumps me to a logged in root shell that ignor

Please post all general support questions for LXDE here.
Locked
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

openbox --exit dumps me to a logged in root shell that ignor

Post by Lew_Rockwell_fan »

With Ubuntu 14.04, 64 bit, installed from the mini.iso with xorg, openbox, lightdm, lightdm-gtk-greeter, thunar and some other stuff added. So, not, strictly speaking, the full LXDE DE, but similar, and other than Thunar, a bit lighter. But there is no Openbox forum per se, so I'm asking here.

Everything worked fine until recently but suddennly

Code: Select all

openbox --exit
shuts down the openbox session as expected but instead of a lightdm/lightdm-gtk-greeter gui login screen as usual, x is shutdown and I get dumped to tty 7, already logged in as root, judging by the prompt. But it is oddly non-responsive, refusing to notice any letter keypresses. It will respond to cntrl-alt-Fn to switch to another tty normally and it will reboot in response to cntrl-alt-del. I can, without rebooting, switch to another tty, login as user, and startx and then I have a normal openbox session. If I use

Code: Select all

openbox --exit
again from that session, the same thing happens except I'm dumped to a tty in which user is logged in and that tty accepts input normally. I tried

Code: Select all

openbox --exit > afile
both from a windowed terminal in the openbox session and from a tty. They make a 0 byte file with no content.

The last thing is tty 7 is:

Code: Select all

Bash: Cannot set terminal process group (1015): Inappropriate ioctl for device
Bash: No job control in this shell
I don't see anything odd in /var/log/boot.log or dmesg.

Any ideas on how I can figure this out or what might be wrong?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: openbox --exit dumps me to a logged in root shell that i

Post by drooly »

root prompt? oddly unresponsive? maybe it just wants you to login with your usual credentials.
if you indeed are logged in already, simply type "whoami" (oh, the beauty of unix) and you will know whether you are root or not.

are you sure lightdm or in fact any login/display manager is installed? if yes, maybe it's just sitting there and not being used? meaning, you just start X with startx?

that said, i have seen some forum thread where someone experienced problems starting an Xsession, but only the first time - the 2nd time would work nicely.

openbox has its own log files, or you can start it with sth like "exec openbox > logfile"
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

Re: openbox --exit dumps me to a logged in root shell that i

Post by Lew_Rockwell_fan »

Thanks for your time, Drooly.
drooly wrote:root prompt?[/b] Yes. Perhaps you call it something else. I should have been explicit. Like this:

Code: Select all

root@trm:/#
which to me means root is logged in and $PWD is /.
drooly wrote:oddly unresponsive?
Yes. As in:
Lew_Rockwell_fan wrote: refusing to notice any letter keypresses. It will respond to cntrl-alt-Fn to switch to another tty normally and it will reboot in response to cntrl-alt-del.
In other words, the ONLY keystrokes I've found that elicit ANY response from tty7 are the 7 combinations I mentioned:
Cntrl-alt-F1
Cntrl-alt-F2
Cntrl-alt-F3
Cntrl-alt-F4
Cntrl-alt-F5
Cntrl-alt-F6
Cntrl-alt-delete
All of those elicit the normal responses, shifting to a different tty in the first 6 cases, rebooting in the last case. No other keys cause any response at all. No keys, no keys at all, cause any change in what is displayed on tty7. No additional characters appear after the root prompt. Tty7's display appeared frozen.

But, since I posted I've discovered another wrinkle. If you just wait long enough (I haven't timed it, but presumably 120 seconds) 3 more lines appear:

Code: Select all

[481.838217] INFO task Xorg:1188 blocked for more than 120 seconds
[481.838272] Not tainted 3.13.8-32-generic #57 Ubuntu
[481.838302]"echo 8 > /proc/sys/kernel/hung_task_timout_secs" disables this message
And after a longish interval (again, I didn't measure, but I presume 2 minutes) those same 3 lines are repeated. And after a similar interval, again, presumably ad infinitum.

Before I was assuming that Openbox was shutting down and failing to restart. Now I'm wondering if

Code: Select all

openbox --exit
caused x itself to shutdown and it's x that isn't restarting. I'll search for that message in boot.log or dmesg. Maybe knowing better what to look for this time I"ll find something.
drooly wrote:maybe it just wants you to login with your usual credentials.
I don't think so. In that case I wouldn't have a root prompt. Instead I'd have:

Code: Select all

Ubuntu 14.04 LTS trm tty7
trm login:
And when I pressed the enter key it would ask for a password. Neither of which is the case. I can login as root or user in ttys 2, 3, 4, or 5, but tty7 doesn't respond to anything I do with the keyboard other than the 7 cntrl combinations mentioned above. tty 1 had something going on in it, which didn't look germane to me at the time, but I'll look at it again.
drooly wrote:. . . simply type "whoami" (oh, the beauty of unix) and you will know whether you are root or not.
Neither "whoami" nor "logname" (strictly I should say neither "whoami [enter]" nor "logname [enter]" cause any response at all in tty7. Nothing I type causes any characters to appear on the monitor. No combination of letter keys and enter cause any response at all. But I can't see any reason to doubt the prompt, which is clearly SAYING I'm logged in as root.
drooly wrote:are you sure lightdm or in fact any login/display manager is installed?
Yes.
drooly wrote:maybe it's just sitting there and not being used? meaning, you just start X with startx?
No. I should have said that this isn't a system I just installed. I've been useing it for a while. I've tweaked the lightdm config files considerably, adjusting colors, font size, etc. When I boot I log in with a pretty graphical dialogue with each keystroke of the password showing as an asterisk in a text entry box. I only use startx if something is screwed up. BUT --- AHAA! Good question. You may have pushed the right button in my brain. This COULD be a problem with the lightdm-gtk-greeter. I've been useing a bleeding edge beta from a ppa from one of the devs. It's worked so well I've quit giving it much thought but it does update pretty frequently - maybe the last update broke it. I'll check that.
drooly wrote:i have seen some forum thread where someone experienced problems starting an Xsession, but only the first time - the 2nd time would work nicely.
I should be so lucky. This has persisted through multiple reboots, cold and hot.
drooly wrote:openbox has its own log files
I didn't know that. I'll look for them. Might be some other relevant logs I haven't looked at, come to think of it. Maybe the greeter even keeps one.
drooly wrote: . . . or you can start it with sth like "exec openbox > logfile"
Ah. I see the distinction. Good idea. I'll try that.

Thanks, Drooly. You've given me several good ideas. I'll report back,
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: openbox --exit dumps me to a logged in root shell that i

Post by drooly »

thinking of the unresponsiveness of tty7, i think this:
Lew_Rockwell_fan wrote:

Code: Select all

Bash: Cannot set terminal process group (1015): Inappropriate ioctl for device
Bash: No job control in this shell
is the corresponding error message.
it might even have something to do with your login manager.

but why it drops you to a root prompt i can't imagine. you are not running some sort of puppy-linuxish setup?
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

Re: openbox --exit dumps me to a logged in root shell that i

Post by Lew_Rockwell_fan »

drooly wrote:thinking of the unresponsiveness of tty7, i think this:
Lew_Rockwell_fan wrote:

Code: Select all

Bash: Cannot set terminal process group (1015): Inappropriate ioctl for device
Bash: No job control in this shell
is the corresponding error message.
it might even have something to do with your login manager.
Yes, on both counts I suspect. I tentatively believe that error is near the heart of the matter. There is a Debian bug,
https://bugs.debian.org/cgi-bin/bugrepo ... bug=659878
that I don't entirely understand that gives pretty much the same error message. It involves a command for gaining root priveleges I haven't heard of - "sux". (I'm trying hard not to get distracted by the possibilities for very impolite puns about bad programming involving root and sux.) I gather, there was a command running in a terminal with root priveleges and that terminal was somehow vulnerable and their Q & D solution solution to that security problem created a different problem they accept for the moment as the lessor evil. The package involved is "login" which Ubuntu apparently uses with little or no modification because Synaptic shows the package's homepage to be at debian.org. And that package IS installed. I suspect lightdm may depend on it. I haven't checked that yet. And since this is happening when I SHOULD be getting a login screen, that sounds like the culprit.
ADDED LATER: Synaptic says login consists of "system login tools" that "are required
to be able to login", so apparently it's essential.

I've eliminated the greeter, or at least anything specific to the particular bleeding edge version of the greeter. I reinstalled the Ubuntu repo version and the problem is unchanged.
drooly wrote:but why it drops you to a root prompt i can't imagine.
I guess at least one of the programs running login, probably "login", must be running as root and what I'm seeing in tty7 is that program stuck in an endless loop waiting for something that never happens, probaby something that used to happen in the process the devs shut down for security reasons. That suggests some experiments I haven't tried yet but will shortly.
EDITED IN LATER:
I wasn't sure if I had tried cntrl-c or cntrl-z to see if maybe they could break
whatever is going on in tty7 out of it's loop. Now I have. They don't. No response.
drooly wrote:you are not running some sort of puppy-linuxish setup?
I know OF Puppy, but not much ABOUT it, so I can't say if my setup is puppyISH. I started with the Ubuntu 14.04 mini.iso which basically gives you a working bash, apt, and very little else. I added xorg, lightdm, the greeter, openbox, thunar and a bit of this and that. Kind of like Lubuntu on a diet.

Thanks for your thoughts, I'll report back.
=========================
Added later:
At this point I'm 80% convinced the problem is derived from the aforementioned bug in login. If so, probably the best thing I can do for now is to reboot on those occasions when I would have logged out to check the effect of some change I've made and figure they'll fix it eventually. I might think differently after I've slept on it. The only thing I have trouble squaring with this model is that I haven't run across other people mentioning this same problem.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: openbox --exit dumps me to a logged in root shell that i

Post by drooly »

not everything that is broken is a bug.
have you searched that (almost) exact error message? like: "Bash Cannot set terminal process group Inappropriate ioctl for device"
something buzzes in my head, saying "the shell is not configured properly" and maybe lightdm is responsible for that.
but that's really just an inkling.

btw, i think sux just means "su" for "X". i don't see how lightdm would depend on that.

"puppyish": puppy linux devs had the great idea that having a root account and a normal user is bloat, and have set up a whole distro that runs as root, including X. totally not recommended, esp. not if it's not puppy linux.
i thought i'd ask since you said that you built your own.

edit: just had a look at your bug report which you probably found by searching as i suggested, sorry.
anyhow, afaiu they say it's not really about sux but about certain use cases of "su".
Locked