Hello
I have recently installed Ubuntu on my Chromebook and added the Unity desktop environment, which I have been more or less familiar for some time, but a few days ago I found out that you could install the classic GNOME environment and even enable it in Ubuntu 13.04 (which is the one I have)... only problem is - in Crouton, you can't switch between DE's since the Log Out option pulls you back into ChromeOS, therefore you can't access the login screen
Is there any other way to switch to a different DE that's not included in the list of targets prior to installing a distro via Croutin?
Maybe a script or an app or a terminal command?
I tried to attempt to do so myself using an instruction on installing Elementary OS instead of XFCE, but the manual redirects me to /usr/bin where there should be a startunity script, which is nowhere to be found
Thanks in advance
Yes, there are many ways. I personally usually open a terminal in chromeOS by typing ctrl+alt+t, then type shell, lastly, I type sudo enter-chroot. This logs me into the terminal of the chroot (ubuntu, in your case), then I type xinit. Xinit logs into whatever I wish it to, whether Ubuntu or Gnome. To setup xinit, you create a file in your home folder called .xinitrc, there you type exec [desktop environment] (in the case of gnome, in place of desktop environment] you put gnome-session). I hope this helps.
If you have any need of clarifications or questions, feel free to ask.
If you want a more verbose/techy/complicated/better explanation, I recommend looking at https://wiki.archlinux.org/index.php/Xinitrc. The Archwiki is an awesome place for people looking for general answers. I also recommend one day looking into using the Arch distro instead of the Ubuntu distro.There is even a version of Crouton for Arch :)
Here's a here's a list of (came from https://wiki.archlinux.org/index.php/Xinitrc) how to load different windows managers using exec, I hope it helps.
awesome ) exec awesome;;
bspwm ) exec bspwm;;
catwm ) exec catwm;;
cinnamon ) exec cinnamon-session;;
dwm ) exec dwm;;
enlightenment ) exec enlightenment_start;;
ede ) exec startede;;
fluxbox ) exec startfluxbox;;
gnome ) exec gnome-session;;
gnome-classic ) exec gnome-session --session=gnome-classic;;
i3|i3wm ) exec i3;;
icewm ) exec icewm-session;;
jwm ) exec jwm;;
kde ) exec startkde;;
mate ) exec mate-session;;
monster|monsterwm ) exec monsterwm;;
notion ) exec notion;;
openbox ) exec openbox-session;;
unity ) exec unity;;
xfce|xfce4 ) exec startxfce4;;
xmonad ) exec xmonad;;
@mtello thank you for your help, but I seem to not have any luck so far. I first tried manually creating the xinit file, but it didn't result in anything
So I looked into the manual you provided, which suggested me to copy the original xinit file into the /home folder. I did, opened it up, typed in the command to launch ghome-classic DE
exec gnome-session --session=gnome-classic;;
Saved the changes to the file. Logged out of Ubuntu. But when trying to launch gnome via terminal from ChromeOS, as you suggested (via enter-chroot and exec commands) - it results me in an error with this text:
* (gnome-session 26418) WARNING: could not open display *
What do I do now?
This isn't _switching_ DEs but it is another way to do it ( from Chrome OS ):
sudo startunity and/or sudo startgnome
You can actually have both DEs running on the same chroot if you like...
@DennisLfromGA that doesn't work with DEs that aren't listed as targets in Crouton. Sure, I can start up Unity or GNOME or Enlightenment via a sudo start command, but I can't launch GNOME Classic. I guess Crouton doesn't know about any other DEs unless you make a script for it, which I have no idea how to create honestly
I searched for other solutions, and the only way to launch DEs other than the "supported" ones is to enter a command
sudo enter-chroot gnome-session-wrapper [desktop environtment name]
Still a one command launcher though, so I guess it'll do for me
But still, hopefully the author can also add support for stuff like Cinnamon and GNOME Classic natively
@Fatal1ty93RUS,
that doesn't work with DEs that aren't listed as targets in Crouton
Well that's true but I usually like to add a DE via crouton and then add to it and tweak in the chroot.
I don't understand the benefit(s) of installing a vanilla chroot and then adding DEs inside the chroot, but I may be missing something.
I guess Crouton doesn't know about any other DEs unless you make a script for it, which I have no idea how to create honestly
You could, in Chrome OS, copy /usr/local/bin/startgnome to /usr/local/bin/startgnome2, for example, and then change the last line -
from: exec startgnome
to exec startgnome2
See host-bin/startgnome.
Then, in the chroot, copy /usr/local/bin/startgnome to /usr/local/bin/startgnome2, and then change the last line -
from: exec crouton-noroot gnome-session-wrapper gnome
to exec crouton-noroot gnome-session-wrapper gnome-classic
See chroot-bin/startgnome.
sudo enter-chroot gnome-session-wrapper [desktop environtment name]
Still a one command launcher though, so I guess it'll do for me
That is probably the easiest method, short of creating your own scripts.
You can make it a tad easier by making an alias to it in Chrome OS.
Possibly something like:
alias startgnome2='sudo enter-chroot gnome-session-wrapper gnome-classic'
and then sticking that line at the end of your ~/.bashrc.
Doing what @DennisLfromGA suggests should give you the same level of convenience as with a fully crouton-supported. There's not a lot of special sauce with DEs as targets (i.e., manually installed DEs should work fine), but including them as targets in crouton comes with the guarantee that 1) they work (automatically tested), and 2) they support all (or almost all) platforms and releases. Most DEs fall short on (2), and thus aren't included.
@Fatal1ty93RUS If you still want to use xinit, fixing that error might be as simple as changing (exporting) the DISPLAY variable. I understand that I probabaly am not explaining this well, so this might help: http://hashcat.net/forum/thread-1973.html
See, I haven't been messing with ChromeOS for awhile, so I haven't had this issue, as it is more recent. Essentially, try typing export DISPLAY=:1 or export DISPLAY=:2, than xinit. If that works, you might want to add it to xinit; just add it before exec.