Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have it saved as an executable, with the .sh suffix and stored in the $HOME/.config/openbox/ directory. I also made sure that none of my lines of code are commented out. Here's what I have in there so far:
wbar &
nitrogen --restore &
Running this script manually (clicking on it in a file manager) works, but it is completely ignored at startup. What gives?
Without any other information to work on, I shall start at the beginning. Did you create a copy of the autostart.sh in ~/.config and add your entries at the end of the file, or did you create an autostart.sh in your home directory with only those two entries? (It took me a while to figure that one out when learning to configure Openbox.) In other words, are
wbar &
nitrogen --restore &
after
Code:
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
# Set a background color
BG=""
if which hsetroot >/dev/null; then
BG=hsetroot
else
if which esetroot >/dev/null; then
BG=esetroot
else
if which xsetroot >/dev/null; then
BG=xsetroot
fi
fi
fi
test -z $BG || $BG -solid "#303030"
# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
# Make GTK apps look and behave how they were set up in the gnome config tools
if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
/usr/libexec/gnome-settings-daemon &
elif which gnome-settings-daemon >/dev/null; then
gnome-settings-daemon &
# Make GTK apps look and behave how they were set up in the XFCE config tools
elif which xfce-mcs-manager >/dev/null; then
xfce-mcs-manager n &
fi
# Preload stuff for KDE apps
if which start_kdeinit >/dev/null; then
LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi
# Run XDG autostart things. By default don't run anything desktop-specific
# See xdg-autostart --help more info
DESKTOP_ENV="OPENBOX"
if which /usr/lib/openbox/xdg-autostart >/dev/null; then
/usr/lib/openbox/xdg-autostart $DESKTOP_ENV
fi
FYI: I have it stored in $HOME/.config/openbox/ as autostart.sh which never existed in this directory in the first place, so I copied a file with the same name and attributes from WindowMaker, and made changes to that.
OK then, how do I tell WattOS to start openbox in this manner? I've been looking all over for ways to modify the login/startup options in WattOS but haven't had much luck. WattOS comes pre-loaded with launchers for:
Notice I said launchers because only LXDE and openbox are fully installed. The rest of the launchers are simply placeholders for those window managers and require the user to go get the packages for the desired window manager and install them. So how do I add/remove window managers to/from this list or alter their startup commands, as I need to with openbox?
!/bin/sh
#
# 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; then
# gnome-settings-daemon &
#fi
# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
nitrogen --restore &
wbar
Everything before 'nitrogen --restore &' is original. Is $HOME/.config/openbox/autostart somehow referring to a directory by that name? If so, maybe I need to add that and put this in there.
i think it should be just "autostart", not "autostart.sh".
have you actually tried that?
Quote:
also, depending on your distro and desktop environment openbox might choose not to parse it at login, or a different file.
so it's wattos. which i'm not familiar with.
doesn't it have some gui in the menu for Startup Applications or something like that? it should.
does it have to be openbox' autostart?
i'm using plain openbox as a graphical desktop environment, and openbox parses the file allright.
i'll say it again, if you are logging into some xxxxx-session (lxde?), then i do not know if openbox even parses autostart, but there are certainly (100%) other ways to autostart applications.
OK then, how do I tell WattOS to start openbox in this manner? I've been looking all over for ways to modify the login/startup options in WattOS but haven't had much luck. WattOS comes pre-loaded with launchers for:
Notice I said launchers because only LXDE and openbox are fully installed. The rest of the launchers are simply placeholders for those window managers and require the user to go get the packages for the desired window manager and install them. So how do I add/remove window managers to/from this list or alter their startup commands, as I need to with openbox?
Are these "launchers" on a Display Manager (a graphical "log-in screen")?
If they are, you got to find out which one WattOS uses by default (if you haven't changed it) and it's configuration file, which possibly has just "openbox" instead of "openbox-session", as others previously mentioned. Google says its "lightdm". Some ubuntu manual page says the config file is "/etc/lightdm/lightdm.conf". There must be some line with "openbox" there, possibly mentioning it twice, one for the "label", other for the command. I'm just guessing here, it's just the way things usually are.
I have the same problem where ubuntu ignores the autostart file, which seems to be the difference in the invocation of 'openbox' or 'openbox-session.' Where in /etc/ can one find the ubuntu session login configuration?
If you're using a Display Manager to log into WattsOS, does it offer an option befofe signing in to choose which session to use? Such as LXDE or Openbox? If so, choose Openbox and it should begin the session with it, then the autostart file should proceed.
I have the same problem where ubuntu ignores the autostart file, which seems to be the difference in the invocation of 'openbox' or 'openbox-session.' Where in /etc/ can one find the ubuntu session login configuration?
Thanks in advance
I don't know what you're asking, but all the OpenBox config files in /etc are here:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.