Some days ago I decided to us Yocto for running my custom photo booth application on a Raspberry Pi. Main reason why choosing Yocto was the lack of a recent QT version on Raspbian which was needed by some features. Other solution didn't offer a hardware acceleration.
After getting the most features running, I stopped at the problem getting the printer configured and running. Cups seems to be sane and running corrently.
My goal was, that the printer is set up at first login by a profile.d-script. I'm using the lpadmin command:
# Check to see if the printer is already installed
if [ `lpstat -p 2>&1 | grep -E 'CP910' -c || true` = "0" ]
then
echo "Installing CP910"
lpadmin -p CP910 -E -m /usr/share/cups/ppd/Canon_CP910.ppd -v usb://Canon/CP910?serial=C91xxxxxxx
lpadmin -d CP910
cupsenable
fi
I copied the PPD file from my Ubuntu computer. lpadmin issues no error. lpstat -v lists my added printer. The output of lpstat -v looks on both Ubuntu and Yocto the same.
When trying to print any file, the state stays at "sending data" and nothing happens.
I have seen that there are cups-filters and drivers. I haven't found any recipes for filters and drivers for Yocto. So I assume that everything is shipped with the CUPS recipt?
Besides CUPS also Gutenprint is needed. Gutenprint provides the printer drivers. Without Gutenprint, CUPS can not connect to the printer.
Yocto currently has no recipe for Gutenprint. Maybe you are lucky and someone will write a recipe soon.
The CP910 can print via Wifi. Fortunately, there is a program that can start printing jobs via Wifi: https://github.com/saeugetier/go-selphy-cp
Related
I'm running WSL 2 on Ubuntu and having some issues getting docker up and running on my computer. I have Docker Desktop installed and running in the background, and I also have WSL integration enabled with Ubuntu.
When I try to run simple docker commands, such as docker --version, I receive this error:
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop
settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
I have already visited the link and followed all the instructions it gives, enabling WSL integration with Ubuntu as shown here:
However the error I receive is still the same. Does anyone know how to fix this?
Note: I can run Docker commands (such as docker --version) in PowerShell and Command Prompt, but it is unrecognized in Ubuntu.
"Docker Desktop" should integrate into WSL without additional configuration. Especially, it should not be necessary to append folders to the PATH environment variable.
Of course it must be made sure that "Docker Desktop" as well as the certain WSL distribution are set up for WSL2: In "Docker Desktop" settings "General/Use the WSL2 based engine" must be checked and wsl -l -v should list version 2. If the latter is not true, it can be fixed by wsl --set-version <distribution> 2, where <distribution> is the name from the previous list. Note that "Ubuntu" and "Ubuntu-22.04" (for example) are different.
"Docker Desktop" normally integrates with the default distribution. It can be seen from the asterisk in wsl -l -v which one had been chosen. For me this once was set to "docker-desktop-data" (probably because "Docker Desktop" had been installed earlier than the distribution). The default distribution can be changed by wsl --set-default <distribution>. Furthermore, in "Resources/WSL integration" of "Docker Desktop" settings, the option "Enable integration with my default WSL distro" must be set.
If another distribution than the default one should use docker as well, it needs to be selected explicitely in the list of distributions of "Resources/WSL integration". Press "Refresh" if that other distribution had been installed recently while "Docker Desktop" was already running.
"Integration" means, as far as I can tell, that a link /usr/bin/docker, pointing to /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker, is created automatically. Since /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker seems to be available in all distributions regardless of the integration setting, the presence (or not) of /mnt/wsl/docker-desktop/cli-tools/usr/bin and its content might help to analyse the problem. There should be docker, docker-compose and others:
ls -l /usr/bin/docker
ls -l /mnt/wsl/docker-desktop/cli-tools/usr/bin
I was having this problem, so I went to this docker link (your link is broken) and worked through the suggestions.
This worked for me:
In PowerShell, type wsl -l -v and you should get something like this:
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop Running 2
Ubuntu-20.04 Running 2
docker-desktop-data Running 2
Go into the Docker Desktop Settings -> Resources -> WSL integration.
Select the WSL 2 distro you are using from the above list (e.g. Ubuntu 20.04 in my case) and Apply & Restart.
Now running the version command works as expected in my distribution, and I have all of the functionality required from within the WSL terminal.
:~$ docker -v
Docker version 20.10.16, build aa7e414
Try to put following line in your Ubuntu's ~/.bashrc
PATH+=":/mnt/c/Program Files/Docker/Docker/Resources/bin"
( It might be /c/Program Files/... depending on your mount point. You can check with the command df )
and start a new bash shell, then run docker.
I was able to fix this by taking the below steps but it required some work arounds because I was unable to click-install the necessary WSL2 Linux kernel update after downloading.
Then I had to complete this process.
Then I had go to the PowerShell command line and navigate to the location of the above WSL Update and run the following (in administrator mode-- and not in the Linux command line):
& '.\wsl_update_x64.msi'
That was the only way I could successfully install the update
Then at Powershell command line (in administrator mode-- and not the linux command line), I ran
wsl --set-version Ubuntu 2
per instructions here
Today I had this problem too. In WSL I got a message that I could update WSL from the microsoft store. So I updated WSL and after that moment docker wasn't on my PATH anymore.
It was a lazy saturday morning, so I decided to restart my PC. And magically the problem was "fixed".
Maybe it would be enough to restart WSL distro, at this moment I don't have the time to research whether that would be a good solution.
I am following the beginner rosnode tutorial http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes
The environment is Windows 10 / WSL. When I enter command "rosrun turtlesim turtlesim_node" after running "roscore", I get the following error:
wn-003% rosrun turtlesim turtlesim_node
QXcbConnection: Could not connect to display
zsh: abort (core dumped) rosrun turtlesim turtlesim_node
Are there any solutions to this? Thanks.
WLS doesn't support graphical interfaces. You need to initialize some "x server for windows" application, like Xming and then type this line in WLS terminal:
export DISPLAY=:0
ROS has a great open source ecosystem and support for Linux Operating system. For a beginner, it is better to get hands-on experience directly on a Linux machine as it is easier and you'll get good support for errors you encounter.
ROS does work on windows but it requires Windows Subsystem for Linux (WSL), which is a compatibility layer which allows running a whole bunch of Linux binaries natively on Windows 10. With the advent of the Windows 10 Creators Update, the WSL was heavily updated and now is able to run ROS lunar and melodic.
You will also need to install BASH shell on your windows 10 machine.
Follow this article by Microsoft for installing WSL and BASH : install WSL on windows
Then follow this great article by janbernloehr : https://janbernloehr.de/2017/06/10/ros-windows
I've flashed several different versions of micropython onto my ESP8266/nodemcu board and I keep getting the following output in a terminal:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x01,hd_drv:0x00,wp_drv:0x04
mode:QIO, clock div:2
cmd len 2
ets_main.c 371
ets Jun 8 2016 00:22:57
These messages repeat continuously. I've tried both with and without -fm dio and -fm qio. When I hit the flash button, it indicates on the terminal it's ready for download at which time I run the esptool.py to flash the micropython.
Are You trying it on Windows, Mac or Linux?
I've recently had some problems with the NodeMcu and Micrpython as well and therefore set up a pretty easy to read and straightforward documentation python2nodemcu on GitHub (what I would call an end-to-end documentation).
Please have a look at it and then verify the following (short version of the link above):
Do You have Python3 installed?
Run python --version
Or python3 --version
Do You have the proper driver installed for serial USB-to-UART connection?
See here
Do You know the device file name, which represents the interface of Your device?
Give it a try with ls -la /dev/tty.*
Do You have the most recent MicroPython firmware?
You also need the correct one for the NodeMcu
I guess, EspTool and PySerial are installed properly?
Can You delete the flash without an error?
Try python3 esptool.py --port /dev/tty.{device-file} erase_flash
Does the most simple flashing command (without parameters) work?
Try python3 esptool.py --port /dev/tty.{device-file} write_flash 0x00000 {latest-micropython-firmware-for-node-mcu}.bin
Did You try to connect to the REPL prompt?
Try screen /dev/tty.{device-file} 115200
Maybe try different baud rates, depending on Your driver, cable, etc.
Did You try to connect to the board using Ampy?
E.g., You can list the files on Your device using python3 ampy/cli.py --port /dev/tty.{device-file} --baud 115200 ls
Again, maybe try other baud rates
Next to this, can You:
Flash the board with the default firmware?
Connect to it with some 3rd party software, such as EspLorer or CoolTherm?
As of my experience, You do not necessarily need to push the physical flash button on the device. Just run the erase_flash and then the flash command as stated above.
This question already has an answer here:
Enable Systemd in WSL 2
(1 answer)
Closed 2 months ago.
I'm a very first user of Ubuntu. I failed to install Ubuntu in wmware ,so I installed Ubuntu application in Microsoft app store and everything was quite all right.
But when I insert shutdown or halt command to power off my ubuntu I kept getting 'system has not been booted with system as init system (PID 1). Can't operate' error message.
I tried to using docker following with this link (https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/) but I failed after going to Number 2 process many times. I'm not sure my failure is because of installing docker toll box instead of normal one. (my computer is just windows 10. not a windows pro)
I think I have to try other thing. If you don't mind me asking, how can I slove this problem?
(and one more. If I just click 'X' button at the top of right side, is it different with shutting down Ubuntu using 'halt' or 'shutdown' command?
Thank you
I found this useful: https://linuxhandbook.com/system-has-not-been-booted-with-systemd/
In my case
# start docker using systemctl
sudo systemctl docker start
# returns:
#
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
The basic advice is:
# check if your system is using `systemd` or `sysvinit`
ps -p 1 -o comm=
If the command doesn't return systemd, and in my case, Ubuntu-20.04 on WSL, the command returned init, then use the command pattern
# start services using sysvinit
service docker start
This works for me.
Based on this: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/
systemd is now available in WSL Version 0.67.6 or higher.
To enable:
Open a command prompt:
# CHOOSE option A or B:
# A. check your version and ensure it is 0.67.6 or higher
wsl.exe --version
# B. run WSL update if the version is low
wsl.exe --update
Open a WSL prompt:
sudo nano /etc/wsl.conf
Add this to wsl.conf and save the file:
[boot]
systemd=true
Go back to the command prompt:
# warning: this will kill any shells/processes you have running!
wsl.exe --shutdown
First of all, Ubuntu installed via MS Store is using WSL (Windows Subsystem for Linux) Technology. It simply means there is no virtualization, Windows and Linux kernels are living side by side (the Linux kernel is not fully implemented yet).
So if you are trying to "shut down your Ubuntu", you would turn off the whole computer just like the Windows does. But in this case, WSL doesn't apparently have rights to do that.
In other words, you can look at your Ubuntu bash window just like any other terminal, like e.g. CMD or PowerShell.
When you start a program in the WSL (Ubuntu), you can see it also in Windows Task Manager - that's just a proof, that there is no virtualization.
Regarding docker:
If I'm not mistaken Windows 10 Home doesn't provide Hyper-V virtualization. It means you'll have to use a different one e.g. by using VirtualBox. In order to make it work, I can recommend you to follow this tutorial and especially for VirtualBox please check this answer here
Hope it helps :)
I have a toshiba laptop c850, dual core. Toshiba does not provide any driver for Wi-Fi for Ubuntu 12.10. I am currently having problem in using DSL modem, Ethernet and Wi-Fi. Can anyone tell me the solution to this problem?
maybe you will find some information there :
http://www.linlap.com/toshiba_satellite_c850-c855
Wireless
A really up to date kernel is required for wireless support, at least
3.5.0 is recommended. Realtek has the Linux drivers available for download but they must be re-complied after upgrades to kernel.
As you commented, you got the Atheros Communications Inc. AR8162 Fast Ethernet Controller.
This is some guesswork here because there are several versions of the driver and some people state only one is working for them, I stick with the most popular for now.
First download this file from another machine:
https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.bz2
If you have Ubuntu or another Linux distro on your second machine you can use wget to download the file:
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.bz2
Next, use your preferred method (preferably an USB Drive) to copy it to your target machine (Toshiba C850) and use the following commands in a terminal. Make sure you are in the right directory first and use cd to change to the directory where your downloaded file resides.
tar -xzvf compat-drivers-2013-03-28-5-u.tar.bz2
cd compat-drivers-2013-03-28-5-u
./scripts/driver-select alx
make
sudo make install
sudo modprobe alx
If this doesn't work try a reboot first then you can try one of the other versions, I can't tell which will work for you:
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2012-02-28-p.tar.bz2
https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/04/compat-drivers-2013-03-04-u.tar.bz2
Sources (for further reading): This question on AskUbuntu and this thread in the Ubuntu forums.