LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xsession errors (https://www.linuxquestions.org/questions/linux-newbie-8/xsession-errors-881863/)

user89 05-20-2011 04:18 PM

xsession errors
 
I am getting xsession errors everytime i login.

The errors however seem to be related to glib.

Can someone please help me resolve it?

Error Log:
https://gist.github.com/8f3ba3ef9007a9d123bb

PhoenixAndThor 05-20-2011 04:55 PM

Looks interesting, let's get to the bottom of it. What is your GUI setup like? Do you use GDM/KDM/XDM (login screens) and what desktop environment are you using (Gnome, KDE, Xfce, etc)?

user89 05-21-2011 06:58 AM

Quote:

Originally Posted by PhoenixAndThor (Post 4362306)
Looks interesting, let's get to the bottom of it. What is your GUI setup like? Do you use GDM/KDM/XDM (login screens) and what desktop environment are you using (Gnome, KDE, Xfce, etc)?

Orignally gdm, .. Switched to xdm

Gnome Desktop Environment.
Have installed xfce but, do not know how to switch to it; Since no selection option during login, and after login there are no menus, taskbars, icons and no right-click menu.

PhoenixAndThor 05-21-2011 08:38 AM

Okay, XDM does not allow users to switch between Gnome, KDE, etc (last time I checked anyway). At this point, I'm going to assume that your system is only usable from the command line (and that your posting from a different machine). First, we need to figure out how to get you back into a GUI. At the XDM login screen, hold down the Ctrl + Alt and one of the function keys (F1 through F9). This should move you to a different virtual terminal (tty). When you get a login prompt, just enter your information as usual. Note that when it asks for a password, you will not see it being typed in. That's a security feature.

After that, type nano .xinitrc. Nano is a small editor run from the terminal, but it's easy to use (help is displayed at the bottom). .xinitrc is a file that, among other things, tells Xorg what to do when it starts up. For a great (but long) guide explaining what you can do with this file, go here:

Xinitrc - ArchWiki

I know it says it's for Arch Linux, but nearly anything else with Xorg works the same way. I recommend that you switch to a stand alone window manager like openbox (add exec openbox-session to .xinitrc). If you don't have openbox installed, just install it by running apt-get install openbox as root (either login as root or use sudo). After you get the .xinitrc file done, it's time to disable XDM. When you exit nano, run the command cd /etc/init.d/xdm stop as root. That should stop the XDM daemon and (at least in my case) move you another tty. Just switch back to whatever terminal you were using and run startx. You should see an empty screen with the mouse cursor. You should also have a right click menu and be able to launch programs. Anything not found in the menu can be launched by opening a terminal emulator (xterm, gnome-terminal, etc) and run the commands from there. Openbox may also come with a Run box and you can use that.

user89 05-21-2011 10:58 AM

Quote:

Originally Posted by PhoenixAndThor (Post 4362843)
Okay, XDM does not allow users to switch between Gnome, KDE, etc (last time I checked anyway). At this point, I'm going to assume that your system is only usable from the command line (and that your posting from a different machine). First, we need to figure out how to get you back into a GUI. At the XDM login screen, hold down the Ctrl + Alt and one of the function keys (F1 through F9). This should move you to a different virtual terminal (tty). When you get a login prompt, just enter your information as usual. Note that when it asks for a password, you will not see it being typed in. That's a security feature.

After that, type nano .xinitrc. Nano is a small editor run from the terminal, but it's easy to use (help is displayed at the bottom). .xinitrc is a file that, among other things, tells Xorg what to do when it starts up. For a great (but long) guide explaining what you can do with this file, go here:

Xinitrc - ArchWiki

I know it says it's for Arch Linux, but nearly anything else with Xorg works the same way. I recommend that you switch to a stand alone window manager like openbox (add exec openbox-session to .xinitrc). If you don't have openbox installed, just install it by running apt-get install openbox as root (either login as root or use sudo). After you get the .xinitrc file done, it's time to disable XDM. When you exit nano, run the command cd /etc/init.d/xdm stop as root. That should stop the XDM daemon and (at least in my case) move you another tty. Just switch back to whatever terminal you were using and run startx. You should see an empty screen with the mouse cursor. You should also have a right click menu and be able to launch programs. Anything not found in the menu can be launched by opening a terminal emulator (xterm, gnome-terminal, etc) and run the commands from there. Openbox may also come with a Run box and you can use that.

Thank-you for the detailed walkthrough.

Before logging in, i switched to Ctrl+Alt+F1, then i logged in while in commandline. Installed openbox. Created ~/.xinitrc using template on the page of Archlinux. added 'exec openbox-session', while commenting rest.

Executed /etc/init.d/xdm stop

executed startx.

It auto-switched to another desktop with gui. As you said, it was just desktop with mouse cursor. On right click menu-list was displayed.
But, none of the options worked, except for exit.

I switched to Ctrl+Alt+F1(while startx was still running) and it showed similar errors as before, the Glib ones.

I again switch to the GUI desktop using Ctrl+Alt+F7, selected exit option. It closed the session and took me back to the terminal desktop where i had executed startx.


Since, i already had xfce, i commented the exec open-session and added exec startxfce4 in ~/.xinitrc

Executed /etc/init.d/xdm stop

executed startx.

It took me to the GUI desktop. But, all i got a pixelled background and a 'X' which turned into a mouse cursor. No menus, No taskbar, no right-click menus.

While in that state, I switched to Ctrl+Alt+F1, and it showed the same Glib errors.


----------

I think my Glib is messed up possibly while resolving some dependency in the past. Is there a way to clean the current Glib & fresh install it?

PhoenixAndThor 05-21-2011 12:13 PM

Quote:

Originally Posted by user89 (Post 4362934)
I think my Glib is messed up possibly while resolving some dependency in the past. Is there a way to clean the current Glib & fresh install it?

Wow, I'm not sure. Perhaps running apt-get update and apt-get upgrade could do it. If not, then you may have to fire up aptitude, which is a CLI front-end to apt, sort of like Synaptic. I have little experience with it, but it does include some help. There is an entry in the Search menu to find broken packages. You can also purge packages, removing the package and all related config files.

Another thing that you could try with openbox is to make it start some kind of file manager when you log in. Just add the something like thunar & right above the exec line. At least then you could launch programs from the links found in /usr/share/applications. It could also be a configuration problem. Have you tried creating a new user account?

user89 05-22-2011 11:33 AM

Quote:

Originally Posted by PhoenixAndThor (Post 4362987)
Wow, I'm not sure. Perhaps running apt-get update and apt-get upgrade could do it. If not, then you may have to fire up aptitude, which is a CLI front-end to apt, sort of like Synaptic. I have little experience with it, but it does include some help. There is an entry in the Search menu to find broken packages. You can also purge packages, removing the package and all related config files.

The mess-up might have been due to manual installing of glib source files.
The search on apt-get, gives multiple packages for 'glib*'.

I do not want to complicate things more by removing important stuff.
Since, the version provided by the apt repo is older than the one i tried installing, i am doubtful whether it will be able to do the uninstalling.

Any idea what i should do to remove Glib & reinstall it?

PhoenixAndThor 05-23-2011 05:57 PM

Experienced user needed!
 
If anyone out there has significant experience with these kinds of problems, now would be the time to speak up.

@user89: I don't know about glib, you may have to track down every file that was created when you tried to install from source and either remove or replace them. This will be difficult because glib is one of those core libraries that a lot of stuff depends on. I have never tried messing with glib, so I can not provide any more help. The next time you attempt something like this, I highly recommend backing up the original files.


All times are GMT -5. The time now is 11:44 PM.