Forum › Forums › General › Hardware › Making antiX work better on hi-res 4K video machines to avoid microscopic fonts
- This topic has 65 replies, 9 voices, and was last updated Sep 20-6:54 am by Xecure.
-
AuthorPosts
-
December 27, 2020 at 7:10 am #48152Moderator
BobC
::And after testing on a few PC’s this is the version I sent to anticapitalista containing PPC’s and my network detection logic, and Xecures autoscale-antix modified to handle multiple dissimilar screens etc. If either of you or other Linux savvy people would please install and test these on a test system and report back that would be great, especially if anyone has HiDPI screens, especially ones you can’t normally read.
Attachments:
December 27, 2020 at 11:48 am #48170MemberPPC
::@BobC – I have no hi dpi screens to help test the script (and I already tested the wi-fi detection part of your proposal), but I noticed a left over in your initial comment on the hi dpi script- it mentions “wi-fi”.
Also, I’m betting that the hi dpi script is a stand alone one (not inside the init file) so you can make it work better with functions, and also, in the future, call it from somewhere else, like the Control Panel…
I hope that, at least the hi dpi part gets picked up by the dev team.. about the wi-fi part of the script, I’m not so helpfull, mainly because, if it gets used in computers without an internet connection, according to your implementation of the script, the user always gets a connman GUI, even if there’s way to connect to ethernet/wi-fi (which is common in many parts of the world, like Brazil, and the reason I omitted that part in the script- it’s a fair assumption that if a computer was a way to detect wi-fi networks, it will probably be able to connect to one- but if the device has no ethernet and no wi-fi network card, probably it’s owner has no permanent access to a network connection).
The for the wi-fi connection routine to be the way that you propose and be “perfect”, it probably would need, in the final part that pops open “cmst -d”, to have a previous yad window, asking if the user wanted to try to automatically configure a network connection (with all the trouble that making that kind of “welcome screen” implies… and anticapitalista does not want in antiX)
In my point of view, probably automagically setting up screen resolution and network connection would fix the major problems newbies (or even seasoned Linux users) can have with antiX- once the screen and network connection is correctly set up, a regular “windows user” can at least get on-line or find out how to use office applications without “much” trouble, no “welcome screen” needed…P.
December 27, 2020 at 1:21 pm #48173ModeratorBobC
::PPC, you are correct that the network detection and internet detection are separately called by the startup script. That’s an easy fix.
The autoscale only affects the screen setups on computers with HiDPI displays, but for other computers it will create the folder arandr expects to find and a blank default.sh script that can be overlaid by the user if they want an unusual setup as their default, for example a system with 3 screens needs to know how they are arranged for the mouse to work correctly.
As for internet, there are many ways to connect, as you can see on the cmst screen, they might use their phone or bluetooth i think. In my case, I go someplace and am not connected and it pops up the screen to alert me that I dont have a connection, and I might tether it to my phone if wifi works on the phone but I can’t connect due to some unusal setup. If at home I might plug it in, or connect to a different wifi hub.
Do you think it’s better to pop up a box saying No Internet Connection and offer to connect or cancel? If you want that, I suggest using the text from someplace it already exists if possible. Would we need it to be a separate script to do that translation? It could give Connman (Easy) or Ceni (fallback) as options as well. I was happy with just popping up connman myself, but that might make everyone happier.
I feel really bad every time I see someone who couldn’t get connected complaining on a review or DW, or lost needing help, and even more so when it happens at my bosses house or a friend who I suggested antiX to. I think anti must also get frustrated by those situations, but I don’t speak for him.
December 27, 2020 at 1:29 pm #48174ModeratorBobC
::Ps, I dont think adding a control Centre option is a good idea. I think only having one network connection option on the control center with a script and yad boxes to drive it would be good, but that’s major change. Normal people dont know what to select is the big problem, I think. If they guess wrong it can make a mess, and certainly frustrate them. Most will give up at that point.
December 27, 2020 at 2:35 pm #48176ModeratorBobC
::If we were building that into a YAD script that allows you to choose between connman and ceni, it probably needs Xecure’s wifi switch thing built in both directions, or else normal people will trip over that?
We are beyond my ability at this point. Simple things I can get to work by fighting them for unlimited hours, but tricky things I’m more useful at testing and tweaking, as we are programming in a language that I don’t know. For example, tweakiing the autoscaler script took about a month for me.
December 27, 2020 at 4:49 pm #48192Member
Xecure
::If what was suggested in this thread (https://www.antixforum.com/forums/topic/incessant-er-periodic-rhythmic-neverending-network-activity/#post-48098) works, there is no need for a internet/load cmst script anymore. We could have wifi enabled by default in connman. cmst or connman-ui would start at boot following the startup file configuration.
I will download and test the autoscale script in a bit and see if I can also add a command to load the virtualbox video auto-resize command if antiX is running on a VirtualBox VM. This will help all those that want to test on a VM.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 27, 2020 at 5:20 pm #48200Moderator
Brian Masinick
December 27, 2020 at 7:07 pm #48215MemberPPC
::We could have wifi enabled by default in connman. cmst or connman-ui would start at boot following the startup file configuration.
Very nice! For devices with lower RAM, probably cmst -d would be advisable (so cmst does not linger on the RAM after being used to configure the wi-fi connection)
Against my own idea is that it occupies very little RAM, and people are used to having a “network icon” on the system tray, that they know they can click anytime, to check/configure/disable the connection… And it can be disabled any time the user wishes…P.
December 28, 2020 at 4:23 pm #48275Member
Xecure
::My feedback while testing on a few settings:
It is good that it detects if there is any DPI setting already saved and doesn’t perform any change.
Resolution scaling looks nice on a hiDPI display (tested on my retina-like tablet and the result is crisp).Problems: No way to restore the resolution to how it initially was (I remember that I had made the Cancel button restore to previous resolution). If I am using a HiDPI display and I don’t want scaling, I am stuck with the resolution untilr next reboot.
As we know, arandr doesn’t know how to set (or recognize) a different scale, so the choice “different setting with arandr” doesn’t work until next reboot.My experiments finally broke my old 1GB usb, so I will try again with a different USB flashdrive. I wanted to see if selecting a different scale, saving it and then see if the autoscale script would change it again.r
I will return once I perform a few more tests and mend the code on the part I mentioned.
By the way, should we really not use a timer to restore everything to before the autoscale was done? We should consider the strange case where scaling makes the screen go black and the user cannot select any option. This would make it impossible to use antiX if the autoscale script always starts at boot, making it a new obstacle to using antiX.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 28, 2020 at 5:00 pm #48278Moderator
Brian Masinick
::@Xecure: Good reasoning. Thank you for your research and observations.
As I have communicated before, I believe that open sharing is useful whether every idea makes it into the distribution or it simply helps people think about their own configuration and allows others to leverage what we have been learning.
Please continue to do the things that you have faithfully been doing and accept the thankful words and affirmation.
--
Brian MasinickDecember 28, 2020 at 6:01 pm #48282ModeratorBobC
::I was worried because I saw save/restore code did not save or restore the scale itself, I didn’t see a way to make it save everything the way it was (like arandr does, writing a script to run).
I did not know how to program a time out automatic response, but do agree that if we could save/restore correctly, the cancel option and timeout should restore and exit. The question is should it leave a default.sh in place to prevent the program from running again next time or not?
If the user (or the program) makes changes and saves them to ~/.screenlayout/default.sh as the script and arandr expects, the autoscale-antix program will be bypassed by the startup script beginning with the next time it runs.
anti has said he will add the program, so I added localization, but it required me to change the name to autoscale-antix.sh to do so.
This was the revised file I sent him, which included the localization. I will email anti to tell him to hold off.
PS: WRONG FILE ATTACHED, SEE NEXT POST FOR CORRECT FILE
- This reply was modified 2 years, 4 months ago by BobC.
Attachments:
December 28, 2020 at 6:10 pm #48285ModeratorBobC
::This is the correct file after network detection was removed and localization added
Attachments:
December 28, 2020 at 8:12 pm #48298Member
Xecure
::I would remove from startup:
# set screen resolution to default.sh if [ -x "$HOME/.screenlayout/default.sh" ] ; then (sleep 3 && . $HOME/.screenlayout/default.sh && sleep 3) else # create dir if not there and an empty default.sh if [ ! -d "$HOME/.screenlayout" ] ; then mkdir $HOME/.screenlayout fi echo "" > $HOME/.screenlayout/default.sh && chmod +x $HOME/.screenlayout/default.sh # fix HiDPI screen if necessary autoscale-antix fiThis could be included in the autoscale script before the font dpi check.
# set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then # Add $HOME/bin directory to PATH if not already there. [ -z "${PATH##*$HOME/bin*}" ] || PATH=$HOME/bin:$PATH fiIf you want the user’s bin folder in PATH, add it to the bashrc file instead (/etc/.skel/bashrc can be modified for future releases).
And remove the connection script and ntpdate script. It seems, with Moddit’s tests, that ntp is better suited to be launched from connman (and it works on his tests) or from ntpd suggested in the other thread.
The timer was added on a previous version but I cannot find the code right now.
These are the changes I propose (included in file):
– Loading the default.sh from the autoscale script directly, instead of using the startup file.
– If a Virtualmachine is detected, stop the autoscale script (I need to test a bit more).
– If Virtualbox is detected, if virtualbox service is not running, add the user if they want to launch it so VB auto-resolution works (launch it and restart session). (I also need to test it a bit more).
– Using temp files in RAM to speed the script.
– Giving the exact information about what scaling have been applied to the displays in the yad dialog (So the user knows what is going on).
– Reduced the amount of text (options are read as tips when placing the mouse on the buttons, as BobC already had)
– Give a 20 second timeout before the resolution restores to default.
– Cancel now again restores to the previous resolution.I will upload it here and later test again. Please, test if the script is now faster and if it works as intended.
Attachments:
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 28, 2020 at 8:14 pm #48302Member
Xecure
::Ignore previous message. I have been writing for the last hours and editing the file, and didn’t see BobC’s correction and new file.
I will download and add the changes there.
EDIT:By the way, does
if [[ -s $AFTER_SCALE_INFO ]]; then # Desktop was restarted, they already decided, and its in place echo "AFTER_SCALE_INFO found, don't run again..." exit 0 fieven work? I have it so the cleanup function removes the temp files when the script closes. Does any lingering info still remain somewhere that tells the script to not execute again?
- This reply was modified 2 years, 4 months ago by Xecure. Reason: Note about autoscale check?
antiX Live system enthusiast.
General Live Boot Parameters for antiX.December 28, 2020 at 8:40 pm #48307Member
Xecure
::Here I upload the modification for the other script prepared by BobC.
I have changed it so it no longer needs to be named autoscale-antix.sh for translation
I have also already prepared the .pot file with the Virtualbox autoscale request and have created the locale structure for all languages (I think) are used in transifex (though probably anticapitalista will use the .pot file and automate it himself).See if it works for you, BobC, and change whatever you don’t like/doesn0t work for you. Changes are the same as stated above.
Attachments:
antiX Live system enthusiast.
General Live Boot Parameters for antiX. -
AuthorPosts
- You must be logged in to reply to this topic.