- Home
- Discussion Forum
- AROS FORUMS
- Development General
- Default Public Screen and Workbench
Default Public Screen and Workbench
Last updated on 1 month ago
NathanHMember
Posted 2 months agoHi,
I'm using the latest Linux Hosted x86. I set up a new default public screen but no windows will open on it. From days gone by (I think starting in AmigaDOS 2.0) I remember there being a shanghai flag you could set for your public screen which then intercepted new windows of public screen unaware programs. From the wiki at https://wiki.amig...reen_Type:
"Because of its close ties with the operating system, there are some extra functions available to manipulate the Workbench screen. One function which controls both Workbench and other public screens is SetPubScreenModes(). This function controls the global public screen mode bits, SHANGHAI and POPPUBSCREEN. If the SHANGHAI mode bit is set, older applications which expect to open on the Workbench screen will open instead on the default public screen (which may or may not be the Workbench screen). The POPPUBSCREEN bit controls whether public screens will be popped to the front when a window is opened. These modes are documented in Window Structures and Functions."
I was wondering if that functionality is going to be implemented in AROS? Thanks.
NathanH
I'm using the latest Linux Hosted x86. I set up a new default public screen but no windows will open on it. From days gone by (I think starting in AmigaDOS 2.0) I remember there being a shanghai flag you could set for your public screen which then intercepted new windows of public screen unaware programs. From the wiki at https://wiki.amig...reen_Type:
"Because of its close ties with the operating system, there are some extra functions available to manipulate the Workbench screen. One function which controls both Workbench and other public screens is SetPubScreenModes(). This function controls the global public screen mode bits, SHANGHAI and POPPUBSCREEN. If the SHANGHAI mode bit is set, older applications which expect to open on the Workbench screen will open instead on the default public screen (which may or may not be the Workbench screen). The POPPUBSCREEN bit controls whether public screens will be popped to the front when a window is opened. These modes are documented in Window Structures and Functions."
I was wondering if that functionality is going to be implemented in AROS? Thanks.
NathanH
ntromansSenior Member
Posted 2 months agoIf its just the case you want to start programs on other screens than Wanderer, please have a look at Start_on_Pubscreen (https://www.arosworld.org/infusions/forum/viewthread.php?thread_id=1390&pid=8496#post_8496).
Please note as this is coded in Hollywood this is just for 32 bit at the moment.
Cheers,
Nigel.
Please note as this is coded in Hollywood this is just for 32 bit at the moment.
Cheers,
Nigel.
NathanHMember
Posted 2 months agoThanks, I'll give that a try. IMO though the shanghai flag should be able to be set with PSI when creating a public screen.
NathanH
NathanH
deadwoodAROS Dev
Posted 2 months agoI checked the sources and while there is API to set those flags, they are not used anywhere in the intuitiuon codes. I guess the fastest route via which it could be implemeted is if there is enough of AmigaOS software needing it so that it becomes important for AmigaKit with their problems. Other then that it's probably less likely to have anyone jump in and implement it.
NathanHMember
Posted 2 months agoThanks, I'm sure there are more pressing problems. I was just caught by surprise when I couldn't get any windows to open on the default public I had just created with PSI. I imagine most software developers choose the default of opening on workbench rather than choosing to open on the default public screen. I hadn't even considered it with the software I've written. I think Hollywood will allow me to choose to use the default public screen but defaults to workbench. I will be cognizant of that fact now.
NathanH
NathanH
ntromansSenior Member
Posted 2 months ago@NathanH - Thanks, I'm sure there are more pressing problems. I was just caught by surprise when I couldn't get any windows to open on the default public I had just created with PSI. I imagine most software developers choose the default of opening on workbench rather than choosing to open on the default public screen. I hadn't even considered it with the software I've written. I think Hollywood will allow me to choose to use the default public screen but defaults to workbench. I will be cognizant of that fact now.
NathanH
Hollywood can list all the public screen that are open (GetPunScreen). You can then bring to the front the one you want to use (ShowScreen). You can of course use PSI to open or close a screen from Hollywood using the run or execte commands. Please note that currently there is a bug so that GetFrontScreen doesn't correctly report the screen at the front, it reports the screen with the currently active window.
Cheers,
Nigel.
deadwoodAROS Dev
Posted 2 months ago@NathanH
Looks like you are in luck. Kalamatee jumped in and added support for these two flags but it would have to be tested. If you are interested I can provide you modified intuition.library for 64-bit.
Looks like you are in luck. Kalamatee jumped in and added support for these two flags but it would have to be tested. If you are interested I can provide you modified intuition.library for 64-bit.
NathanHMember
Posted 2 months agoWow, that's amazing. Thanks! I use 32-bit Linux Hosted for everyday system but can install a 64-bit version to either virtualbox or as another linux hosted to test it out.
NathanH
NathanH
deadwoodAROS Dev
Posted 2 months agoHere is new build with change applied:
https://axrt.org/development/intuition.library.20251003.x86-64-aros.zip
Let us know if it behaves as in AmigaOS.
https://axrt.org/development/intuition.library.20251003.x86-64-aros.zip
Let us know if it behaves as in AmigaOS.
NathanHMember
Posted 2 months agoThanks for the opportunity. Here's my experience. I've never dealt with AROS 64 bit so that was new but installed the 20250418 version via Virtualbox Linux. I made an iso with the new intuition library that you posted here and replaced the one in LIBS:. I used PSI to open a new screen which I entitled Test and checked 'System Default' and 'Close Gadget' and opened it. I then ran several progams and demos and opened Wanderer windows but everything opened on the Workbench screen. Not the System Default screen. That experiment resulted in the same behavior as without the new intuition library on 64 bit and is normal behavior for 32 bit AROS and AmigaOS.
On AmigaOS (from Aminet) there is a program called PSM (Public Screen Manager) which was available prior to the Public Screen Inspector (PSI). It allows the user to create a new screen as with PSI but allows the user to explicitly set the Shanghai and PopPubScreen flags for the screen being created.
I created a new System Default screen with PSI and started my hex editor. It ignored the System Default screen and opened on Workbench. I closed that screen and made a new screen with PSM as System Default with the Shanghai and PopPubScreen bits set and the same hex editor opened on the new screen and that screen popped to the front. The program was 'shanghaied' onto the System Default screen.
I have not found a program for 64 bit (or 32 bit for that matter) AROS which allows one to set those screen bits. I might be able to do it manually if parForth ran on 64 bit but it is 32 bit only. That is the extent of my ability. PSI is a more polished program than PSM but it would be cool if it would allow a user to set those bits (on all AmigaOS, 32-bit AROS, and 64-bit AROS) and intuition responded as described above.
I know there are more pressing concerns so have no problem waiting. It is something that would make user created screens useful though. Thanks.
NathanH
On AmigaOS (from Aminet) there is a program called PSM (Public Screen Manager) which was available prior to the Public Screen Inspector (PSI). It allows the user to create a new screen as with PSI but allows the user to explicitly set the Shanghai and PopPubScreen flags for the screen being created.
I created a new System Default screen with PSI and started my hex editor. It ignored the System Default screen and opened on Workbench. I closed that screen and made a new screen with PSM as System Default with the Shanghai and PopPubScreen bits set and the same hex editor opened on the new screen and that screen popped to the front. The program was 'shanghaied' onto the System Default screen.
I have not found a program for 64 bit (or 32 bit for that matter) AROS which allows one to set those screen bits. I might be able to do it manually if parForth ran on 64 bit but it is 32 bit only. That is the extent of my ability. PSI is a more polished program than PSM but it would be cool if it would allow a user to set those bits (on all AmigaOS, 32-bit AROS, and 64-bit AROS) and intuition responded as described above.
I know there are more pressing concerns so have no problem waiting. It is something that would make user created screens useful though. Thanks.
NathanH
deadwoodAROS Dev
Posted 2 months agoThat's interesting. Thank you for testing this change. I wonder why PSI does not have the ability to do what you described. On first read it seems like a missing feature, but maybe there is something deeper in this.
So in essence you are saying that PSM is the only way to do this on AmigaOS? Does it have sources? Or maybe there is some command line tool with sources that does what you need and could be ported to AROS.
So in essence you are saying that PSM is the only way to do this on AmigaOS? Does it have sources? Or maybe there is some command line tool with sources that does what you need and could be ported to AROS.
deadwoodAROS Dev
Posted 2 months agoGood, it has sources included. If anyone wants to jump in and try to port, let me know - I'll be happy to help.
NathanHMember
Posted 2 months agoHi,
PSM is just what I have always used. There are other tools. I used a cli tool called PubScreen to open a screen via a script to launch Wordperfect 4.1 automatically on a 640x200 screen with Topaz 9 as the default font so that it didn't crash yet was a little larger than Topaz 8. Wordperfect crashed with any other font I tried as the default. It won't run at all on modern resolutions. Just old school but the latest Linux Hosted AROS (March 2025) has switched my main machine from OS 3.9 on WinUAE 1.5 under Wine to Linux Hosted AROS 32 bit. I'm slowly gaining experience with it and how to set it up similar to my OS 3.9 setup. I use a dock I wrote which works on both which I like better than AmiStart.
NathanH
PSM is just what I have always used. There are other tools. I used a cli tool called PubScreen to open a screen via a script to launch Wordperfect 4.1 automatically on a 640x200 screen with Topaz 9 as the default font so that it didn't crash yet was a little larger than Topaz 8. Wordperfect crashed with any other font I tried as the default. It won't run at all on modern resolutions. Just old school but the latest Linux Hosted AROS (March 2025) has switched my main machine from OS 3.9 on WinUAE 1.5 under Wine to Linux Hosted AROS 32 bit. I'm slowly gaining experience with it and how to set it up similar to my OS 3.9 setup. I use a dock I wrote which works on both which I like better than AmiStart.
NathanH
@NathanH
Will the dock you wrote be available for download? If it is compatible with native AROS 64Bit, I would be curious to install it on my AROS One.
Will the dock you wrote be available for download? If it is compatible with native AROS 64Bit, I would be curious to install it on my AROS One.
NathanHMember
Posted 2 months agoOFF TOPIC
The dock is written with Hollywood which only compiles for AROS i386 32-bit currently. It uses a Hollywood icon display library that doesn't work with AROS Gorilla icons so I haven't released it. The library is going to be updated soon at which time I'll place it for AROS download.
NathanH
The dock is written with Hollywood which only compiles for AROS i386 32-bit currently. It uses a Hollywood icon display library that doesn't work with AROS Gorilla icons so I haven't released it. The library is going to be updated soon at which time I'll place it for AROS download.
NathanH
Thanks NathanH, on AROS One the icons are DualPNG, I think they are well supported.
deadwoodAROS Dev
Posted 1 month ago@NathanH
You might be in luck again. Kalamatee ported SetPSM command which allows you to set both flags. Let us know if it works (64-bit build attached)
You might be in luck again. Kalamatee ported SetPSM command which allows you to set both flags. Let us know if it works (64-bit build attached)
You do not have access to view attachments
NathanHMember
Posted 1 month agoWow, thanks again guys.
Here is my experience. I made an .iso with SetPSM on it, copied it to C:, and set the executable bit. I used PSI to open a new screen called 'test' with System Default checked. I opened a shell and typed 'SetPSM test' and got an error. I looked at the template for the SetPSM command and it doesn't ask for the name of the screen for which to set the shanghai and poppubscreen flags. Instead, it asks for two switches called SHANGHAI and POP. So, I figured maybe it searches for the System Default screen to set those flags for otherwise it would be setting them on the Workbench screen which is the opposite of what we want. So I typed 'SetPSM SHANGHAI POP'. I tried many different programs but nothing changed, everything opened on the Workbench Screen. I was deflated.
I opened PSI again to check whether 'test' was still marked as the System Default screen. It was. For no particular reason I decided to 'Jump' PSI to that screen. It didn't jump; it stayed on workbench. I thought maybe I had a partial success because Workbench was shanghaing it from the System Default screen to the Workbench screen. So I decided to investigate PSI further.
I rebooted and opened the new system default screen with PSI and hit 'Use'. Opened PSI again and hit 'Jump' to move the PSI window to the system default screen. Aargh, nothing happened. So now I don't know whether PSI is not actually setting a System Default screen or whether the 'Jump' functionality of PSI just doesn't work.
I decided to try the same steps on Linux Hosted 32-bit and got the same results. PSI doesn't jump to the System Default screen (either it isn't really setting it as the system default or the jump algorithm doesn't work). So I decided to try it on AmigaOS to make sure I wasn't crazy.
On AmigaOS I opened a System Default screen using PSI and hit Use. I reopened PSI and hit the 'Jump' button which moved the PSI window to the new System Default screen called test. PSI on AmigaOS was indeed setting the System Default correctly and its 'Jump' algorithm worked.
In conclusion, the SetPSM command does not allow for specifying which window to set the Shanghai and PopPubscreen flags on. That could be the problem. PSI on both 32-bit and 64-bit won't allow the PSI window to jump to the default public screen. This could be the problem if it is not actually setting the screen as system default. It may, however, be a bug in the PSI's jump algorithm as to why it won't jump to the default public screen. Overall I wasn't very successful, I'm afraid. Sorry. Thanks for all of your work!
NathanH
Here is my experience. I made an .iso with SetPSM on it, copied it to C:, and set the executable bit. I used PSI to open a new screen called 'test' with System Default checked. I opened a shell and typed 'SetPSM test' and got an error. I looked at the template for the SetPSM command and it doesn't ask for the name of the screen for which to set the shanghai and poppubscreen flags. Instead, it asks for two switches called SHANGHAI and POP. So, I figured maybe it searches for the System Default screen to set those flags for otherwise it would be setting them on the Workbench screen which is the opposite of what we want. So I typed 'SetPSM SHANGHAI POP'. I tried many different programs but nothing changed, everything opened on the Workbench Screen. I was deflated.
I opened PSI again to check whether 'test' was still marked as the System Default screen. It was. For no particular reason I decided to 'Jump' PSI to that screen. It didn't jump; it stayed on workbench. I thought maybe I had a partial success because Workbench was shanghaing it from the System Default screen to the Workbench screen. So I decided to investigate PSI further.
I rebooted and opened the new system default screen with PSI and hit 'Use'. Opened PSI again and hit 'Jump' to move the PSI window to the system default screen. Aargh, nothing happened. So now I don't know whether PSI is not actually setting a System Default screen or whether the 'Jump' functionality of PSI just doesn't work.
I decided to try the same steps on Linux Hosted 32-bit and got the same results. PSI doesn't jump to the System Default screen (either it isn't really setting it as the system default or the jump algorithm doesn't work). So I decided to try it on AmigaOS to make sure I wasn't crazy.
On AmigaOS I opened a System Default screen using PSI and hit Use. I reopened PSI and hit the 'Jump' button which moved the PSI window to the new System Default screen called test. PSI on AmigaOS was indeed setting the System Default correctly and its 'Jump' algorithm worked.
In conclusion, the SetPSM command does not allow for specifying which window to set the Shanghai and PopPubscreen flags on. That could be the problem. PSI on both 32-bit and 64-bit won't allow the PSI window to jump to the default public screen. This could be the problem if it is not actually setting the screen as system default. It may, however, be a bug in the PSI's jump algorithm as to why it won't jump to the default public screen. Overall I wasn't very successful, I'm afraid. Sorry. Thanks for all of your work!
NathanH
NathanHMember
Posted 1 month agoBTW, here is some other Public Screen findings that may or may not be relevant.
I wrote and use a dock on 32-bit Linux Hosted AROS which allows the user to select via menu which screen upon which it should reside. When I jump the dock to the new screen I made, the following things happened. New shells, Multiview, Scout, and OWB all open on the Workbench screen so must be hard-coded that way. JanoEditor (Editor in AROS parlance), hfinder, my rpnScientific calculator (both hfinder and the calc are Hollywood apps), and ZuneArc open on the default public screen upon which the dock resides.
To be clear, these programs are not opening on the default public screen because it is the default public screen as they open on workbench if my dock is on workbench. They are opening on the screen which my dock is on (from which they were opened). Thus, it is still unclear whether PSI is setting a screen as the system default.
NathanH
I wrote and use a dock on 32-bit Linux Hosted AROS which allows the user to select via menu which screen upon which it should reside. When I jump the dock to the new screen I made, the following things happened. New shells, Multiview, Scout, and OWB all open on the Workbench screen so must be hard-coded that way. JanoEditor (Editor in AROS parlance), hfinder, my rpnScientific calculator (both hfinder and the calc are Hollywood apps), and ZuneArc open on the default public screen upon which the dock resides.
To be clear, these programs are not opening on the default public screen because it is the default public screen as they open on workbench if my dock is on workbench. They are opening on the screen which my dock is on (from which they were opened). Thus, it is still unclear whether PSI is setting a screen as the system default.
NathanH
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Moderator: Administrator, Moderators
