Xfce4-timer-plugin - how to restore timers?

In xfce4-timer-plugin, all defined by me timers disappear from time to time.

I discovered that the file: ~/.config/xfce4/panel/xfce4-timer-plugin-10.rc is responsible for this.
I have this file archived, but simply recovering this file while the system is running does not bring any effect (after the replacement, the ‘old’ settings are still not seen).
Even restarting the system doesn’t help here.

Only shutting down the system and replacing it from the outside (e.g. from Live USB) restores the ‘old’ alarms.

However, this is a cumbersome solution.

Do you know a way to replace this file (to recover ‘old’ timers) without shutting down the system?

You’d have to stop xfsettingsd before replacing and restart it afterwards.

Another way is to log out of the session and do the replacing from a TTY login
(command line - no GUI, a console file manager like “mc” can help with this)

The real way is to find out why the things “disappear” in the first place - and address that issue.

Perhaps simply delete them and then create them anew. :man_shrugging:

1 Like

This works. Thank you.

Based on your advice, I came up with the following solution (which eliminates the use of an inconvenient mc):

  • open terminal and input the command restoring the archived file: cp /PathToYourArchivedFile/xfce4-timer-plugin-10.rc ~/.config/xfce4/panel/ (this will place this command in Bash history)
  • log out of the session
  • go to TTY (Ctrl+Alt+F4)
  • use the last inserted command from Bash history to recover this file.

However, this solution has one drawback: you have to sign out by closing all the applications you use, and then log back in and restart those applications.

I haven’t tested the option with stop xfsettingsd because I don’t know how to do it. Does this option also require you to close all the applications you are using?

I have this issue for about half a year, but it has been reported for a longer time.
The last time this happened, I found no trace of this problem in the system log.

Too much work. I have ca 30-40 timers set.

… the little differences between people … :grinning:
To me, the use of a console file manager is not inconvenient at all - I use it all the time and only very seldom use a graphical one like Thunar (Xfce).
And it works in a terminal within the graphical session just as well as on a TTY - very helpful in case the graphical session would have some problem or didn’t start at all.

To me your “solution” is a very crude workaround - but of course, it works.

Me and others have suggested this more than once here on the forum, but that has been some time ago.
A forum search or (often better) a google search likely helps.

From memory - how I’d do it without much thinking … I’d kill the process:
killall xfsettingsd

and afterwards, restart it (also from memory):
xfsettingsd --replace
or log out and back in if you don’t care about open programs needing a restart

I have no experience with and don’t use these timers.
When I sort of need one to suspend my system after a video I’m watching
I simply write:
sleep 100m && systemctl suspend
and Enter, to have the system suspend after 100 minutes or however long the video is :man_shrugging:



edit: addition
what I found when playing with these timers

The following is not quite accurate:

ls -hl ~/.config/xfce4/panel/
total 28K
-rw-rw-r-- 1 jo jo  400 Dec 14 20:03 XfceTimer.rc
...
-rw-rw-r-- 1 jo jo  400 Dec 14 20:03 xfce4-timer-plugin-20.rc

There is not just one file, but two.
The contents are identical - add a timer or remove one - still two files with identical content.
…and:
the name of one of them is different from yours
xfce4-timer-plugin-20.rc instead of xfce4-timer-plugin-10.rc

But that different name may be because I played with it - including removing the first one completely from the panel
and then adding it once again.
But:
~/.config/xfce4/panel/XfceTimer.rc
is always there as well - with identical content

Is it more strange.
I have 3 files with timers here, but only the file xfce4-timer-plugin-10.rc is changed when I add/remove any timer, and only this file is cleared after the issue from this thread.
The other files with timers seem to be some old version of my timers:
XfceTimer.rc - dated on May 2023
xfce4-timer-10.rc dated on January 2018

And killall xfsettingsd does not allow to change timers. After this the situation is just the same as described in the first post.

How can you have 3 files when you speak of just two?
one is:
xfce4-timer-plugin-10.rc
the other is:
XfceTimer.rc
there is no third from what you said.
(perhaps a different date - one from your backup, the other one the actual file in use
who knows :man_shrugging: )

You likely need only one file named like xfce4-timer-plugin-10.rc
and another - with the same content - XfceTimer.rc

Again: the content is identical.
So I would conclude that you could just use the one from which you know it contains all your timers
and save it once as xfce4-timer-plugin-10.rc and once as XfceTimer.rc
and delete the third (whatever it’s name), which likely causes confusion.

