15

Can someone advise me of how to add borders (wide borders) to Windows in Ubuntu version 14.04. In the past I have used "gnome-tweak-tool". However it doesn't work with version 14.04.

All my windows (especially the many terminal screens I work with) appear to blend as one. It's very hard to tell where one window begin and another end.

Also the title bars are very hard to distinguish between which window is active and with window is inactive.

Thanks in advance for anyone who has a solution of how to customize these Windows (or how to make gnome-tweak-tool work with Ubuntu 14.04).

I tryed activating the Window Decorator feature of CCSM but using that disabled Unity and made the environment unusable.


All about tweaking the Windows in Ubuntu 14.04... setting border width, color, title, etc.

  • Possible duplicate? askubuntu.com/questions/448204/… – fossfreedom Apr 24 '14 at 8:09
  • Hi, Fossfreedom. There is a lit of similarity to the two questions. This is why I linked this one to yours. I'm still doing research to provide the best summary and conclusing to this particular question so that it'll be very useful in helping people all over. The question has recur many times and in a little while I hope this QA will be a very solid resolution. I see a not suggesting for a bounty, but if the moderators can be patient I'll clear it up. – L. D. James Apr 29 '14 at 14:17
  • The real question is why do UI designers think 1-pixel borders are acceptable? At the very least they could give us a system setting to tweak the border size and turn on sane scrollbars. – Ron Smith Sep 25 '14 at 23:49
13

I appreciate the work around provided by the first answer. However, I was very specifically looking for a method of using the actually components as provided by the distribution if it exists.

At present you can copy your favorite theme from /usr/share/theme to ~/.theme. Name the theme folder something different from what it was named in the /usr/share/theme. This way when you select your chosen them you'll find it by the name you called the folder.

Example:

$ cp -R /usr/share/themes/Radiance/ ~/.themes/MyRadiance

This is a per-user operation and doesn't require elevated access.

Now you can edit the gtk-3 folder of that new directory to make your borders any way you want them. You can also customize other components of the theme.

The borders can be resized by editing the UnityDecoration features of the unity.css file located in the apps folder:

~/.themes/MyRadiance/gtk-3.0/apps/unity.css

To change the borders change the 0's to a different number of the parameter:

-UnityDecoration-extents: 28px 0 0 0;

You'll find many other editible features in the gtk-3.x folder.

For other features of the borders such as color, text, etc... take a look at Unity/Theming at:

https://wiki.ubuntu.com/Unity/Theming

I appreciate the previous workaround. But I hope many can benefit from using the feature as distributed by the OS developers.

Oh yea, to use this newly edited theme you'll have to install the unity tweak tool.

$ sudo apt-get install unity-tweak-tool

Note: I already linked this question to a similar question about Ambiance configuration. This resolution can easily be applied to any modern Ubuntu theme... not just Ambiance (or the Radiance reference mentioned in this particular instance).

  • Please specify which setting de OP must change in the gtk-3 folder, so I can up-vote this answer. – Roberto May 8 '14 at 20:41
  • @Roberto It's Done! – L. D. James May 12 '14 at 21:32
  • 1
    What do you have to do in the unity-tweak-tool to use your edited theme? – Stephen Rasku Feb 19 '15 at 22:41
  • Never mind. I just had to use gnome-tweak-tool to select the theme (not unity-tweak-tool). – Stephen Rasku Feb 19 '15 at 22:51
  • 1
    @StephenRasku You can use either gnome-tweak-tool or unity-tweak-tool. In unity-tweak-tool just click on the Theme tab and from the list of Available themes, click on your chosen one. – L. D. James Feb 20 '15 at 2:59
3

17.10

fragfutter's answer worked for me!

  1. Make a file ~/.config/gtk-3.0/gtk.css

  2. Add the lines:

    decoration { border: 1px solid gray; background: gray; }

  3. Reboot (or you could probably just log out and back in to gnome)

Earlier versions of Ubuntu

Here is a shell-script version of my favorite part of L. D. James's excellent answer:

17.04 uses gtk-3.20

sudo sed -i -e \
's/-UnityDecoration-extents: 28px 0 0 0;/-UnityDecoration-extents: 28px 2 2 2;/' \
/usr/share/themes/Ambiance/gtk-3.20/apps/unity.css

16.04 and 15.10 use gtk-3.0

sudo sed -i -e \
's/-UnityDecoration-extents: 28px 0 0 0;/-UnityDecoration-extents: 28px 2 2 2;/' \
/usr/share/themes/Ambiance/gtk-3.0/apps/unity.css

You'll have to log out, then log back in to see the results of this change. You can replace Ambiance (the default) with Radiance or whatever theme you're currently using.

How does it work?

sed is a command line utility that replaces text.

Ending a line with \ tells the shell that the command continues on the next line (for human readability).

-i tells sed to edit the file in-place (don't make a new file).

-e tells sed that what follows is the sed script (instead of reading it from a file).

s/.../.../ the s means to substitute what's between the first two slashes with what's between the second two slashes. It only makes one substitution (because there is no /g at the end).

0

Here is How to do it!!!

First Pop that terminal up! and type this in.

this should get a older version of the theme use in 13.10

wget http://ftp.osuosl.org/pub/ubuntu/pool/main/u/ubuntu-themes/light-themes_13.04+13.10.20131014-0ubuntu1_all.deb

This should remove the current version of the theme.

sudo apt-get purge light-themes

This should allow it to download inside of your download folder if you wanted to keep it.

cd ~/Downloads

This should install the older version of the theme, that did use the borders.

sudo dpkg -i light-themes_13.04+13.10.20131014-0ubuntu1_all.deb

This sould delect the .deb file if you wanted to.

rm light-themes_13.04+13.10.20131014-0ubuntu1_all.deb

If that link is dead click here to see more!

  • 1
    I'll check out the workaround you described and report on problems. I'll appreciate having a way to tell the difference between windows again. By by your answer, are you saying that it's impossible to configure 14.04 to have distinguished window titles and to have borders around the windows? If possible, I would like to work with 14.00... but understand I'll have to use a workaround if that isn't possible. – L. D. James Apr 24 '14 at 9:05
  • I don't get why they remove these borders! when It updates, it may updated it to the new light-themes. So if you so light-theme in the updater uncheck it. – MathCubes Apr 24 '14 at 9:07
  • Thanks. Your workaround makes it easier to see where the terminal window begins and ends. I'll ask another question specific to how to make the active and inactive window easier to distinguish. In the past I used gnome-tweak-tool and changed the foreground titlebar background to be blue... Your input has tripled my productivity quota. – L. D. James Apr 24 '14 at 9:35
  • Thanks for the workaround. I restored the OS back to it's original state and used the resolution provided in the publised answer. – L. D. James May 8 '14 at 20:35

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.