D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] lshw -html UPDATED

 

On Tue, 9 Feb 2010, tom wrote:

Gordon Henderson wrote:
On Mon, 8 Feb 2010, tom wrote:

tom wrote:
I've just run sudo lshw -html on a machine and a couple of thing popped up in red - one of which was the graphics chip which mostly works all right but one or two thing produce windows with graph paper or black
Anyone know how to dig deeper into this?
Tom te tom te tom

I'm not 100% sure but I think the red may be due to problems with the display driver. I found out how to fix it (in theory) but I've now come across a problem where I cant save Xorg.conf even as sudo! I dont want to change the ownership without setting it back to whatever it was before - does anyone know a little script that will save the file settings somewhere and then change them so sudo can edit and save the file and then write them back again?

If you

  ls -l

the original file, you'll get all the information you need to change ownership & modes after writing a new file.

Xorg.conf is fairly minimal these days though - it's unusual to need to fiddle with it - at least in the Debian world... I did do some fiddling on the laptop to get compiz going though.

Gordon

Its a 32 meg radeon - there is a known problem with it and the fix is to modify Xorg.conf to add
Option "RenderAccel" "off"

even under sudo editors wont overwrite the original file and its easy to make a mistake with resetting ownership/permissions so I though someone may know of a script to record its status and then reset it after modification.
I guess I'll have to write one!

Just ls -l the file, so:

  ls -l /etc/X11/xorg.conf

On mine, I see:

  -rw-r--r-- 1 root root 3433 Dec  1  2008 /etc/X11/xorg.conf

I have to say though - there is normally nothing special about the ownership and permissions of the various system files. In-general, they're read only by normal users, and read/write by root. That's all. The numberic modes for the file above is 0644.

But if you really can't write it, show the output of

  lsattr /etc/X11/xorg.conf

I get:

  ------------------- /etc/X11/xorg.conf

If you see a lower-case 'i' in the line of dashes, then it's write protected, even to root.

If you really can't modify the file, then stop mucking about with sudo and do a real su;

  su -

then you're really root and anything sudo might do won't get in the way. If you don't have su, then sudo /bin/bash will work. (FWIW, I don't even have sudu installed on any of my boxes, but that's just me, and Debian - if I have to type 4 commands as root, I'm not prefixing them with sudu!)

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html