This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: issues with startxwin not loading x windows


Michael,

To limit information leakage, I do this for several pieces of software
on my corporate PC.  The sed script that you'll create is useful in
many other "cleaning" operations as well.

1. Create a text file dump using cygcheck or by whatever method named
"original_text_file"

2. Look for strings in "original_text_file" that you want filtered or
changed.  (I simply delete entire lines containing anything with a
sensitive string, but you could obviously replace the string only.)

3. Add these strings to a sed file, e.g. "clean.sed"

4. To avoid matching short strings before long strings, run the
command below to put the longest strings first, so that partial
strings aren't replaced too early, causing misses later in the
original_text_file:

    awk '{print length($0)";"$0}' clean.sed|sort -nr|awk -F\; '{print
$2}'>clean.longest_strings_first.sed


/sensitive_string_lowercase_002/d
/sensitive_string_lowercase_001/d
/sensitive_string_lowercase_000/d
/SENSITIVE_STRING_UPPERCASE_000/d
/SENSITIVE_STRING_MixedCase_000/d
/username_lowercase_001/d
/username_lowercase_000/d
/SENSITIVE_STRING_001/d
/^[0-9][0-9][0-9]*(/d
/USERNAME_MixedCase/d
/MACHINE_NAME_001/d
/DOMAINNAME_001/d
/DOMAINNAME_000/d
/USERNAME_CAPS/d
/LOGONSERVER/d
/xyzcompany/d
/XYZCOMPANY/d
/CLIENTNAME/d
/PuTTY/d
/BLART/d
/FOO/d


5. Run this command line to produce an output named "filtered_text_file"

    sed -f clean.longest_strings_first.sed original_text_file>filtered_text_file

6. I like to use the "vimdiff" command to show the changes from
"original_text_file" to "filtered_text_file."


    vimdiff original_text_file filtered_text_file


7. Iterate over steps 2 - 6 editing "clean.sed" until it produces a
clean.longest_strings_first.sed file that filters or modifies strings
that you don't want in the output.



On Fri, Aug 19, 2016 at 8:28 AM, Eliot Moss <moss@cs.umass.edu> wrote:
> Maybe I am way off base, but this seems similar to what will happen if a
> .startxwinrc file's commands don't have something that waits.  My
> .startxwinrc
> looks like this:
>
> #!/bin/bash
>
> xrdb -merge ${HOME}/.Xdefaults
> xmodmap ${HOME}/.Xmodmap
>
> UC="${USER} console"
> xterm +tb -geometry 110x62+4+0  -T "${USER}" -n "${USER}" -name "${USER}"
> -bg rgbi:.0/.2/.2    -ls -iconic &
> xterm +tb -geometry 110x62-10+0 -T "${UC}"   -n "${UC}"   -name "${UC}"
> -bg rgbi:.5/.0/.1    -ls -iconic &
> xemacs -iconic -geometry 110x61+0+0  -T xemacs &
> wait
>
>
> That is, it sets some defaults using xrdb and xmodmap and that opens two
> xterms and one xemacs.
> Note that those last three commands end in & ... they are this started in
> background.  The
> 'wait' is very important here!  Without it, the X startup process terminates
> and then the
> X server exits.
>
> Hope this helps, or at least does not add too much noise to the
> conversation!
>
> Eliot Moss
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]