You are not logged in.
Recently I decided to get rid of GDM because I only ever use Openbox on X and most of the time I work completely from the console, so it's a waste for X to stay running when I don't use it. I'd rather "opt-in" to an X session with startx than "opt-out" and have it continue using resources in the background.
I uninstalled GDM and added "exec openbox-session" to my .xinitrc file. Now startx pushes me into Openbox correctly, but whereas usually (with GDM) nm-applet connects me to my wireless network automatically when I log in, without GDM I have no such luck. I have to manually enter my WPA key every time, which is a pain because it's very long (untrustworthy neighbors).
I remember 3 or so years ago in Ubuntu with GNOME, I faced a similar problem that was due to GDM not correctly unlocking the GNOME keyring when I logged in. Is this the same issue? Is there something I could add to my .xinitrc that would prevent nm-applet from prompting me for my password every time?
Secondly, Crunchbang's default logout script depended on GDM and thus was also uninstalled. I reverted my menu.xml file to what I thought was the standard logout menu item for Openbox. It looks like this:
<item label="Exit">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>It drops me out of X correctly, but there is a graphical problem with the exit dialog:
Can I tweak that for readability? And what concerns me more is, when I'm dropped back into the command line after I exit Openbox, I get this error:
waiting for X server to shut down XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 17698 requests (17698 known processed) with 0 events remaining.
[12147:12147:3498526218:FATAL:app/x11_util.cc(64)] X IO Error detectedIs there something wrong with my X server that can be corrected? If the error message is actually of no concern, is there a way to suppress it?
I realize that's a lot of questions all at once, but they all seem to be spurred from this one change and I didn't feel right barraging everyone with posts by splitting them into separate topics. I'd greatly appreciate any advice you could give me.
Last edited by shazbot (2010-09-25 05:25:09)
Offline
You can use this script for shutdown/reboot/logout:
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import os
class DoTheLogOut:
# Cancel/exit
def delete_event(self, widget, event, data=None):
gtk.main_quit()
return False
# Logout
def logout(self, widget):
os.system("openbox --exit")
# Reboot
def reboot(self, widget):
os.system("sudo shutdown -r now")
# Shutdown
def shutdown(self, widget):
os.system("sudo shutdown -h now")
def __init__(self):
# Create a new window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Exit? Choose an option:")
self.window.set_resizable(False)
self.window.set_position(1)
self.window.connect("delete_event", self.delete_event)
self.window.set_border_width(20)
# Create a box to pack widgets into
self.box1 = gtk.HBox(False, 0)
self.window.add(self.box1)
# Create cancel button
self.button1 = gtk.Button("Cancel")
self.button1.set_border_width(10)
self.button1.connect("clicked", self.delete_event, "Changed me mind :)")
self.box1.pack_start(self.button1, True, True, 0)
self.button1.show()
# Create logout button
self.button2 = gtk.Button("Log out")
self.button2.set_border_width(10)
self.button2.connect("clicked", self.logout)
self.box1.pack_start(self.button2, True, True, 0)
self.button2.show()
# Create reboot button
self.button3 = gtk.Button("Reboot")
self.button3.set_border_width(10)
self.button3.connect("clicked", self.reboot)
self.box1.pack_start(self.button3, True, True, 0)
self.button3.show()
# Create shutdown button
self.button4 = gtk.Button("Shutdown")
self.button4.set_border_width(10)
self.button4.connect("clicked", self.shutdown)
self.box1.pack_start(self.button4, True, True, 0)
self.button4.show()
self.box1.show()
self.window.show()
def main():
gtk.main()
if __name__ == "__main__":
gogogo = DoTheLogOut()
main()Just add a line to your sudoers file like:
username ALL=(ALL) NOPASSWD: /sbin/shutdownOffline
And for the wireless connection, I would suggest configuring it manually and getting rid of network-manager and nm-applet.
*note* sometimes, your wlan0 or eth0 can be reported as UP at boot even though it isn't. Try adding this to /etc/rc.local (yes take the wireless card down twice)
ifdown wlan0ifdown wlan0ifup wlan0Now in your /.config/openbox/autostart.conf Change the wait time for nm-applet to come up, this will allow your card time to come up and THEN attempt a wireless connection first. (change 4 to 10)
# Launch network manager applet
(sleep 4s && nm-applet) &If you do need a gui to connect to the network, try Wicd. The autoconnect feature for nm-applet has never been 100% on most machines, especially with wireless.
If you don't like Wicd, you can just replace it with network-manager again.
Offline
sorry ii dont have an answer to your problems, but ccould you help me wwith deleting gdm and autostarting x?
maybe send me a pm about it 
thanks alot !
I once installed gentoo. It asked me for a sacrifice and would not install itself unless I gave him my neighbor's first born and my best bottle of Whiskey. -Awebb 2011
Offline
Thanks for all the advice, everyone!
Anon, that script looks fantastic. I'll try it out right away and report back if I have any problems.
Rich, I don't use Network Manager on my desktop, but on my laptop I hop around to a bunch of different APs that have those annoying click-through web forms to get internet access, and I find that I usually need to go to X to negotiate a connection anyway, so I leave it installed and use cnetworkmanager on the console when I'm on a friendlier AP. Actually, I quite like the way cnetworkmanager works, I've found it to be faster to get connected than doing it the old way in most cases.
Bolle, my X doesn't autostart when I log into the console, because usually I just run Emacs, check my mail, and start coding. If I want to browse graphics-heavy websites or play in Gimp or something else that requires graphics, I type "startx" to go to an X session.
To use startx just make a file in your home directory called .xinitrc and then put this line in it:
exec openbox-sessionIf you do want to automatically startx on login, you could set up your .bash_profile to run startx when you log in on tty1. This goes on the bottom of .bash_profile:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
logout
fiI ran across that snippet at the Arch Wiki a while ago and I haven't tested it but I don't see any reason why it wouldn't work for Crunchbang.
Oh, and to get rid of GDM just run this:
sudo apt-get remove gdmAnd of course if something breaks or you decide you don't like it, use install instead of remove to put it back. If you're running the default Crunchbang desktop with Network Manager like I am, you might also want to apt-get install a program called cnetworkmanager, which allows you to manage your connection from the console. If you mess up your .xinitrc and can't get into an X session for some reason, you can use cnetworkmanager to establish a network connection so you can reinstall packages from the net.
Offline
GDM also does some esoteric permissions stuff related to consolekit, hal, dbus, policykit... so life without it can be complicated.
I don't claim to understand it properly, but you might try using 'exec ck-launch-session openbox-session' in your .xinitrc.
It might just make a difference.
There isn't much documentation on all this, but to get dbus running it might also be necessary to add this to your ~/.config/openbox/autostart.sh
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fiTry googling ck-launch-session 
https://bbs.archlinux.org/viewtopic.php?pid=637913
https://bbs.archlinux.org/viewtopic.php?pid=744354
John Please help us keep your forums manageable.
--------------------
( a boring Japan blog , idle twitterings and GitStuff )
#! forum moderator
Offline
wow thanks so much guys! i kinda hijjacked this thread :S
sorry! 
I once installed gentoo. It asked me for a sacrifice and would not install itself unless I gave him my neighbor's first born and my best bottle of Whiskey. -Awebb 2011
Offline
Until I can figure out how to recreate whatever permissions-related things GDM sets up on login, I've reinstalled it. I've kept anon's logout script though. I like it.
I'm low on free time right now but I plan to do some research and come back to this problem. I know I'm probably not the only one for whom most of GDM's functionality is overkill.
Offline
I do actually agree,have same problem.
It do generate error when i started to make some set up GDM.
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.