You are not logged in.

#1 2020-07-31 11:06:56

crazy_bird_guy
Member
Registered: 2020-07-31
Posts: 4

[SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

Greetings all,

This is my first time with Arch and so far I am enjoying it. This is also the first time I have tried out i3 and I am having some difficulties with auto-starting some applications. Since I am using Deepin DE alongside i3, I edited the i3 config file (/.config/i3/config). The commands and the context are as follows:

exec --no-startup-id nm-applet 
         exec --no-startup-id wal -R
         exec --no-startup-id pnmixer     

The problem I am having is that when I start i3 up, I notice pnmixer start for a second in the right hand corner or the status bar but it will soon disappear. If I manually launch it, the program will stay.

I  also noted in the i3 User's Guide that I could use

exec_always

since

 exec 

commands only run at initial startup. Does this mean that these commands only run when setting up the i3WM or does this mean that these commands only run when I restart my machine?

Thank you all in advance for your help.

Last edited by crazy_bird_guy (2020-08-03 13:26:12)

Offline

#2 2020-07-31 12:51:26

bmataram
Member
Registered: 2020-05-11
Posts: 4

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

Hi,

I also new in arch linux, and also exploring i3 at the moment.
Just want to share my choice of volume applet on my setup: https://www.archlinux.org/packages/comm … pasystray/

And on config file I put:

# Pulseaudio System Tray (applet)
exec --no-startup-id pasystray

Work flawlessly. Never drop out or disappear.

You can try to use exec_always to pnmixer and see how it goes.

To answer your question, i quote this line from here: https://i3wm.org/docs/userguide.html#_a … i3_startup

By using the exec keyword outside a keybinding, you can configure which commands will be performed by i3 on initial startup. exec commands will not run when restarting i3, 
if you need a command to run also when restarting i3 you should use the exec_always keyword. These commands will be run in order.

Never quit exploring... ;p

Offline

#3 2020-07-31 13:02:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,934
Website

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

In many common cases the distinction between exec and exec_always will not actually be relevant.  i3wm can be restarted (without restarting X) and replace itself as the window manager.  I suspect this is most commonly done when one updates their configs and wants to restart the WM while keeping their X11 session active (i.e., all their client windows stay open).  Both exec and exec_always command will run every time you start X with i3 regardless of whether you just rebooted or not.  The only difference is the "exec" commands will not run again if you restart/reload i3 as described above (without logging out and back into X).

As for why they are not running or are failing, we'd need log information.  An Xorg log from a session where they failed would be a start.  I'm not sure if i3 keeps it's own logs somewhere else too.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2020-07-31 13:53:01

crazy_bird_guy
Member
Registered: 2020-07-31
Posts: 4

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

I got it to work but I am not sure what made if work so I will post below the steps I took that made it work.

1. I tried changing exec to exec_always and no dice.
2. Fully restarted the computer, still didn't work
3. I installed pasystray and added the code:

 exec --no-startup-id pasystray

(after removing the line of code I had placed for pnmixer). Also no dice
4. Fully restarted the computer again, still didn't work
5. launched pasystray using command line. The program worked but it would not launch after a restart.
6. launched pasystray using

 pasystray --debug 

  and nothing looked wrong.
7. changed code in i3 config file to use exec_always and restarted the whole computer and it still did nothing
8. Restarted the whole computer a couple of more times and it suddenly started working.


I am not sure why but it now seems to work.


EDIT: I found out it only will appear after logging out and back into i3. It still will do the same if you fully restart. I will check on that.

Last edited by crazy_bird_guy (2020-07-31 15:23:57)

Offline

#5 2020-07-31 15:13:51

crazy_bird_guy
Member
Registered: 2020-07-31
Posts: 4

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

Here are the logs I got from i3.

This one is the log from a full restart where the icon appears for a few seconds then disappears:
here

This one is a log off and a log in which the icon stays:

here

Offline

#6 2020-08-01 07:33:13

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 87
Website

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

This seems to be caused by upstream issue: https://github.com/i3/i3/issues/4159

Downgrading i3 to 4.18.1 can be a workaround until the issue is fully resolved upstream and a new version is packaged.


Home is where my Arch is

Offline

#7 2020-08-01 14:49:19

hpmachining
Member
From: Michigan
Registered: 2016-11-23
Posts: 33
Website

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

There is a discussion for what sounds like the same issue posted here: applets get closed after startup. A workaround posted adds a sleep command to the config line.

exec --no-startup-id sleep 5; pnmixer

Offline

#8 2020-08-02 09:24:12

bmataram
Member
Registered: 2020-05-11
Posts: 4

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

demaio wrote:

This seems to be caused by upstream issue: https://github.com/i3/i3/issues/4159

Downgrading i3 to 4.18.1 can be a workaround until the issue is fully resolved upstream and a new version is packaged.

It seem so...
I also got this 'symptom'. All my applet disappear after the i3wm latest update.

Offline

#9 2020-08-02 09:47:49

ondoho
Member
Registered: 2013-04-30
Posts: 638
Website

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

bmataram wrote:

I also got this 'symptom'. All my applet disappear after the i3wm latest update.

Did you try what was suggest in post #7?


However studied and stilted your rant, it can never hide the base and primitve emotion that inspired it.

Offline

#10 2020-08-03 13:19:11

crazy_bird_guy
Member
Registered: 2020-07-31
Posts: 4

Re: [SOLVED] Scripts and Programs are not Auto-Starting Correctly i3

Sorry for not replying earlier. I tried the sleep command to tide me over till a new update and it worked. It, of course takes a few seconds to load but at least it loads every time I reboot the computer!

Offline

Board footer

Powered by FluxBB