Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Startx with openbox wm (virtualbox)

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Seventh
Posts: 44
Joined: 2017-04-01 10:13

[SOLVED] Startx with openbox wm (virtualbox)

#1 Post by Seventh »

Hi, newby here, just trying to find my way around debian.

Just a quick question, im trying to startx in virtualbox by the user but im getting below screen. Ive edited the .xinitrc file to have
exec openbox-session

Strange this is as i can get to the desktop with "sudo startx" but i dont want to be doing that. Any help much appreciated.

Note: its a minimal install thus far, no desktop environment, only openbox, menu, sudo and xorg have been installed,
sudoers have been edited to include my user. Ive changed the sources list to contrib non-free for stretch which is what i am using, ive done update and upgrade also.

Image

--------------------------
EDIT: solved post here: http://forums.debian.net/viewtopic.php? ... 84#p641460
Last edited by Seventh on 2017-04-11 07:50, edited 2 times in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Startx with openbox wm

#2 Post by debiman »

Seventh wrote:Strange this is as i can get to the desktop with "sudo startx" but i dont want to be doing that.
rightly so.
i've seen this a few times recently, i wonder what makes people think that simply prepending "sudo" will solve their problem?

first of all you should check your $HOME if there are any root-owned files now.
chown them back to your username:groupname. or maybe delete. :twisted:

anyhow, the screen you're showing us shows us that something is wrong, but not what is wrong.
please

Code: Select all

cat /var/log/Xorg.0.log
after the failed attempt.
do you have internet connection?
you can upload via commandline: https://unix.stackexchange.com/a/108495 and put the link into your next post (and any other relevant additions you have found out so far - you're not just waiting for us to solve your problem, right?).

edit:
which debian version? what did you install?

Seventh
Posts: 44
Joined: 2017-04-01 10:13

Re: Startx with openbox wm

#3 Post by Seventh »

The

Code: Select all

cat /var/log/Xorg.0.log
Is far too long to post here and the log file is on a virtual machine making it a bit hard to get a complete readable readout. One thing did stand out in the log is that SElinux is disabled.

I wanted to have this system without a display manager such as sddm or lightdm.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Startx with openbox wm

#4 Post by Head_on_a_Stick »

Seventh wrote:i can get to the desktop with "sudo startx"
Don't do that.

As debiman observes, your ~/.Xauthority will now be owned by root and this is what causes the Connection refused error.

Just remove the offending file, a new one will be created with the correct permissions:

Code: Select all

rm ~/.Xauthority
Seventh wrote:I wanted to have this system without a display manager such as sddm or lightdm.
Remove your ~/.xinitrc and instead use ~/.config/openbox/autostart for any autostarted programs (if needed) and make sure that openbox-session is selected in the output of:

Code: Select all

# update-alternatives --config x-session-manager
It should then be possible to use `startx` without ~/.xinitrc, this is the preferred method in Debian.
deadbang

Seventh
Posts: 44
Joined: 2017-04-01 10:13

Re: Startx with openbox wm

#5 Post by Seventh »

Thanks Hoas, still not working, I think it must be something to do with virtualbox and not debian.

I might set up a partition on bare metal and see what happens.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Startx with openbox wm

#6 Post by Head_on_a_Stick »

The answers will be in the log file, upload it to here and post the URL:

https://paste.debian.net/

EDIT: I can see "No screens found" in the scrot, this usually means that the correct video drivers are not installed (or that their configuration is wrong).

It's messy but you could use:

Code: Select all

# apt install xserver-xorg-video-all
That should cover all the bases :)

I have no experience of running Debian in VirtualBox though, that would be just wrong :?

Have you considered KVM instead?
deadbang

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Startx with openbox wm

#7 Post by GarryRicketson »

What do you get if you just type ? :

Code: Select all

$ startx  
With out OpenBox,..?
I do use Virtual Box , several VMs, and do not think that is the problem.
But then again,
Head_on_a_Stick » Have you considered KVM instead?
It would be ineteresting to see if that makes any differnce.
by debiman » which debian version? what did you install?
This is important and also, as other mention, you shoudln't run startx as root , nor should you need to.
by Seventh »
I wanted to have this system without a display manager such as sddm or lightdm
Last edited by GarryRicketson on 2017-04-09 17:23, edited 1 time in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Startx with openbox wm

#8 Post by debiman »

Seventh wrote:virtualbox
rant warning: if you're easily offended, scroll over this post.
i see somebody "simply trying out linux" in a virtual machine, and why not, there's no real danger, things break, :shrug: just delete the vm and start from zero. no real harm done.
so there's a careless attitude, one tends to get careless and /or experimental. but then they expect us to treat their "virtual" problems with the same consideration as if it was "for real".
so far this is just a mild annoyance, but here's what really pisses me off: their replies are just as careless as their whole attitude. questions are being ignored, meaningless "doesn't work" answers, and just the amount of text typed is much less than what each "helper" types.

