[pad location] Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup

Bug #1798374 reported by Ty Unes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xpad
Fix Released
Medium
Arthur Borsboom

Bug Description

I thought of adding to the previously submitted bug, "#1425549 XPad 4.2 on Ubuntu - Notes are opened randomly scattered over workspaces" however this is a different version (5.0) and slightly different problem.

I have Xpad in system startup. When logging in to the desktop (Gnome 3) and Xpad starts, the *first* note I created shows up in it's proper, previous desktop location, all other notes created after the first are randomly positioned all over the desktop on every login. Obviously it would be nice for *all* notes to show up on the desktop where I last put them.

Perhaps there is a setting that I cannot find and obviously don't know about that fixes this. I suspect this could be a Gnome (or window manager) issue rather than Xpad.

Comments? Suggestions?

Related branches

Ty Unes (riverty)
no longer affects: ubuntu
Revision history for this message
Arthur Borsboom (arthurborsboom) wrote :

Hi Ty,

I am trying to understand what you are asking.

The request you have is only for the creation of new pads, is that right?
And if a new pad is requested by the user, you would like the pad to be on the same workspace as the last pad, is that right?

What do you have in mind how to define 'the last pad'?
What should happen if there is one pad on workspace 1 and one pad on workspace 2?

Changed in xpad:
status: New → Incomplete
Revision history for this message
Ty Unes (riverty) wrote : Re: [Bug 1798374] Re: Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup

Arthur,

Thank you for the return.

Let me explain it this way.

