How can i get into desktop /gui of snappy ubuntu from putty?
startx command is not working
or is there any way to do loke real vnc
m using raspberry pi2+snappy core
ubuntu-core
How can i get into desktop /gui of snappy ubuntu from putty?
startx command is not working
or is there any way to do loke real vnc
m using raspberry pi2+snappy core
So I just received my Raspberry Pi 3 Model B in the mail and installed Ubuntu Snappy Core 16 in the recommended way. I performed the initial setup via HDMI and usb keyboard, ethernet, & DHCP. Then I created my ssh connection over ethernet and disconnected the monitor and keyboard. From there, I wanted to connect my device to WiFi and stumbled upon this post.
I like to try things without extra installations or workarounds, so I consulted Installation Tips as recommended above and saw that WPA_Supplicant was supposed to be pre-installed. With very little meddling and less effort than the Tips suggested, I found that you can configure the wifi by simply adding a config file consisting of four lines to the default location searched by wpa_supplicant and nothing else. Though it was asked a while ago about a Raspberry Pi 2 I see from recent comments that it might still be relevant and it was so simple I am inclined to share.
I know this answer looks long, but it is very simple and detailed with pictures. Anyone who has a basic knowledge of Terminal and was able to set up their raspberry Pi initially will be able to follow it.
Tl;Dr
- Setup your Rasberry Pi and establish a LAN connection via SSH
- Shutdown your Raspberry Pi with
sudo shutdown -P now
- Plug your SD card into a linux distro
- In a text editor add a config file called "wpa_supplicant.conf" to the /writable/system-data/etc/ folder on the Writable partition of the SD card
- I did this by creating the conf file on my desktop and then using
sudo cp
to move it to the correct directory- The config file should be:
network={
ssid="Typhon Secure"
Use your network SSIDpsk="*******"
Use your network Passkey}
- Note: This works for Hidden Networks as well
- Eject your SD, plug it into your Pi, boot your Pi; it should connect to your WiFi
My tutorial begins from the point of having an ssh connection via ethernet, which can be achieved by following the instructions at Ubuntu Core Get Started Raspberry Pi 2/3.
Then type wpa_supplicant
and you will see that it does not need to be installed as it is pre-built into Snappy Core. As you'll see in the below images, just running wpa_supplicant
will return a lot of options, but notice the last line:
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
What this tells you is first the Driver, then the Interface, then the location that it is looking for the interface file: -c/etc/wpa_supplicant.conf
Now that I knew where the configuration file needed to be, I shutdown the Raspberry Pi with sudo shutdown -P now
and once it shutdown; disconnected the power and inserted the SD into a linux box with Fedora. Somehow the file system shows differently so you'll find the location where wpa_supplicant.conf
needs to be location is at writable/system-data/etc
and the SD card mounted in /run/media/cregger/ for me, so you'll see my file path is /run/media/cregger/writable/system-data/etc/
.
I used nano to create a new file called "wpa_supplicant.conf" with the following four lines:
network={
ssid="Typhon Secure"
(My network SSID)
psk="*******"
(Obviously the asterisks represent my WiFi passkey)
}
Don't forget to terminate.
Note that this works for hidden networks with no extra configuration. My network has a hidden SSID and I changed nothing. It has WPA-PSK 2 security; pretty standard fare.
You'll notice that I saved it to the desktop. I then copied it to the proper location with terminal as it is owned by root.
Then eject your SD card from Linux, plug it back into your Raspberry Pi, plug your power source back into your Raspberry Pi; let it boot and it will seek your wifi.
You'll see in my case both Eth and Wlan have taken an IP
I can now ssh via either LAN or WLAN
I know this was long, but I hope it was helpful in helping you to keep from mucking up your FS and installing a bunch of needless applications.
apt-get
and other utilities for working with traditional .deb
packages do not work to install and upgrade applications on a Snappy Ubuntu Core system. Instead you use the snappy
utility. See the Snappy Tour for details.
To summarize a couple examples from the Snappy Tour, to install the Docker application you would run:
sudo snappy install docker
And to install updates, you run sudo snappy update-versions
(which corresponds to sudo apt-get update
on a normal Ubuntu system), snappy versions
to see what's newly available, and sudo snappy update ...
to specify packages for updating (put their names in place of ...
).
Because Snappy Ubuntu Core doesn't use .deb
packages, Ubuntu packages created for regular Ubuntu systems will not work--the relationship between regular Ubuntu systems and Snappy Ubuntu Core when it comes to package files is, in effect, the same as the relationship between any two distributions that use totally different package managers. (For example: Ubuntu and Fedora.)
Like in just about any OS, you could manually install programs on Snappy Ubuntu Core provided you have or can obtain all the libraries (and any other dependencies) they need. However, just as the best way to install most software on regular Ubuntu systems is with a .deb
package, the best way to install software on Snappy Ubuntu Core is with specially built snappy packages. Only a handful of these exist so far.
To search for Snappy Ubuntu Core apps from within a Snappy Ubuntu Core system, use:
snappy search search-term
This finds Snappy packages with search-term
in their names. (You'd replace that with whatever you're looking for, of course.)
As for Raspberry Pi, those have ARM processors, which you're right are not the same as the usual 32-bit and 64-bit Intel and AMD processors most of us use on our traditional PCs. However, Raspberry Pi support does not appear to be the main point of Snappy Ubuntu Core. Instead, as you may be aware, the general aim of Snappy is for better speed, stability, and security, in circumstances where a minimal Ubuntu Core system is sufficient and appropriate.
Snappy is cloud-oriented ("Snappy Ubuntu Core is the perfect system for large-scale cloud container deployments..."), and explicitly supports many x86 (i.e., not ARM) platforms--see the list of options under "Try the new, snappy Ubuntu yourself!" on the Snappy home page.
Nonetheless, depending on your needs, Snappy Ubuntu Core may be a reasonable way to get a working Ubuntu Core system on a Raspberry Pi. Depending on which Raspberry Pi board you have, it may or may not support a fuller, more traditional installation of Ubuntu. Note, though, that there are other options that may be more Ubuntu-like in the ways that matter to most users of traditional Ubuntu systems:
apt-get
. In fact apt-get
originated in Debian. (Ubuntu is a derivative of Debian.)apt-get
). The Debian project's page about Debian on Raspberry Pi even says, "Generally, your best bet is to use Raspbian".See also this list of operating systems for Raspberry Pi.
Best Answer
Now there is https://developer.ubuntu.com/en/snappy/guides/mir-snaps/ to package a single GUI application and bring it up on a snappy system.