You are not logged in.
I have this command in my .xinitrc (before exec...) (to choose a display):
xrandr --output VGA1 --primary --output LVDS1 --off
Then, I tested with exec startkde and exec cinnamon-session and it is not applied (both displays are used). It works with exec startxfce4. I suspect kde and cinnamon reconfigure displays after X is started. LVDS1 is broken, so I can not fix this from within kde. How can this be fixed before X is started?
Last edited by Gradient (2016-03-29 01:04:28)
Offline
I don't really get your situation. Do you mean that the physical monitor LVDS1 is broken, that the DE defaults to this broken monitor and that because of that you can't interact with it once it has started?
Stupid question perhaps, but does it apply correctly if the command gets executed after the DE has started? If so, configuring your DE to autostart the command may help out. A more quick and dirty fix (if you only need it once) would be:
{ sleep 5; xrandr --output VGA1 --primary --output LVDS1 --off } &
exec startkde
The DE should start during the sleep, so you may have to increase the sleep time depending on how fast it gets started.
EDIT: If that doesn't work you'll have to dive into the DE's settings.
Last edited by Steef435 (2016-03-28 22:39:55)
Offline
I don't really get your situation. Do you mean that the physical monitor LVDS1 is broken, that the DE defaults to this broken monitor and that because of that you can't interact with it once it has started?
Yes, that is what I meant.
Your command also works and fixes my problem, except that I need to write is that way :
{
sleep 5; xrandr --output VGA1 --primary --output LVDS1 --off
} &
exec startkde
Any idea why I need linebreaks after and before { and }?
Offline
Use parenthesis instead of brackets, or put a semicolon at the end of the xrandr command and you will not need the newlines.
Curly braces is better in bash (no extra subshell).
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Ah, my bad, I'm a zsh user myself and didn't test it in bash properly (sh is still bash in my head). Glad to see you solved it.
Offline