Make App Window Transparent in Ubuntu 18.04, 18.10

gnomelogo

This quick tutorial is going to show you how to make any application window in Ubuntu Gnome transparent.

Since Ubuntu 18.04 switched to Gnome 3 desktop, you can no longer set transparent application window with CCSM utility.

transparent-window-bionic

As a workaround, you can run following steps to set any application window opacity in Ubuntu 18.04, and Ubuntu 18.10.

1. Open terminal either via Ctrl+Alt+T or from software launcher.

launch-terminal

2. When terminal opens, paste following the command and hit enter:

sh -c 'xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * 80 / 100)))'

Your mouse cursor will become cross-shaped, simply click on any window and it become 80% opacity.

set-opacity-command

In the command, you can change 80 to number range from 1 ~ 99 for other window opacity.

3. To reset the window opacity, run command:

sh -c 'xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * 100 / 100)))'

When mouse cursor changes, click on the window to reset its transparent level.

reset-opacity

About ml

ml is a part time stay-at-home dad who've been using Ubuntu Desktop for a few years. He writes in the free time and wishes to share some useful tips with Ubuntu beginners and lovers.

12 comments

  1. How do you make this default in 18.04 for all windows because ccsm has become incompatable

  2. Hi, this no longer works making the terminal transparent. Not sure what happened. I can run the command and make other windows/apps transparent but not the terminal. 🙁

  3. Hello, I just tried this and I can make terminal transparent but I can’t figure out how to make all windows transparent. Was wondering if you could help me out. I’m fairly new to this and have only been running Ubuntu 18 for a couple of days now. Love it though, much better than windows! Thanks

  4. GLAUDISTON GOMES DA SILVA

    Working on ubuntu 19.04 … thank you for sharing.

  5. Works great on Ubuntu 19! Thank you.

  6. Ramzel Renz Loto

    Wow it worked! Amazing!

  7. Ramzel Renz Loto

    Wow! It worked on penguin subtitle player.
    Now I can watch with transparent subtitle background on Ubuntu 18.04
    Amazing!

  8. Thank you!
    Works great on Ubuntu 18.04.

  9. can someone make a transparency slider that is placed in the menubars, real quick? 😉

  10. Hey,
    I need to make transparent not the all window but the black pixels on it. Can this be done?

  11. Michael Landstreet

    Here’s a shell script you can save that adds a little UI slider and stuff to make this easy based on the script used in this article. Hope it’s useful for someone.

    #!/bin/bash

    # if we don’t have a file, start at 80
    if [ ! -f “/tmp/value.dat” ] ; then
    slidevalue=80

    # otherwise read the value from the file
    else
    slidevalue=`cat /tmp/value.dat`
    fi

    # take the value from the slider and set it to a variable
    value=$(zenity –scale –title “Set Window Opacity” –text “Set value in %. After clicking OK select the title bar of the window you wish to add transparency.” –min-value=10 –max-value=100 –step=5 –value=${slidevalue})

    # use the slider variable and use it in the script to apply opacity to a window.
    xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * ${value}/ 100)))

    # save the slider value to a tmp file that the script can set the slider to during the next run.
    echo “${value}” > /tmp/value.dat