Edmond Orignac | 16 Mar 21:42 2015
Picon

CUPS, locales and dtprintinfo

I have found a problem with dtprintinfo when using CUPS with a locale 
other than "C". If the locale is set to fr_FR.ISO8859-1 the CUPS lpq 
message "no entries" is translated into "aucune entrée" and if it is set 
to it_IT.ISO8859-1 the message "no entries" becomes "nessuna voce". The 
code
in programs/dtprintinfo/objects/PrintObj/ParseJobs.C (line 933)
will then fail to recognize that the print queue is empty and will
exit with the error message

*** STDERR(1): (/usr/dt/bin/dtexec) /usr/dt/bin/dtprintinfo: PID 4650: 
sam. mars 14 19:02:32 2015
Unexpected legend column: aucune != Rank
Unexpected legend column: entrée != Owner

i. e. the "aucune entrée" message is treated as the legend line in the 
lines 978 and following.

One possible workaround could be to set explicitly the environment to
LANG=C with a command "LANG=C lpq" in the lines 874 and 876.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Isaac Dunham | 9 Mar 04:29 2015
Picon

Re: Where to add new filetypes?

On Sun, Mar 08, 2015 at 12:37:48PM +0100, Edmond Orignac wrote:
> I have a file with datatypes for PDF, DJVU, wordprocessor and spreadsheets
> formats, multimedia formats, compressed formats (bzip, gzip, zoo, pkzip,
> winrar, lzma) and some programming languages.
> 
> I have not tried to generate a source file for it, but it could be included
> in contrib/

Ah, that's almost all that I wanted, and more besides.

So I've hacked up a little tool that will convert it into the source.
Said tool is rather clumsy; it *must* be invoked as:
 nlsize file.dt <NUMBER>

and it will generate temp.dt.src and temp.dt.tmsg,
overwriting them if they exist.
<NUMBER> is whereever you want the index number for localization to start.
There is of course no sanity checking; it calls
fopen(argv[1]); atoi(argv[2]);
and doesn't check them. Also note the hardcoded output filenames.
It also assumes that the input file is valid, and that all lines are under
4096 chars long.

But here it is, along with the output from
nlsize extra_datatypes.dt 4000

You may treat it as public domain, via CC0.

> The associated actions are defined in separate files. They can be found
> from my homepage at:
(Continue reading)

Isaac Dunham | 7 Mar 18:56 2015
Picon

Where to add new filetypes?

I'd like to add a bunch of new filetypes.
Should I add them to datatypes.dt, or would using a new file be preferable?

(I'd like to work on better CDE integration for a few external programs
such as ida, but that entails CDE recognizing the file formats. Including
the magic to recognize PNG files in a config file for an image viewer seems
rather lame.)

Thanks,
Isaac

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Isaac Dunham | 7 Mar 18:43 2015
Picon

[PATCH] contrib/rc/linux/dtlogin: Make the init script work.

* insserv requires a shebang line
* the rc script can hang if a daemon is started in the foreground
* "pgrep dtlogin" apparently can match the init script, if it is started
  with "service dtlogin start" or similar.
* reduce code duplication
---
 cde/contrib/rc/linux/dtlogin | 51 ++++++++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/cde/contrib/rc/linux/dtlogin b/cde/contrib/rc/linux/dtlogin
index 3a04ab5..177ae34 100644
--- a/cde/contrib/rc/linux/dtlogin
+++ b/cde/contrib/rc/linux/dtlogin
 <at>  <at>  -1,3 +1,4  <at>  <at> 
+#!/bin/sh
 ### BEGIN INIT INFO
 # Provides:		lsb-dtlogin
 # Required-Start:	$all
 <at>  <at>  -8,38 +9,36  <at>  <at> 
 # Description:		Dtlogin
 ### END INIT INFO