Or delete them - you have a backup.
Then create a new timer.
Then replace the content of both files that are created with what works.

Any editor will do the job - just not while the session is running.
Then the files content change won’t stay.

killall xfsettings works for me
Not sure about the restart with:
xfsettingsd --replace


again I played a little:
If you remove all timers, this file will stay:
XfceTimer.rc
If you then add timers again - the content of this file will be used - and all your timers defined there should re-appear.
If I where you, I’d probably go that way first.
It seems to be the easiest.

The third file with timers was xfce4-timer-10.rc (without “plugin” in the name).
And I deleted it.

Then I copied timers from xfce4-timer-plugin-10.rc to XfceTimer.rc .
Let’s see if with this setup will be without the issue in the next few months.

OK.
Thank you for your help.
Let’s assume the problem is solved :slight_smile:

Although there remains a curiosity (not really important)
But it is still strange and not working as in your machine:
When I add a new timer:

  • via left mouse button over plugin’s icon and than choose “adding alarm”, then the alarm/timer is correctly added to the plugin’s pop-up list, but neither xfce4-timer-plugin-10.rc nor XfceTimer.rc is changed.
  • via right mouse button over plugin’s icon and than choose “Preferences” and add a timer via Plugin preferences window, then alarm/timer is correctly added to the plugin’s pop-up list and to the file xfce4-timer-plugin-10.rc but the file XfceTimer.rc remains unchanged.

Re the last part:

When I remove the timer panel icon, I’m left with XfceTimer.rc which still contains all the previously defined timers.

When I add the timer panel icon again, all the previous timers are present
and a new file with the naming scheme xfce4-timer-plugin-XY.rc (XY being some two digit number)
is created - which then also has the same content.

So:
don’t use your xfce4-timer-plugin-10.rc file at all.
it will be created again - with a slightly different name (the difference is in the number …)

  • when I left click on the panel icon, all the timers will be displayed and can be chosen/started …
  • when I right click ont the panel icon, I get a menu which contains the option “Properties” (“Einstellungen” - my system is in german).
    That then opens a window, where all the timers are displayed - and where I can add another one - or remove/change one.

so that behavior seems very different to your description

It appears that all you need is to remove all timers (remove the panel icon)
and then add it again
which will create a file NOT named xfce4-timer-plugin-10.rc (like your old one was) but one with a different number. Mine was called: xfce4-timer-plugin-17.rc

Then all the timers are there again and can be changed or added to as well.
The previously defined timers are never truly lost when you remove them - they are present as long as XfceTimer.rc is still there.

It appears you’ll have to live with the number Xfce4 chooses for you - rather than insist on using a file name with your own number (10 in this case - which comes from your backup).

It appears to me that your approach of keeping restoring all the old files was actually perpetuating the issue rather than being a good way of solving it.

I did some more experiments and it is still different than in your system.

The same at that moment. (And the file xfce4-timer-plugin-NN.rc was removed)

I have no timer seen. When I left click on the panel icon I only see the option for adding an alarm (as below: “Dodawanie alarmu” - in my polish system).
2023-12-16_232510

And XfceTimer.rc remains unchanged (with my old timers).

And when adding new timer/alarm this way, it is added and seen (as below).
2023-12-17_001337
What is strange, at this stage, I still have no file xfce4-timer-plugin-NN.rc and file XfceTimer.rc still remains unchanged (with my old timers).

Those new added timers work properly, so that means that this information is stored somewhere else (in the memory or in another file?).

When I right click on the panel icon, then choose “Properties”, “Add” new timer and accept it, at this moment file xfce4-timer-plugin-NN.rc is created and file XfceTimer.rc still remains unchanged (with my old timers).

Another conclusion: XfceTimer.rc is not used in my current system.

And I did more. I removed the package xfce4-timer-plugin to start from zero.
This didn’t remove the file XfceTimer.rc (with my old timers). So I removed it myself.
Than I reinstalled the package xfce4-timer-plugin and the situation is as follows:

  • by left click I can add timers but no file xfce4-timer-plugin-NN.rc is created
  • by right click >Properties I can add timers and in this moment file xfce4-timer-plugin-NN.rc is created (or modified when removing a timer).
  • XfceTimer.rc is not used in my current system.

… a lot of differences in what should be the very same
I’m sorry but I can’t / won’t dig any deeper into this.

One thing to keep things hanging in the air:
I’m not currently on Arch/Manjaro - but on Mint (Linux Mint 21.1 Vera, base: Ubuntu 22.04 jammy)

Xfce4 here apparently is at version 4.16

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.