X and Openbox start at Login on Live System

New to Debian (Or Linux in general)? Ask your questions here!

X and Openbox start at Login on Live System

Postby nathanid95 » 2017-02-23 04:44

Hey guys,

I'm newish to Debian and I have a live USB device running Jessie 8.7 with persistence that I use on a few different machines. I started with a minimal installation and I installed Xorg and Openbox to have a fallback GUI for web browsing, but I like to mostly stick to the CLI. Since installing these packages, though, I can't seem to exit to the terminal.

When I boot up, there's no splash, and there's no display manager (just a username and password prompt, which is what I want). Once I log in, however, X and Openbox start immediately, and if I try to close them, they just open right back up without letting me enter any commands.

I have no idea why this is happening. I just want to boot to command line, and only start X and openbox with a command. Could anyone help me out?

Thanks much,
Nate
nathanid95
 
Posts: 6
Joined: 2017-02-23 04:38

Re: X and Openbox start at Login on Live System

Postby Head_on_a_Stick » 2017-02-23 07:02

Please post the content of ~/.profile & ~/.bash_profile and also ~/.bashrc as well, just in case.

You are using bash, right?

If not, post the relevant shell initialisation files.
“Such is modern computing: everything simple is made too complicated because it’s easy to fiddle with; everything complicated stays complicated because it’s hard to fix." — Rob Pike

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6367
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X and Openbox start at Login on Live System

Postby nathanid95 » 2017-02-23 16:42

I'm using bash, yes.

.profile
Code: Select all
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
   . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi


.bashrc
Code: Select all
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
   # We have color support; assume it's compliant with Ecma-48
   # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
   # a case would tend to support setf rather than setaf.)
   color_prompt=yes
    else
   color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    #alias grep='grep --color=auto'
    #alias fgrep='fgrep --color=auto'
    #alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi


There doesn't seem to be a .bash_profile file present in my home folder.

Thanks for your help.
nathanid95
 
Posts: 6
Joined: 2017-02-23 04:38

Re: X and Openbox start at Login on Live System

Postby jjgomera » 2017-02-23 18:24

or maybe your system are using ~/.xinitrc, could you post here if exist in your system?
jjgomera
 
Posts: 9
Joined: 2013-02-05 18:05

Re: X and Openbox start at Login on Live System

Postby nathanid95 » 2017-02-23 21:47

There doesn't appear to be a .xinitrc file in my home directory either. Just .Xauthority and .xsession_errors
nathanid95
 
Posts: 6
Joined: 2017-02-23 04:38

Re: X and Openbox start at Login on Live System

Postby Head_on_a_Stick » 2017-02-24 07:07

How about /etc/profile & /etc/bash.bashrc (I'm not even sure if Debian uses the latter but check anyway)?

This really is weird :?

Can we also see the output of:
Code: Select all
ls -lR /etc/systemd/system
“Such is modern computing: everything simple is made too complicated because it’s easy to fiddle with; everything complicated stays complicated because it’s hard to fix." — Rob Pike

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6367
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X and Openbox start at Login on Live System

Postby nathanid95 » 2017-02-27 01:36

Hey Head_on_a_Stick, thanks for sticking around. Here are the files you requested:

/etc/profile
Code: Select all
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi



/etc/bash.bashrc
Code: Select all
# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
#    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
#    ;;
#*)
#    ;;
#esac

# enable bash completion in interactive shells
#if ! shopt -oq posix; then
#  if [ -f /usr/share/bash-completion/bash_completion ]; then
#    . /usr/share/bash-completion/bash_completion
#  elif [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion
#  fi
#fi

# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
   function command_not_found_handle {
           # check because c-n-f could've been removed in the meantime
                if [ -x /usr/lib/command-not-found ]; then
         /usr/lib/command-not-found -- "$1"
                   return $?
                elif [ -x /usr/share/command-not-found/command-not-found ]; then
         /usr/share/command-not-found/command-not-found -- "$1"
                   return $?
      else
         printf "%s: command not found\n" "$1" >&2
         return 127
      fi
   }
fi



output of ls -lR /etc/systemd/system
Code: Select all
/etc/systemd/system:
total 4
drwxr-xr-x 2 root root   42 Jan 16 23:09 basic.target.wants
drwxr-xr-x 2 root root   40 Jan 16 23:10 bluetooth.target.wants
lrwxrwxrwx 1 root root   37 Jan 16 23:10 dbus-org.bluez.service -> /lib/systemd/system/bluetooth.service
lrwxrwxrwx 1 root root   40 Feb 23 02:25 dbus-org.freedesktop.ModemManager1.service -> /lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root   53 Feb 23 02:25 dbus-org.freedesktop.nm-dispatcher.service -> /lib/systemd/system/NetworkManager-dispatcher.service
lrwxrwxrwx 1 root root   37 Feb 23 02:50 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x 2 root root   41 Jan 16 23:05 getty.target.wants
drwxr-xr-x 2 root root   43 Jan 16 23:05 halt.target.wants
drwxr-xr-x 2 root root   45 Jan 16 23:10 hibernate.target.wants
drwxr-xr-x 2 root root   45 Jan 16 23:10 hybrid-sleep.target.wants
drwxr-xr-x 2 root root 4096 Feb 23 02:25 multi-user.target.wants
drwxr-xr-x 2 root root   43 Jan 16 23:05 poweroff.target.wants
drwxr-xr-x 2 root root   43 Jan 16 23:05 reboot.target.wants
drwxr-xr-x 2 root root   35 Jan 16 23:10 sockets.target.wants
lrwxrwxrwx 1 root root   31 Jan 16 23:11 sshd.service -> /lib/systemd/system/ssh.service
drwxr-xr-x 2 root root   45 Jan 16 23:10 suspend.target.wants
lrwxrwxrwx 1 root root   35 Jan 16 23:06 syslog.service -> /lib/systemd/system/rsyslog.service

/etc/systemd/system/basic.target.wants:
total 0
lrwxrwxrwx 1 root root 39 Jan  4  2015 live-config.service -> /lib/systemd/system/live-config.service

/etc/systemd/system/bluetooth.target.wants:
total 0
lrwxrwxrwx 1 root root 37 Jan 16 23:10 bluetooth.service -> /lib/systemd/system/bluetooth.service

/etc/systemd/system/getty.target.wants:
total 0
lrwxrwxrwx 1 root root 34 Jan 16 23:05 getty@tty1.service -> /lib/systemd/system/getty@.service

/etc/systemd/system/halt.target.wants:
total 0
lrwxrwxrwx 1 root root 40 Jan 16 23:05 hwclock-save.service -> /lib/systemd/system/hwclock-save.service

/etc/systemd/system/hibernate.target.wants:
total 0
lrwxrwxrwx 1 root root 42 Jan 16 23:10 anacron-resume.service -> /lib/systemd/system/anacron-resume.service

/etc/systemd/system/hybrid-sleep.target.wants:
total 0
lrwxrwxrwx 1 root root 42 Jan 16 23:10 anacron-resume.service -> /lib/systemd/system/anacron-resume.service

/etc/systemd/system/multi-user.target.wants:
total 0
lrwxrwxrwx 1 root root 35 Jan 16 23:10 anacron.service -> /lib/systemd/system/anacron.service
lrwxrwxrwx 1 root root 31 Jan 16 23:10 atd.service -> /lib/systemd/system/atd.service
lrwxrwxrwx 1 root root 32 Jan 16 23:06 cron.service -> /lib/systemd/system/cron.service
lrwxrwxrwx 1 root root 40 Feb 23 02:25 ModemManager.service -> /lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 42 Feb 23 02:25 NetworkManager.service -> /lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 36 Feb 23 02:25 pppd-dns.service -> /lib/systemd/system/pppd-dns.service
lrwxrwxrwx 1 root root 36 Jan 16 23:05 remote-fs.target -> /lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 35 Jan 16 23:06 rsyslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 31 Jan 16 23:11 ssh.service -> /lib/systemd/system/ssh.service

/etc/systemd/system/poweroff.target.wants:
total 0
lrwxrwxrwx 1 root root 40 Jan 16 23:05 hwclock-save.service -> /lib/systemd/system/hwclock-save.service

/etc/systemd/system/reboot.target.wants:
total 0
lrwxrwxrwx 1 root root 40 Jan 16 23:05 hwclock-save.service -> /lib/systemd/system/hwclock-save.service

/etc/systemd/system/sockets.target.wants:
total 0
lrwxrwxrwx 1 root root 32 Jan 16 23:10 uuidd.socket -> /lib/systemd/system/uuidd.socket

/etc/systemd/system/suspend.target.wants:
total 0
lrwxrwxrwx 1 root root 42 Jan 16 23:10 anacron-resume.service -> /lib/systemd/system/anacron-resume.service



Thanks for your help!
nathanid95
 
Posts: 6
Joined: 2017-02-23 04:38

Re: X and Openbox start at Login on Live System

Postby Head_on_a_Stick » 2017-02-27 07:03

OK, last throw of the dice:
Code: Select all
find ~/.local/share/systemd
“Such is modern computing: everything simple is made too complicated because it’s easy to fiddle with; everything complicated stays complicated because it’s hard to fix." — Rob Pike

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6367
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X and Openbox start at Login on Live System

Postby nathanid95 » 2017-03-02 21:07

That command returns:

find: `/home/mosskin/.local/share/systemd': No such file or directory

I'm glad I'm not the only one stumped by this!
nathanid95
 
Posts: 6
Joined: 2017-02-23 04:38

Re: X and Openbox start at Login on Live System

Postby Segfault » 2017-03-03 01:15

But you are using systemd, right? Systemd happens to be an init system ... that handles everything, including login. I do not use it myself, but I wouldn't be surprised if systemd handles your X startup for you, user intervention is not expected ...
Segfault
 
Posts: 401
Joined: 2005-09-24 12:24

Re: X and Openbox start at Login on Live System

Postby Head_on_a_Stick » 2017-03-03 06:55

Segfault wrote:but I wouldn't be surprised if systemd handles your X startup for you, user intervention is not expected ...

All systemd unit files that are enabled to be started (both at the system and at the user level) have already been listed by my requested command output and there are no such .services running, AFAICT :?

However, because Debian still uses the "legacy" sysvinit files in /ect/rc.d (or whatever, I'm not really familiar with sysvinit), the picture can become very confused with some programs using sysvint-style scripts that are not listed by `systemctl list-unit-files` but are nevertheless still part of the startup process.

I would therefore submit that this problem is caused by a sysvinit-style script that has been activated and does not show up in my interrogations.

Does anybody know how to list running sysvinit services?

I can't be bothered startpaging obsolete practices :mrgreen:
“Such is modern computing: everything simple is made too complicated because it’s easy to fiddle with; everything complicated stays complicated because it’s hard to fix." — Rob Pike

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6367
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X and Openbox start at Login on Live System

Postby Segfault » 2017-03-03 11:25

IMHO this could only happen if some login manager is involved - and nathanid95 mentioned there is CLI login. As a last resort I'd recommend creating a test user to determine whether this issue is caused by something in the home directory.

BTW, do you know exactly what logind does? Perhaps it starts X if it finds it, does not mean there is a special systemd service that would show up in your interrogation.
Segfault
 
Posts: 401
Joined: 2005-09-24 12:24

Re: X and Openbox start at Login on Live System

Postby Head_on_a_Stick » 2017-03-04 12:41

Segfault wrote:I'd recommend creating a test user to determine whether this issue is caused by something in the home directory.

+1, good idea :)

BTW, do you know exactly what logind does?

Yes :mrgreen:

Looks like system calls to me but maybe I missed something...
“Such is modern computing: everything simple is made too complicated because it’s easy to fiddle with; everything complicated stays complicated because it’s hard to fix." — Rob Pike

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6367
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: X and Openbox start at Login on Live System

Postby tynman » 2017-03-05 17:32

The question that pops up in my wee brain after reading this is: how were xorg and openbox actually installed? If installed with, say,
Code: Select all
sudo apt-get --no-install-recommends install xorg openbox

I am fairly confident that neither xorg nor openbox will autostart on bootup. So either (1) they were installed some other way, and/or (2) there is a
Code: Select all
startx
command somewhere in one of the scripts that are autorun during bootup (which seems not to be the case here), or (3) they are being started as services using either systemd unit files or sysvinit initd files (which I think would be unusual but should be doable).
tynman
 
Posts: 29
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: X and Openbox start at Login on Live System

Postby debiman » 2017-03-06 06:39

^ i have to agree with that.

nathanid95, HOW is Xorg starting up automatically?

if you didn't do that yourself (hard to imagine), it must be in the way you created the live persistence.
so again, how did you create this install?
User avatar
debiman
 
Posts: 693
Joined: 2013-03-12 07:18

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable