Arch Linux in Virtual Machine, startx results in missing assets used by the desktop

WisePassion

New Member
Credits
67
I tried running startx on my Arch Linux virtual machine (using Oracle Virtualbox) to test Arch Linux, and I am making new improvements rapidly. I tried to test different display managers to find out which one I was going to install on my computer, and I finally decided I was not going to use one, and I was instead going to use startx to run various window managers/desktop environments, as this means I can choose not to run xorg at all in any particular session if I ever want to. Upon running startx /bin/cinnamon, the desktop boots up and allows me to interact with it, however, many assets, such as themes, backgrounds, icons, and even the cursor (the cursor was invisible but I could still click stuff, this made it difficult to use the desktop) were missing, and the result was either black or transparent space where they were supposed to be. This makes it difficult to use the environment. When I went to Themes on the gui settings manager, the themes appeared as options, but I couldn't see them in action. I just want to know how to load Cinnamon and other desktop environments (I tried i3 and it looks like it didn't even transition from the terminal text to the gui, usually there is a initial setup wizard that appears in graphical form the first time you boot up i3 or when there is no ~/.config/i3/config found.) using startx so I don't have to be limited to a display manager when logging in to my system.
 

Attachments



Tolkem

Well-Known Member
Credits
1,300
using startx so I don't have to be limited to a display manager when logging in to my system.
Hmmm ... Actually, a DM will give you more options to log in to any DE you have installed. You could install lightdm or ssdm, then everytime you boot the VM on the right up corner you'll see a drop-down menu to choose which DE you want to start. Strating a DE using startx is not that simple, you also need to edit xinit file https://wiki.archlinux.org/index.php/Xinit

as this means I can choose not to run xorg at all in any particular session if I ever want to
AFAIK, to be able to run any graphical environment like a DE or WM; KDE, Cinnamon, Mate, XFCE, i3wm, awesome, Xorg is mandatory otherwise you'll get issues like the ones you're already having since it makes possible that hardware like mouse and keyboard interacts with the GUI. https://magcius.github.io/xplain/article/ So, install Xorg and a DM, they're quite useful and will make you're experience smoother. You could also run command line only if you don't want to install xorg.
 

WisePassion

New Member
Credits
67
Hmmm ... Actually, a DM will give you more options to log in to any DE you have installed. You could install lightdm or ssdm, then everytime you boot the VM on the right up corner you'll see a drop-down menu to choose which DE you want to start. Strating a DE using startx is not that simple, you also need to edit xinit file https://wiki.archlinux.org/index.php/Xinit



AFAIK, to be able to run any graphical environment like a DE or WM; KDE, Cinnamon, Mate, XFCE, i3wm, awesome, Xorg is mandatory otherwise you'll get issues like the ones you're already having since it makes possible that hardware like mouse and keyboard interacts with the GUI. https://magcius.github.io/xplain/article/ So, install Xorg and a DM, they're quite useful and will make you're experience smoother. You could also run command line only if you don't want to install xorg.
I didn't mean I wanted to be able to "run a DE without Xorg". I meant I wanted to have the option to skip running a DE and Xorg in any session and use the command line only, and on other sessions that I wanted to use my desktop, I would use startx to run both Xorg and Cinnamon/any DE. This way I would not need a display manager, and I can not only choose what DE/WM I wanted to boot up each session, I can run some extra Zsh commands before I even do any of that.

I have encountered problems before where some GUI applications refuse to boot up, leaving me with a "black screen of death" that doesn't let me do anything until I restart my computer. This is especially problematic on a VM where I don't know how to switch TTYs without switching my host machine to a different TTY instead. SDDM always leaves a black screen before it can boot up my DE and I don't know how to fix it, but that's a problem for another day.

I will try configuring my xinit file and see if I can get Cinnamon to run better. Thank you.
 

Tolkem

Well-Known Member
Credits
1,300
I didn't mean I wanted to be able to "run a DE without Xorg". I meant I wanted to have the option to skip running a DE and Xorg in any session and use the command line only, and on other sessions that I wanted to use my desktop, I would use startx to run both Xorg and Cinnamon/any DE
Ah, I see. My bad, guess I misread that part.

SDDM always leaves a black screen before it can boot up my DE and I don't know how to fix it, but that's a problem for another day.
That's weird, I don't remember having any issue like that with it. Did you install guest additions?

I will try configuring my xinit file and see if I can get Cinnamon to run better. Thank you.
This might help https://www.distributednetworks.com/redhat-linux-admin/module2/configuringXstartup-usingXinitrc.php
 

WisePassion

New Member
Credits
67
I figured out by configuring ~/.xinitrc I could run GNOME without any problems. The Arch Wiki shows how to set up xinitrc to do that.

However, when I kept my GNOME xinitrc and run startx /usr/bin/cinnamon I could run Cinnamon, and icons would appear, but the background was missing and I could not set it. Also, going to the start menu to log out or shut down I didn't get any dialog box.

I had to use the virtual machine X button to signal the machine to shut off (the equivalent of pressing the power button once). Surely there is an improvement, but not quite usable yet. I looked at the Arch Wiki to see the proper xinitrc for Cinnamon, and all that was in the box was
Code:
exec cinnamon-session
so I don't know what is not being loaded this time.

While writing this I tried actually making the rc as the Cinnamon box says and appended .old to the GNOME xinitrc.
This actually solved the problem with Cinnamon, except Cinnamon was complaining that it couldn't find my video drivers, even though I had installed xf86-video-nouveau (which was probably wrong considering even though I have a Nvidia graphics card on my host machine, I'm using Virtualbox to run this Arch machine and it probably doesn't have direct access to my graphics card).
However, I wish there was an easy way to switch between 2 desktop environments, or choose which one to boot each session without having to fiddle with file names.
 

ExSiS

New Member
Credits
53
The same thing happened to me. But then I installed a display manager (I am using LXDM) and my desktop works.
 

Tolkem

Well-Known Member
Credits
1,300
There is also this option with xinit. Never tried it but just thought I would mention it if you wanted to try it.
That's what he's already using and having issues with. People created/developed display managers because they make logging to a desktop more much easier than the way they were doing it; editing .xinitrc and setting everything by hand thus saving a lot of time and frustration for them and luckily for us too, every Linux user out there and here, so use them, they're there for that same purpose. I use them, why bother with some ancient-hard approach when more experienced people who know better than me created those wonderful tools so I don't have to? If for learning sake I guess is ok but still ... long live the display managers and thank you so much to the people who created them! BTW, you could create your own DM. Here's something to get you started https://www.gulshansingh.com/posts/how-to-write-a-display-manager/ I tried once a while ago just for fun but didn't work :(
 


Members online


Top