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 12-16-2018, 11:26 PM   #1
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Rep: Reputation: Disabled
Caja's zoom settings


In Caja's default settings the next zoom increment after 200% is 400%, which is a bit too much for me.
I am trying to find a way to tweak the settings in order to set an intermediate step between those two, i.e. 300%.

I think I have identified the relevant configuration file that needs to be tweaked for that purpose, but due to my limited skills I am not sure how to tweak it.
Can someone help me?

The path of that config file is:

/usr/share/glib-2.0/schemas/org.mate.caja.gschema.xml

In contains explicit mentions to zoom settings (search for 'zoom').

Thanks for the help

--Grabby

Last edited by Grabby; 12-16-2018 at 11:27 PM.
 
Old 12-18-2018, 01:45 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
dconf or gconf, i guess, is the tool of choice to manipulate these "schemas".
it probably also needs to be the verison compatible with MATE.
 
1 members found this post helpful.
Old 12-18-2018, 06:48 PM   #3
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Looking at lines 44-52 in /usr/share/glib-2.0/schemas/org.mate.caja.gschema.xml, the zoom values are just enumerations:
Code:
  <enum id="org.mate.caja.ZoomLevel">
    <value nick="smallest" value="0"/>
    <value nick="smaller" value="1"/>
    <value nick="small" value="2"/>
    <value nick="standard" value="3"/>
    <value nick="large" value="4"/>
    <value nick="larger" value="5"/>
    <value nick="largest" value="6"/>
  </enum>
rather than the actual zoom percentages, which means those percentages are defined elsewhere. dconf-editor just shows the nicknames above for the caja zoom levels
 
3 members found this post helpful.
Old 12-19-2018, 01:30 PM   #4
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by RockDoctor View Post
Looking at lines 44-52 in /usr/share/glib-2.0/schemas/org.mate.caja.gschema.xml, the zoom values are just enumerations:
Code:
  <enum id="org.mate.caja.ZoomLevel">
    <value nick="smallest" value="0"/>
    <value nick="smaller" value="1"/>
    <value nick="small" value="2"/>
    <value nick="standard" value="3"/>
    <value nick="large" value="4"/>
    <value nick="larger" value="5"/>
    <value nick="largest" value="6"/>
  </enum>
rather than the actual zoom percentages, which means those percentages are defined elsewhere. dconf-editor just shows the nicknames above for the caja zoom levels
Yes, I had noticed that, but I was not able to find out where those values are defined.
 
1 members found this post helpful.
Old 12-19-2018, 02:38 PM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Grabby View Post
Yes, I had noticed that, but I was not able to find out where those values are defined.
They appear to be hard-coded in the source code. The actual icon size values equating to the various zoom levels are defined in libcaja-private/caja-icon-info.h:

Code:
    /* Nominal icon sizes for each Caja zoom level.
     * This scheme assumes that icons are designed to
     * fit in a square space, though each image needn't
     * be square. Since individual icons can be stretched,
     * each icon is not constrained to this nominal size.
     */
#define CAJA_ICON_SIZE_SMALLEST	16
#define CAJA_ICON_SIZE_SMALLER	24
#define CAJA_ICON_SIZE_SMALL	32
#define CAJA_ICON_SIZE_STANDARD	48
#define CAJA_ICON_SIZE_LARGE	72
#define CAJA_ICON_SIZE_LARGER	96
#define CAJA_ICON_SIZE_LARGEST  192
 
2 members found this post helpful.
Old 12-21-2018, 01:18 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ these icon sizes are also widely accepted standard sizes for freedesktop icon themes.
 
1 members found this post helpful.
Old 01-11-2019, 05:11 AM   #7
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
They appear to be hard-coded in the source code. The actual icon size values equating to the various zoom levels are defined in libcaja-private/caja-icon-info.h
Thanks for taking the time to look into this, I appreciate.

Too bad those settings are hard-coded, because I really need to have an intermediate zoom setting between 200% and 400%. The gap is too much.

I have a couple of related questions:

1) if I decide to modify the source and then recompile the whole thing, will it be enough to remove Caja and then download the program's master branch from Github and use make? I am not a professional programmer, so I was wondering if perhaps there is something else to do that I do not know.

2) how long approximately will compiling Caja take, minutes or hours? (my CPU is intel i7 8th gen)

Thanks a lot again, this is a wonderful forum

Grabby

Last edited by Grabby; 01-11-2019 at 05:21 AM.
 
1 members found this post helpful.
Old 01-11-2019, 06:14 AM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I'm certainly not an expert on this, Grabby, but rather than potentially muck up your system, I would suggest setting up a virtual machine or a dual boot so that you can use a test system for playing around with Caja. If you are going to play around with your main system, I recommend making a system snapshot/backup/image first.

First things first. I suggest creating an issue about the zoom settings here - https://github.com/mate-desktop/caja/issues. Sometimes it takes a while for someone to respond, but the developers tend to look at the issue reports so it's a good place for your issue to be noticed.

Next, ask questions about the zoom settings on a MATE forum or subreddit - details here: https://mate-desktop.org/community/

Then, depending on the answers you receive, you can look at hacking Caja. If you do, I would suggest you download the latest released version rather than the latest code - see http://pub.mate-desktop.org/releases/1.21/

I don't think it would take you long at all to build Caja. Replacing your current version of an integral component of the desktop with a new one compiled at your own hand may prove interesting though.
 
2 members found this post helpful.
Old 01-11-2019, 11:06 AM   #9
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Thanks a lot, hydrurga, for your very comprehensive and helpful answer!! I will follow your suggestions.
 
1 members found this post helpful.
Old 01-11-2019, 11:08 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Grabby View Post
Thanks a lot, hydrurga, for your very comprehensive and helpful answer!! I will follow your suggestions.
No problem. Let us know how you get on.
 
1 members found this post helpful.
Old 01-11-2019, 01:41 PM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Grabby View Post
1) if I decide to modify the source and then recompile the whole thing, will it be enough to remove Caja and then download the program's master branch from Github and use make? I am not a professional programmer, so I was wondering if perhaps there is something else to do that I do not know.
you can always try to 'make' (as normal user, not as root) without actually installing it.
the executable usually gets dropped in some subfolder.
you can try running it from there.
if you're lucky it will Just Work, and you are not endangering any system files.

no idea how long the compile will take; getting all the dependencies right, dev versions of libraries on debian-based distros, etc., will probably take longer than the actual compilation.
 
2 members found this post helpful.
Old 01-12-2019, 03:43 PM   #12
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
@ondoho: I followed your suggestion and after modifying the source I compiled it as non-root. Compilation went OK. The executable file was created in the ./src subdirectory, and it runs. Only, for some strange reason the version of Caja that runs is not the one I compiled (version 1.21.3, as displayed by the autogen.sh file) but the one previously on the system (version 1.20.3). I could tell by looking at the About dialog.

Of course I used the ./ before the filename of the executable, and yet the program loaded is the default one that was already present on the system.
I even tried changing the name of the executable to avoid any possible name conflict and I ran it again, so there is no doubt that the program loaded is the one I compiled -- once again, the program runs fine, but it is not the version I compiled.

Any idea how to make sure that the program loaded is the one in the current directory?

Last edited by Grabby; 01-13-2019 at 05:29 AM.
 
1 members found this post helpful.
Old 01-12-2019, 04:17 PM   #13
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
It just came to my mind that since Caja is always running in the background (because it manages the desktop icons) there may be a problem with loading into memory another version of it, so I am redirected to the Caja that is the default on the system. Could this be the reason?

Last edited by Grabby; 01-12-2019 at 05:19 PM.
 
1 members found this post helpful.
Old 01-13-2019, 02:43 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
both could be responsible.
you can try
Code:
while pidof caja; do killall caja; sleep 1; done; ./caja
(this should exit after 1s and start your custom caja; if not caja is automatically respawning itself).
but even if you manage to kill the caja process for goosd, it's probably still calling upon system resources, sth like /lib/caja/version.gui maybe... the answer to that lies in the sources and possibly in the compilation options.
 
1 members found this post helpful.
Old 01-13-2019, 12:40 PM   #15
Grabby
Member
 
Registered: Feb 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
both could be responsible.
you can try
Code:
while pidof caja; do killall caja; sleep 1; done; ./caja
(this should exit after 1s and start your custom caja; if not caja is automatically respawning itself).
but even if you manage to kill the caja process for goosd, it's probably still calling upon system resources, sth like /lib/caja/version.gui maybe... the answer to that lies in the sources and possibly in the compilation options.
Caja is respawning itself, as you predicted, in an endless loop. I think it's time to give up on this. I will probably keep the binary and try to run it in another desktop environment when I have a chance.
 
1 members found this post helpful.
  


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
(caja:27198): GLib-GObject-WARNING error when opening trash with caja via terminal on Debian 9 MATE backport. linustalman Linux - Software 1 08-17-2018 01:04 PM
why would my columns in LibreOffice separate as zoom out and overlap as zoom in 1sweetwater! Linux - Software 18 02-10-2015 08:50 AM
Query regarding "Zoom in" and "Zoom Out" on Fedora-17 ajaygarg Linux - Desktop 2 12-03-2012 11:59 PM
Zoom Zoom barnelli-jones LinuxQuestions.org Member Intro 1 06-27-2012 08:55 PM
plasma hangs - zoom out but no zoom in CollieJim Linux - Desktop 3 04-06-2010 08:53 AM

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

All times are GMT -5. The time now is 05:42 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