I use cups to add printer to my Linux machine it is easy to add via localhost:631 on the browser but i wanna add it using terminal alone there is a command to do that lpadmin -p printername -v device_uri -m everywhere when I run this command uli get a error
"lpadmin:Printer drivers are deprecated and will stop working in a future version of cups
lpadmin : unable to copy ppd files"
Is there any other way I could add printer with correct driver on Linux machine using terminal only?
Related
I use vscode with Arduino extension on Ubuntu 22.04.1 LTS which had worked well until now.
If I'm trying to upload I'm getting the error:
avrdude: ser_open(): can't open device "/dev/ttyACM0: Permission denied"
When trying to upload a sketch to an Arduino Micro.
Then I tried it with the Arduino IDE 1.8.19 which produces the same error.
I have added my user to the dialout group even though it had worked before without that (and I restarted after that).
If I change chmod of /dev/ttyACM0 that does not help at all.
If I do:
~ $ ls -al /dev/ttyACM0
crw-rw----+ 1 root dialout 166, 0 Sep 14 00:15 /dev/ttyACM0
~ $ id
uid=1000(magraina) gid=1000(magraina) groups=1000(magraina),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),134(lxd),135(sambashare)
I was able to run avrdude manually with sudo
So I have now setup a rule under:
/etc/udev/rules.d named 50-myusb.rules
With:
SUBSYSTEM=="usb", MODE="0666", GROUP="dialout"
Now I'm able to run avrdude in the terminal to upload my sketch manually without sudo, but I'm still unable to run it through vscode or the Arduino IDE.
What else can I do?
It's more like a workaround but it's a solution that works for me.
Now the Arduino IDE in Version 2.0 has been released.
I downloaded it and run it.
With that version I'm now able to to upload a sketch as usual.
But sadly I could not find a solution for vscode as the Arduino extension only supports the old version for now.
Even though vscode runs avrdude from the same path as the new version of the Arduino IDE does.
It seems to me like, as if vscode has different user rights and I don't know how to change that.
sudo chmod a+rw /dev/ttyUSB0 or /dev/ttyACM0 which port used see Tools
I am trying to install Qt on a Linux machine remotely from a Windows machine using PuTTY.
When I run the command to install Qt on Linux I get the following error:
~/QT# ./qt-unified-linux-x64-2.0.4-online.run
QXcbConnection: Could not connect to display
Aborted
Please suggest any workaround.
You can use the software repository of that Linux distribution.
For example, if it's Debian or Ubuntu:
sudo apt-get install qtbase5-dev
But if you really want to use the installer (usually, when specific Qt version is needed), then try one of the options:
run an X server on that machine
use the --script option of the online installer (you'll have to write a script like here: https://stackoverflow.com/a/34032216/4742108), it will probably need UI anyways
see if the offline installer has an option to run without UI
refer to here: https://community.nxp.com/message/532966
maybe use the cmd "export DISPLAY=:0" and it works
Try to connect with ssh to the host machine using -X to enable X11 display:
ssh <username>#<ip> -X
aqtinstall is a good option: https://github.com/miurahr/aqtinstall
It's a simple command line tool to download and install any Qt version. It's a fork of my old qli-installer script.
So I've just switched to d to Linux Mint rosa from Windows 10. I'm trying to figure out how download the firmware through eclipse. Whenever I click the plug-in and then the firmware I get;
"starting nxjflashg failed
org.lejos.nxt.ldt.util.LeJOSNXJException: NXJ_HOME is not set. Please specify it in the plug-in's preferences
See Eclipse error log for detailed stack trace."
I know when I was using windows 10 I had to change environmental variables and download the NXJ drivers also, I'm not sure how to do this w/ Linux
You have 3 steps to flash a NXT on Linux with eclipse (once Java is working):
install the libusb driver
install LeJOS
install the LeJOS eclipse pugin
I think you only installed the eclipse plugin, so you need to follow the instructions here : http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStartedLinux.htm
Summary :
sudo apt-get install libusb-dev ant (install libusb driver and ant, a kind of make for java)
download leJOS, unizp it and put it where you want (/opt for instance)
set the NXT_HOME in the window > Preferences > leJOS NXT > NXJ_HOME to the path you copied leJOS
run ant in $NXJ_HOME/build to build the usb driver
to access to your USB port without su rights
edit your udev rules (1)
add your user to the group lego (sudo groupadd lego && sudo gpasswd -a $USER lego)
log out and log in to update the rules
(1) udev rule : vim /etc/udev/rules.d/70-lego.rules
# Lego NXT brick in normal mode
SUBSYSTEM=="usb", DRIVER=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0002", GROUP="lego", MODE="0660"
# Lego NXT brick in firmware update mode (Atmel SAM-BA mode)
SUBSYSTEM=="usb", DRIVER=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", GROUP="lego", MODE="0660"
I have to setup ipmitool on my local vm for testing and learning purposes.
I followed simple steps of mentioned in the link, https://www.hugeserver.com/blog/tutorials/how-to-ipmitool-linux/
sudo yum install ipmitool
sudo modprobe ipmi_devintf
The first command will install ipmitool and the second command will install ipmi device drivers/interfaces.
After installing these two things I should be ready to use ipmitool. But I am getting errors whenever I try to run any ipmitool command.
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
I am stuck here.
I have also tried to re-install OpenIpmi and also rebooted the system.
Please help!
If this error comes in actual machine then the following post will give you the solution.
https://serverfault.com/questions/480371/ipmitool-cant-find-dev-ipmi0-or-dev-ipmidev-0
But In virtual machine, ipmitool commands will work straight away without these drivers. I faced same issue & worked for me without installing any drivers on my VirtualBox.
When doing a wubi install of linux from windows, the place/file where all linux info is saved is inside a "root.disk" file.
I am intending on formatting my laptop to run linux only and I can't seem to find a way to open this root.disk file from linux itself (to extract some of the files from my previous installation). Of course, it does and is able to open in windows using a certain software, but because I will only have linux on my system now, does anybody know how to open this file in linux itself? It's kind of strange that it isn't able to open with the default linux tools.
Specs:
I am using Linux Mint 12 (via wubi install). Intending on moving to a 'lighter' version of linux.
You need to mount this image before you can access it, try the following:
mkdir olddisk
sudo mount -o loop /path/to/root.disk olddisk
You should now be able to access the data inside this container.