Add xPad to the system startup (however you do this for your desktop
environment - I'm using Ubuntu 18.04 with Gnome 3 (gnome-shell).
Start xPad with no notes, clean start.
Create a new note (Note # 1) and add some text in it.
Place this note (Note # 1) somewhere on your desktop, a specific location.
Reboot the machine and you should see Note # 1 in the exact location on
your desktop that you left it.

Now create a second note (Note # 2) and add some text in it.
Place this note (Note # 2) somewhere specific on your desktop.
Now, reboot the machine. You should see Note # 1 in the proper location you
left it, however Note # 2 will place itself in a random location on my
desktop, not the specific location I actually placed it. Subsequent notes
(#3, #4, #5, etc.) will place themselves at random locations on the
desktop, however, Note # 1 will be at the proper desktop location I placed
it. The expected behavior would be for ALL notes to come back exactly where
I placed them, not just the first created note.

Hopefully that makes more sense.

Regards,

*Ty Unes* - <email address hidden>

On Sat, Nov 10, 2018 at 11:30 AM Arthur Borsboom <email address hidden>
wrote:

> Hi Ty,
>
> I am trying to understand what you are asking.
>
> The request you have is only for the creation of new pads, is that right?
> And if a new pad is requested by the user, you would like the pad to be on
> the same workspace as the last pad, is that right?
>
> What do you have in mind how to define 'the last pad'?
> What should happen if there is one pad on workspace 1 and one pad on
> workspace 2?
>
> ** Changed in: xpad
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1798374
>
> Title:
> Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup
>
> Status in Xpad:
> Incomplete
>
> Bug description:
> I thought of adding to the previously submitted bug, "#1425549 XPad
> 4.2 on Ubuntu - Notes are opened randomly scattered over workspaces"
> however this is a different version (5.0) and slightly different
> problem.
>
> I have Xpad in system startup. When logging in to the desktop (Gnome
> 3) and Xpad starts, the *first* note I created shows up in it's
> proper, previous desktop location, all other notes created after the
> first are randomly positioned all over the desktop on every login.
> Obviously it would be nice for *all* notes to show up on the desktop
> where I last put them.
>
> Perhaps there is a setting that I cannot find and obviously don't know
> about that fixes this. I suspect this could be a Gnome (or window
> manager) issue rather than Xpad.
>
> Comments? Suggestions?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/xpad/+bug/1798374/+subscriptions
>

Revision history for this message
Arthur Borsboom (arthurborsboom) wrote : Re: Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup

Hi Ty,

Thanks for providing the exact steps to reproduce it. It is very clear.
Unfortunately, I have not been able (yet) to reproduce the behavior.

It might have to do with the fact that I am using Xpad 5.1, or maybe because I am using Arch Linux with Lxqt.

I will give Ubuntu a try later.

Changed in xpad:
status: Incomplete → Confirmed
importance: Undecided → Medium
assignee: nobody → Arthur Borsboom (arthurborsboom)
milestone: none → 5.2.0
Revision history for this message
Arthur Borsboom (arthurborsboom) wrote :

Hi Ty,

I have been able to reproduce the issue.
I believe the issue is not related to Ubuntu, but the way Xpad is terminated.

If Xpad is terminated in the 'graceful way' (what nobody does), for example with CTRL-Q (= Quit), then all the pad metadata (such as the desktop location) is explicitly saved.

If Xpad is terminated in the 'Linux way' (what everybody does), for example by shutting down your computer, the application gets a SIGTERM signal. This signal is a message from the Operating System to all applications: guys, whatever you are doing, save and close your stuff, because you need to stop soon! :)

I am guessing the SIGTERM signal handler is not implemented and therefore Xpad will never gracefully shutdown.

The solution I am betting on is implementing this handler and call the graceful shutdown function.

I will do this soon.

However, I first have to buy a aquarium pump with filter, because our fishes turn from orange to green to blue. :D

Revision history for this message
Ty Unes (riverty) wrote : Re: [Bug 1798374] Re: Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup
Download full text (3.4 KiB)

Arthur,

Nice find and yes, I can confirm this on my machine. I placed the two notes
I currently have on the desktop in the specific locations I want them, but
this time I properly "quit" the application (CTRL-Q) and then rebooted the
machine. Sure enough, the notes came back exactly where I put them!

I am a Linux System Administrator by day and a Linux Desktop User all other
times. While I've written several PHP / MySQL based web applications (and
websites) over the years, and am no stranger to BASH, I don't consider
myself a "programmer", though I'd be useful in testing?? So, I understand
what you are saying about Xpad getting a SIGTERM on a reboot or shutdown
request. And yes, I think most people would not think to properly "quit"
Xpad before a reboot or shutdown.

Thank you for your time in entertaining my concern and your response.

Good luck with the fishes!

*Ty Unes* - <email address hidden>

On Sun, Nov 18, 2018 at 4:15 AM Arthur Borsboom <email address hidden>
wrote:

> Hi Ty,
>
> I have been able to reproduce the issue.
> I believe the issue is not related to Ubuntu, but the way Xpad is
> terminated.
>
> If Xpad is terminated in the 'graceful way' (what nobody does), for
> example with CTRL-Q (= Quit), then all the pad metadata (such as the
> desktop location) is explicitly saved.
>
> If Xpad is terminated in the 'Linux way' (what everybody does), for
> example by shutting down your computer, the application gets a SIGTERM
> signal. This signal is a message from the Operating System to all
> applications: guys, whatever you are doing, save and close your stuff,
> because you need to stop soon! :)
>
> I am guessing the SIGTERM signal handler is not implemented and
> therefore Xpad will never gracefully shutdown.
>
> The solution I am betting on is implementing this handler and call the
> graceful shutdown function.
>
> I will do this soon.
>
> However, I first have to buy a aquarium pump with filter, because our
> fishes turn from orange to green to blue. :D
>
> ** Changed in: xpad
> Status: Incomplete => Confirmed
>
> ** Changed in: xpad
> Importance: Undecided => Medium
>
> ** Changed in: xpad
> Assignee: (unassigned) => Arthur Borsboom (arthurborsboom)
>
> ** Changed in: xpad
> Milestone: None => 5.2.0
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1798374
>
> Title:
> Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup
>
> Status in Xpad:
> Confirmed
>
> Bug description:
> I thought of adding to the previously submitted bug, "#1425549 XPad
> 4.2 on Ubuntu - Notes are opened randomly scattered over workspaces"
> however this is a different version (5.0) and slightly different
> problem.
>
> I have Xpad in system startup. When logging in to the desktop (Gnome
> 3) and Xpad starts, the *first* note I created shows up in it's
> proper, previous desktop location, all other notes created after the
> first are randomly positioned all over the desktop on every login.
> Obviously it would be nice for *all* notes to show up on the desktop
> where I last put them.
>
> Perhaps there is a setting that I cannot ...

Read more...

Changed in xpad:
status: Confirmed → Fix Committed
Revision history for this message
Arthur Borsboom (arthurborsboom) wrote : Re: Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup

Hi Ty,

My suspicion was right. The SIGINT and SIGTERM signals were not implemented and thus ignored. The SIGINT happens on a user request, for example CTRL-C. SIGTERM comes from the OS, by a kill command, reboot or shutdown.

Besides this fix, I have also implemented the missing auto-save functionality (+/- within a couple of seconds) when the pad location and/or the pad size changes. In case of a system crash, chances are big that this metadata (size/location) is saved.

For your interest, the code changes for these fixes can be found here.

https://bazaar.launchpad.net/~xpad-team/xpad/trunk/revision/974

The fixes will be available with the release of Xpad v5.2.

If you are able to build your own Xpad from source, please let me know if it has been fixed for you. If not, you have to wait until your Linux distribution (Ubuntu) has released v5.2 into the Ubuntu repositories.

summary: - Xpad 5.0 (Ubuntu 18.04) scattered pad locations on startup
+ [pad location] Xpad 5.0 (Ubuntu 18.04) scattered pad locations on
+ startup
Changed in xpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.