I am programming my keyboard shortcuts in awesome wm. At the moment I use qdbus to control media players and they all work except for full screen of vlc. The command I use is:

qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Fullscreen

This works to get the boolean value of the full screen status but should also be able to set it, what I already did is the above command followed with true/false (and a couple of variations on them) but it always gets interpreted as false.

CanSetFullscreen has value true

  • I have neither of awm, qdbus or vlc installed so just shooting in the dark... You could try with: qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 Fullscreen true assuming CanSetFullscreen is true. – don_crissti Jul 25 '15 at 16:35
  • @don_crissti you would think so, I tried true, True, TRUE, t, T, 1, boolean:true, ... all I could think of, and if the value was true to begin with it changes to false, so it does do something. I will change my question with this information. – switch87 Jul 25 '15 at 16:51
  • If you introspect the object is there a property called "CanSetFullscreen" ? If so, is it set to true or false ? – don_crissti Jul 25 '15 at 18:19
  • it is true while playing a video file and false in play-list modus, switching from full screen to windowed also works with the command, only setting it to full screen (true) not, with other words no mater what I give for value it is always false – switch87 Jul 25 '15 at 19:02

Awesome has a way to send fake key events, this can be used to overwrite the standard keys used by vlc to match the keys configured in awesome wm. Inside ~/.config/awesome/rc.lua change the fullscreen key like this:

enter code hereawful.key({ modkey,           }, "f",      function (c) 
    if awful.rules.match(c, {class = 'Vlc'}) then
        c.fullscreen = not c.fullscreen  

to do this with other programs you first have to get to know the class of it, this you can get with the command xprop | grep WM_CLASS.

 WM_CLASS(STRING) = "vlc", "Vlc"
                     |      |
                     |      |--- class
                     |--- instance

CanSetFullscreen is a read-only parameter, go check Fullscreen which is a read/write entry. for D-Bus exploration, D-Feet on Ubuntu is quite good.

  • If you read the whole question you would see this is what I tried, I did not try to manipulate CanSetFullscreen – switch87 Nov 25 '15 at 12:17

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.