LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I exit Black Box?!? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-exit-black-box-159850/)

in2jesus18 03-19-2004 11:43 AM

How do I exit Black Box?!?
 
Hey guys,
I installed linux yesterday and was fooling around with themes and environments and made the mistake of trying to use "Black Box." Now I cant get out of it because the only menu is from the right mouce click and it just has programs (a graph editor, games, etc) and I cant for the life of me figure out how to log off of it and use a different environment (or whatever they are called).
HELP!
How do I exit it?
Thank you,
Stephen

slakmagik 03-19-2004 11:51 AM

There should be a sort of 'system' menu at the bottom. If not, add
[exit] (Exit)
to the menu? - (That's flux, but blackbox is the same/similar, iirc.)

Or ctrl-alt-backspace? And usually you can switch wm's from the menu. Or you could open an xterm, 'ps ux | grep blackbox', kill it by PID, and then restart another wm from the xterm. All your window decorations will go away and then new ones will get drawn, is all. :)

in2jesus18 03-19-2004 11:58 AM

hmm,
Thanks for the quick reply! However, I used linux only once several years ago and this is my first time since. I dont know my way around anymore. Do you have a minute to explain how to do what you just said?
Thank you Very much!
Stephen

in2jesus18 03-19-2004 12:19 PM

I tried the alt-ctrl-backspace and it got me to a terminal type screen. I entered my admin user name but i dont know what to do from there. Also, I hit ctrl-alt-F(1-9) and they all did different things (most took me to the terminal again) but again I do not know what to do from there.
I dont know linux, like I said, but I tried different commands (kill, exit, etc) and all I can do is to get it to shut dont (from the terminal) but that is all. when I reboot it goes right back to blackbox,
Thank you,
Stephen

slakmagik 03-19-2004 12:28 PM

I don't know what's wrong with me today. (Or in general.) What distro are you using and what runlevel are you in? (I should have asked this first. Sorry.) I mean, when you hit ctrl-alt-backspace, do you end up at a console or at a graphical login? Does X restart immediately or do you issue 'startx' to do so?

(I was going more for the menu edit thing, but ctrl-alt-backspace does stuff, too.) ;)

in2jesus18 03-19-2004 12:38 PM