+export PATH="/usr/dt/bin:$PATH"
+OPTIONS="-quiet -daemon"
+
+start(){
+	if [ -z "$(pgrep /usr/dt/bin/dtlogin)" ];
+	then
+		echo " * Starting dtlogin..."
+	 	export LANG=C
(Continue reading)

Johannes von Rotz | 21 Jan 12:00 2015
Picon

Fix 'make World' on OpenBSD

Hi,

I tried to build CDE on OpenBSD today and had to do some minor 
adjustments to let the make process finish without errors.

Cheers, J.
From 244d467bf7adb486119fc1514cc792c0079b447a Mon Sep 17 00:00:00 2001
From: Johannes von Rotz <jr <at> vrtz.ch>
Date: Wed, 21 Jan 2015 11:54:46 +0100
Subject: [PATCH] Let "make World" run through on OpenBSD

---
 cde/programs/dtcm/dtcm/browser.c | 1 +
 cde/programs/dtcm/dtcm/help.c    | 1 +
 cde/programs/dtlogin/dm.h        | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/cde/programs/dtcm/dtcm/browser.c b/cde/programs/dtcm/dtcm/browser.c
index 94fb735..99d7246 100644
--- a/cde/programs/dtcm/dtcm/browser.c
+++ b/cde/programs/dtcm/dtcm/browser.c
 <at>  <at>  -29,6 +29,7  <at>  <at> 
  */

 #include <EUSCompat.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
(Continue reading)

alx | 25 Dec 22:50 2014

[PATCH] dtcopy: Fix file removal

Hi - this fixes a bug that causes dtfile to leave copies of 
moved/trashed files and directories when these are moved between 
different filesystems.
From e09104c58ef4cc434ef3ae6de35fb16c532d9354 Mon Sep 17 00:00:00 2001
From: alx <alx <at> fastestcode.org>
Date: Thu, 25 Dec 2014 22:06:11 +0100
Subject: [PATCH] dtcopy: Fix file removal
Content-Length: 991
Status: RO

---
 cde/programs/dtfile/dtcopy/fsrtns.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cde/programs/dtfile/dtcopy/fsrtns.c b/cde/programs/dtfile/dtcopy/fsrtns.c
index c1d1d56..5532aca 100644
--- a/cde/programs/dtfile/dtcopy/fsrtns.c
+++ b/cde/programs/dtfile/dtcopy/fsrtns.c
 <at>  <at>  -387,7 +387,7  <at>  <at>  static int
 EraseObject(char *nameP, int force)
 {
   struct stat src_stat;
-  int rc;
+  int rc = 0;

   if (periodicCallback)
     if (periodicCallback() != 0)
 <at>  <at>  -396,15 +396,15  <at>  <at>  EraseObject(char *nameP, int force)
(Continue reading)

Richard L. Hamilton | 18 Dec 20:15 2014
Picon

Tips for porting to new platform? (Mac)

Are there any notes for getting started to port to a new platform?  I do have an imake from MacPorts (none is
bundled with Apple’s Xquartz.app), but the darwin.cf is ancient.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Richard L. Hamilton | 29 Nov 20:28 2014
Picon

Other CDE and Motif related goodies out there

If someone gets it working and wants to jazz it up a bit, there’s other goodies out there.

xlockmore - some versions (google for it) included the ability to build with CDE support; I have an extended
action file to invoke that with the appropriate arguments, which adds some much cooler screen savers. 
Some of them need 3D acceleration to not be dogs.

Someone had done some audio utilities, that implemented the Sun keyboard volume keys, and provided a nice
front panel volume control.  The site doesn’t seem to be around anymore (and the relevant pages don’t
seem to be in archive.org), but I’ve got a copy (although so far, I only found the extracted version, not
the original archive file).  Note: all that is very specific to Sun keyboards and/or audio interfaces; but
if someone wanted to use it as a starting point for similar functionality elsewhere, it might be easier
than starting from scratch.

Older versions of the xpat2 multiple solitaire games program included Motif support (which I think was
ripped out at some point).

Someone else had done a digital clock for the front panel; haven’t tried to track that down yet.

There are (or were) perl modules to interact with the calendar; they could be used to automatically insert
entries for holidays every year.

While it wasn’t as pretty as the Sun CDE sdtwinlst, there was something that would list windows; I think I
helped get it working, maybe I still have that somewhere.   Yep, found a site that has it:  http://levana.de/findwindow/find_window.shtml

I have one or two oddities myself, listed at http://www.smart.net/~rlhamil/  (the bottom few entries).
The one I know some people other than me have used is dtwmcmd (sends f. commands to dtwm from the command
line).  I made that because I noticed that dtstyle could restart dtwm, but an action to edit .Xdefaults
(which was presumably a script calling dtpad) could not.  That made me curious enough to reverse-engineer
the mechanism.  So now you can do from a shell script something like
dtwmcmd f.restart -noconfirm
(Continue reading)

Richard L. Hamilton | 24 Nov 17:34 2014
Picon

SPARC build: a little more progress

Using the git code, the wiki Solaris build instructions (minus the /usr/bin/cc -> /usr/bin/gcc link), and
the following PATH
PATH=/usr/gnu/bin:/usr/xpg4/bin:/usr/bin:/opt/solarisstudio/bin
(which avoided the version of sed that was running wild), I got a lot further; until the error sequence
below.  Most of the binaries built, and the ones I can test by just putting the libraries they need in their
proper place appear to work (ugly without resource files, but usable, at least for those I tried, e.g.
dtksh, dtcalc, dtterm - nothing that needs the CDE-specific ToolTalk or RPC services for instance, since
I don’t have them running).

Any idea what to try next would be appreciated.  In the full build output, I did not see any mention of
libtptregexp, which I would have expected  prior to referencing the library as -ltptregexp.

So far, I see no reason to suppose that a SPARC build by someone who had previously succeed at an x86 build
should run into any insurmountable problems.  Whether I do it (with someone else telling me in sufficient
detail how they did their x86 build), or someone else with access to a modern enough SPARC to run Solaris 11
does it, I really think we ought to get it done somehow. :-)  Once the build was straightforward, there’s
no reason it couldn’t be done automatically on a regular basis, and given a test for successful
completion, packaged up, and put in a test repository, assuming someone has the knowledge to create
additional scripts to do that, and an idea for a version numbering convention that accommodates the idea
of a snapshot as of X time (with manual intervention only needed when an official version number change is
agreed-on.  Builds agreed on as acceptably stable could be promoted from a test repo to a “stable”
repo, etc.

Since I do have a T5240 that’s strictly my playtoy (albeit other LDOMs on there will be doing useful work
for me that I don’t want disrupted), in principle I could run automated builds for awhile (not signing up
to do that forever!!); but I will NOT host a repository or anything like that; so there would need to be a
place that I could drop the results.

errors below:

(Continue reading)

Richard L. Hamilton | 22 Nov 15:31 2014
Picon

see command doesn't finish in build

Building on Solaris 11.2 SPARC, per the wiki (i.e. code from git), the following sed command never finishes; eventually it could run the disk out of space making parser.c arbitrarily large.  Off the top of my head, I’m not good enough with sed to see why.  Given the PATH I had set, it appears that /usr/xpg4/bin/sed was the version being used.

including in programs/dtcm/server...
/usr/ccs/bin/yacc -d  parser.y
sed -e "s/yy/yyy/g" -e "\a# linea D" y.tab.c > parser.c
^C

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@...
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
Murray Blakeman | 20 Nov 05:55 2014

Solaris 11 Dtlogin logindevperm console_user

During my testing I've noticed the following issue.

I may be doing something wrong so please let me know if I'm way off.

Most of this detail is from the following URL (and relevant links within)

http://www.x.org/wiki/Events/XDC2012/XDC2012AbstractAlanCoopersmith/SolarisXorgPrivileges.pdf

Solaris 11 uses "/etc/logindevperm" and "/dev/vt/console_user" to set the permissions of relevant devices.

As I understand it, an "ioctl" call is made by Xorg to the kernel to set the permissions of the devices and the "console".

Normally GDM sends a trigger to Xorg.  Xorg then makes an "ioctl" call to the kernel which sets the permission to the user logged into the console.  Below is an example when logged onto the console via GDM as "murrayb".

$ ls -l /dev/vt
total 0
...<snip>...
crw--w----   1 murrayb  tty      144,  7 Nov 17 00:56 7
...<snip>...
lrwxrwxrwx   1 root     root           1 Nov 17 00:55 active -> 7
lrwxrwxrwx   1 root     root           1 Nov 17 00:55 console_user -> 7

Permissions on all devices listed in "/etc/logindevperm" are also set to the "console_user", including the sound devices.

$ cat /etc/logindevperm | grep /dev/sound
/dev/vt/console_user    0600    /dev/sound/*            # audio devices

When logged into the console via Dtlogin as "murrayb", these are the permissions.

$ ls -l /dev/vt
total 0
...<snip>...
crw-------   1 root     root     270,  7 Nov 18 21:29 7
...<snip>...
lrwxrwxrwx   1 root     root           1 Nov 18 21:29 active -> 7
lrwxrwxrwx   1 root     root           1 Nov 19 15:23 console_user -> 7

This mean that all devices in "/etc/logindevperm" can only be accessed by "root" unless the permissions are changed manually.

The Dtlogin provided with Solaris from Sun/Oracle was obviously patched to send the relevant trigger to Xorg.

The patch used in GDM can be found here (I think this is it)

https://hg.java.net/hg/solaris-desktop~spec-files/file/eb13b6860b6c/patches/gdm-28-logindevperm.diff

I'm trying to locate the relevant patch for Dtlogin but considering it was closed source at the time, it may not be readily available.

Note that when running CDE via "env LANG=C startx /usr/dt/bin/Xsession" the permissions on the relevant files are fine but I noticed that the search folders for DT related files are different.  Not sure why that is.

Regards

Murray





------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@...
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Gmane