It's something i've seen a few times now, and it took me a while to realize why it rubs me the wrong way, hence the plural.
so, Seventh, prove me wrong.
go back to my first reply and try again.
it took me quite a while to compose it, i predicted some difficulties you will be having (copying text out of a vm), which is why i looked up command line pastebin tools, and all i get is "too long, didn't work".
also consider, act & report on the other things i wrote.

Seventh
Posts: 44
Joined: 2017-04-01 10:13

Re: Startx with openbox wm

#9 Post by Seventh »

My apologies debiman, its just my lack of understanding and smidge of ignorance showing through.

Ok so i figured out how to get the log into a pastbin. Ive never done that before so took me a little while getting my head around it.

Not sure what you mean by version i have, i thought i mentioned that in the OP? But below is exactly what i did, albeit second install now doing the exact same thing (except running sudo startx) and getting the exact same result.

Version: Debian testing-stretch. Netinstall iso.
Uname -a: Linux debian 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) x86_64 GNU/Linux
Installed: xorg, sudo, openbox, menu, netcat.

Link to xorg log: http://termbin.com/i2ni

@ Hoas i will try

Code: Select all

# apt install xserver-xorg-video-all


and i havent used kvm before i will have a look into it, thanks.

@ Gary, before i installed openbox on the second install tonight still had the same errors.

I have done a bunch of googling and reading about this but have had no luck, i dont really like to ask for help and generally get things done myself, im not looking for anyone to do anything for me but if you can spare some help that would be appreciated.

Cheers.

Seventh
Posts: 44
Joined: 2017-04-01 10:13

Re: Startx with openbox wm

#10 Post by Seventh »

@Hoas, all video drivers installed by default i think, still no luck.

Code: Select all

# apt install xserver-xorg-video-all

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Startx with openbox wm

#11 Post by bw123 »

your log mentions (EE) loading vboxvideo have you tried to find out why? I did a quick search, and it may be informationally only, but you didn't mention whether you eliminated it?
have done a bunch of googling and reading about this but have had no luck, i dont really like to ask for help and generally get things done myself, im not looking for anyone to do anything for me but if you can spare some help that would be appreciated.
I like this search engine
https://duckduckgo.com/html/?q=startx+vboxvideo

Also, it looks like the card isn't showing up correctly? this error would be a good search, along with the keyword 'virtualbox' or vmware or whatever your vm is called.
(EE) open /dev/dri/card0: No such file or directory
resigned by AI ChatGPT

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Startx with openbox wm

#12 Post by dasein »

At the risk of pointing out the obvious, VirtualBox abstracts hardware and presents that to the OS.

Seemingly pertinent: https://bugs.debian.org/cgi-bin/bugrepo ... bug=808794

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Startx with openbox wm

#13 Post by bw123 »

maybe a better search, and thread title would be "install debian in virtualbox" ? I bet there's a how-to or three, and I recall threads on here in the past.
resigned by AI ChatGPT

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Startx with openbox wm

#14 Post by GarryRicketson »

I don't have any problem like this running Debian 8 with Open Box on Virtual Box
Image
============
Image
===============

But that is with Debian 8 Jessie, the current stable version ,... I
am not sure about Debian testing-stretch, there could be problems, since it is
"testing". Also I did not use a "Netinstall iso", I used a complete Cd image.
by Seventh »---snip--if you can spare some help that would be appreciated.
Thanks, and no problem, I wish I could be of more help, all ways am happy to try, any way, there is no problem asking about this here on this forum.
I wonder what would happen if you try installing a the Debian 8 Jessie (stable) instead of Debian testing (stretch)

I had a Debian Stretch VM, and it was working , also using OpenBox,... but last night, when I started it , I was going to , so I could show that it does work on Virtual Box,..unfortunately, guess what ?,.. It would not boot, all I got was a blinking cursor,...it had been working the last time I used it, I don't think I had done anything to change anything,..but then again, it is "testing", ..maybe later
if I have time I will try fixing it, or re-installing,..any way , glad to try to help.
but need to apologize , because I couldn't be of more help.
===P.S edit===
Don't pay attention to my signature,...it all ways says that, about "What we expect you have done ", I suppose I should change it.
=====edit ;Note===
Hopefully I don't run out of band width, I am re-installing Debian Stretc (testing) to the VM, and using the Netinstall ISO,..we'll see how it goes and I will get back in a while

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Startx with openbox wm

#15 Post by debiman »

kudos for figuring out the termbin.
Seventh wrote:running sudo startx
you did it again? please,
debiman wrote:first of all you should check your $HOME if there are any root-owned files now.
chown them back to your username:groupname. or maybe delete. :twisted:
can't hurt:
Please also check the log file at "/home/sc/.local/share/xorg/Xorg.0.log" for additional information.
anyhow, the pertinent error seems to be:
(EE) Failed to load module "vboxvideo" (module does not exist, 0)
putting this in a search engine does not yield immediate results, but my suspicion is something like this:
during initial installation, virtualbox was configured for a cli-only install, and the virtual hardware to run a gui simply isn't there. just a wild idea.
how did you install, btw?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Startx with openbox wm

