-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request - graphical chroot in a tab #147
Comments
I've been experimenting with a vnc target that can be used instead of X11 and Xephyr, allowing you to access the chroot's desktop through an offline VNC client. It sort of works, but I need to figure out how to launch a new Chromium tab from the shell. If you can figure that out, I can put the final pieces together and put it up for testing. |
When I run the VNC client you linked to, it says it doesn't support ARM yet. Also, what VNC server are you running in the chroot? I installed vino, but I think it needs gnome. To run a command from the shell, write the extension app called "tab_chroot" then write a gcc program like this that can execute from the command line: #include <stdio.h> int main(void) return(0); I don't know how to write tab extensions yet, but I think drinkcat does ;) Did you see the message in the unmount chroot issues thread that the two fingers on touchpad on ARM ummounts, and exits the sigkill loop? |
Right, that's probably gated on PNaCl. I'm not aware of any other offline VNC apps though. The vncserver is vnc4server, which creates a VNC server with its own X11 server included, independent from any desktop. You have to use a vnc viewer to see this desktop. I'm afraid that C code is completely irrelevant. If you have a comment on the unmount chroot issue, please post your comment in that issue. |
I was thinking extension / icon, but for launching a new tab in a an open chrome window, this works for me: $google-chrome http://localhost/test/php (or http://127.0.0.1/test.php) |
The |
Does everything else in the vnc target work? Could be worth sharing as a beta and tell people to use a VNC extension to open 0.0.0.0 manually until that last bit is figured out. |
I can format it into a target and add a branch; it's currently just a proof-of-concept hack. A couple things that need to be done before it's releasable:
|
just started playing with this looking at how i can get a few full screen games added to my daughter's chromebook. going direct from shell and running full screen without needing to start up a separate xserver works a treat--it's just a bit manual at the moment. having the hooks to allow people to create their own private extensions which effectively scripts all the steps from enter-chroot to launching the desired application would be a really powerful enhancement to a vanilla chromebook. |
Sorry for the (massive) delay. I've added a vnc branch, and you can grab the latest version of that branch here. It's extremely rough right now, but it's something to play with if you want it. Specify |
tried installing crouton-vnc but got this error: Installing target vnc... E: Package 'vnc4server' has no installation candidate was going to try the html5 novnc, as the linked one above doesn't support ARM. |
Argh. Looks like xtightvncserver is available on both platforms though. Try editing the /prepare.sh to install xtightvncserver instead. |
I used apt-get in my existing xfce precise shell to install xtightvncviewer (with fonts, etc.), and the apt-get instlall xtightserver and have the install options below: I restarted and ran /usr/bin/vncserver which said my desktop was localhost:2 and set a password. I hot-keyed to chromeos, and ran novnc, entering above info, but got timeouts. Does the other vncserver use port 8080 ? Suggested packages: |
upon running /usr/bin/vncserver & I get the output below. netstat -a shows that *:5902 and *:x11-2 might be related ports to xtightvnc server, a quick search shows #125 got pretty close with a windowed only vnc connection? root@localhost:/home/ted# ps ax | grep vnc New 'X' desktop is localhost:2 Starting applications specified in /root/.vnc/xstartup using netc |
looks like port is 5902: root@localhost:/# ps ax | grep vnc log file shows it got a connection from client 127.0.0.1 but not a valid RFB client ? |
tightvnc server is running fine in the chroot, as I'm now on another computer running xtightvncviewer, and have the chroot up in a window after entering ip:5902 and password. My default wallpaper is gone, and default xfce is here, so I'm wondering if it picked up my raring chroot? below is shell output from non chromebook, successfully connecting to chroot vncserver (client is a dell with mint quantal xfce): ted14 ted # /usr/bin/vncviewer |
Why not just change the generated /prepare.sh script to use the other package like I suggested? You're reinventing the wheel... |
I will do that now, and test it. But doing this will only provide a working vnc server in the chroot on the ARM, as even on my networked PC with chroot in vnc window, I can't copy from chroot and paste into my host OS, so the copy/paste to chromeOS side still needs a chromeos localhost vnc client (at least on the ARM). But the vnc server working in the chroot is exciting! |
I need help here. I have 2 prepare.sh files, one in: /usr/local/chroots/precise/prepare.sh and one in: /mnt/stateful partition/dev_image/chroots/precise/prepare.sh backing them up, and chmod 700 (they were 500), to edit the vnc4server to xtightserver, then saving, then running: sudo sh -e ~/Downloads/crouton-vnc -t vnc,xfce -u both generated the "Package vnc4server is not available...E: Package 'vnc4server' has no installation candidate' messages. So I need to edit file(s) besides prepare.sh, right? I opened up crouton-vnc in vi, but cannot find vnc4server referenced there either. What am I missing here? |
Those are the same file; the partition has two mount points. Running crouton-vnc again overwrites prepare.sh. Edit the prepare.sh and then just enter-chroot; crouton will ask if you want to run the prepare.sh (say yes). |
OK, this works. I have removed my vncserver, edited prepare.sh using tightvncserver, and entered the chroot, answering yes to continue completing the install. The tightvncserver was retrieved and installed properly. (note that the package name is tightvncserver, which is unpackages to /usr/bin/vncserver and alternate ways of starting the vncserver. The preferred way is probably ~/.vnc/xstartup although files like vncserver are placed in /usr/bin ~/.vnc is also the directory for log files, where you can see which port is used (default appears to be port 5902), and which window your vnc is (default localhost:2) Optionally, if you want to test your vnc server immediately, you can from apt-get install xtightvncviewer and immediately view a vnc session of your current chroot. You will be asked for your ip (enter ip:port), and optionally a password if you set one. You can also set a view only password. You should be able to startup the vnc server in /etc/rc.local, just as you would sshd, and other servers. Note that your vnc session may not look exactly like your local session as it may drop your wallpaper, and revert to the defaults, at least with my xfce, but it is the same underlying chroot. Below is an image of the VNC window, on top of the customized chroot: Let me know where to upload the proper prepare.sh with chmod 500 settings. It is the one generated by crouton-vnc but replaces the vnc4server with tightvncserver package. If this is the best way we can implement a vnc server in the chroot, I will write it up in the wiki. I did not encounter bug #125 where a full-screen VNC window doesn't function, because the default VNC window size from this package is 1024 or so, which is smaller than my 1376 and 1440 screens, so it was not capable of going to full-screen on those systems. |
None of that, actually. Once you have the VNC target installed, just use startxfce4 as normal. It should launch Xvnc instead of X11. |
You are right. I just quit my chroot, and entered again, and went straight to /usr/bin/vncviewer and the server is running. I then checked the process below. How is it auto-starting? It put nothing in /etc/rc.local? And is this a safe thing to auto-start a vnc server that opens a tcp port? root@localhost:/usr/bin# ps ax | grep vnc |
I don't think that one was launched by my script...you should probably reboot to get to a sane state, then just try doing startxfce4. |
I powered off and on, and yes, it is not coming up automatically: But I don't understand what power cycling did that completely exiting and unmounting, then restarting the chroot did. Actually, I have an idea, that I will test tomorrow - after running the new prepare.sh the first time, then answering yes to the prompt, and having the chroot updated with the vnc package, I exited the chroot, and went to /usr/local/chroots/precise to send the prepare.sh and noticed it was gone after it was used, so I made a new one, cp'd it to ~/Downloads to upload or attach. But by making a new one (from a .bak file), I think it ran again, so perhaps it runs once after installing. Should you consider leaving the prepare.sh file there, perhaps renaming it prepare.used or prepare.last so advanced users can see if the parameters and font types/directories are what they want, or can debug? I realize you can't leave it there as executable or it will run every chroot entry, but renaming, or chmod to non exec? I will look into this tomorrow. Thanks. root@localhost:/usr/bin# xvncviewer |
David, When you get a chance, I'd love an explanation of what's different between using VNC and VT3. Would it be easy to set up one instance of crouton to use one or the other? Based on this commit it looks like I could ~/bin/lcdinit:
~/bin/vncinit:
/etc/X11/xinit/xserverrc:
|
Yep, that should work (I've tweaked the lines to fix the syntax), and yes, the two techniques will interop just fine. Benefits of running in VT3 are that you get GPU/3D acceleration, it runs at full resolution with minimum lag, and it's the most efficient battery-wise. Downsides are that currently Chromium seems to drop connections when not the active VT (see #118), you can't share the clipboard without something like #144, the keyboard shortcut to switch chroots sucks (#48), and you can't see your Chromium OS tabs and your chroot at the same time. Benefits of running in VNC are that it runs in a tab or a window (so you can arrange it with your other tabs however you desire), switching to the chroot is the same as switching to any webpage, and if your VNC client implements clipboard synchronization you automatically get that. Downsides are that you don't have any GPU acceleration, there's a bit of lag and overhead due to encoding/decoding/rendering the VNC protocol, all possible resolutions have to be supplied to the Xvnc command line (pass multiple -geometry parameters), and you have to have an extension installed and launch (or auto-launch) it. The third option is running using Xephyr, which nests an X11 server inside the Chromium OS one and uses ratpoison to swap between them. Benefits/downsides are pretty much a hybrid of VT3 and VNC: switching between the chroot and Chromium OS is easier and faster because of the nicer shortcut keys and that you're not changing VTs, there's no lag and the graphics system is pretty efficient, and Chromium doesn't drop connections while in the chroot; however, you still need #144 for clipboard synchronization, you can't see your chroot and Chromium OS at the same time, you don't get GPU/3D acceleration, and you can't change resolution at all. |
@tedm, yes, it sounds like you reset your changes. |
yes. Let me know if you have a crouton-vnc that makes a prepare.sh with tightvncserver instead of vnc4server and I will test again. I don't know vnc well enough to know what additional optimal default parameters should be passed other than replacing the vnc4server package with tightvncserver. Also, is it a bug that the vncclient that goes along with tightvncserver (xtightvncviewer package) doesn't pick up my xfce customizations? The last time I used vnc was many years ago with the LTSP project, and there was only one X server that we knew about. Wallpapers were not yet invented... ;) As an instructor, we teach from books that mention vnc is outdated... and potentially insecure and inefficient ... of course that's not all entirely true. |
@tedm - It looks like David switched to using the tightvncserver about a week ago. @david - Just installed crouton-vnc using targets vnc,xfce and it works great. One question though - after looking at some of the branch files, it looks like maybe I should have specified targets vnc,xephyr instead since it looks to be setup that way ??? Thanx again for all your work! |
K, can you give me a primer on why a Virtualbox guest can resize the desktop with no problem, but a VNC client to an otherwise headless display can't? |
Virtualbox uses its own video driver and protocol. That's why you need the Virtualbox tools installed in the guest in order for that feature to work. |
There is functionality in VNC for the client to resize the host, I believe, but I don't think it's widely implemented. |
Could we emulate that as a piece baked into a chroot, or is that too big of On Wed, Aug 7, 2013 at 4:34 PM, David Schneider [email protected]:
|
It'd probably be more reasonable to look into using xvfb-randr or some VNC server/client combo that implements everything necessary already. |
K, I'll see what I can do to figure out a VNC entirely in browser, and you work on your stuff things. Thanks for the information. |
Would a tabbed VNC client be able to be Chromecasted, cause then we could get really fancy with our display setups. |
And another thing, since it's just me in the echo chamber right now. Steam and other GUI based apps don't seem to work well under VNC. Gonna try with the standard Crouton since I know that will work, and see if I can make a tab there. |
It should be Chromecastable, but only via the slow way (of screensharing). |
Figured as much. Now trying to use Java on my book to get
|
In case anyone is interested the the RealVNC viewer for Google Chrome mentioned earlier supports ARM Chromebooks as of the latest version released today. You can find it here: https://chrome.google.com/webstore/detail/vnc-viewer-for-google-chr/iabmpiboiopbgfabjmgeedhcmjenhbla |
Poke. My old work around of entering the chroot and using "vncserver -geometry 800x600 :1" quit working on me, in that the VNC Viewer in Google Chrome mentioned above simply cannot connect to the Chroot's seemingly unaffected VNC instance with tightvncserver. Is this a 64bit issue, crouton update, or something else that fell down, went boom? |
I was trying crouton-vnc on my Samsumg Chrome Box But when launching startxfce4 it ends up with the following error. I am not sure what's the issue. Can someone please help? chronos@localhost / $ sudo startxfce4 21/10/13 00:08:35 Xvnc version TightVNC-1.3.9 VNC server launched on display :1 screen saver extension not supported (xfwm4:24595): xfwm4-WARNING *: The display does not support the XRender extension. (xfsettingsd:24625): xfsettingsd-CRITICAL *: No RANDR extension found in display :1.0. Display settings won't be applied. ** (xfce4-volumed:24630): WARNING *: Binding 'XF86AudioRaiseVolume' failed! ** (xfce4-volumed:24630): WARNING *: Binding 'XF86AudioRaiseVolume' failed! ** (xfce4-volumed:24630): WARNING *: Binding 'XF86AudioRaiseVolume' failed! (xfce4-session:24567): Gtk-WARNING *: Unable to locate theme engine in module_path: "pixmap", |
None of those are errors, really. Did you try launching the VNC client? |
I am getting the following error when i tried to connect to the localhost:5901 I also tried localhost:1 and exact ipaddress:1 everything shows the following error. Cannot establish connection. Are you sure you have entered the correct network address, and port number if necessary? |
The VNC client from https://chrome.google.com/webstore/detail/vnc-viewer/iabmpiboiopbgfabjmgeedhcmjenhbla now works on ARM too. |
I installed crouton-vnc and see the same output as bosscar. When I connect to it the vnc server the Google Chrome VNC client or the VNC Viewer client, I can connect successfully (hooray!). My mouse works, however my keyboard on the Chromebook ( including a separate USB keyboard I tried) doesn't work in the VNC window. Ugh! So close, yet so far away. Any ideas'? |
I also tried launching it with Unity. I see some font warnings and I wonder if that's related to the keyboard input issues. Thx for the help! .................................................... chronos@localhost / $ sudo startunity 02/01/14 23:42:47 Xvnc version TightVNC-1.3.9 |
That's harmless. Which Chromebook are you running? I might give it a try... |
@drinkcat ye old $250 Samsung ARM Chromebook. (Besides the pain of ARM compatibility, the hours and hours of battery time rock! w00t!) As an aside (which may be just random useless info) I got the x11vnc server working out of the box (http://www.cs.man.ac.uk/~aljamms8/debian-chroot-armbook/) and can successfully connect to it with the Chrome VNC client. Shockingly the keyboard works with that VNC server. However when I plug in my HDMI cable and the monitor syncs the displays, the connection suddenly drops. :/ Appreciate anything you can think of. |
As a quick update, the current plan is to implement a framebuffer display via the crouton extension that uses the dummy xserver driver as a backend. Nothing's been implemented yet, of course. |
Very interesting conversation... I would love to be able to run a single linux app as a tab in chrome OS. I'm assuming the crouton extension/framebuffer display would support this? Even better would be to have that app show up in the launcher bar of Chrome OS. |
I don't think chromeos security would allow an app in a tab, only a screen or desktop to a vnc or x11 server. What would be the disadvantages of say X11 ssh forwarding in a tab (like xming for windows) vs vnc server / client tab app? |
I know that someone came up with this work around for gtk apps. https://www.reddit.com/r/Crouton/comments/2c9v0u/using_crouton_with_broadway_to_run_gtk_apps_in/ X11ssh isn't quite ready for ChromeOS, so we can't directly do that yet to On Sun, Aug 17, 2014 at 12:20 AM, tedm [email protected] wrote:
|
An implementation is almost ready to merge in #1144. Closing this. |
Can we get crouton so instead of hot-keying, it is just in a tab in chrome? Then we get our linux and chroot a bit more seamless, without hot-keying back and forth.
Seems like one would just need to modify the chrubuntu so it fits in a chrome window instead of the whole physical display.
The text was updated successfully, but these errors were encountered: