Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

Post Reply
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

Hi all!

After migrating the OS to another disk, XnView MP 0.93.1 started with the rights of an ordinary user for 20 seconds!!! And then work normally.
But! when running from root, it starts instantly. This also works with the option to preserve user's enviroment (sudo-sE).

Upgrading to 0.98.3, reinstalling the XnView (with purge), deleting "~/. config/xnviewmp" doesn't help.

When running in the terminal, first 20 seconds of silence, then the output starts (output is identical to that when running as root). The xnview and XnView processes appears immediately in the task list (in the System Monitor).

There are no messages relevant to the problem in the OS logs, "sudo journalctl-f" does not issue records after starting XnView. There is no XnView log.

Tell me pls: how do I identify the source of the problem? What is the lack of rights for the user?

Andrey
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by xnview »

there is perhaps a problem with rights of your account??
Pierre.
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

Thanks for the answer :)

I tried creating a new user - the effect is the same :(

In the OS, only the two block devices (HD with system partition and partition with /home ) and the paths to some data directories from /home/*** have changed. Other programs (I tried about 20 of them) do not experience problems.

I need to somehow find out where XnView wants to get into the OS at the time from launch to its first message to the console.... how to do this ?

IMHO the answer most likely lies in the way XnView gets the list of mounted devices in the explorer window... I have the right to be wrong ;)
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by xnview »

you have mounted devices with some rights?
Pierre.
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

Oh, I don't see any problems with the rights to the mounted devices...
Let me explain in more detail what was done.
The system partition was moved by rights-preserving copying (sudo cp-rxa / /mnt/******) to the partition of the new SSD. A separate partition of the old HD was previously mounted in the /home directory. In the new system, the user's home directory is moved to the /home directory again by copying with the same rights. In the /home directory, there was previously an additional directory with data available to all users. In the new system, I created the same directory for data with 0777 permissions. Additionally, the partitions of two more disks are mounted in /home, the rights to them are 0777.

ksx@xubuntu:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 99,2M 1 loop /snap/core/10958
loop1 7:1 0 99M 1 loop /snap/core/11081
loop2 7:2 0 408,8M 1 loop /snap/pycharm-community/236
loop3 7:3 0 408,8M 1 loop /snap/pycharm-community/238
sda 8:0 0 298,1G 0 disk
└─sda1 8:1 0 298,1G 0 part /home/Data
sdb 8:16 0 465,8G 0 disk
└─sdb1 8:17 0 465,8G 0 part /home/Sam500
sdc 8:32 0 931,5G 0 disk
├─sdc1 8:33 0 927,8G 0 part /media/ksx/LDATA
├─sdc3 8:35 0 1K 0 part
└─sdc5 8:37 0 3,7G 0 part
sdd 8:48 0 111,8G 0 disk
├─sdd1 8:49 0 103G 0 part /
└─sdd2 8:50 0 8,8G 0 part [SWAP]

ksx@xubuntu:~$ mount | grep "/dev/sd"
/dev/sdd1 on / type ext4 (rw,noatime,errors=remount-ro)
/dev/sdb1 on /home/Sam500 type ext4 (rw,noatime,x-gvfs-show)
/dev/sda1 on /home/Data type ext4 (rw,nosuid,nodev,relatime,x-systemd.device-timeout=1ms)
/dev/sdc1 on /media/ksx/LDATA type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)
ksx@xubuntu:~$

XnView freely reads data in the home directory, in the root (where allowed), and data directories /home/Data, /home/Sam500, /media/ksx/LDATA.

In fact, only the composition of the partitions and their UUIDs have changed.... There were no system updates from the moment of migration until the bug was detected with XnView. But I can see that something still broke :(

How, well, how to see where XnView can't get to ?
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by xnview »

ap1213 wrote: Thu May 20, 2021 6:16 pm How, well, how to see where XnView can't get to ?
could you try strace?
Pierre.
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

WOW! I just now learned from you about such a tool :) - that's cool !
However, to interpret the result, I need a deeper knowledge of Linux system functions. :(

File strace.txt - output " strace -o strace.txt xnview"
When running in the terminal, the pause occurs at the time of calling wait4 () (line 55)

File strace_f.txt - output " strace -f -o strace_f.txt xnview"
When running in the terminal, the pause occurs at the time of calling " 62113 poll([{fd=9, events=POLLIN}], 1, 25000) = 0 (Timeout)" in line 7088 (can be found by the characters I inserted "//*ksx***Timeout** " (those same 25 seconds ??? !!!).
Attachments
strace_f.txt.gz
(80.5 KiB) Downloaded 13 times
strace.txt.gz
(1.41 KiB) Downloaded 14 times
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by xnview »

Strange, don't see an explication :(
Pierre.
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

Sadly :(

I found another oddity: when using the context command "Open with", VLC starts about 20 seconds. I applied "strace" and saw only a lot of system calls. Output "strace-f-o strace_f.txt xnview" attached. At the same time, GIMP starts instantly.
But when working with root rights, the picture is as follows. If run with the root environment (sudo -s & xnview), then XnView-> "Open with" - >VLC (vlc-wrapper for root) starts in 5 seconds (but without sound -- need to export the Pulse-audio environment). And if run with the environment preserved (sudo-sE & xnview), then XnView-> "Open with" - >VLC starts for 20-25 seconds again (with sound :)).

Heh...
Attachments
strace_f_vlc.txt.gz
(802.06 KiB) Downloaded 13 times
ap1213
Posts: 6
Joined: Sat May 15, 2021 1:40 pm

Re: Xubuntu 20.04 - Long start of XnView MP with the rights of an ordinary user

Post by ap1213 »

Hi all :)

Today, the Linux kernel and the Nvidia proprietary driver were updated.... and XnWiew began to start instantly! 8)
Post Reply