LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-13-2010, 01:41 AM   #1
Removed44
LQ Newbie
 
Registered: Jul 2009
Posts: 11

Rep: Reputation: 0
[openbox] My autostart.sh file is not restoring things


I've decided to give openbox a try with Debian testing. I set up my right-click menu exactly how I want it, and everything else is set up perfectly.

I installed trayer and tint2, along with nitrogen. I added the following lines to my ~/.config/openbox/autostart.sh file, but things aren't loading/restoring as they should. Tint2 and trayer don't load at all, and nitrogen isn't restoring my wallpaper. All I get is a black screen with my cursor, but the ability to right-click and open the menu, so it's not like X is dead. I did set the default wallpaper by issuing the command nitrogen /home/john/Pictures/Wallpapers, where "Wallpapers" contains all of my background images.

Here is my autostart.sh file:
Code:
# Autostart file for openbox

nitrogen --restore &
(sleep 2s && tint -c /home/john/.config/tint/.tintrc) &
(sleep 2s && trayer --expand true --transparent true --alpha 255 --edge bottom --align right --expand true --SetDockType true --widthtype request --margin 130) &
I do have proper content in the .tintrc file located in /home/john/.config/tint/tintrc. Am I doing something wrong here?

Last edited by Removed44; 06-14-2010 at 09:26 AM.
 
Old 06-13-2010, 06:01 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
So how do you start openbox? To run ~/.config/openbox/autostart.sh you need to start openbox with the /usr/bin/openbox-session script. That is what calls ~/.config/openbox/autostart.sh. If you just put exec openbox in ~/.xinitrc it will just start openbox without running autostart.sh
 
Old 06-14-2010, 09:28 AM   #3
Removed44
LQ Newbie
 
Registered: Jul 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Andrew Benton View Post
So how do you start openbox? To run ~/.config/openbox/autostart.sh you need to start openbox with the /usr/bin/openbox-session script. That is what calls ~/.config/openbox/autostart.sh. If you just put exec openbox in ~/.xinitrc it will just start openbox without running autostart.sh
That must be my problem. I'm running Debian squeeze and having openbox start by having the line exec openbox in the file ~/.xsession.

EDIT: What content should be in the /usr/bin/openbox-session script?

Last edited by Removed44; 06-14-2010 at 02:45 PM.
 
Old 06-14-2010, 05:44 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I don't use Debian, I install openbox from source. /usr/bin/openbox-session looks like this
Code:
#!/bin/sh

if test -n "$1"; then
    echo "Syntax: openbox-session"
    echo
    echo "See the openbox-session(1) manpage for help."
  exit
fi

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
      -remove _NET_DESKTOP_NAMES \
      -remove _NET_CURRENT_DESKTOP 2> /dev/null

AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh"
GLOBALAUTOSTART="/etc/xdg/openbox/autostart.sh"

if test -r $AUTOSTART; then
    . $AUTOSTART
else
    if test -r $GLOBALAUTOSTART; then
        . $GLOBALAUTOSTART
    fi
fi

exec /usr/bin/openbox "$@"
 
Old 06-14-2010, 09:31 PM   #5
Removed44
LQ Newbie
 
Registered: Jul 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Andrew Benton View Post
I don't use Debian, I install openbox from source. /usr/bin/openbox-session looks like this
If I just copied/pasted this text into my openbox-session file, will this work, regardless of what distro I'm running?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM
execute a file in Autostart in .kde sailu_mvn Linux - Software 0 08-21-2006 04:24 AM
restoring windows file system true_atlantis Linux - Software 4 02-23-2006 03:31 PM
Restoring a rm'ed file? sharpie Linux - Newbie 6 02-03-2004 03:05 AM
Restoring / Undeleting a file richardrex Linux - General 4 10-24-2003 07:59 AM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration