Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 14 Nov 2019, 23:47
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
woofCE /etc/windowmanager can be invalid
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
williams2

Joined: 14 Dec 2018
Posts: 190

PostPosted: Sat 02 Mar 2019, 19:31    Post subject:  woofCE /etc/windowmanager can be invalid  

if /etc/windowmanager is invalid and does not point to a valid executable file (this can happen from a typo when starting xwin from the connsole, e.g.
Code:
xwin jwm
xwin jwn
xwin JWM
xwin icwm

or it might get corrupted installing something. Anyway, if /etc/windowmanager is invalid .xinitrc will start X using the default wm, jwm. It does NOT fix /etc/windowmanager. wmexit still works properly, because after failing to kill `cat /etc/windowmanager` it then explicitly kills jwm, which should succeed.

But other software might use /etc/windowmanager and assume it is correct, (e.g. remasterpup2) which could cause problems. I think:

1) the code in .xinitrc that checks the validity of /etc/windowmanager should be moved to xwin

2) xwin should check the validity of /etc/windowmanager

3) xwin should display an appropriate error message (dialog might get more attention.)

4) optionally, xwin could place a copy of the error message in $HOME, something like that.

5) it should offer a choice to exit to allow the user to start xwin with a valid wm name, or wait 30s and allow xwin to automatically fix /etc/windowmanager with the default wm (not necessarily jwm.)

There are many ways to do things. I think /etc/windowmanager should be checked AND fixed by the software.

See MochiMoppel's posts here.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6988
Location: Auckland, New Zealand

PostPosted: Sun 03 Mar 2019, 05:51    Post subject:  

Hmmm.
The way you describe it, it sounds like it is already a nice foolproof system which "just works", even compensating for user error.
So I'm inclined to think most of what you suggest would just be unnecessary complexity. Unless you can identify a real problem it would solve?

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Sun 03 Mar 2019, 08:40    Post subject:  

Hello, williams2.

Sorry for being so frank, but your question comes out of science-fiction.

The last three lines of /root/.xinitirc -- if you have not touched it -- are:
Code:
which $CURRENTWM && exec $CURRENTWM
[ -x $CURRENTWM ] && exec $CURRENTWM
[ "$desktop" = "rox" ] && exec jwm
Push comes to shove, anything happens,
a mouse eats file /etc/windowmanager thinking it is cheese, Twisted Evil
or you're out in the cold in the Great White North, there is ice on your keyboard and
your fingers slip typing icwm instead of icewm, jwm gets loaded. Big deal.

If your chosen WM is icewm and you did a typo, you open a console and re-type
Code:
echo icewm > /etc/windowmanager
Problem solved.

disciple is right, no need for fancy preventive or guessing code.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1925
Location: Japan

PostPosted: Sun 03 Mar 2019, 10:51    Post subject:  

musher0 wrote:
Problem solved.

Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 190

PostPosted: Sun 03 Mar 2019, 20:48    Post subject:  

There is no bug here, of any kind, as I was trying to explain to MochiMoppel here.
Quote:
most likely it is this bug.
I doubt that this will ever be fixed properly. The whole trouble started with this post back more than 12 years ago and the unfortunate "all implemented" response by BK.


There is no bug, just features. If /etc/windowmanager is invalid, Puppy starts automatically with jwm. I think that is a good thing. I like that code, it seems to be well thought out. I think that it does not fix /etc/windowmanager intentionally, partly so you can check what was wrong. For example, a wm pet package might have a bug and damage /etc/windowmanager, looking in the file would help debugging.

I do not agree with MochiMoppel here but I can see why it might be a good thing to actually fix the file. There is some software that uses /etc/windowmanager, and most or all of them assume that the file is valid. For example, remastering scripts. This might cause bugs to occur.

I think Puppy would be slightly more robust if /etc/windowmanager is checked AND fixed. Maybe change this:
Code:
which $CURRENTWM && exec $CURRENTWM
[ -x $CURRENTWM ] && exec $CURRENTWM
[ "$desktop" = "rox" ] && exec jwm

to this:
Code:
which $CURRENTWM && exec $CURRENTWM
[ -x $CURRENTWM ] && exec $CURRENTWM
echo -n jwm > /etc/windowmanager
[ "$desktop" = "rox" ] && exec jwm


This would prevent you looking in /etc/windowmanager for debugging info, but the contents of the file could be saved in an error message.

And this assumes that jwm is actually in each and every Puppy that runs this code. It might be safer to have a default wm somewhere, rather than assuming it is jwm. Like this:
Code:
test -f /etc/windowmanager-default || cp /etc/windowmanager /etc/windowmanager-default

which would copy the file once when Puppy first runs. Or you can assume jwm is in every Puppy.

It's not a question of a bug, it's what features you want to have. Fixing /etc/windowmanger automatically might help other scripts have fewer bugs.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Sun 03 Mar 2019, 21:40    Post subject:  

Double. Sorry.
_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)

Last edited by musher0 on Sun 03 Mar 2019, 21:52; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Sun 03 Mar 2019, 21:52    Post subject:  

Hi williams2.

Yes of course .xinitrc needs improvement. Mistfire and I gave it a go way back when,
and we came up with something pretty solid, as I remember it. But it was received by
some on this board as if it were a Frankestein.

(Back in a few minutes with the reference. I have to do a search.) Here it is:
http://murga-linux.com/puppy/viewtopic.php?p=979790&sort=lastpost&search_id=321425242#979790.
Perhaps read the entire thread to get the context? You'll see that mistfire's original is
(still?) used in the LXPups. I ask "still?" because that thread is 14 months old. Perhaps
someone can confirm.

As to protecting, etc., the /etc/windowmanager file tself, I do not see it as necessary.
I tend to think of that file as strictly data.

TWYL.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 190

PostPosted: Sun 03 Mar 2019, 22:27    Post subject:  

Thanks for the link musher0, I will read that.

It's just that I was trying adwm and I needed to run it from a script, which means the wmexit bug prevents X from shutting down, which might have been MrDuckGuy's problem so I thought this time I would whine about it, for the benefit of all users.

And something MochiMoppel said made me think, yes, maybe it would be good if Puppy automatically fixes the configuration data in /etc/winmanager.

Not that I expect anything to happen. But I did try.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Mon 04 Mar 2019, 02:38    Post subject:  

Thanks for the context, williams2.

adwm? Do you have a URL to its home page? Is it new?
I love exploring "unknown" WM's!

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 190

PostPosted: Tue 05 Mar 2019, 04:27    Post subject:  

adwm is a fork of Echinus.

https://github.com/bbidulock/adwm

If it doesn't compile and wants reallocarray - well, it should compile, but I had to:

download zip from git

edit configure.sh:
change:
CPPFLAGS="-D_FORTIFY_SOURCE=2"
to:
CPPFLAGS="-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE"

then:

./autogen.sh
./configure
make
make install

I got it to compile in bionicpup64-7.9.7 but not in xenialpup64-7.5

It's not clear in the documentation, but A+Tab is set to the same thing as A+j. I set this to make A+Tab do the same thing as Echinus:
Adwm*viewprevtag: A + Tab

If you want to change the default number of workspaces you need to edit /usr/share/adwm/themes/Default/themerc

Adwm*tags.number: 12

There are some bugs. I opened Geany in ws1, moved it to ws5, then pressing ctrl+F opens a search box in ws1 instead of ws5 where Geany is.

And it crashes sometimes, which kills X, so I'm running adwm from a script:
Code:
while true
do
date >> /root/adwm-start.log
date >> /root/adwm.log
adwm "$@" >> /root/adwm.log 2>&1
sleep 10
done


By the way, bbidulock seems to be a dev at Arch.

And adwm has "full support for Window Maker dock applications in floating and tiling modes"
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Tue 05 Mar 2019, 22:25    Post subject:  

williams2 wrote:
adwm is a fork of Echinus.

https://github.com/bbidulock/adwm
(...)

Thanks, williams2.

I'm a great fan of echinus. Will look adwm up.

TWYL.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14461
Location: Gatineau (Qc), Canada

PostPosted: Tue 05 Mar 2019, 22:57    Post subject:  

Thanks, williams2.

adwm discussion cont'd here, so as not to burden this thread.

See you there, hopefully.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0593s ][ Queries: 12 (0.0112s) ][ GZIP on ]