Running The Emulator On Linux Command Line Only
Running The Emulator On Linux Command Line Only
I'm not sure if this is the right place for this question... if it is not, I am very sorry... please point me to a better match.
I have an old laptop that I've installed Ubuntu Server on. It's basically Linux, but without a GUI layer. I want to use this to run the X16 emulator... is this possible? Has anybody done this before? I don't want to dive down a long rabbit hole only to find out that it's not even possible. So, I just want to know if it can be done...
Thanks.
Greg
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Running The Emulator On Linux Command Line Only
Yes, it can be done, but I suggest installing a windowing system along with a VNC server and run it through VNC. It is a lot faster than x-forwarding the application it self.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
Running The Emulator On Linux Command Line Only
I haven't done X redirection in quite a long while, but one thing I found back in the day was that the app (Netscape, if that's any indicator) actually ran FASTER over X because the host machine (a 386 in the Pentium era) didn't have to do all of the graphic stuff like layering the windows. I don't know how an SDL application would fare in these conditions. As far as sound, you'd need to run a remote sound session in parallel to the X session if you want the emu's audio to come through. I did this once with ess - not sure if modern sound stuff like Alsa, PulseAudio, Jack, etc have such hooks, but it wouldn't surprise me.
Accomplishing the X portion shouldn't be hard though - install some kind of X server on your main PC (I don't have any recommendations - it's been ages) and configure it to allow remote connections. Then on the Linux box, before running the emu, just issue the command "export DISPLAY=ip.of.host.pc:0" - where 0 would be the display ID that your X server uses to refer to monitor 0. The specifics of that would be in the xserver configuration, not the Linux box.
- desertfish
- Posts: 1091
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Running The Emulator On Linux Command Line Only
not entirely sure what your use case is but if you want to run the emulator without actually displaying anything you should be able to use the virtual framebuffer server as well xvfb
Running The Emulator On Linux Command Line Only
Thanks for the feedback...
My idea was to convert an old laptop to one that ran only the X16 emulator. The laptop I have is way too under powered to run any graphic version of Linux (or at least, too under powered to run Ubuntu... maybe a more light weight debian distro would work) but it does run Ubuntu server pretty well...
I installed Ubuntu server originally to set up a Minecraft server for my kids -- it worked okay, right up until somebody logged onto it:) then it really got laggy, so that was scrapped. But, while I was fiddling with the CLI server, it reminded me of running a very old lap top computer with DOS...
But, it sounds like this will be a pain to get running and may run worse than it would under a graphical environment.
Thanks.
Greg
-
- Posts: 913
- Joined: Tue Apr 28, 2020 2:45 am
Running The Emulator On Linux Command Line Only
There are a lot of lightweight desktop environments for Debian/Ubuntu. I'd recommend Lubuntu (LXQt-based) or Xubuntu (Xfce-based). Both work great on older computers, so it's a matter of which environment you like better.
Running The Emulator On Linux Command Line Only
I am currently 100% Fedora with a LXDE DTE. I just want stuff to run. I don't need a lot of eye candy. I have not been disappointed.
Running The Emulator On Linux Command Line Only
15 hours ago, iGregory said:
Thanks for the feedback...
My idea was to convert an old laptop to one that ran only the X16 emulator. The laptop I have is way too under powered to run any graphic version of Linux (or at least, too under powered to run Ubuntu... maybe a more light weight debian distro would work) but it does run Ubuntu server pretty well...
I installed Ubuntu server originally to set up a Minecraft server for my kids -- it worked okay, right up until somebody logged onto it:) then it really got laggy, so that was scrapped. But, while I was fiddling with the CLI server, it reminded me of running a very old lap top computer with DOS...
But, it sounds like this will be a pain to get running and may run worse than it would under a graphical environment.
Thanks.
Greg
I mean, if you want to run it on the server itself without installing a GUI, you can install the X11 and SDL2 library files on their own. I think that's all you really need to run a GUI application. Whether your machine is powerful enough to actually run the emulator smoothly is another matter.
Running The Emulator On Linux Command Line Only
There are emulators for other computers that run in a terminal e.g. https://atari800.github.io/ and https://www.weggetjes.nl/sg/zx81ce.html (WAS: http://rullf2.xs4all.nl/sg/zx81ce.html). The output of x16emu can be sent through a filter program that converts PETSCII to UTF8: https://github.com/mobluse/x16-petscii2utf8
The difficult thing is to get the keys you press (key down and key up events) in the terminal to be sent to x16emu. I once hacked x16emu so that this was possible, but that slowed down the emulator. One would also need to remove the GUI to make it independent of X and SDL.
Running The Emulator On Linux Command Line Only
So I installed LUbuntu. Now I have a multi-emulator computer -- It runs DOSBox, VICE and X16 really well. I just need to set up the keyboard mapping and get them to run full screen.
Thanks for the suggestions, folks!!
Greg