If you’re like me, you change things constantly in your linux desktop. I’m always entering in and tweaking .conf files to see what I can do and where the limits of things might be. In my attempt yesterday to get my EXACT monitor supported in PCLinuxOS, I hosed my xorg.conf file which is where all the Xsession settings (or Xwindows session) are stored (like mouse, keyboard, monitor, and graphics driver settings). Since I hosed this up, my graphical user interface and window manager would not start. So I was dropped to login via the shell. This might be daunting for some new users in Linux so I figured I’d write up this little how-to that would get them back on their feet.
First, don’t be intimidated by the shell. It’s more powerful than a cmd line in windows and you’ll have complete control of your computer from the confines of this awesome tool. Plus, you’re about 15-20 seconds away from having your desktop back up and running by executing only a few commands.
In order to fix your xorg.conf file, it’s important that we become root…so login as root and let’s fix your xorg.conf file in 4 commands.
First, let’s get to the right directory to work with xorg.conf:
[root@lostmain ~] cd /etc/X11
Next, let’s remove all xorg.conf files and any backups (usually saved as xorg.conf.old or xorg.conf.bak) with the next command:
[root@lostmain X11] rm -f xorg.conf*
The -f flag forces the deleting of the files without prompting and the * means that we’ll delete any file that starts with xorg.conf. That means xorg.conf.bak and xorg.conf.old will be deleted right along with our original xorg.conf file as well. Now let’s fix this by using the shell PCLinuxOS Control Center. That’s right, you don’t have to have KDE fired up and running to access the PCLinuxOS Control Center…you can do it right here:
[root@lostmain X11]mcc
Now use arrow keys to go into hardware and configure the display. When choosing a monitor, the quickest and easiest way to get back into a GUI is to use the “Generic” setting. I chose Generic 1280X1024 @ 76 for my Samsung Syncmaster 710N 17″ LCD screen. Next up, If you have the ATI or Nvidia driver installed, it will ask you if you’d like to use it (choose yes). It will then ask if you’d like to change any options…the default is usually ok. Now it will take you in to test the configuration. If you see the rainbow test screen, you’re set. If not, you’ll have to change things (normally resolution) until you’re able to see it. The test screen will ask you if you’d like to use the settings it is using to test the screen…hit yes (it might be “ok”, I’m going from memory here) and you’ll be dropped right back to the shell.
Now we could just start kdm/xdm and an Xsession here…but it’s much easier for new users to simply reboot so:
[root@lostmain X11] reboot
Next time you start up things should be back to normal. Isn’t it nice to be able to have quick resolution to many Linux problems via the PCLinuxOS Control Center? What a great tool!
That was one of the main reasons I chose PCLinuxOS over other desktops…it has the PCLinuxOS Control Center available for me to configure samba, groupware, LDAP, Printers, etc….pretty much anything I need to configure in Linux is ready and waiting for me in this fantastic control center. It usually puts new users at ease as well since they’re used to the control panel in Windows. I know when I was first introduced to Linux I noted that there was not a central place where I could control all things Linux (although /etc in Slackware is handy 😀 ). This Control Center puts all other distros to shame it’s so complete. Plus, if you’re missing anything…a quick word to the devs and chances are you’ll see it included very soon. So get used to that PCLinuxOS Control Center!! Remember that you can call it via the shell as well with the pcc command. Hopefully, this little tip has been helpful to you.
Thanks a lot for the blog. I am really new to linux and your blog helps alot.
I hope that you keep writing since I have bookmarked you.
Thanks for reading! I hope this blog helps you out!
hi devnet, im sorry about, that the linuxlog dont refresh the content. you gotta post some new blog entrys 🙁
Excellent info. What screen environment is pcc running in in the above situation? X cannot be runnning at all I guess? so is it curses or some other text env?
It's curses…and it has switched to the 'mcc' command in later versions of pclinuxos 😀
Thanks, this really helped me out.