You are not logged in.

#1 2016-01-18 21:06:32

acnelson12
Member
Registered: 2016-01-18
Posts: 5

[solved] Tint2 autostart fails. Fresh install

Okay, so this is my first experience with Arch, and I regret to be asking for help so soon, but everything I find seems to give the same advice.

I have installed Openbox and Tint2, no other desktop environment stuff.  I would like to have tint2 autostart.  When I enter

tint2

at the terminal prompt, the taskbar shows up perfectly.  I have created

~/.config/openbox/autostart

All it does is tell the computer to start tint2:

#
# These things are run when an Openbox X Session is started.
# You may place a similar script in $HOME/.config/openbox/autostart
# to run user-specific things.
#

# If you want to use GNOME config tools...
#
#if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then
#  /usr/lib/openbox/gnome-settings-daemon &
#elif which gnome-settings-daemon >/dev/null 2>&1; then
#  gnome-settings-daemon &
#fi

# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
tint2 &

The computer has been rebooted (twice, actually).  No luck.  Nothing seems to say I need to do anymore than I've already done which makes it frustrating.  I've also looked at the corresponding file from my old #! installation, and it doesn't seem to suggest I need any more than I already have.
Any help is welcome.
Thanks

=============================
The problem was that I was only starting openbox in my .xinitrc file instead of openbox-session.  Correcting this solved the problem.

Last edited by acnelson12 (2016-01-18 22:05:22)


Committed myself fully to Linux January, 2014.  Never installed the same distro twice.  Went from Debian to Slackware to Crunchbang now to Arch.  So far it's been fun.

Offline

#2 2016-01-18 21:21:03

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [solved] Tint2 autostart fails. Fresh install

You may want to check whether the autostart script is actually executed - try adding something like this:

echo 'autostart executed!' > $HOME/autostart_success

and see if that file gets created upon start.

If so, redirecting tint's output to a file might be helpful:

tint2 >$HOME/tint2_log 2>&1 &

Perhaps it tells you the reason why it cannot correctly start.

If not, check if it's executable. I'm not familiar with those autostart files, though, so I'm not sure whether that's really an issue.

Last edited by ayekat (2016-01-18 21:22:21)


pkgs │ hacks │ cfg │ blag

Offline

#3 2016-01-18 21:28:14

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

Re: [solved] Tint2 autostart fails. Fresh install

As ayekat points out, I too think it needs to be executable.   I also think the file name is supposed to be autostart.sh


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 2016-01-18 21:33:54

acnelson12
Member
Registered: 2016-01-18
Posts: 5

Re: [solved] Tint2 autostart fails. Fresh install

ayekat wrote:

You may want to check whether the autostart script is actually executed - try adding something like this:

echo 'autostart executed!' > $HOME/autostart_success

and see if that file gets created upon start.
...
If not, check if it's executable. I'm not familiar with those autostart files, though, so I'm not sure whether that's really an issue.

That's a really elegant idea.
Here is my current autostart file:

#
# These things are run when an Openbox X Session is started.
# You may place a similar script in $HOME/.config/openbox/autostart
# to run user-specific things.
#

# If you want to use GNOME config tools...
#
#if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then
#  /usr/lib/openbox/gnome-settings-daemon &
#elif which gnome-settings-daemon >/dev/null 2>&1; then
#  gnome-settings-daemon &
#fi

# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
tint2 &
echo 'autostart executed!' > $HOME/autostart_success

No file got created.  I checked the permissions on autostart, and anyone has permission to execute it.


Committed myself fully to Linux January, 2014.  Never installed the same distro twice.  Went from Debian to Slackware to Crunchbang now to Arch.  So far it's been fun.

Offline

#5 2016-01-18 21:35:38

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

Re: [solved] Tint2 autostart fails. Fresh install

Try changing the name to autostart.sh   (I think we had been posting at the same time)


Edit:  If that does not work, add

#!/bin/bash

as the first line in the file.

Last edited by ewaller (2016-01-18 21:37:40)


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

#6 2016-01-18 21:43:03

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [solved] Tint2 autostart fails. Fresh install

acnelson12 wrote:

Okay, so this is my first experience with Arch, and I regret to be asking for help so soon, but everything I find seems to give the same advice.

Might be useful to let us know what that advice was?

... Are the autostart file permissions correct? autostart should be flagged executable wink <-- redundant sad

Last edited by satanselbow (2016-01-18 21:44:02)

Offline

#7 2016-01-18 21:45:30

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,716
Website

Re: [solved] Tint2 autostart fails. Fresh install

How are you starting openbox?

Just for the record, my autostart script is non-executable, has no shebang, and doesn't have the .sh extension, and it works.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#8 2016-01-18 21:48:59

