You are not logged in.

#1 2018-06-21 05:01:07

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

pkexec thunar hangs on first-run

It's happened on all my helium installs. I don't know what else to report. It'll take five minutes before it fires up, and I grow impatient every time, so all of a sudden 3 windows appear.

I can add that pkexec thunar does not seem to work at all in xfce4-appfinder, not in stretch nor buster. It'll give me the password prompt and then nothing.

-edit- It works if I run xfce4-appfinder -c from a terminal. What the...

Offline

#2 2018-06-21 05:42:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,675
Website

Re: pkexec thunar hangs on first-run

Thunar's first window can be very slow to open. It was bothering me all the time - but never as long as 5 minutes!! I tried this fix from the Arch Wiki and also reenabled 'thunar --daemon' in openbox/autostart but it seemed to make no difference... until recently. I don't know if some upgrade's come in, but now even the first time it's only a couple of seconds, and since moving to Helium I haven't got that Arch fix any more anyway.

But all that is for regular user Thunar. Let me just try pkexec:

right-click "open as root" opens immediately
likewise 'pkexec thunar' in terminal

Although this is after opening a couple of user Thunar windows - not a complete cold start, and I have got the daemon running.

I don't understand what you mean by "pkexec thunar does not seem to work at all in xfce4-appfinder". I thought xfce4-appfinder was just a GUI for finding apps from their .desktop files?

EDIT: xfce4-appfinder's not part of the standard Helium setup - what else have you installed on top? Something that might be slowing things up?

EDIT2: I just tried on a fresh bootup, opened a terminal and 'pkexec thunar': after the password box Thunar came up almost immediately - less than a second.

Last edited by johnraff (2018-06-21 11:18:27)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Online

#3 2018-06-21 14:28:55

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

Re: pkexec thunar hangs on first-run

johnraff wrote:

EDIT2: I just tried on a fresh bootup, opened a terminal and 'pkexec thunar': after the password box Thunar came up almost immediately - less than a second.

Good. I'll try to confirm with a newinstall sometime soon.

I thought xfce4-appfinder was also a "run" dialog, it runs programs that don't have a *.desktop file. I use it as a drop-in replacement for gmrun, 'xfce4-appdinder --collapsed --disable-server'.

Offline

#4 2018-06-21 14:29:33

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: pkexec thunar hangs on first-run

I would give strace a shot.  Strace is used to find all system calls a program/script makes.
 
Using the code below, I've set this to output to a file in $HOME that will record the opening sequence of Thunar. 

The first number on a line will correlate the time between each system call,  the end number on each line will tell you how long the actual system call takes. <--- This is what you probably need to see.

strace -o ~/strace-output -r -T -e open thunar

Edit** -- Ack!!  This wouldn't help you with pkexec.  Sorry, got hung up on thunar smile

Last edited by sleekmason (2018-06-21 20:45:04)


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#5 2018-06-21 21:15:51

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: pkexec thunar hangs on first-run

Sorry about that. To see what pkexec is doing while opening Thunar:

sudo strace -o ~/strace-output -r -T -e trace=process pkexec thunar

Whether this is enough to really identify the problem . . . eh.  I wish I could replicate it. smile


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#6 2018-06-21 23:03:17

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

Re: pkexec thunar hangs on first-run

Fresh 64 bit install, I ran the initial upgrade and rebooted (the kernel is upgraded). From gmrun I ran pkexec thunar, the password prompt immediately opened and then nothing happened for 30 seconds. I tried opening htop via the shortcut keys, there was a pause, the thunar window appeared, then htop.

strace doesn't seem to show anything...

     0.000000 execve("/usr/bin/pkexec", ["pkexec", "thunar"], [/* 17 vars */]) = 0 <0.000308>
     0.010127 arch_prctl(ARCH_SET_FS, 0x7effc3036d80) = 0 <0.000019>
     0.016118 clone(child_stack=0x7effbea61df0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7effbea629d0, tls=0x7effbea62700, child_tidptr=0x7effbea629d0) = 2636 <0.000049>
     0.000462 clone(child_stack=0x7effbe260df0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7effbe2619d0, tls=0x7effbe261700, child_tidptr=0x7effbe2619d0) = 2637 <0.000037>
     0.065560 execve("/usr/bin/thunar", ["/usr/bin/thunar"], [/* 11 vars */]) = 0 <0.001229>
     0.027084 arch_prctl(ARCH_SET_FS, 0x7f8eb9cbda80) = 0 <0.000019>
     0.033397 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8eb9cbdd50) = 2638 <0.000697>
     0.006286 wait4(2638, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2638 <0.000554>
     0.000711 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2638, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
     0.035447 clone(child_stack=0x7f8eae852c70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8eae8539d0, tls=0x7f8eae853700, child_tidptr=0x7f8eae8539d0) = 2639 <0.000041>
     0.196771 clone(child_stack=0x7f8ead60dc70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8ead60e9d0, tls=0x7f8ead60e700, child_tidptr=0x7f8ead60e9d0) = 2640 <0.000070>
    17.495289 exit_group(0)             = ?
     0.002227 +++ exited with 0 +++

The command is working instantly now that it's opened once. Some weird hardware issue with my old Dell Inspiron?

Offline

#7 2018-06-22 01:14:07

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,675
Website

Re: pkexec thunar hangs on first-run

Network issue? Might gvfs be taking a long time to resolve your network? (Mine's a simple wire to a router.)

Try these:
1) Add the thunar  --daemon line to openbox/autostart, as we've already decided to put in by default in the next upgrade.
2) Add the gvfs network fix described in the Arch Wiki.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Online

#8 2018-06-22 01:45:54

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

Re: pkexec thunar hangs on first-run

^ I'll try those next time I do a fresh install. Like I said, after it opens one time everything is fine.

Offline

#9 2018-06-22 01:51:45

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,675
Website

Re: pkexec thunar hangs on first-run

Even after a reboot, it's quick?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Online

#10 2018-06-22 01:53:47

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

Re: pkexec thunar hangs on first-run

^ Yes. I'll report back if I find out anything new, but since nobody else seems to be reporting this, we can let it be for now.

Offline

#11 2018-06-22 02:06:53

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: pkexec thunar hangs on first-run

strace doesn't seem to show anything...

It would have to be run as the first opening instance, while the error was actually occuring. If run from a terminal, it will open a root instance of Thunar right after strace finishes with pkexec.  If this is what you did, then nope, didn't show squat:)

If I remember correctly, it is the last time stamp number on the line that gives time on each call.

Sounds like johnraff may have it figured anyway:)


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

Board footer

Powered by FluxBB