Launching application without titlebar and window decorations

1,101

Use either Devil's Pie or Devilspie2 to remove the window decoration. Both will likely work for any application, otherwise will not work against applications with the client-side decoration.

Using Devil's Pie

For Devil's Pie, open a text editor and type the following code.

(if (is (application_name) "VLC media player") (undecorate))

Save as file at $HOME/.devilspie/filename.ds with any filename of choice. Make sure the file extension is .ds. Finally, run devilspie in terminal to see the result.

Using Devilspie2

For Devilspie2, open a text editor and type the following code.

if (get_application_name()=="VLC media player") then
   undecorate_window();
end

Save as file at $HOME/.config/devilspie2/filename.lua with any filename of choice. Make sure the file extension is .lua. Finally, run devilspie2 in terminal to see the result.

Devil's Pie vs. Devilspie2

If there is one thing that makes difference between these tools, it is the latter. Devilspie2 provides a convenient way to check the window name and application name for running applications, without having to run a separate command like wmctrl -l from other tool.

To see the debug information with Devilspie2, add the following code in the .lua file.

debug_print("Window name: " .. get_window_name());
debug_print("Application name: " .. get_application_name());

Exit running instance, then run devilspie2 -d in Terminal will print something like below.

Running devilspie2 in debug mode.
[...]
Window Name: VLC media player
Application name: VLC media player
Window Name: Dictionary
Application name: xfce4-dict

See /usr/share/doc/devilspie2 for script example and more details.

Devil's Pie and Devilspie2 are both available in all repositories of Debian releases (oldstable, stable, testing, unstable), according to the Debian package search results.

Tested Devil's Pie and Devilspie2 in Debian 8 Xfce and Xubuntu 14.04 (both runs Xfce 4.10), and Devilspie2 in Linux Mint Debian Edition 3 (Cinnamon 3.8).

Share:
1,101

Related videos on Youtube

cvetozaver
Author by

cvetozaver

Updated on September 18, 2022

Comments

  • cvetozaver
    cvetozaver over 1 year

    I am successfully loading and using an PKCS12 file Cert.pfx from Assets like this:

    String certLocation = "certificates/Cert.pfx";
    InputStream isCert = null;
    try {
        isCert = getAssets().open(certLocation);
    } catch (Exception e) {
        Log.d(TAG, "Could not get Assets");
        }
    
    // Work with the certificate
    

    I am trying to do the same now, but reading from a storage in Android.

    File sdCard = Environment.getExternalStorageDirectory();
    File dir = new File (sdCard.getAbsolutePath() + "/PrintableRSA");
    File cert = new File(dir,"Cert.pfx");
    
    InputStream isCert= null;
    
    try {
        isCert = new BufferedInputStream(new FileInputStream(cert));
        isCert.close();
        Log.d(TAG,"Sucsess!");
    } catch (Exception e) {
        Log.d(TAG, "Could not load the file");
    }
    
       // Same work with the certificate
    

    The file loads sucsessfully, but When I further to work with isCert InputStream, loaded from storage, it does not work. I suspect that therefore the files are not equal.

    I also tried with InputStream isCert = FileInputStream(cert); unsuccessfully.

    How can I fix this issue?

    • Selvin
      Selvin over 9 years
      it depends on what "does not work" means ...
    • greenapps
      greenapps over 9 years
      Why are you referring to external memory as internal memory?
    • cvetozaver
      cvetozaver over 9 years
      Because, android automatically chooses the internal one if external is not available. And this is what I want.
    • TNW
      TNW over 8 years
      Does this work?
    • anders
      anders over 8 years
      Unfortunately not. It puzzles me a bit that this is so hard to achieve. Mplayer manages to do it, but has other problems which makes it useless.
    • TNW
      TNW over 8 years
      Could you run just xprop on both vlc and mplayer? That should display properties of their windows - there's a chance you could copy something off mplayer that will do the trick.
    • anders
      anders over 8 years
      Running with -noborder option on mplayer shows the motif hints: 0x3, 0x0, 0x0, 0x0, 0x0. Running VLC with the options above results in 0x3, 0x3e, 0x7e, 0x0, 0x0. Changing the hints doesn't really do much. I see that VLC receives a resize event, but thats it :(
    • Admin
      Admin about 8 years
      Related: KDE users refer to this post and Openbox users refer to another post.
  • cvetozaver
    cvetozaver over 9 years
    I checked my original code. I had an this.myCert = isCert between the isCert declaration and isCert.close() statement. I wrongfully thought that the InputStream gets copied at that point. I guess when the isCert is closed, the this.myCert becomes null as well. Can you confirm this?