You are not logged in.

#1 2018-11-19 09:44:23

Skunky
Member
Registered: 2018-01-25
Posts: 231

[Solved] File Manager hang on start (i3)

Hello everyone im learning how to use i3, everything was working fine until yesterday when file manager with no apparent reason stopped working correctly, it hangs for several seconds (15-16) then it open normally, it doesn't happen if i do for example

sudo thunar

also i tried Caja,Thunar and Nautilus.
Running Thunar and Nautilus from terminal give no output at all while Caja output this

Caja-Share-Message: 10:36:38.593: Called "net usershare info" but it failed: 'net usershare' returned with error 1: Can't load /etc/samba/smb.conf - run testparm to debug it

i don't know if this can be related, any ideas?
Thanks in advance.
EDIT: i just installed PCManFM and it works fine, but i would like to know why other file managers stopped working thanks.

Last edited by Skunky (2018-11-21 15:24:18)

Offline

#2 2018-11-19 13:14:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,729

Re: [Solved] File Manager hang on start (i3)

You forgot to say what "file manager" actually is, but a naive "sudo some_gui_process" will fail in *many* cases, starting from X11 access over the dbus environment and ending in the fact that several GUI FM actively suppress being run as UID0 for major security conerns…

Offline

#3 2018-11-19 15:46:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,715

Re: [Solved] File Manager hang on start (i3)

I agree with Seth, I would not run thunar as root.   Regardless, sudo is not the way to run a program with a GUI.  If you must do this, use something like gksu or gksudo instead of sudo.

Last edited by ewaller (2018-11-19 15:46:52)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2018-11-20 02:48:00

Skunky
Member
Registered: 2018-01-25
Posts: 231

Re: [Solved] File Manager hang on start (i3)

Thank you both for your quick reply, i know i should not run Thunar as root indeed im looking for a solution to run it as non-root user because it takes about 20 seconds to start for some reasons.
I also noticed that this happen if i use "Extract" options from context menu (i have to wait the same amount of time for archive manager to open).
Thanks for your help

Offline

#5 2018-11-20 07:30:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,729

Re: [Solved] File Manager hang on start (i3)

"about 20 seconds" sounds like a dbus timeout, but we're actually not a bit closer to understand your problem, notably reg. "looking for a solution to run it as non-root user" and whether that means you're facing the startup issues even as regular user or whether you you desire to use an unprivilegued FM to deal w/ files your user lacks permissions on.

Unless you become *much* more specific about your problem, this is going absolutely nowhere.

Offline

#6 2018-11-20 08:41:26

Skunky
Member
Registered: 2018-01-25
Posts: 231

Re: [Solved] File Manager hang on start (i3)

I'm sorry i badly explained myself, basically when i start thunar, it takes 20 seconds to start simple as that smile

Offline

#7 2018-11-20 10:51:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,433

Re: [Solved] File Manager hang on start (i3)

As your normal user? How are you starting i3? post your ~/.xinitrc and

loginctl show-session $XDG_SESSION_ID

Offline

#8 2018-11-21 13:18:14

Skunky
Member
Registered: 2018-01-25
Posts: 231

Re: [Solved] File Manager hang on start (i3)

Thanks for your reply, here is my .xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

#export GDK_BACKEND=x11
#exec gnome-session
#exec mate-session
exec i3
#startxfce4

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

And loginctl show-session $XDG_SESSION_ID

Id=1
User=1000
Name=skunky
Timestamp=Wed 2018-11-21 13:54:04 UTC
TimestampMonotonic=4801571
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=login
Scope=session-1.scope
Leader=471
Audit=1
Type=tty
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=1542808443180000
IdleSinceHintMonotonic=3406625
LockedHint=no

Offline

#9 2018-11-21 13:37:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,433

Re: [Solved] File Manager hang on start (i3)

Your exec i3 is at the wrong location, move that after the

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
...
fi

block. Currently these scripts, which are essential for proper session startup, are not read because you run exec i3 to soon and the interpreting shell is replaced.

Offline

#10 2018-11-21 15:23:52

Skunky
Member
Registered: 2018-01-25
Posts: 231

Re: [Solved] File Manager hang on start (i3)

Thank you very much for explaining my mistake, marking as solved

Offline

Board footer

Powered by FluxBB