How To Disable Pending Update of Chromium Snap? message Kiosk

Sometimes use of snap cause too many issues if you are a Ubuntu user and find many difficulties in the loop and many more things which is very irritating there are lots of solution provided by people to fix the issue in ubuntu we will try to cover all of them in one place simply try one by one and you are good to go. so basically we can install chromium or firefox with any snap there is a method published on the Omgubuntu website now let us move to How To Disable Pending Update of Chromium Snap?

The most simple explanation is to disable Snaps completely and instead use the apt update mechanism, which, unlike the Snap daemon, can be made to behave. All of the same programs are available through apt, with the exception that they take up less disc space, load faster, and create fewer issues.

How To Disable Pending Update of Chromium Snap? message Kiosk

Now let’s move further possibility to fix the issue if you are using ubuntu 22.04 on your server then it is not possible to disable snap completely unless you use the older version of Ubuntu 18.04. if you don’t have the option to use the ubuntu 18.04 repository because using the last version to be able to send the kiosks away and not have to touch them for years to come

Another possibility is to construct a systemd unit that runs snap refresh after your network is up but before whatever is automatically launching Chromium. There could be a method to accomplish it with Snapd via a setting, but I’m not sure because I’m not experienced with it.

the person having difficulties said: I modified the refresh timer, but there are no “outside hours” because each kiosk has its own beginning and closing down times, and I can’t leave them on outside of those hours. I could delay the startup and have it update on boot, but it doesn’t appear to work.
I don’t want to disable app awareness because I don’t want canonical to make a mistake, and someday some kiosks will stop the browser at random, and I won’t know until the client is furious after being bombarded with client complaints.

so there is a solution comes here

Steps to Disable Pending Update of Chromium

we have to update after system is online but before chromium starts. there is a question How is your system getting online? If it’s done via the desktop environment (eg. a network-manager setting that requires you to be logged in) then attempting to do the refresh before the graphical environment starts won’t work.

Presumably, there is a script somewhere that runs chromium. we can make that

sudo snap refresh chromium; chromium instead?

We’ll need to make sudo accessible without a password. You may achieve this by adding a line

yourusername ALL=(ALL) NOPASSWD:ALL to a file in /etc/sudoers.d/.

If you don’t want the user to be able to run sudo due of the kiosk mode, you can construct a wrapper that only runs sudo. snap refresh chromium in /usr/local/bin and configure sudo to allow running just that.

I’m not convinced that relying just on the deb is a good idea. If browsers are updated “under their feet,” they may crash. As you suggest, it’s preferable to do it on boot. This is a matter of arranging to run sudo snap refresh chromium at the right time; it’s not some problem with snaps themselves.

Another option is to set up a systemd service unit that just executes snap refresh chromium as root. but in the proper boot sequence – after snapd has begun and the machine is online, but before the graphical environment has started. As previously said, this is only feasible if you set up the machine to be online outside of your desktop environment.

How to Manually Update Snap?

The snap refresh command can be used to trigger an update refresh regardless of when it is scheduled:

$ snap refresh
gnome-system-monitor 3.28.2 from ‘canonical’ refreshed
gnome-calculator 3.28.2 from ‘canonical’ refreshed

You can also use the refresh command to see when the previous refresh was and when the next one is scheduled:

$ snap refresh –time
timer: 00:00~24:00/4
last: today at 09:16 GMT
next: today at 17:39 GMT

The value of the timer system option is shown in the first line of the aforementioned report. This specifies how and when a refresh should occur.

Use the extra —list parameter to check which snaps will be updated with the next refresh:

$ snap refresh –list
Name Version Rev Publisher Notes
core 16-2.45.1+git2022.b6b3c25 9584 canonical✓ core
get-iplayer 3.26 250 snapcrafters –
qt551 5.5 30 keshavnrj –

refresh.hold

To postpone snap refreshes until a certain time and date, use refresh.hold (up to 90 days). RFC 3339 specifies the format for time and date.

For example, at 5:22pm (BST) on Tuesday, April 23, 2019, the following would be displayed:

2019-04-23T17:22:54+01:00

The correct format can be generated with the date command:

$ date –date=”BST 2019-04-23 17:22:54″ +%Y-%m-%dT%H:%M:%S%:z
2019-04-23T17:22:54+01:00

$ sudo snap set system refresh.hold=”$(date –date=tomorrow +%Y-%m-%dT%H:%M:%S%:z)”
$ sudo snap get system refresh.hold
2019-04-24T17:22:54+01:00

The next refresh can be postponed for up to 90 days after the last refresh, after which a refresh will be conducted regardless of the previous refresh. maintain their worth

Conclusion

So, in the end, the best solution is to delay the snap update it will delay for 90 days but still you cannot delay because of the updates then there is no solution now we will find and fix this soon.