Find the answer to your Linux question:
Results 1 to 5 of 5
Hello to everyone ! I'm new to Linux world and I've chosen Arch Linux as my first distro. After several days of fight, I could finally make my wireless modem, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    6

    Question [SOLVED] Openbox: Terminal not working


    Hello to everyone ! I'm new to Linux world and I've chosen Arch Linux as my first distro. After several days of fight, I could finally make my wireless modem, my video card and my audio card work (and I'm freaking proud of it xD). Also, I've installed Openbox, but I have the following problem with the terminal (which is xterm, by default):

    Everytime I launch Openbox the terminal gets opened (labeled as "login") and if I close it Openbox gets closed. This is weird as when I installed it in VirtualBox this didn't happen (I haven't seen this on any YouTube video either). Also, there is no response when I enter a command in it (the only thing that seems to do is to give some information about the active programs -for example: "Conky: window type - desktop"). This happens when I open Openbox as the root user as well as a normal user.

    I want to mention that I've searched for this issue a lot, so this is my last plan (I don't really like to abuse of forums help). I hope someone can give me a hand with this issue. Thanks in advance!

    Happy new year !

    Note: I'm not an English native speaker, so excuse me for the mistakes :P

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    How are you starting openbox?

    EDIT: If you're using .xinitrc post the contents here.

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    6

    Smile .xinitrc

    Quote Originally Posted by reed9 View Post
    How are you starting openbox?

    EDIT: If you're using .xinitrc post the contents here.
    Thanks for the quick reply reed9! I'm starting Openbox by entering the following command:
    Code:
    xinit openbox
    Also, I can use:
    Code:
    xinit openbox-session
    But I don't know what's the difference between both.

    The content of my .xinitrc is:
    Code:
    #!/bin/sh
    
    userresources=$HOME/.Xresources
    usermodmap=$HOME/.Xmodmap
    sysresources=/etc/X11/xinit/.Xresources
    sysmodmap=/etc/X11/xinit/.Xmodmap
    
    # merge in defaults and keymaps
    
    if [ -f $sysresources ]; then
    
    
    
    
    
    
    
        xrdb -merge $sysresources
    
    fi
    
    if [ -f $sysmodmap ]; then
        xmodmap $sysmodmap
    fi
    
    if [ -f "$userresources" ]; then
    
    
    
    
    
    
    
        xrdb -merge "$userresources"
    
    fi
    
    if [ -f "$usermodmap" ]; then
        xmodmap "$usermodmap"
    fi
    
    # start some nice programs
    
    
    if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    	for f in /etc/X11/xinit/xinitrc.d/*.sh ; do
    		[ -x "$f" ] && . "$f"
    	done
    	unset f
    fi
    
    twm &
    xclock -geometry 50x50-1+1 &
    xterm -geometry 80x50+494+51 &
    xterm -geometry 80x20+494-0 &
    exec xterm -geometry 80x66+0+0 -name login
    I found this file in the /etc/X11/xinit directory, notice that its name does not start with a dot (that means that it's not hidden, right?).

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    By default, xinit will run the following unless told otherwise

    Code:
    xterm -geometry +1+1 login -display :0
    When starting a WM with xinit, the full path is required, ie
    Code:
    xinit /usr/bin/openbox
    Without the full path, xinit ignores what follows and runs the default xinitrc script (or with no xinitrc the above mentioned default). In your case that xinitrc ends with

    Code:
    exec xterm -geometry 80x66+0+0 -name login
    Which is the xterm you're seeing.

    When the xinit script quits, X will end, hence when you close the xterm window, you exit the GUI.

    You'll want to override the default with your own settings.

    If it doesn't exist, create a file in your home directory, .xinitrc and use that as your start script
    Code:
    echo "exec ck-launch-session dbus-launch openbox-session" >> ~/.xinitrc
    (The ck session and dbus part assume you may want to run dbus aware applications, and be able to do things like automount external drives.)

    Start your session with
    Code:
    startx
    openbox-session v. openbox runs the script ~/.config/openbox/autostart.sh or /etc/xdg/openbox/autostart.sh at start, so if you have programs you want to start along with openbox, they can go there.

    https://wiki.archlinux.org/index.php/Openbox

  6. #5
    Just Joined!
    Join Date
    Jan 2011
    Posts
    6

    Thanks!

    Hey reed9! Forgive my delay in replying, that worked perfectly

    Thanks a lot for your time, your explanation was very clear!

    Cheers

Posting Permissions

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