[SOLVED] can't chmod /boot/config.txt to add lcd_rotate
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
New install of Debian 32 bit default distro on Pi 3b and need to rotate screen to suit 7"display. I can't make chmod take whatever su/sudo I use, eg if I
sudo chmod o+w config.txt -v
it reports mode changed from 0755 0757 but ls -l shows it has not changed and I can't save changes.
I realise I am probably setting myself to look a proper plonker but I have run out of ideas.
Was the partition that config.txt is on mounted as root? Can't you write to that file as root? Can root create/delete files on that partition? Copy config.txt to somewhere, edit it, then rewrite the new config.txt.
On a FAT32 file system example:
Code:
sudo mount -t vfat /dev/sdb1 ~/mount/point
sudo touch ~/mount/point/config.txt
Root can write to config.txt. FAT32 doesn't support file permissions though.
Sorry I don't know about partitions and mounts, it is just the default on a new Debian install on a raspberry pi3B.
After su -l I was able to copy a previously edited copy of config.txt back into /boot it doesn't however have the desired effect ie the screen is still upside down, I guess this a specifically pi issue.
I can indeed edit config.txt as suggested but it still didn't change the screen orientation. There must be hundreds of posts giving this as the solution.
SOLVED - there is a utility in the gui under Preferences, Screen Configuration, Configure, Screens, DSI-1, Orientation where Inverted is an option.
Doesn't help if you don't want the gui mind.
there is a utility in the gui under Preferences, Screen Configuration, Configure, Screens, DSI-1, Orientation where Inverted is an option.
Doesn't help if you don't want the gui mind.
If it survives a reboot then it needs to be saving that setting somewhere.
You can verify whether somewhere is config.txt by duplicating the file, toggling the setting, maybe rebooting, then checking if/how the file has changed.
Its failure to work may be because you're (possibly?) running stock Debian, and /boot/config.txt is a Raspbian-specific setting?
Please clarify exactly what version of Debian (and desktop) you're running. (inxi is a convenient tool for that.)
In any case, searching the relevant source repository for "orientation" or "inverted", and following what it does, may reveal where it's actually saved.
Since it's a wrapper, that explains why it might not contain orientation/inverted itself, but its code does have a save_configuration function, the relevant part of which is:
In other words, lxrandr probably saves to "/home/$USER/.config/autostart/lxrandr-autostart.desktop"
If so, that change will only come into effect after login - it you have a login screen which is correctly oriented then it would need to be something not user-specific, possibly in "/etc/xdg"
Thank you boughtonp, my autostart directory only contains a file LXinput-setup.desktop which I think was written when I used LXinput and a Coordinate Transformation Matrix to get the touchscreen in sync with the display - always handy!
I am content that what I have works correctly now even if the method is probably not the best or most efficient.
If continuing this discussion might prove useful to others I am happy and interested to proceed, my problem being that a lot has changed since my SVr4 course in 198?
The login screen is correctly oriented but everything prior to that is inverted.
No recent files in /etc/xdg apart from some in lxpanel from intallation 2 days ago.
If the login screen is the first point it's correct then my understanding is that the display manager is where it would be handled - for LXDE that would be LXDM, and man lxdm lists relevant files as being in "/etc/lxdm/"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.