LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-31-2022, 09:11 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
e16 autostart issues not working


Quote:
MOD:
I got is 3/4 working. the icons are not showing up right away.

marking solved
instructions
Quote:
Session Scripts

E16 can automatically run user scripts or applications during Startup, Restart, and Shutdown. This facilitates the loading of system tray applets, rss readers, screen savers, and other daemons (e.g. dbus), and allows for cleanup of programs that don’t terminate properly when e16 quits (this is especially common with KDE applications in e16 and the arts daemon or dcop server keeps running).

The session script feature is controlled by the configuration keys (shown with default values):

misc.session.enable_script = 0
misc.session.script = $EROOT/scripts/session.sh

misc.session.enable_script is a boolean. When set to 1, e16 will execute the script in the misc.session.script key. By default, this feature is disabled. When enabled, it will do nothing until the home directory ($ECONFDIR — normally ~/.e16) is configured.

The default session.script is located in $EROOT/scripts/session.sh ($EROOT is normally /usr/share/e16 or /usr/local/share/e16). It will look for directories in the user’s $ECONFDIR/ (~/.e16/) called:

~/.e16/ ($ECONFDIR)
Init/
Start/
Stop/

and run any and/or all scripts or executables in each when e16 starts, restarts, and shuts down. If no scripts or executables are present, or if any of the directories Init, Start, and Stop do not exist, nothing will happen and e16 will start up as usual. So, in order to use session scripts, all the user has to do is to populate the Init, Start, and Stop directories with scripts, applications, or links to applications that should run during Startup, Restart, or when e16 is stopped.

The user may write a custom script and place it anywhere. Simply modify the config file by using:

$ eesh set misc.session.script myscript

and modify it (be sure to chmod +x the file otherwise it won’t run). The session script is called with one of three command parameters; init, start, and stop. Any custom script should have a code block similar to this in order to function properly in e16.

case "$1" in
init)
# do blah
# or do function init
start)
# do blah
# of do function start
stop)
# do blah
# or do function stop
esac

Automatic script running can be enabled/disabled in the Settings Dialog under "Session", or by setting misc.session.enable_script key to 1/0:

$ eesh set misc.session.enable_script 1/0

This process is very flexible since when used, the user can turn off individual scripts and applications by chmod -x or simply leave the startup directories empty or remove them.
commands issued
Quote:
eesh set misc.session.enable_script 1

eesh set misc.session.script $HOME/bin/e16.autostart.sh
scripts
Quote:
Location = $HOME/bin/e16.autostart.sh
#!/bin/sh

case "$1" in
init)

# do blah
# or do function init
start)
e16autostart.sh
# do blah
# of do function start
stop)
# do blah
# or do function stop
esac

-----------------------------
location = $HOME/.e16/Start/e16autostart.sh

#!/bin/sh

#DEBUG
echo "Srarted" > $HOME/e16startappsstarted
# Start DBUS session bus: for automount
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval $(dbus-launch --sh-syntax --exit-with-session)
fi
#mapfile -t startapps < /usr/local/bin/e16startapps
#mapfile -t startapps < /home/userx/Dropbox/GNUstep/e16startapps
mapfile -t startapps < $HOME/bin/e16startapps

for p in ${startapps[@]} ;
do
which "$p" >/dev/null && "$p" &
echo "Sp" >> $HOME/e16startappsstarted
done
$HOME/bin/e16loadbackgrounds
----------------------------------

Location = $HOME/bin/e16startapps
pa-applet
gkrellm
nm-applet
dropboxd
blueman-applet
qbittorrent
and noting is starting ...


MOD:

Code:
userx@slackdog.pen:~
$ bin/e16.autostart.sh
bin/e16.autostart.sh: line 8: syntax error near unexpected token `)'
bin/e16.autostart.sh: line 8: `start)'
userx@slackdog.pen:~


#!/bin/sh

case "$1" in
init)
      
        # do blah
            # or do function init
start) <--- line 8
		e16autostart.sh
            # do blah
            # of do function start
stop)
            # do blah
            # or do function stop
esac
fixed add ;; in each case

it still does not work on login. I tested all of the scripts on the cli this one "bin/e16.autostart.sh" does not fire off the e16autostart.sh


this script in ~/.e16/Start/e16autostart.sh works
Code:
 $.e16/Start/e16autostart.sh
HEHEHEHH
/media/storage/wallpaper/backgrounds
Loading files from list ...
Done loading files from list.
Randomizing  files ...
Files Now Randomized.
starting timer
available 0dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-158.4.4564/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-158.4.4564/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-158.4.4564/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'

Last edited by BW-userx; 10-31-2022 at 10:23 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to get bluetoooth pulseaudio e16 not working BW-userx Slackware 5 10-31-2022 07:04 AM
E16 ; Eterm not working... BW-userx Manjaro 16 11-03-2018 11:13 AM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
Mandrake8.2 & E16 questions... Estariel Linux - Distributions 1 07-29-2002 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration