4

I am a new user of Ubuntu and I was trying to find my xorg.conf. I used

find / -name xorg.conf

but it says "permission denied" like in this image. What can I do to get the permission?

https://i.stack.imgur.com/yFIZ8.jpg

4 Answers 4

3

Use sudo:

sudo find / -name xorg.conf 

sudo allows a permitted user to execute a command as the superuser or another user.

For more info:

man sudo

(you can quit with Q)

2

You are getting all those "permission denied" messages because the directories are not readable by you and you are not running as root. xorg.conf would be in a readable/traversable directory anyway (/etc/X11), so if you didn't find it, it doesn't exist (but read on). If you don't want to see all the permission denied messages, just redirect stderr to /dev/null (2>/dev/null)

Modern Xorg servers do not really need an xorg.conf. If you must have one, run Xorg -configure (relevant man pages: Xorg(1) and xorg.conf(5)).

2
  • So, if i want to change my screen resolution to 1280x1024 how should I do?
    – Adrian
    May 16, 2015 at 18:22
  • @Adrian Please make a new question to get an answer to. New questions in a comment are confusing. ;c)
    – A.B.
    May 16, 2015 at 18:25
1

You are getting all those "permission denied" messages because the directories are not readable

Try:

sudo find -perm -a+r / -name xorg.conf

-perm -a+r means that the current user (which is root once sudo is taken), its group and others must all have read permission

0

Direct Answer: Use sudo to run with administrative privileges. More precisely, as described in the man page: "sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy."

sudo find / -name xorg.conf

Best Answer: Use locate instead.

locate xorg.conf

Cool Answer: add 2>/dev/null at the end to discard error/warning messages. -iname is cool because it makes the search case insensitive.

find / -iname xorg.conf 2>/dev/null

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .