0

I use Slax Linux as a Live Linux on a USB drive and I have a problem with multiple monitor configuration.

My computer has two screens, this is the output of xrandr:

Screen 0: minimum 320 x 200, current 3200 x 1200, maximum 16384 x 16384
DVI-I-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-I-2 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02*+  75.02  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

When Slax is started, it looks like this: (50% scale) Screenshot 1 Which is perfect, except, to get the mouse on the left screen, I have to move it out of the right of the right screen. So I want to switch the screens. First I tried:

xrandr --output DVI-I-1 --auto --output DVI-I-2 --auto --left-of DVI-I-1

Now the mouse moves the right way, but the screens look like this:

Screenshot 2

If I do instead:

xrandr --output DVI-I-1 --off --output DVI-I-2 --off
xrandr --output DVI-I-1 --auto --output DVI-I-2 --auto --left-of DVI-I-1

It seems to work at first, my screens looks like the first picture and the mouse moves okay. But when I click on the four squares to start a program, the screens look like this:

Screenshot 3

How can I switch the screens and get FluxBox (version 1.3.5) to work normally? Note that I'll be using this installation on different computers, so I don't want any permanent configuration, just a few lines of code that I can run after startup when I'm using this particular computer. Editing of configuration files is allowed though, Slax uses a temporary file system and changes will be lost on reboot anyway.

0

I figured it out. Rubber duck debugging at its best. Found it here.

The solution is to change ~/.fluxbox/init permanently. Change session.screen0.allowRemoteActions: false to session.screen0.allowRemoteActions: true. FluxBox needs to be restarted for this to work, or simply do a reboot.

Then, when needed FluxBox can be restarted after a xrandr command. In my case:

xrandr --output DVI-I-1 --auto --output DVI-I-2 --auto --left-of DVI-I-1
fluxbox-remote restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.