LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 07-06-2012, 02:45 PM   #1
zwitterion-241920
Member
 
Registered: Nov 2011
Location: AccountKiller
Distribution: AccountKiller
Posts: 89

Rep: Reputation: 39
bochs cannot connect to X server or set SDL video mode in Archlinux


I'm trying to run one of the first stages of James Molloy's kernel tutorial (http://www.jamesmolloy.co.uk/tutorial_html/) in Bochs on my Archlinux laptop, but when I unleash Bochs onto the image, it gave me an error message. I tweaked the configuration file, read the manual, googled the problem and then I thought it might be a problem with the build from the Arch repos.
I downloaded the source code for the latest stable version and then did:
Code:
$ ./configure --with-x11 --with-sdl --enable-x86-64
$ make
I ran the executable with
Code:
$ /source/directory/bochs -f bochsrc.txt
With this bochsrc.txt
Code:
megs: 32
romimage: file=/usr/share/bochs/BIOS-bochs-latest address=0xf0000
vgaromimage: file=/usr/share/bochs/VGABIOS-elpin-2.40
floppya: 1_44=/dev/loop0, status=inserted
boot: a
log: bochsout.txt
mouse: enabled=0
clock: sync=realtime
cpu: ips=5000000 model=corei7_sandy_bridge_2600k
display_library: sdl
I get the following output:
Code:
========================================================================
                       Bochs x86 Emulator 2.5.1
              Built from SVN snapshot on January 6, 2012
                  Compiled on Jul  6 2012 at 21:17:20
========================================================================
00000000000i[     ] reading configuration from bochsrc.txt
------------------------------
Bochs Configuration: Main Menu
------------------------------

This is the Bochs Configuration Interface, where you can describe the
machine that you want to simulate.  Bochs has already searched for a
configuration file (typically called bochsrc.txt) and loaded it if it
could be found.  When you are satisfied with the configuration, go
ahead and start the simulation.

You can also start bochs with the -q option to skip these menus.

1. Restore factory default configuration
2. Read options from...
3. Edit options
4. Save options to...
5. Restore the Bochs state from...
6. Begin simulation
7. Quit now

Please choose one: [6] 6
00000000000i[     ] installing sdl module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
No protocol specified
No protocol specified
========================================================================
Bochs is exiting with the following message:
[SDL  ] Unable to set requested videomode: 640x480: Couldn't set console screen info
========================================================================
When I change display_library to 'x', the last lines are replaced with:
Code:
Please choose one: [6] 6
00000000000i[     ] installing x module as the Bochs GUI
00000000000i[     ] using log file bochsout.txt
No protocol specified
========================================================================
Event type: PANIC
Device: [XGUI ]
Message: bochs: cannot connect to X server :0

A PANIC has occurred.  Do you want to:
  cont       - continue execution
  alwayscont - continue execution, and don't ask again.
               This affects only PANIC events from device [XGUI ]
  die        - stop execution now
  abort      - dump core 
Choose one of the actions above: [die] die
========================================================================
Bochs is exiting with the following message:
[XGUI ] bochs: cannot connect to X server :0
========================================================================
SDL works fine for other programs and X appears to work. Does anyone know of a solution?
 
Old 07-31-2012, 04:59 PM   #2
zwitterion-241920
Member
 
Registered: Nov 2011
Location: AccountKiller
Distribution: AccountKiller
Posts: 89

Original Poster
Rep: Reputation: 39
solved!

I was using Bochs from a script which had to be run as root, so I should have modified the script to use gksudo or something like that.

Last edited by zwitterion-241920; 07-31-2012 at 05:01 PM. Reason: typo
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SOLVED : P new install of archlinux with archlinux-2010.05-core-i686.iso elenger Arch 1 08-18-2011 01:55 PM
[SOLVED] how to set video mode at boot user100 Slackware 10 10-15-2010 07:45 AM
Can't set video mode? wazntme Linux - Newbie 1 10-27-2005 08:20 PM
America's Army: Can't set video mode starchie Linux - Games 4 12-02-2003 11:23 PM
damn fireGLCouldn't set video mode: Couldn't find matching GLX visual Kilka Linux - Games 0 11-27-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration