LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-12-2015, 04:10 PM   #1
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
A colour issue when renaming a file using Nemo under Xubuntu 14.04.


I’m running Xubuntu 14.04, but the Thunar file manager has the annoying habit of executing executable text files (i.e., scripts), instead of opening them in a text editor, when I double-click them. Since there seems to be no way to change this behaviour (at least not without patching Thunar), I went looking for another file manager that will let me open text files in an editor, whether or not they are executable.

Since the Ubuntu 14.04 repositories provide the Nemo file manager (from the Cinnamon environment), I decided to try that one first.

Nemo works fine, except for one little detail: When I select an icon, and then press the F2 key to rename the file, then the background of the file name field turns black, and I can no longer read what I’m typing (since the file name is now displayed with black text on a black background).

Since Nemo is a GTK3+ application, I decided to delete the “gtk-3.0” subdirectory under the theme (or, rather, to move the subdirectory out of the way), and see if that changes anything. Under root, I do:
Code:
mkdir /root/Greybird
mv /usr/share/themes/Greybird/gtk-3.0 /root/Greybird
The problem then disappears.

For further experimentation, I moved the subdirectory back into place:
Code:
mv /root/Greybird/gtk-3.0 /usr/share/themes/Greybird
rmdir /root/Greybird
Then, under my own user account, I copied the theme files to my personal configuration directory:
Code:
cp -r /usr/share/themes/Greybird/gtk-3.0 ~/.config
(NOTE: I initially left the global theme settings in place at this point, but I soon realised that I had to move them out of the way again, to prevent any settings to be taken from the global files when I removed them from my local settings.)

I subsequently tried to delete as much as possible from my personal “gtk-3.0” configuration directory, and after all my testing, I found that the problem sits in the “gtk-widgets.css” file—specifically in the “.entry” declaration in the file:
Code:
/*********
 * entry *
 *********/
.entry {
    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.6);
    border-right-color: shade(@theme_bg_color, 0.7);
    border-left-color: shade(@theme_bg_color, 0.7);
    border-bottom-color: shade(@theme_bg_color, 0.72);
    border-radius: 3px;
    background-color: @theme_base_color;
    background-image: linear-gradient(to bottom,
                                      shade(@theme_base_color, 0.99),
                                      @theme_base_color
                                      );

    color: @theme_text_color;
}
To solve the colouring issue, I must apparently change the “border-radius” value (highlighted in the code above) to “0px”. I have no idea whatsoever how a “border-radius” setting can cause such an issue, but in any case, the minimal files that I need in my personal GTK3+ configuration directory (i.e., “${HOME}/.config/gtk-3.0”) in order to solve the issue, are as follows:
  • File “gtk-widgets.css”:
    Code:
    .entry {
        border-radius: 0px;
    }
  • File “gtk.css”:
    Code:
    @import url("gtk-widgets.css");
QUESTION: Does anybody have any idea why the “border-radius” setting causes this issue?
While I did find a way to fix the issue, I’m curious about why it happens in the first place.

P.S.: If you would rather stick with a GTK2+ file manager (in line with the XCFE 4.10 desktop environment that comes with Xubuntu 14.04), then you may want to try the Caja file manager (from MATE) instead. However, MATE isn’t present in the default Ubuntu 14.04 repositories, and you will need to add the following PPAs to your system:

Last edited by luvr; 02-13-2015 at 05:52 AM.
 
Old 02-14-2015, 03:20 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
I'd just like to point out that with Thunar you can open an executable script in a text editor by right-clicking and selecting "open with->"

As to the colouring issue, it sounds like you've uncovered a bug in the gtk library. Have you tried to see if there is a bug report related to this issue?
 
Old 02-14-2015, 07:11 AM   #3
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459

Original Poster
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by qlue View Post
I'd just like to point out that with Thunar you can open an executable script in a text editor by right-clicking and selecting "open with->"
True, but the way Thunar insists on executing executable text files, rather than opening them in the default text editor, feels awkward and inconsistent to me, in that I have to remember that the only way to safely and consistently open text files is through the “Right-Click Open” option. I did try to get used to this behaviour, but every now and then, I double-clicked an executable script file and immediately thought, “Oops! I didn’t want to do that!” In my case, this is a disaster waiting to happen, and I’d rather be safe than sorry.

I can imagine that some people consider the “executability” of a file more important than whether it’s a text or a binary file, and I’m perfectly happy with a file manager that lets everyone choose which option has the higher priority for them. Heck, I don’t even care if executing scripts is its default setting—as long as I can change it. For me, any text file must open in a text editor when I double-click its icon.

Quote:
As to the colouring issue, it sounds like you've uncovered a bug in the gtk library. Have you tried to see if there is a bug report related to this issue?
I have been looking for any information about this issue, but I haven't come up with anything useful. I haven’t even found an explanation of what the “border-radius” setting is supposed to do—at least not in terms that I can understand. I have no idea what's causing this problem, either; I did use Nemo with Cinnamon under Linux Mint in the past, and I've never encountered the issue before.
 
Old 02-14-2015, 03:56 PM   #4
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459

Original Poster
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Incidentally, I found out that these themes belong to the “shimmer-themes” package, which has a few bugs reported against it. One of those in particular caught my eye: Bug #995640: “Colour issue in Eclipse with Greybird”. I’m apparently not the only one running into colour issues with these themes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] want nemo file manager to ignore case Greenfuse Linux - Desktop 2 08-03-2013 07:24 AM
How to add background.xml file in Nemo? acraig Linux - Newbie 0 01-30-2013 08:44 AM
LXer: Nemo Review: A New File Manager for Linux LXer Syndicated Linux News 0 04-24-2008 05:30 PM
LXer: Project Nemo: when file managers and calendars converge LXer Syndicated Linux News 0 01-24-2008 05:50 PM
LXer: Nemo file manager organizes around a calendar LXer Syndicated Linux News 0 12-10-2007 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration