LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Make ggcalctool start in Eng(ineering) mode? (https://www.linuxquestions.org/questions/linux-desktop-74/make-ggcalctool-start-in-eng-ineering-mode-706449/)

catkin 02-21-2009 12:12 PM

Make ggcalctool start in Eng(ineering) mode?
 
Hello :smile:

Is it possible to make gcalctool (5.22.3) start in Eng(ineering) mode?

Best

Charles

PTrenholme 02-21-2009 02:45 PM

The gcalctool should restart in whatever view mode was selected when you last closed it.

catkin 02-22-2009 06:48 AM

Thanks P :)

Helpful to know how it should behave and the behaviour you describe would be nice. Several other settings are remembered from the last session, including X and Y positions. What system(s) are you on? I'm on ubuntu 8.04.2.

There is a ~/.gconf/apps/gcalctool/%gconf.xml file which included
Code:

<entry name="display" mtime="1235300629" type="string">
        <stringvalue>FIX</stringvalue>
</entry>

Setting that to ENG did not change gcalctool's initial mode. vim unexpectedly reported that %gconf.xml had changed when trying to save an edit; this when gcalctool was not running. ???

Wnen gconf-editor->apps->gcalctool was used to set display it was persistent; after quitting gconf-editor and restarting, the value was the same but was not written to %gconf.xml and did change gcalctool's initial mode.

Perhaps gcalctool in the 5.22.3-0ubuntu0.1 package has been built to ignore the usual display configuration but the full configuration utilities are left in place, with the display part ineffective. This would be consistent with the "dumbing down" design philosophy of ubuntu/GNOME.

I started to install gcalctool-5.24.3.1 direct from http://ftp.gnome.org/pub/GNOME/sourc...24.3.1.tar.bz2 but gave up because it required a later version of intltool and I was worried that might cause breakage. Was I being over cautious?

The following is probably a red herring (hence the colour!) but is included for completeness.

Wnen gconf-editor->apps->gcalctool was used to set display to ENG as the default it gave error message "The application "gconf-editor" attempted to change an aspect of your configuration that your system administrator or operating system vendor does not allow you to change. Some of the settings you have selected may not take effect, or may not be restored next time you use the application." with details "No database available to save your configuration: Unable to store a value at key '/apps/gcalctool/display', as the configuration server has no writable databases. There are some common causes of this problem: 1) your configuration path file /etc/gconf/2/path doesn't contain any databases or wasn't found 2) somehow we mistakenly created two gconfd processes 3) your operating system is misconfigured so NFS file locking doesn't work in your home directory or 4) your NFS client machine crashed and didn't properly notify the server on reboot that file locks should be dropped. If you have two gconfd processes (or had two at the time the second was launched), logging out, killing all copies of gconfd, and logging back in may help. If you have stale locks, remove ~/.gconf*/*lock. Perhaps the problem is that you attempted to use GConf from two machines at once, and ORBit still has its default configuration that prevents remote CORBA connections - put "ORBIIOPIPv4=1" in /etc/orbitrc. As always, check the user.* syslog for details on problems gconfd encountered. There can only be one gconfd per home directory, and it must own a lockfile in ~/.gconfd and also lockfiles in individual storage locations such as ~/.gconf"

I worked my way through all that lot but didn't identify any problem causes. :scratch:


Best

Charles

PTrenholme 02-22-2009 08:34 AM

Well, I was on Fedora 10 at the time, which has version 2.24.3. That version, on Fedora, offers a "Scientific" mode, but no "Engineering" mode. (Running KDE, not GNOME, by the way.)

I'm on Fedora 10 right now, so I'll edit this post when I log in to Ubuntu. (I don't have the old 8.04 release, but I'll try it on 8.10 and 9.04.)

catkin 02-22-2009 09:13 AM

Quote:

Originally Posted by PTrenholme (Post 3453210)
Well, I was on Fedora 10 at the time, which has version 2.24.3. That version, on Fedora, offers a "Scientific" mode, but no "Engineering" mode. (Running KDE, not GNOME, by the way.)

Thanks some more :)

5.22.3 has a Scientific view (along with Basic, Advanced and Financial) available on the View drop down menu) and Eng, Fix and Sci display modes, available on radio buttons. It starts in the last selected view OK, just not in the last selected display mode.

Best

Charles

PTrenholme 02-22-2009 12:21 PM

Quote:

Originally Posted by catkin (Post 3453261)
Thanks some more :)

5.22.3 has a Scientific view (along with Basic, Advanced and Financial) available on the View drop down menu) and Eng, Fix and Sci display modes, available on radio buttons. It starts in the last selected view OK, just not in the last selected display mode.

Best

Charles

Sorry, I misunderstood the problem.

So, now I'm on Ubuntu 9.04 in GNOME, with gcalctool 5.25.91, and it has exactly the same behaviour as you describe for 5.22.3.

Let me see if I can change the XML file . . .

Weird! I tried this script to no avail:
Code:

#!/bin/bash
dbg=yes
xml=~/.gconf/apps/gcalctool/%gconf.xml
[ -n $dbg ] && ls -l $xml && grep -A 1 display $xml
cat $xml | sed 's/>FIX</>ENG</' > $xml
[ -n $dbg ] && echo && ls -l $xml && grep -A 1 display $xml
gcalctool &
disown

Clearly gcalctool "fixes" the FIX when it starts.

I reported the problem to the Ubuntu maintainers, but I suspect it's a "feature" of the tool, not a "bug."

<edit>
O.K., back on Fedora 10, and I see the same behavior. That, I think, increases the likelihood that it's a "feature"of gcalctool.

Sorry. Perhaps you could patch the source code you've got and submit it as a bug fix.
</edit>

catkin 02-23-2009 12:33 PM

Quote:

Originally Posted by PTrenholme (Post 3453454)
Sorry, I misunderstood the problem.
[snip]
Perhaps you could patch the source code you've got and submit it as a bug fix.
</edit>

No problem, P :). Thanks for working with me on this.

I looked at the code as you suggested but it was too complex for my aged C knowledge so I submitted a bug report, 572880, about "display" being present in the configuration mechanisms but ineffective and an enhancement request, 572881, to have the "display" setting made persistent and configurable.

Best

Charles


All times are GMT -5. The time now is 12:40 AM.