I am using Mandrake 9.2 (i believe!). Im sorry, I dont know what you mean by Run Level:(
ctrl-alt-backspace only blanks the screen for about 5 secs then goes back to blackbox. If i hit those keys a couple of times in a row then I go to a blank screen (much like dos) when text in the top left corner. When I log in (still all in text, no graphical interface) its just like a terminal i guess because it reads something like Root$Admin- (or something like that)
I asume "X" is that graphical insterface? I do not do anything with "stratX" I asume you mean at a terminal? Everything goes automatically, i turn on the pc and i just choose between winxp or linux, then it boots right to xp or blackbox. At one point i used to have to option to choose login names and environments. but not anymore
Thank you,
Stephen

slakmagik 03-19-2004 12:50 PM

I want graphical runlevels banned.

I'm confused. You're doing all this as root without a password or something? It should be impossible to boot directly to a GUI without even a login.

Okay, somebody who knows Mandrake's graphical runlevel process would have to tell you how to fix this correctly.

I'd say to hit 'ctrl-alt-F1' - or do whatever you said got you to a console if that doesn't work. I'd edit /etc/inittab and change this line:
id:5:initdefault:
to this:
id:3:initdefault:
Then I would create a normal user and assign root and myself a password. At that prompt, issue 'man useradd' and then 'useradd' (I'd do adduser, but I'm pretending I'm on Mandrake). Then I would edit ~/.xinitrc to say what I wanted it to say. Change the last line to 'exec window-manager-I-want'. (If it doesn't exist, do 'cp
/etc/X11/xinit/xinitrc .xinitrc'). Then I would reboot, login as normal user at the console, and then issue 'startx' to start the window manager of my choice.

That's just what I would do, but you probably shouldn't actually do it.

How did you get blackbox recognized to begin with? How did you switch to it in the first place? The usual thing is that it shows up on your GUI login menu. You select it. You play around. You choose 'exit' from the menu. You go back to your login screen and select a different one. What did you do and where did it go wrong?

in2jesus18 03-19-2004 12:58 PM

lol, thanks for your help. Im more confused than you.
I do not need a password because when I installed it yesterday I set two users both without passwords.
I got into blackbox by going to configuration (while already logged in, not at the login screen) and chosing the different styles/environments/whatever they are called. I only clicked on BLack Box because the name sounds cool :) I hate black box.
You know, I may just reinstall it because I have dont hardly anything to it so I wont lose anything and will probably only save time but why would it be this hard just to change graphical interfaces?!? There should be an Exit icon!
Thanks for your help. I supose I will try stuff out over the weekend and then reinstall it monday if I cant get anywhere. I figure I shouldnt give up because I am sure I will learn linux faster the more problems I run into.
Thanks again, let me know if you get any more ideas or if anyhing i said now makes sence!
Stephen

slakmagik 03-19-2004 01:11 PM

Well, you should definitely have passwords on all your accounts. (It should still take you to a login, even if all you have to do is hit 'enter'. You still have to identify yourself to the system unless your whole login/getty process is messed up.

So basically, some GUI tool offered you a wm but, when you get there, your GUI tool is gone and you can't get back. I see. But there is (or should be) an exit entry in the blackbox menu. (I've been writing this all along based on your first request for me to explain what I said, but events got a bit beyond this. But I'll post it anyway, if it'll help later. I don't think you at all need to reinstall by any means, but if you want, it's your call.

Anyway - as far as what I was saying: (I'm describing fluxbox but they're very similar - usually identical, so just allow for what adjustments are necessary). The fluxbox menu takes data from a file in a hidden directory in my home directory. That's ~/.fluxbox/menu. To control what appears on the menu, I edit the file with a text editor. So if you can get to a text editor from the menu or from an xterm, mine looks like this at the end:
Code:

[submenu] (Window)
      [restart] (icewm) {icewm}
      [restart] (pekwm) {pekwm}
[end]
      [exec] (Lock Screen) {xlock}
      [commanddialog] (Fluxbox Command)
      [reconfig] (Reload config)
      [restart] (Restart)
      [separator]
      [exit] (Exit)
[end]
[end]

If yours has the name of another window manager or an 'exit' entry, then that's what you want to switch window managers. You should see those words - or words like that - in (parentheses) on your menu. Just click that part of the menu. If it doesn't, you could try adding those lines.

As long as ctrl-alt-backspace isn't trapped to do something weird, that key combination sends a signal to kill the X server, which will exit your window manager and X and everything and dump you back at a console if you used 'startx' or should (not sure, it varies) take you back to your GUI login where you can select a different window manager.

As far as the 'ps' thing - when you start a window manager, you're starting a process. The ps command lists processes. 'ux' just gives certain flags - you can use several to control the output. 'grep' searches for lines containing a match. So 'ps ux | grep blackbox' shows you the running processes named 'blackbox'. In column 2 is a number. That's the PID (Process ID). 'kill' is a command that stops that process. So 'kill PID' stops blackbox. If you started an xterm in ~/.xinitrc, it's independent of blackbox - and that's usually what you do in an .xinitrc script. The xterm will remain when blackbox goes. So then you can issue 'icewm' or 'startkde' or whatever and start a replacement process. The new window manager will draw its own borders and display its own menus and everything's dandy. (The xterm, aterm, eterm, console, terminal emulator - however it's described) being an applications which emulates a terminal and gives you access to your shell.)

And a runlevel is a description of how your system is running. If you boot as root into single user mode... which, come to think of it, it sounds like what your doing, except that X shouldn't be able to start - you're in runlevel 1. If you've executed the scripts to be running normally and booting to a console you're in the runlevel that starts those scripts - usually runlevel 3. If you boot directly to a graphical login you're in runlevel 4 or 5. If you are halting or rebooting, you're at runlevel 0 or 6. In Slack, an rc.0 script executes the commands necessary to halt the machine. In Mandrake it's probably a directory of symlinks. There are other runlevels and they can vary as to what they do. Basically, whatever inittab lists as the default runlevel determines what scripts will be run at boot which governs the condition of your box. That's the runlevel.

Little if any of this really has anything to do with your problem, it seems, but you asked. :)


All times are GMT -5. The time now is 03:32 AM.