How do I xrandr -x in Recovery mode?

If none of the more specific forums is the right place to ask

Re: How do I xrandr -x in Recovery mode?

Postby Bloom » 2019-09-05 18:56

Code: Select all
# dpkg-reconfigure xserver-xorg-legacy

And select 'anybody' for 'allowed users'.
User avatar
Bloom
 
Posts: 193
Joined: 2017-11-11 12:23

Re: How do I xrandr -x in Recovery mode?

Postby debian121212 » 2019-09-05 23:36

Bloom wrote:
Code: Select all
# dpkg-reconfigure xserver-xorg-legacy

And select 'anybody' for 'allowed users'.


From recovery or from normal log in? Any?

This safer than just using a straight superuser startx from recovery? Why shouldn't I just startx from default superuser recovery/ why you say startx should be run as normal user?

No security compromised?


Also, as per https://unix.stackexchange.com/questions/101930/how-to-run-startx-as-non-root, login not possible like this in recovery bc it sais that logging in is not allowed yet.

I think an issue is that people login as root, then switch users using su -l username, which creates/spawns a subprocess under root owned by "username". X will use the .Xauthority of the top process (in this case root), which "username" does not have permission to use.

The error will be shown:

Cannot open virtual console 1 (Permission denied).

To solve this, just run login instead of su to start a new shell as a top process.


(unfortunately can't be used in recovery bc it gives the not allowed yet message)
User avatar
debian121212
 
Posts: 67
Joined: 2019-01-03 01:34

Re: How do I xrandr -x in Recovery mode?

Postby debian121212 » 2019-09-06 04:03

Bloom wrote:
Code: Select all
# dpkg-reconfigure xserver-xorg-legacy

And select 'anybody' for 'allowed users'.


After my previous last post, I decided to go ahead and venture into it on my own figuring I could then reconfigure it if any issues. Seems that the dpkg reconfiguration can be started from normal log in or from recovery and stays the same until changed from whichever. I tried every combination of performing that action that came to mind. Here are my attempts:

1.Logged in normally as usual. In the normal log in, I open terminal and use
Code: Select all
sudo dpkg-reconfigure xserver-xorg-legacy
(then changed it to anybody) as normal non super user. Then I rebooted into recovery, and tried to sudo USER (change into normal user), naviagate to home (~ directory) and from there tried the startx as the non super user. Gave the exact same console permission denied as in previous pics.

I then logged in normally into my normal desktop and dpkg-reconfigure to allow console users only again as it was before tampering with it in the first place.

2. Second attempt I go straight into recovery from the GRUB boot process. In there I changed to normal user, went to home, ran the reconfigure so that anybody can start x, and tried to startx. Gave the exact same console permission denied as in previous pics as well.

3. Tried the same as second attempt however this time I just run sudo startx at the end and it worked. Then I realized that I didn't need to reconfigure dpkg for this to work and also that doing it this way seems to defeat the whole purpose as we don't want su involved in starting X.
User avatar
debian121212
 
Posts: 67
Joined: 2019-01-03 01:34

Previous

Return to General Questions

Who is online

Users browsing this forum: No registered users and 16 guests

fashionable