You are not logged in.

#1 2021-06-10 14:12:20

Raadush
Member
Registered: 2015-03-05
Posts: 96

[SOLVED] Where to put commands from bash_profile when using LightDM?

Hi. I have one command I want to run in bash_profile. I was using text login, so it worked fine. Now I started using lightdm and that command is not run and I don't know where to put it. I tried creating .xinitrc or .xsession files in my home folder, but with no success. Thanks for any help.

Last edited by Raadush (2021-06-10 14:56:26)

Offline

#2 2021-06-10 14:19:40

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

I assume you're looking for https://wiki.archlinux.org/title/LightD … on_wrapper
Otherwise please be a tidbit more specific on the task at hand (ie. "what command?")

Online

#3 2021-06-10 14:25:58

Raadush
Member
Registered: 2015-03-05
Posts: 96

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

To start minidlna server: minidlnad -f /home/$USER/.config/minidlna/minidlna.conf -P /home/$USER/.config/minidlna/minidlna.pid
But hypotetically I will need more commands, like starting plank

Last edited by Raadush (2021-06-10 14:26:37)

Offline

#4 2021-06-10 14:30:01

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

Starting plank will be for your session, so your session script or some autostart system, https://wiki.archlinux.org/title/Autost … nt_startup
minidlna can theoretically also (or preferably) go into xprofile (since it's session agnostic)

You can also use a systemd user service, https://wiki.archlinux.org/title/ReadyM … r_own_user

Online

#5 2021-06-10 14:41:41

Raadush
Member
Registered: 2015-03-05
Posts: 96

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

Ok, I tried simple test how .xprofile works. I have SmartGit application for managing git repositories. So I tried to run it on session start - created .xprofile file and just added 'smartgit' command to it. When session launched, smartgit launched but nothing else, no xfce, nothing, only black screen with smart git. Why is that?

But minidlna command works fine with .xprofile. Thanks a lot

Last edited by Raadush (2021-06-10 14:54:19)

Offline

#6 2021-06-10 14:48:34

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

You need to treat .xprofile same as what you know about .xinitrc. You need to start your programs in the background with "&" at the end of the command lines. If you don't do that, the programs will block the continued execution of everything at login, your window manager won't get to start.

Last edited by Ropid (2021-06-10 14:49:06)

Offline

#7 2021-06-10 14:55:57

Raadush
Member
Registered: 2015-03-05
Posts: 96

Re: [SOLVED] Where to put commands from bash_profile when using LightDM?

Ropid wrote:

You need to treat .xprofile same as what you know about .xinitrc. You need to start your programs in the background with "&" at the end of the command lines. If you don't do that, the programs will block the continued execution of everything at login, your window manager won't get to start.

Oh, I didn't know that. smile It's Newbie corner here and I really belong here. big_smile

Thank you all. I think my problems are solved

Offline

Board footer

Powered by FluxBB