You are not logged in.

#1 2021-03-17 12:17:12

portaro
Member
Registered: 2020-01-03
Posts: 25

Script welcome message on autostart dont work.[solved]

In past I use a distro called Gobang Linux that is very similar to Bunsenlabs, it also uses Openbox.

I this distro we have a message script welcome at each time that we start session on pc.

The site of distro.
https://gobangos.sourceforge.io/

So from this date I allways use this script to put a derivative on my instalaltions, I iinstall xdotool and aosd-cat as dependencies to make the scritp work, I do the same work on Bunsenlabs but for some reason doesn't work.

The script :

#!/bin/bash
asd() {
cat <<"EOT"
  


 ____  __     __   _  _  __  ____  _  _ 
(  __)(  )   / _\ / )( \(  )(_  _)/ )( \
 ) _) / (_/\/    \\ \/ / )(   )(  ) \/ (
(__)  \____/\_/\_/ \__/ (__) (__) \____/




EOT
}

asd  | aosd_cat -n "Monospace 6"  -R "#ABB3C6" -B None -S black -t 2 -f 500 -u 4500 -o 500  -p 6 -l 0 -s 192 -r 255 
echo | aosd_cat -n "Monospace 8"  -R "#9f9f9f" -B None -S black -t 2 -f 500 -u 16000 -o 500  -p 6 -l 0 -s 192 -r 255

I think that have any differente method to work with .sh files on Bunsenlabs generally because I have some .sh files that simple dont work when  click on her icon and simply runs geany a open the files, I had markd previously to "make this file executable on settings of file on thunar".
But if I open the terminal on the path of the script and run them from terminal with :
→ $ sh mensagem.sh
it works and appear on desktop.

Maybe someone have an idea to make this work put the file on /.config/autostart to appear at any time that we start our session on pc.

Thanks.

Last edited by portaro (2021-03-26 00:14:33)

Offline

#2 2021-03-17 13:33:41

misko_2083
Member
Registered: 2016-05-24
Posts: 434

Re: Script welcome message on autostart dont work.[solved]

https://linux.die.net/man/1/openbox-session

On log in, openbox-session will run the ~/.config/openbox/autostart.sh script if it exists... You may place anything you want to run automatically in those files, for example:

    xsetroot -solid grey &
    gnome-settings-daemon &

Make sure that each line is followed by a "&" or else the script will stop there and further commands will not be executed. You can use the /etc/xdg/openbox/autostart.sh file as an example for creating your own.


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#3 2021-03-17 17:04:18

portaro
Member
Registered: 2020-01-03
Posts: 25

Re: Script welcome message on autostart dont work.[solved]

misko_2083 wrote:

https://linux.die.net/man/1/openbox-session

On log in, openbox-session will run the ~/.config/openbox/autostart.sh script if it exists... You may place anything you want to run automatically in those files, for example:

    xsetroot -solid grey &
    gnome-settings-daemon &

Make sure that each line is followed by a "&" or else the script will stop there and further commands will not be executed. You can use the /etc/xdg/openbox/autostart.sh file as an example for creating your own.

It works but need to put the following line on the autostart file placed in ./config/bunsen/autostart

## mensagem log-in
sh /home/joao/.config/autostart/mensagem.sh &

Captura-de-ecr-2021-03-17-17-10-17.png

Offline

#4 2021-03-18 02:17:41

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,851
Website

Re: Script welcome message on autostart dont work.[solved]

portaro wrote:

Maybe someone have an idea to make this work put the file on /.config/autostart to appear at any time that we start our session on pc.

~/.config/autostart is a place to put desktop files that will be started up along with (or sometimes replacing) the files in /etc/xdg/autostart. Desktop files have a special structure - open one in a text editor to see. ~/.config/autostart  is not the best place to put scripts - its special purpose might be the reason Thunar wasn't making your script executable whan asked. (Try 'ls -l' to see the executability of files in a directory.)

Anyway, you could move your script to some other location and try again making it executable with Thunar, so you won't need to run it with 'sh'. Also, if you make a file executable and put it in ~/bin then you don't need to use the full path - you'd be able to put this in ~/config/bunsen/autostart:

## mensagem log-in
mensagem.sh &

...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#5 2021-03-18 15:32:27

portaro
Member
Registered: 2020-01-03
Posts: 25

Re: Script welcome message on autostart dont work.[solved]

johnraff wrote:
portaro wrote:

Maybe someone have an idea to make this work put the file on /.config/autostart to appear at any time that we start our session on pc.

~/.config/autostart is a place to put desktop files that will be started up along with (or sometimes replacing) the files in /etc/xdg/autostart. Desktop files have a special structure - open one in a text editor to see. ~/.config/autostart  is not the best place to put scripts - its special purpose might be the reason Thunar wasn't making your script executable whan asked. (Try 'ls -l' to see the executability of files in a directory.)

Anyway, you could move your script to some other location and try again making it executable with Thunar, so you won't need to run it with 'sh'. Also, if you make a file executable and put it in ~/bin then you don't need to use the full path - you'd be able to put this in ~/config/bunsen/autostart:

## mensagem log-in
mensagem.sh &

Thanks for the info.
I am still in the process of know better the Bunsenlabs, it works fantastic. I like.

Offline

Board footer

Powered by FluxBB