acnelson12
Member
Registered: 2016-01-18
Posts: 5

Re: [solved] Tint2 autostart fails. Fresh install

ewaller wrote:

Try changing the name to autostart.sh   (I think we had been posting at the same time)


Edit:  If that does not work, add

#!/bin/bash

as the first line in the file.

I was actually just trying that! haha (the first thing you said)
The first part you said did not work, although I went back and manually executed it.  The script runs fine.
The second part, both by itself and together with the first part, does not work.
It still won't execute on its own.
Here is the current state of the file:

#!/bin/bash
# These things are run when an Openbox X Session is started.
# You may place a similar script in $HOME/.config/openbox/autostart
# to run user-specific things.
#

# If you want to use GNOME config tools...
#
#if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then
#  /usr/lib/openbox/gnome-settings-daemon &
#elif which gnome-settings-daemon >/dev/null 2>&1; then
#  gnome-settings-daemon &
#fi

# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
tint2 &
echo 'autostart executed!' > $HOME/autostart_success

Committed myself fully to Linux January, 2014.  Never installed the same distro twice.  Went from Debian to Slackware to Crunchbang now to Arch.  So far it's been fun.

Offline

#9 2016-01-18 21:51:00

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [solved] Tint2 autostart fails. Fresh install

WorMzy wrote:

Just for the record, my autostart script is non-executable, has no shebang, and doesn't have the .sh extension, and it works.

And mine is, none, no .sh ... and works...


Is the test file created if you remove tint2 from the config file? ... ie creating the file is the only operation autostart performs.

Offline

#10 2016-01-18 21:54:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: [solved] Tint2 autostart fails. Fresh install

Openbox's autostart is does *not* need to be executable nor have a shebang.

Have you specified yet how you start openbox?  Do you use openbox itself, or openbox-session?  I'm not sure if the former reads the autostart file.

But on that note, I'm not a fan of openbox's autostart file - it's poorly handled.  Just put tint2 in your xinitrc.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2016-01-18 21:57:00

acnelson12
Member
Registered: 2016-01-18
Posts: 5

Re: [solved] Tint2 autostart fails. Fresh install

Lots of replies here. haha

satanselbow wrote:
acnelson12 wrote:

Okay, so this is my first experience with Arch, and I regret to be asking for help so soon, but everything I find seems to give the same advice.

Might be useful to let us know what that advice was?

The advice was simply "add the following line to autostart".  The line was "tint2 &".

WorMzy wrote:

How are you starting openbox?

Just for the record, my autostart script is non-executable, has no shebang, and doesn't have the .sh extension, and it works.

I edited the .xinitrc file:

setxkbmap -layout us -variant dvorak
exec openbox

(yes, I like my weird keyboard)

satanselbow wrote:

Is the test file created if you remove tint2 from the config file? ... ie creating the file is the only operation autostart performs.

No it is not.


Committed myself fully to Linux January, 2014.  Never installed the same distro twice.  Went from Debian to Slackware to Crunchbang now to Arch.  So far it's been fun.

Offline

#12 2016-01-18 21:57:23

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

Re: [solved] Tint2 autostart fails. Fresh install

Trilby, WorMzy  -- Okay, okay...  Mine autostart.sh  is executable, has the shebang  and it works smile  It was a just shot in the dark


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

#13 2016-01-18 22:01:09

acnelson12
Member
Registered: 2016-01-18
Posts: 5

Re: [solved] Tint2 autostart fails. Fresh install

Trilby wrote:

Openbox's autostart is does *not* need to be executable nor have a shebang.

Have you specified yet how you start openbox?  Do you use openbox itself, or openbox-session?  I'm not sure if the former reads the autostart file.

But on that note, I'm not a fan of openbox's autostart file - it's poorly handled.  Just put tint2 in your xinitrc.

That's it.
Use openbox-session instead of just openbox.  #$%@#! that was simple.  Thanks, guys!

Last edited by acnelson12 (2016-01-18 22:02:06)


Committed myself fully to Linux January, 2014.  Never installed the same distro twice.  Went from Debian to Slackware to Crunchbang now to Arch.  So far it's been fun.

Offline

#14 2016-01-18 22:02:59

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,716
Website

Re: [solved] Tint2 autostart fails. Fresh install

acnelson12 wrote:

I edited the .xinitrc file:

setxkbmap -layout us -variant dvorak
exec openbox

Try "openbox-session", as Trilby mentioned.

acnelson12 wrote:

(yes, I like my weird keyboard)

Same, though I use the UK variant. tongue

@ewaller: The manpages and "example" say different things regarding the naming, it's not very well documented. Apparently both work, so I guess either's good.

EDIT: glad that was it.

Last edited by WorMzy (2016-01-18 22:04:39)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB