Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: openbox autostart configuration

  1. #11
    nishant_no2 is offline Newcomer
    Join Date
    May 2010
    Posts
    10

    Default Re: openbox autostart configuration

    Quote Originally Posted by please_try_again View Post
    Hmm, interesting! As you can see, it just worked for me. I haven't tried to log in from a DM though, but it should not be different.
    You might try to add an echo at the top of your autostart.sh and see if it appears in your ~/.xsession-errors (or whichever file you use to log X session messages). This is what I used:

    Code:
    echo running $0
    You can see what it printed in my previous post.
    here is the log.

    Code:
    /etc/X11/xim: Checking whether an input method should be started.
    sourcing /etc/sysconfig/language to get the value of INPUT_METHOD
    INPUT_METHOD is not set or empty (no user selected input method).
    Trying to start a default input method for the locale en_US.UTF-8 ...
    There is no default input method for the current locale.
    Dummy input method "none" (do not use any fancy input method by default)
    Quote Originally Posted by vazhavandan View Post
    What did you write inside that autostart ?
    Can you share what you wrote inside "autostart" in paste.opensuse.org
    Can you check whether there are any syntax errors in the "startup" file?
    How do you know that it is not executed ?
    here is my autotart

    Code:
    numlockx on &
    sh ~/.fehbg &
    tint2 &
    nm-applet &
    pnmixer &
    conky &
    synapse -s &
    echo running $0
    there are no issues when i manually execute autostart.

  2. #12
    deano_ferrari is online now Global Moderator
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    7,588

    Default Re: openbox autostart configuration

    Try creating ~/.config/lxsession/LXDE/autostart and adjust the syntax accordingly:

    LXDE - basic settings - Linux commands

  3. #13
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    Quote Originally Posted by nishant_no2 View Post

    Code:
    numlockx on &
    sh ~/.fehbg &
    tint2 &
    nm-applet &
    pnmixer &
    conky &
    synapse -s &
    echo running $0
    there are no issues when i manually execute autostart.
    Move the echo line to the top though!

  4. #14
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    Quote Originally Posted by deano_ferrari View Post
    Try creating ~/.config/lxsession/LXDE/autostart and adjust the syntax accordingly:

    LXDE - basic settings - Linux commands
    Yes, but the OP said that he's using standalone openbox session, not LXDE. The autostart he has should work in this case. It does for me.

  5. #15
    deano_ferrari is online now Global Moderator
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    7,588

    Default Re: openbox autostart configuration

    Quote Originally Posted by please_try_again View Post
    Yes, but the OP said that he's using standalone openbox session, not LXDE. The autostart he has should work in this case. It does for me.
    Well that's what I initially thought, but I'm not clear how LXDE fits into all of this... happy to be educated.

  6. #16
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    Quote Originally Posted by deano_ferrari View Post
    Well that's what I initially thought, but I'm not clear how LXDE fits into all of this... happy to be educated.
    LXDE is a DE only. It doesn't "include" a window manager. It uses openbox by default, but could use another one.
    openbox is a wm only. It doesn't have a desktop (taksbar, etc), but has some application menus (usually processed on the fly).

    openbox can be use as a standalone session (openbox-session) without LXDE or any other desktop. The last command it executes is:

    Code:
    # Run Openbox, and have it run the autostart stuff
    exec /usr/bin/openbox --startup "/usr/lib/openbox-autostart OPENBOX" "$@"
    The script /usr/lib/openbox-autostart shows how it handles autostart stuff. Here's this script:

    Code:
    # cat /usr/lib/openbox-autostart
    #!/bin/sh
    
    # Set a background color
    BG=""
    if which hsetroot &>/dev/null; then
      BG=hsetroot
    elif which esetroot &>/dev/null; then
      BG=esetroot
    elif which xsetroot &>/dev/null; then
      BG=xsetroot
    fi
    test -z $BG || $BG -solid "#303030"
    
    GLOBALAUTOSTART="/etc/xdg/openbox/autostart"
    AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart"
    
    # Run the global openbox autostart script
    if test -f $GLOBALAUTOSTART; then
        sh $GLOBALAUTOSTART
    elif test -f $GLOBALAUTOSTART.sh; then
        sh $GLOBALAUTOSTART.sh
    fi
    
    # Run the user openbox autostart script
    if test -f $AUTOSTART; then
        sh $AUTOSTART
    elif test -f $AUTOSTART.sh; then
        sh $AUTOSTART.sh
    fi
    
    # Run the XDG autostart stuff.  These are found in /etc/xdg/autostart and
    # in $HOME/.config/autostart.  This requires PyXDG to be installed.
    # See openbox-xdg-autostart --help for more details.
    /usr/lib/openbox-xdg-autostart "$@"
    It should become obvious that the user autostart script is executed, whether you are on a freedesktop compliant desktop, in which case XDG_CONFIG_HOME is set, or not, since HOME is set anyway.

    I don't see why it doesn't work for the OP.

  7. #17
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    @deano_ferrari

    About ~/.config/lxsession/LXDE/autostart you mentioned earlier, I guess that's what used to work but doesn't work anymore. I vaguely remember that I already wrote such scripts for LXDE. Now I don't see them anymore. It might be deprecated.

    But it's not relevant for standalone openbox, or openbox as an alternate wm for other desktops (including KDE).

  8. #18
    deano_ferrari is online now Global Moderator
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    7,588

    Default Re: openbox autostart configuration

    Thanks for posting the /usr/lib/openbox-autostart script. Yes, it's a mystery....

  9. #19
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    Quote Originally Posted by deano_ferrari View Post
    Yes, it's a mystery....
    I can reproduce it by adding this in my xinitrc (because I'm using startx):

    Code:
     unset XDG_CONFIG_HOME HOME
    But who would do something like that?

  10. #20
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: openbox autostart configuration

    Quote Originally Posted by nishant_no2 View Post
    here is the log.


    here is my autotart

    Code:
    numlockx on &
    sh ~/.fehbg &
    tint2 &
    nm-applet &
    pnmixer &
    conky &
    synapse -s &
    echo running $0

    Notice that - provided python-xdg is installed - openbox-session can run XDG autostart stuff, like any other freedesktop compliant DE:


    Code:
    # Run the XDG autostart stuff.  These are found in /etc/xdg/autostart and
    # in $HOME/.config/autostart.  This requires PyXDG to be installed.
    # See openbox-xdg-autostart --help for more details.
    /usr/lib/openbox-xdg-autostart "$@"
    Thus you certainly don't need to start nm-applet from this script - nor to start it twice. This is what I'm using (system wide) for conky:

    Code:
    # cat /etc/xdg/autostart/conky.desktop
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=conky
    Exec=conky.sh
    StartupNotify=false
    Terminal=false
    Hidden=false
    X-KDE-autostart-phase=2
    NotShowIn=KDE;
    X-GNOME-Autostart-enabled=true
    You migh want to replace conky.sh with conky here, since you don't have this script.
    Both this .desktop file and conky.sh are included in package conkyconf available in my repo.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO 3.5.2 PL2