callmejoe
Posts: 69
Joined: Sun Aug 28, 2016 10:50 pm

[solved] pcmanfm default view

Wed Mar 18, 2020 10:00 pm

Hello.
im running raspbian buster. i have pcmanfm configured to open the side pane in Places. It always defaults to Filesystem Root. Can't figure out how to get it to start on Home Folder.
Last edited by callmejoe on Thu Mar 19, 2020 3:07 pm, edited 1 time in total.

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: pcmanfm default view

Wed Mar 18, 2020 10:28 pm

The only way I can get filesystem root on startup is by running 'pcmanfm /'

Did you modify the menu entry?
What happens if you run 'pcmanfm' from a terminal window.

User avatar
kerry_s
Posts: 759
Joined: Thu Jan 30, 2020 7:14 pm

Re: pcmanfm default view

Wed Mar 18, 2020 10:31 pm

sounds like root owns it to me.

you didn't perhaps use a root file manager in your home folder?

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: pcmanfm default view

Wed Mar 18, 2020 10:36 pm

kerry_s wrote:
Wed Mar 18, 2020 10:31 pm
sounds like root owns it to me.

you didn't perhaps use a root file manager in your home folder?
If I'm logged in as pi and start pcmanfm as root it will still show Pi's home folder on startup...

callmejoe
Posts: 69
Joined: Sun Aug 28, 2016 10:50 pm

Re: pcmanfm default view

Thu Mar 19, 2020 12:06 am

kerry_s wrote:
Wed Mar 18, 2020 10:31 pm
sounds like root owns it to me.

you didn't perhaps use a root file manager in your home folder?
hmm. so i am running raspbian headless and i have a VNC server set up on it. looks like when i open a terminal it defaults to /

when i ssh into the pi it defaults correctly to /home/pi

has to be something with the way i set up the vnc server. i used tightvncserver. set up a systemd unit to start at boot. i guess i will start there.
any advice?
Attachments
pcmanfm.png
pcmanfm.png (51.11 KiB) Viewed 285 times

User avatar
kerry_s
Posts: 759
Joined: Thu Jan 30, 2020 7:14 pm

Re: pcmanfm default view

Thu Mar 19, 2020 12:53 am

i think it has a vnc server already, just need to enable it. i'm a bit tired today so i'm just going to point you to the docs, sorry.
https://www.raspberrypi.org/documentati ... te-access/

i just spent all day wiring a new kitchen light, hands are killin me.

callmejoe
Posts: 69
Joined: Sun Aug 28, 2016 10:50 pm

Re: pcmanfm default view

Thu Mar 19, 2020 12:50 pm

i dont like the Real VNC software that comes with the pi, so i usually install tightvnc. i had no issues with it on jessie or stretch. but i was using SysV scripts to start the vncserver at boot. on buster i am using systemd Units to start at boot and i think that is causing my issue.

if i ssh into the pi and start the vncserver manually everything works fine. something about the systemd startup unit is causing it to default to the root folder (not root user).

i've seen sporadic forum posts about this going back to 2012, but with no clear solution/reason.

for now i'm using this alias to start things manually

Code: Select all

alias rpi="ssh pi@192.168.1.7 'vncserver -geometry 1900x1080 -depth 24 :1' ; vncviewer 192.168.1.7:1 -passwd /home/callmejoe/.vnc/passwd"

callmejoe
Posts: 69
Joined: Sun Aug 28, 2016 10:50 pm

Re: pcmanfm default view

Thu Mar 19, 2020 3:07 pm

well after trying different service units i finally found one that worked.

Code: Select all

systemctl status vncserver@1.service
still show a fail error, but the server starts none the less and doesn't default to the root folder

Code: Select all

[Unit]
Description=Start tightvnc server
After=syslog.target network.target

[Service]
Type=forking
User=pi
WorkingDirectory=/home/pi
PAMName=login

# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -geometry 1900x1080 -depth 24
PIDFile=/home/pi/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

Return to “Raspberry Pi OS”