#16 Post by GarryRicketson »

Just to say, after installing to the VM I am getting the same problem
as the OP,..

Code: Select all

Note: Some text was removed 
======================
[   220.369] (II) LoadModule: "vboxvideo"
[   220.369] (WW) Warning, couldn't open module vboxvideo
[   220.369] (II) UnloadModule: "vboxvideo"
[   220.369] (II) Unloading vboxvideo
[   220.369] (EE) Failed to load module "vboxvideo" (module does not exist, 0)
[   220.369] (II) LoadModule: "modesetting"
[   220.373] (EE) Screen(s) found, but none have a usable configuration.
[   220.373] (EE) 
====================
Fatal server error:
[   220.373] (EE) no screens found(EE) 
[   220.373] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   220.373] (EE) Please also check the log file at "/home/garry/.local/share/xorg/Xorg.0.log" for additional information.
[   220.373] (EE) 
[   220.383] (EE) Server terminated with error (1). Closing log file.
 
by debiman »---snip-virtualbox was configured for a cli-only install, and the virtual hardware to run a gui simply isn't there. just a wild idea.
how did you install, btw?
I have never noticed a option for this on VirtualBox, but that does not meant there
is not one, based on the errors, it seems to be "on the right track" so to speak.
More important, is how the OP installed, but , I just installed the same way I do
everything,...for example when I installed Minix3 to the VM, Xorg installed, and just worked, but anyway this is Debian,...so that does not matter. I will also look into this
more, and see if I can find anything in the VB configurations that will help.
========= edited ==========
I could not get it to where startx will start as a normal user, but it does as
root, same as the OP,..and openbox runs fine, , Why ?
from what I could find, it is because no "guest additions" are available for
Debian stretch (testing) , that is what it showed me when I tried to install
guest additions,...
from: http://wiki.minix3.org/doku.php?id=user ... virtualbox
VirtualBox's guest additions are not available for MINIX3. Therefore, MINIX cannot correctly guess the screen resolution. The desired screen resolution has to be set manually in the xorg.conf file.
I know , it is not Debian, but the same could apply to Debian, in other words:
Without "guest additions", Debian stretch cannot correctly guess the screen resolution. The desired screen resolution has to be set manually in the xorg.conf file .
It goes on to explain how to do that, but I could not figure out how to do that
on Debian, for example, where to put the new xorg.conf file,?
Maybe KVM would work, or using Debian 8, or Debian 7 instead ?
I did not do any searches to see if there is a "guest additions" maybe available for Debian stretch, somewhere else, besides the debian repos,...
=====edited=======
Actually "guest additions" is available:
https://packages.debian.org/stretch/vir ... itions-iso
I did not have the "non-free" in my sources.list, so that is why it said it was
not available.
It is best to have that installed, before installing other packages, such as Xorg
though,..I am not sure if installing it now, and trying to reconfigure Xorg will work,...in any event I am to tired to try just now,..
If the OP had guest additions installed, then I don't know what else it might be,
they have not answered back , on what and how they installed VB, and set up the VM ...the guest additions is a important part.
===================

To me it is not important enough to pursue, since both OpenBsd, and Minix3,
"just worked", on a VirtualBox VM, both are minimal installations, with just Xorg and OpenBox, all though I do have a few applications (packages) I use also installed.
I think it would work, if one knows where to put the xorg.conf.new after they edit it, that is the part I can not figure out.
sorry for not being able to help.

Seventh
Posts: 44
Joined: 2017-04-01 10:13

Re: Startx with openbox wm

#17 Post by Seventh »

dasein wrote:At the risk of pointing out the obvious, VirtualBox abstracts hardware and presents that to the OS.

Seemingly pertinent: https://bugs.debian.org/cgi-bin/bugrepo ... bug=808794
Ok this has solved the error as linked above by dasein, installing

Code: Select all

# apt install xserver-xorg-legacy
startx now works and brings me to the openbox desktop as user.

Thankyou dasein and to all who have contributed to the thread. :D

@Gary, can you confirm this works for you?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: [SOLVED] Startx with openbox wm (virtualbox)

#18 Post by GarryRicketson »

Sounds good, I just now saw this, and have not yet tried it,.. thanks for letting us know
I will get back as well,..thanks
======= edited ====
Yes it did work for me, as well,.....that sure turned out to be simple,..
thanks
===========================
Image
Last edited by GarryRicketson on 2017-04-11 15:30, edited 1 time in total.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Startx with openbox wm

#19 Post by dasein »

Seventh wrote:Thankyou dasein
You're welcome. Thanks for marking your thread as [SOLVED]

Post Reply