date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,430,915,124,000
I have more than 2 serial devices enumerated by FTDI driver as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 etc. On reboot, these may get jumbled up in any other order. Also, I may replace/swap these devices physically among these or with some other similar device. Now, I want a persistent enumeration for these. I want th...
Taking cues from the comment above I managed to find a solution to the above. udevadm info /dev/ttyUSB0 | grep "ID_PATH=" The above lists the the sysfs path for the port that /dev/ttyUSB0 is connected to. Use this value to create rules for as many devices (ttyUSB1, ttyUSB2....) as you want in the rules file, say /etc...
udev rules for USB serial 'by path' not working
1,430,915,124,000
I'm connecting a linux machine using a nowadays popular Huawei Brovi E3372-325 LTE USB Stick to the internet. The special requirement is that incoming ssh/ping/NTP/... connections must reach my linux OS. The state is, that using usb_modeswitch -X and the option driver I can bring up the 3 ttyUSB interfaces, and connec...
If I'm not mistake, I don't use RNDIS right now. RNDIS is a Windows-specific network interface driver API. Um, that as nothing to do with what you're doing, right? What might be the reason, that ppp0 does not have a MAC address? How it's even possible? a MAC address is an Ethernet concept; and PPP is not ethernet ...
USB LTE modem without MAC address?
1,430,915,124,000
I previously followed the answer in this question: Attaching USB-Serial device with custom PID to ttyUSB0 on embedded Now, I need to revert that step so that the device id I echoed to new_id doesn't map to ttyUSB0 every time I connect it. The file, new_id, seems to have '0403 e0d0' permanently written to it now. I've ...
I looked into this, and it does seem like remove_id was never implemented for usb-serial. Should be able to take the work in drivers/usb/core/driver.c and implement remove_id in drivers/usb/serial/bus.c. Sorry for not having an easy answer.
How to remove device id from manually entered usb-serial driver
1,430,915,124,000
This is related to a previous thread I created about a month ago and which was answered. Today I am attempting to setup a serial console login prompt on a laptop running Ubunutu 20 with a Belkin F5U409 USB serial adapter. I have run into the same issue where larger text output will eventually fall apart into scrambled...
The Belkin F5U109 seems to be a device of fairly old design, so perhaps the F5U409 with the same usb vendor:device id is similar. In this case the Linux driver chosen because of the id is the mct_u232.c. We can read in the .h file for Flow control: no flow control specific requests have been realized apart from DTR/R...
Serial flow control issue with ttyUSB0
1,430,915,124,000
I have a bunch (20+) of serial ports connected to my linux machine. ttyUSB0 through ttyUSB27 as of now. I use picocom to connect/monitor these ports, but not all of them are connected. If I want to connect picocom to a new port I have to either go through all the port numbers until I find the ones that are not connec...
A one liner (edited): ps | grep picocom | awk '{print $1}' | tr -s '\n' ',' | xargs lsof -p | grep ttyUSB Searches through the running processes for picocom captures the PID and lists the open files, filtering them on the string ttyUSB. The last column of output should show all your /dev/ttyUSB devices.
picocom: list all connected ports
1,430,915,124,000
It is possible to connect my laptop to any network equipment like managed switch or firewall via mini-USB port on them, then use screen to connect to its TTY. Is it actually possible to connect to another computer, say laptop or server, by adhoc USB-to-USB connection? Like: Terminal Client Linux Box - USB PORT ===> Ta...
Yes, you can use USB serial cable to connect Terminal using lsusb and modprobe usbserial. USB to Serial Cable... The external conversion cable directly implements hardware support internally. So whether the original board has hardware support or not, the software operating system can solve it. USB to Serial Conversion...
Can I connect to any computer's physical terminal without monitor
1,430,915,124,000
I'm creating udev rules to map my USB devices (ttyUSB*) to the USB ports where they are connected. The usual way to do so is looking at the output of: udevadm info --name=/dev/ttyUSB0 --attribute-walk Here my output (I removed the ATTRS lines not meaningful): looking at device '/devices/platform/soc/3f980000.usb/usb1...
If you look at man udev, KERNELS searches the device path, while KERNEL matches the device itself, and SUBSYSTEM represents the part of the kernel generating the event. When your USB dongle is plugged in, several udev events are created, as parts of the kernel discover the device and react according. You want your rul...
KERNELS path for USB device connected to HUB
1,430,915,124,000
I have board with CP2105. It is usb-to-serial bridge with two uart interfaces on one usb port. I've read some guides, and documentation of UDEV, but I'm stuck on creating symlinks for them. I want them to have serial ID in name. The problem is that it does not work, even with simple rules. My rule, that should do what...
It turned out, that I had to change two things. First I had to make number from filename with my rules higher (I changed it from 52 to 70). Second, I noticed, that ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea70" didn't work, as there was no attributes avaliable for checking for subsysem tty. I changed it to proper env...
How to assign symlinks to serial devices from usb-to-serial device CP2105?
1,430,915,124,000
I use screen \dev\ttyUSB0 command to connect to virtual serial port. It prints out the incoming communication, but I dont know how to send message back to the connected device. Thanks for answers EDIT: Turns out I send out character as I type, but I cannot see them. So is there any way I could see what am I typing be...
Just type. Anything you type (that is not a screen escape key combination) will be sent to the device. The problem might be that the device is not currently echoing back the characters you type, so it may look like you're not sending anything. Using screen in the way you describe is pretty much a set of "straight pipe...
How to enter message in serial communication using screen
1,430,915,124,000
I've got a Buildroot-based embedded system that uses a 3G modem (Cinterion PH8-P) and PPP to connect to the internet. The 3G modem is a USB device that provides 4 ttyUSB ports. One of these is used for PPP, whereas another is used for GPS. Occasionally, the 3G modem will stop working and will need to be restarted. I d...
As it turns out, PPP is affecting it's own serial port, and since that's the one that's used to configure the GPS, that's what's causing the problem. By comparing the results of stty -F /dev/ttyUSB3 before and after running PPP, it became apparent that PPP was configuring the serial port in raw mode, which meant I cou...
ppp affecting serial ports so that they cannot be used if modem is reset
1,430,915,124,000
I am struggling accessing my beaglebone black via FTDI using picocom. It has been working without any trouble in the past few weeks. I entered following command and it would work properly. sudo picocom -b 115200 /dev/ttyUSB0 Anyhow, I have been working with Ethernet- over- USB lately. Which wasn't a problem either....
So apperently it's all been about the Virtual Box. Now that I am connected to an "actual" Ubuntu-PC I can access both at the same time.
Sudden picocom error: invalid baud rate
1,430,915,124,000
I have seen that it is possible to connect two computers by USB cable and make a virtual ethernet bridge or something like that. My question is, can we do something similar but configure the connection as a SERIAL interface? To be exact: Is it possible to connect two computers with a USB cable (I do not know what the ...
A USB bus must have a tree structure, with exactly one USB Host Adapter at the root of the tree. The Host Adapter will be responsible for overall control of the entire bus. Connecting two basic USB Host Adapters together with just a simple cable with USB-A connectors on both ends will never work and is explicitly agai...
Virtual COM port using only USB cable
1,542,987,537,000
When I "safely remove" an external hard-drive from my file-manager (Thunar), the whole hard-drive is powered off and disappears from /dev. Therefore, I guess that under the hood, this is done by calling udisksctl power-off -b /dev/sdX which has the same effect. I thought it should somehow be possible to bring the devi...
If Thunar is behaving like udisksctl power-off, then it is using usb_remove_store(). That means Thunar is being misfeature-compatible with Microsoft Windows. You can just use eject /dev/sdX from the command line instead to allow hardware to be safely removed. The only difference is that the LED light won't turn off. T...
How to power on an external hard-drive after powering it off?
1,542,987,537,000
When I plug in a USB drive it is automatically mounted on /run/media/user/fslabel. This is done, I guess by some udev/dbus/thunar/nautilus/gvfs or other system, and I find this convenient and do not want to revert to manual mounting by root. However, I have a problem with the default mount options: vfat drives are m...
External media/drives mounting is handled by udisks2 on most modern distros. I don't think there's any trivial way to change the default mount options as they are hard-coded (see FSMountOptions in udiskslinuxfilesystem.c) that is, they're not configurable (at least not yet1). Your options are quite limited: unmount th...
How do I change automatic mounts of removable vfat / fat32 drives/partitions to use "noexec"?
1,542,987,537,000
Is there any way to unlock LUKS partition using keyfile while not having root priviliges? (using sudo is not an option) I know that udisksctl can open LUKS partition, however it can do it only with a passphrase.
No. And even solutions that apparently do it without root privileges, actually do have root privileges. This is just a basic requirement for mounting or accessing raw disk data. If you could do those without root priveleges, you could read files you have no permission to read (by reading and searching the raw data), a...
Unlock LUKS partition using keyfile without root access?
1,542,987,537,000
Loop devices, i.e. for mounting raw disk images, can be managed without root privileges using udisks. For testing purposes, an image can be created and formatted like so: dd if=/dev/urandom of=img.img bs=1M count=16 mkfs.ext4 img.img And then setup using udisks udisksctl loop-setup -f img.img This creates a loop dev...
I had a detailed look into the udisks2 source code and found the solution there. The devices correctly mounted under user permissions were formatted with old filesystems, like fat. These accept uid= and gid= mount options to set the owner. Udisks automatically sets these options to user and group id of the user that i...
Mount image user-readable with udisks2
1,542,987,537,000
In the terminal I have to use sudo mount, otherwise it says operation not permitted. But in the file explorer (started normally, without sudo) I can mount by pressing the icon next to the external disk (or right click -> Mount) and it works. How do I use the same technique in bash to mount a usb drive without sudo?
The file managers uses UDisks2 to mount the external drives without admin rights. GNOME, KDE, XFCE and various other desktop environments uses UDisks2 to allow normal users to mount removable media devices. UDisks2 project provides a system daemon called udisksd, and a command-line tool called udisksctl. The udiskd da...
mount usb drive without sudo
1,542,987,537,000
Currently, I do this to mount my encrypted thumbdrive: # Works! pass thumbdrive-password | # get device password entry from password manager head -n 1 | # get the device password itself sudo cryptsetup luksOpen /dev/sdb thumbdrive # unlock device udisksctl mount -b /dev/mapper/thumbdrive # mount device I'd li...
For udisks version 2.6.4 and later Note: I haven't tested this. I will once I get udisks 2.6.4 (whenever https://github.com/NixOS/nixpkgs/pull/41723 is backported to NixOS stable). Update: I have udisks 2.8.0 now, so I can test my solution. The only thing I missed was removing the trailing newline from the output of p...
Provide password to udisks to unlock LUKS-encrypted device
1,542,987,537,000
I'm trying to make udisks-glue work on my Raspbian Raspberry Pi. This works fine if I manually start udisks-glue via ssh. However, I wish to start it automatically on startup. Hence, a script at /etc/init.d/udisks-glue launches the daemon for me (as per instructions here). This works fine, but disks are mounted with r...
I had the same problem a while ago. Solution: Fixing your configuration: create file /etc/polkit-1/localauthority/50-local.d/50-mount-as-pi.pkla with the following contents: [Media mounting by pi] Identity=unix-user:pi Action=org.freedesktop.udisks.filesystem-mount ResultAny=yes Fixing your init script: add a varia...
How can I make udisks-glue run at startup and mount drives as particular user?
1,542,987,537,000
I'm analyzing the systemd and I want to improve my system's booting speed.The number one service in the blame list of systemd-analyze by a clear gap is udisks2.service with almost 10 seconds ( those numbers might be misleading because of the dependencies but udisks doesn't have any ) . It's not a good solution to disa...
Do you have a block device/partition/LV that is not listed in /etc/fstab (and so looks like a candidate for udisksd management) but is encrypted or otherwise not easily identifiable? Or maybe a CD drive or a memory card reader with a slow or non-existent detection of a "no media in drive" error? In the case of a memor...
Speeding up udisks2.service in linux
1,542,987,537,000
Logged in as the root user, udisksctl mount mounts my device at /media/root/mydevice. Alternately, logged in as another user, udisksctl mount mounts my device at /media/anotheruser/mydevice. So far, so good. However, I would like to mix the two. Logged in as the root user, I would like udisksctl mount to mount my devi...
Yes, either su -c 'udisksctl mount -b /dev/sdd --no-user-interaction' - thb or su - thb udisksctl mount -b /dev/sdd --no-user-interaction exit will mount /dev/sdd on e.g. /media/thb/mydevice without causing an unwanted GUI authentication dialog to pop up.
How to cause udisksctl to act for another user?
1,542,987,537,000
udisksctl is my tool of choice when dealing with file system images (recent example, but I've been doing this all over the place). The dance typically looks like fallocate -l ${img_size} filesystem.img mkfs.${fs} filesystem.img # Set up loop device as regular user loopback=$(udisksctl loop-setup -b "${img_file}" | se...
I feel your pain... I also love the sudo-less power of udisksctl, I use UDisks2 in several snippets and projects, and I also hate how "machine-unfriendly" its output is. That said, one approach I'm leaning towards to is not to parse the output of udisksctl mount,loop-*,..., use it for actions only, and leave parsing t...
udisksctl: get loop device and mount point without resorting to parsing localized output?
1,542,987,537,000
In Debian Wheezy I had a special rule for my ntfs usb hdd. When it is inserted it is mounted in /media under a specific sub-folder. ACTION=="add", SUBSYSTEMS=="usb", ATTRS{serial}=="<serial_number>", SYMLINK+="mx%n" ACTION=="add", SUBSYSTEMS=="usb", ATTRS{serial}=="<serial_number>", RUN+="/bin/mount <options>", OPTION...
Unfortunately I wasn't able to find the reason why udev and udisks2 didn't work together. But I found a solution for my problem here. Below is a simple example how to implement automount of a ntfs usb hdd. First is a script mount.sh to mount a drive #!/bin/bash mkdir -p /media/usbhdd mount -t ntfs-3g -o locale=en_IE.U...
udev+udisks2: udisksctl gives 'Error looking up object for device'
1,542,987,537,000
When I mount blank btrfs partition in Dolphin, I get "Permission denied" on write. You can see that it's mounted on /run/media/%username% dir which is correct, but owner is root. [doctor@doctoror doctor]$ pwd /run/media/doctor [doctor@doctoror doctor]$ ls -l total 4 dr-xr-xr-x 1 root root 0 січ 1 1970 Home [doctor@d...
When you create a filesystem that supports file ownership, its root directory starts owned by root (with all the mkfs that I remember seeing). The ownership of the mount point and the user who did the mounting are irrelevant to the ownership of the root directory (or any other file) on that filesystem. It would be pro...
udisks2: permission denied
1,542,987,537,000
I'm running Linux Mint 17.1, based on Ubuntu Trusty. If I run udisks --mount /dev/sda7 then the partition is mounted in /media and not in /media/$USER as it should. What am I doing wrong?
As @don_crissti suggests, I was indeed using udisks 1. I should've done udisksctl mount -b /dev/sda7
Mount a partition in Terminal with udisks
1,542,987,537,000
I have a btrfs partition with several subvolumes, one of which is /. I have another subvolume with some other stuff that I also want to mount, but trying to mount it with udisksctl: udisksctl mount -b /dev/mapper/container -o subvol=other gives me this error: Error mounting /dev/dm-0: GDBus.Error:org.freedesktop.UDis...
First read the man page (man udisksctl)! It says you should use --options. If this is not working, then subvol is considered an unsafe option (IMHO, it should). If so, you can use the mount command or you can set the options directly in /etc/fstab for a given mount point.
udisksctl mount a different subvolume of an already mounted btrfs partition
1,542,987,537,000
udisks2 with udiskie are set up to automount USB storage devices. Connecting a pen drive labeled MYDRIVE, it is mounted to: /media/MYDRIVE When pulling the drive without prior unmounting, the above directory persists. Is it possible to get stale mount points be deleted right away? I've actually seen that happening in...
The maintainer of udiskie pointed out that stale mount points not being cleaned up is a bug in udisks2. In fact, after more tests, I can confirm that sometimes the mount point is deleted.
Make udisks2 clean up stale mount points?
1,542,987,537,000
I mounted 2 drives as a RAID1 btrfs array (btrfs v3.12, Ubuntu 14.04). Everything's working fine except nautilus and other GUI-based apps see two disks, both labeled "Raid1". One is mounted (the working btrfs disk), the other is unmounted. Does anyone know why this "ghost" volume exists or how to get rid of it? Edit...
I assume you're referring to a btrfs raid1 filesystem created on top of two block devices created with something like mkfs.btrfs -L Raid1 -d raid1 /dev/sd* /dev/sd* Reproduced this setup locally (based on Funtoo instructions from here): $ dd if=/dev/zero of=/tmp/btrfs-vol0.img bs=1G count=1 $ dd if=/dev/zero of=/tmp/b...
btrfs RAID1 array shows as two disks
1,353,529,426,000
I just did my first install of any Linux OS, and I accidentally selected "Desktop GUI" in the install, but I want to build everything myself. Is there any way by which I can remove the GUI environment without re-installing OS?
Debian uses tasksel for installing software for a specific system. The command gives you some information: > tasksel --list-tasks i desktop Graphical desktop environment u web-server Web server u print-server Print server u dns-server DNS server u file-server File server u mail-server Mail server u da...
Can I Remove GUI From Debian?
1,353,529,426,000
I am using CentOS 7. I installed okular, which is a PDF viewer, with the command: sudo yum install okular As you can see in the picture below, it installed 37 dependent packages to install okular. But I wasn't satisfied with the features of the application and I decided to remove it. The problem is that if I remove ...
Personally, I don't like yum plugins because they don't work a lot of the time, in my experience. You can use the yum history command to view your yum history. [root@testbox ~]# yum history Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager, verify, versionlock ID | Login user ...
How to remove all installed dependent packages while removing a package in CentOS 7?
1,353,529,426,000
I previously added some external sources to /etc/apt/sources.list.d but I now want to remove one of them. I also want to: remove all packages solely from that source revert all packages to versions in my original source(s) alternatively, make a list of all packages from this source so I can perform this procedure man...
Depending on the configuration of the repository you wish to remove, apt list --installed might provide enough information to identify packages you need to uninstall or downgrade. Another option, if the repository defines a unique “Origin”, is to use aptitude search '~i ~Oorigin' (replacing origin as appropriate). (Th...
How can I uninstall all packages from one Debian source?
1,353,529,426,000
I installed the development packages for X11 today and now want to remove them. I do not remember the exact name of the package that I installed. I installed by running apt-get install ... and now want to remove the development package using apt-get purge --auto-remove <name of package>. Any suggestions?
If you installed them today, they’ll all be listed in /var/log/apt/history.log. Look through that, identify the packages you don’t want, and remove them.
How to uninstall or remove recently-installed packages
1,353,529,426,000
I don't use snap and never install snap packages. On a new Ubuntu Server 18.04, snap list shows: No snaps are installed yet. Is it safe to remove it? I'm not sure what weird dependencies are going on in the background - so I don't want to accidentally break the system now or in the future. (I want to be sure, becaus...
There is a similar post on Ask Ubuntu: snapd is seeded in the default install so as to enable snaps to be installed without further work. However, no part of the base install is a snap (you can verify via snap list, it should return no snaps). Because of this, snapd can be safely removed with no ill side effect...
Safe to remove snap on Ubuntu Server?
1,353,529,426,000
I have installed the BSD games package. Many of the games are awful or broken, so I wish to uninstall some of them without uninstalling others. Is there an easy way to do that? Currently, I'm sudo rming them from usr/share/applications/bsdgames and usr/games/.
To uninstall part of a package, your approach is correct: if you know you don’t (and won’t) need a file shipped in a package, you can delete it (after all, it’s your system). However if you leave it at that, the next time the package is upgraded, the deleted files will be restored (unless they are configuration files ...
How can I uninstall part of a package?
1,353,529,426,000
I'm running sid, and in the course of trying to cross-grade my system from i386 to amd64 I came across some ancient packages that I couldn't remove. Some background: I've had this system since potato, or maybe earlier. There are about a hundred packages like this, so I'd like a generic or scriptable answer. Here's ...
I solved it by making my own install-info command and putting it before /usr/bin in $PATH. The script was #!/bin/sh /usr/bin/install-info "$@" || true
How can I remove a bunch of ancient packages on debian?
1,353,529,426,000
I am trying to remove devtoolset-7 from my CentOS system. For this I am running following commands:- sudo yum remove devtoolset-7 sudo yum remove devtoolset-7-libatomic-devel sudo yum remove devtoolset-7-libatomic-devel After running these commands, I list out devtools by command:- sudo yum list | grep devtoolset-7* ...
You've fallen into the "default" trap; yum list will (from man yum, under "List Options"): List all available and installed packages. My emphasis on available. If you only want to see the packages that you have currently installed, use: yum list installed Additionally, be careful with constructs like: sudo yum list...
Unable to remove devtoolset-7 from my CentOS System
1,353,529,426,000
I've done a bit of searching, and have come to no perfect answer, so I'm wondering, is there a good way to uninstall (and purge dependencies of) unused applications/programs in my Ubuntu Server install? When I first installed 16.04, there were a ton of programs that were pre-installed, and I know they're not all usele...
Use an interactive tool that lets you easily get information about a package (its description, its dependencies, what depends on it, …). You can use aptitude in a text terminal. There are also GUI programs for that. Beware that it's difficult to know whether a package is necessary. Sometimes a package may be used in a...
Removing unused applications/programs
1,353,529,426,000
I'd atom installed on the system and tried to remove it with: pacman -Rs atom I still have a .atom folder in /home/user and another Atom folder in /home/user/.config, not sure whether there's anymore left in any other place! How to remove programs together with all the folders and files it created automatically over ...
Pacman saves important configuration files when removing certain applications and names them with the extension: .pacsave. To prevent the creation of these backup files use the -n option: # pacman -Rn package_name Note: Pacman will not remove configurations that the application itself creates (for example "dotfiles" ...
How to remove programs completely on Arch Linux, including files that it created in home directories?
1,353,529,426,000
I downloaded this Vim release and extract the tarball on Ubuntu 16.04. Then I switched to the vim directory and run sudo checkinstall, the procedure ends up with: Makefile:2412: recipe for target 'installpack' failed make[1]: *** [installpack] Error 1 make[1]: Leaving directory '/home/mudde/Downloads/vim-8.0.0326/sr...
checkinstall is the Debian way to make the Debian package manager aware of packages that you can build through configure and make && make install. Apparently something went wrong during installation via checkinstall and the your build is not properly registered as installed package. You may uninstall the software in s...
Remove vim manually after checkinstall [duplicate]
1,353,529,426,000
Well, I'm pretty scared now. I was trying to delete a folder by sudo rm /var/lib/texmf -r but instead, wrote sudo rm /var/lib -r I read some documentation about it, and found this thread. I tried to follow all the steps from the last comment (2nd page), but I didn't know how to do some of the things listed there. So...
I was able to copy the directory from a Live DVD, and now I can work on my computer. The reason why I couldn't do this before was because of my CD ROM. Apparently, it was damaged, and that's what all the "Kernel panic" was all about. I chose to do this instead of reinstalling the whole operative system because I didn'...
Removed /var/lib. Can't open Desktop
1,353,529,426,000
So, it would appear that following the official MongoDB installation instructions when installing on Debian - you're heading for a world of pain. Firstly, it didn't install correctly so now - i'm trying to remove all installed MongoDB packages so that I can start from scratch. Frustratingly, because it didn't install ...
The mongodb-org-server package appears to be broken. The prerm script mongodb-org-server.prerm is trying to run the script /etc/init.d/mongod as part of invoke-rc.d. As the name suggests, the prerm script is run by dpkg prior to removal of the mongodb-org-server package. The poster said the server was not running, so...
MongoDB will not uninstall
1,353,529,426,000
Background: I bought an NVIDIA graphics card and tried to install its driver. Somewhere along the way I messed up and now I'm running my computer on Cinnamon backup mode (I have Ubuntu but I removed Unity and replaced it with Cinnamon). I want to start back from scratch (prior to this, I was using a core i3 and no gra...
It's not particularly useful here (where you can just fix your escaping as commented) but in the case where you want to search the whole dpkg -l line, you can run it through something like awk and then into apt-get purge with minimal conditioning: sudo apt-get purge $(dpkg -l | awk '$2~/nvidia/ {print $2}') That shou...
Remove All NVIDIA Files
1,353,529,426,000
I have installed OpenLDAP with yum, but I have accidentally deleted some of the config files. I am not able to recover them. I want to uninstall it. I tried the following command but it ends with an error: --> Processing Dependency: PackageKit-glib = 0.5.8-20.el6 for package: PackageKit-gtk-module-0.5.8-20.el6.x86_64 ...
Can you make a backup of the configuration and : yum remove openldap rpm -e openldap.package_name yum install openldap And copy your configuration files back
How to uninstall OpenLDAP in RedHat?
1,353,529,426,000
I previously was using VirtualBox on Fedora 30, but recently moved to using Boxes (review) and am quite happy with the switch. I've removed VirtualBox, but upon booting up my system, I still get a tainted kernel message: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel I'v...
Caveat: I don't have a Fedora system at-hand, so this is untested! I would suggest removing the file /etc/modules-load.d/virtualbox.conf; it may be owned by a package, so check: dnf provides /etc/modules-load.d/virtualbox.conf and if needed, remove that package with: dnf remove (that package name). As per this Fedora ...
How to remove VirtualBox vboxdrv kernel module?
1,353,529,426,000
I want to remove the vi text editor from Linux but it does not show up as a package in aptitude. Is it possible to remove this? I have already removed vim by running sudo apt-get remove vim I am using Linux Mint.
You can test where /usr/bin/vi to lead update-alternatives --query vi Usually there is link to /usr/bin/vim.tiny To find package name you can try dpkg -S /usr/bin/vim.tiny In my system I have received vim-tiny: /usr/bin/vim.tiny So there is additional package vim-tiny.
Is it possible to remove vi?
1,353,529,426,000
I installed oracle 11g xe to test a software and have not been using it for a while. How to cleanly uninstall?
Brute force: Remove Oracle software: Find the Oracle home directory by looking around /u01/app/Oracle or browsing /etc/oratab and then rm -rf starting there Besides removing the software, if you created any databases, you will need to remove the data files that hold the database data. If you followed recommended ...
how to uninstall oracle 11g xe from centos 7?
1,353,529,426,000
I installed and later uninstalled webmin with Apper years ago. Since I switched to Wayland on Debian11/KDE starting the computer from standby, sessions are breaking all the time (currently once every second day on average). After pressing ctrl+alt+F2, logging the user out with pkill -KILL -u {username}, and pressing c...
In Debian Policy-compliant packages, yes, systemd services are supposed to be removed along with the package. However, this isn’t a systemd service, it’s an init script. Since these live in /etc, they are only removed if the package is purged, not just removed: sudo apt purge webmin In addition to that, webmin might ...
Are init scripts not removed after uninstalling packages?
1,353,529,426,000
I installed avfs to check how it works. It works, but after a short test drive I decided to uninstall the package, basically because I can change files within a zip but it's not possible to write them back. Now my question is, at this point is it safe to completely uninstall avfs? $ sudo apt-get purge --auto-remove av...
My doubt was justified because of the lack of docs about avfs. Anyway, it was enough to umount the virtual fs $ umountavfs and uninstall the package the usual way.
Safely uninstall avfs
1,353,529,426,000
Recently I asked to my hosting provider to reload the OS to Ubuntu 12.04 64 bit minimal assuming minimal would have the minimum required packages installed, but I realized that mysql was installed so, as I don't need it, I want to uninstall all packages related to it. What I did was: $ sudo apt-get --purge remove mys...
If you want to use apt-get remove for a file contained in a specific package you can do: apt-get remove $(dpkg -S /usr/bin/mysql | cut -d ':' -f 1) (replace /usr/bin/mysql, with whatever file you were looking for to remove) Using this, apt-get will still ask if you really want to remove the package (that dpkg found)...
Shell: How to uninstall all related packages to a specific one? / Ubuntu
1,353,529,426,000
When I want to remove MariaDB from the system, I run # apt remove --purge mariadb*, but then I get a prompt like this one: Is there a way for me to skip this prompt specifying a value for yes or no? I tried # yes | apt remove --purge mariadb*, but it just managed to freeze the installer. Any idea? Thanks!
The best that I can think is this: DEBIAN_FRONTEND=noninteractive apt remove --purge -yq mariadb\* rm -rf /var/lib/mysql WARNING: This could be dangerous.
Remove MariaDB in non-interactive mode
1,353,529,426,000
I'm trying to do a pkgadd on Solaris with non-interactive. Somehow pkgadd -d /home/mypackage -n doesn't work. While reading the man page, I found out that i can disable interaction by using admin file. So i followed the guideline here. When i tried to run pkgadd -d /home/mypackage -a /home/admin it still prompt for u...
Found a hint here. I tried to apply the command with -n and it works!! The command should finally be pkgrm -n -a /export/home/admin mypackage
Add parameter to admin file for pkgrm
1,353,529,426,000
I wanted a software to be installed and its default directory to install was /root. But the software could not get installed. Now I want to do it again from scratch. But there are some files in /root directory. I am not sure whether they are of the software that I installed or system files. In short I wanted to ask wh...
The timestamp of the files should give you a hint if things were created during your installation. The /root directory is only the home directory of the root user. Nothing important lives there unless you explicitly place it there. Therefore removing everything should be fine. (Maybe you want to keep .bashrc and .prof...
Remove all the contents from /root ( /~ )directory
1,353,529,426,000
I'm currently trying to uninstall Wine from my Fedora system using dnf, and while I seem to have been mostly successful, I'm still noticing a few packages that I can't seem to remove. Running dnf list | grep wine shows about a dozen helper utilities for Wine and their versions: wine.i686 7.12-2.fc35 updates wine.x86_6...
dnf list lists available packages, it isn’t limited to installed packages. To list installed packages matching wine, run dnf list --installed '*wine*' If any are shown by the latter command, you should be able to uninstall them. If no packages match, you’ll see Error: No matching Packages to list instead.
'dnf list' shows Wine packages that can't be removed
1,353,529,426,000
I've gone from a single server to multi server setup in the past few weeks. I am now ready to uninstall Let's Encrypt / Certbot from the original server. (I've setup SSL termination with HA Proxy.) I've tried apt remove --purge letsencrypt. But this is showing packages I am still requiring: Reading package lists... ...
apt keeps track, for each package, whether it was installed because it was explicitly requested or because it was automatically pulled in as a dependency. Packages which are automatically installed become candidates for auto-removal when all the packages which need them are themselves removed. Determining why packages...
Uninstalling Showing Unexpected Packages
1,353,529,426,000
Webmin and Virtualmin were recently installed using rpm packages on a remote CentOS 7 server. How do I uninstall them? I have googled this, but all the results are either so old as to be obsolete or do not pertain to rpm files, or both.
To remove rpm packages you can use rpm's -e flag. Firstly find the name of the rpm you have installed; rpm -qa | egrep -i "webmin|virtualmin" Then remove the package from the name that you see from above; rpm -e $packagename
removing virtualmin and webmin from remote CentOS 7 server
1,353,529,426,000
I am using Bodhi Linux how to uninstall the Chromium Browser?
As per this posting in Bodhi Linux community, commands to remove Bodhi's version of Chromium are: sudo apt purge bodhi-chromium && sudo apt autoremove
How to uninstall Chromium browser
1,353,529,426,000
Passwords and Keys alias seahorse won't run if clicked on. When launched from terminal, I get this error: seahorse: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory When trying to find such package and possibly install it I get: $ apt-cache policy 'l...
If you still have your full build tree, perhaps in /home/vlastimil/Downloads/seahorse/seahorse-3.31.91/build, then either cd /home/vlastimil/Downloads/seahorse/seahorse-3.31.91/build sudo ninja uninstall or cd /home/vlastimil/Downloads/seahorse/seahorse-3.31.91/build sudo make uninstall should uninstall the /usr/loc...
seahorse won't run, how to remove old version properly?
1,353,529,426,000
I installed Visual Studio Code on Ubuntu using: sudo apt install ./code_1.37.1-1565886362_amd64.deb I then found these commands to try to find out more information about the package: dpkg -l dirmngr systemctl --user status dirmngr apt-cache search code I still see it on my ubuntu application gui but I can't find it ...
I am also very confused by seeing dirmngr as the pattern you searched for. 1.However, in case you ever have a .deb file that you installed but don't know what actual package it corresponds to you can run dpkg-deb -W. Just to illustrate, using epson-printer-utility_1.0.2.deb as an example: $ ls *.deb epson-printer-...
how to uninstall vscode with apt
1,353,529,426,000
I've been trying to compile x11/gnome2 under FreeBSD 10.0-REL, but have been running into all sorts of issues. Eventually I found things indicating that gnome2 is no longer really supported, and that I should use something else (MATE, Xfce, KDE, whatever) instead. But gnome2 installs a trillion other packages, none o...
FreeBSD 10 comes with pkg utility that allows you to do exactly that: pkg autoremove See pkg help for the full list of pkg commands. You probably will need to clean the port after failed build as well. You can do it this way: cd /usr/ports/x11/gnome2 make clean About your second question: yes, there is a way. You sh...
FreeBSD - delete a partially installed gnome2?
1,697,325,872,000
(disclaimer: I am… a certified noob) I think I made a real mess while installing EndeavourOS (gonna call it EOS for short) and then trying to kind-of reinstall it… so I might need an advice of someone experienced. I’ll begin from the start (oh and yeah, I did post this on EOS forums, but... nobody seems to have solved...
update: (short summary) my problem was fixed by an advice of someone from EOS forums... then I had another problem, but thankfully that was fixed as well. (more details) I asked someone from EOS forums whether it's safe to delete uEFI boot loader partitions (along with the system partitions) using GParted. They said t...
I made a mess while reinstalling a distro, how can I FULLY and properly remove a distro from my computer?
1,697,325,872,000
I recently had some issues with running pycharm-community where it completely failed to load, so I decided to completely remove the software and try again with a fresh install. Unlike most software I currently use, pycharm-community was installed by downloading a tarball of the software and running an install.sh scrip...
I still don't really understand what the files are, but sudo snap install pycharm-community seems to be working. I had some issues with opening a project which was linked to my github: Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found java.lang.Run...
cgroup files for uninstalled software
1,697,325,872,000
Manjaro with Gnome comes with some preloaded applications. One of them is a suite of Microsoft Word Online applications (Word, Outlook, etc). And I would like to uninstall them, since I'll be using either Libre Office or Google Docs.
Those Microsoft applications can be found as the package "ms-office-online". One can simply open the default package manager, search for this name, and untick the box to remove it.
How can I uninstall Microsoft Word Online on Manjaro (Gnome ver.)?
1,697,325,872,000
To find packages which have no installation candidate in my current repositories I ran: apt-show-versions | grep "No available version in archive" (as recommended here) I think it would be best if one was notified by the package manager that there are packages that were installed from a repository but are not in any o...
I suggest marking all such packages as automatically installed: apt-show-versions | awk '/No available version in archive/ { print $1 }' | xargs sudo apt-mark auto Then apt autoremove will weed out those which can be removed; you’ll need to check the list and un-mark any packages you want to keep (apt-mark manual). P...
How to find out which packages that have no install candidate can be removed? (How to properly clean out such packages?)
1,697,325,872,000
I am using Linux Mint XFCE 20. Recently I installed Java by running sudo apt-get install openjdk and it automatically installed versions 8 and 11 of both JRE and JDK, including JRE headless. It turns out that I needed only openjdk 16 to run what I wanted to, and having other versions of java are kinda pointless. My ma...
The unwanted versions can be removed by name: sudo apt remove openjdk-8-jdk sudo apt remove openjdk-11-jdk They are installed with different packages. You can see all the openjdk packages available with this command: sudo apt update apt-cache search openjdk You can see all openjdk packages in your system with: dpkg ...
How to uninstall versions of Java openJDK
1,697,325,872,000
uname -a Linux MiWiFi-R3-srv 4.19.0-0.bpo.9-amd64 #1 SMP Debian 4.19.118-2~bpo9+1 (2020-05-20) x86_64 GNU/Linux sudo dpkg -l vim Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name...
There are either one of two things: The package that is installed isn't vim and is actually vim-tiny, vim-athena, vim-gtk, vim-gtk3, or something else. To find out if this is the case, use the following command: dpkg-query -l | grep vim It could also be that the vim on your system has been compiled from source and wo...
Why can't remove vim?
1,697,325,872,000
While setting up Debian, allowed sid repositories to install some stuff, but forget disable it after. So latter executed apt update & upgrade. That added more than 500 mb of insecure repos. How remove just these adds without touch the previous? If from terminal, better.
This is adapted from another answer I wrote. This will list packages from unstable: apt list --installed | grep /unstable You can then either downgrade them manually, or force their downgrade by adding a pin priority. To do the latter, add this to /etc/apt/preferences (creating it if necessary): Package: * Pin: relea...
how remove sid (unstable) repositories
1,697,325,872,000
I installed Mongoose OS using the following command on Debian 9.5.0: curl -fsSL https://mongoose-os.com/downloads/mos/install.sh | /bin/bash How do I safely uninstall this software?
To determine how to uninstall a piece of software installed in this fashion, you need to read through the script used to perform the installation and determine what it did, then undo that. Using curl | sh-style patterns means that the installation script isn’t preserved, so we need to download the current version and ...
How to uninstall Mongoose OS from Debian?
1,697,325,872,000
Suppose I have the history looks like this: Start-Date: 2016-09-20 15:49:21 Commandline: apt-get install kchmviewer Install: libkde3support4:amd64 (4.14.2-5+deb8u1, automatic), libresid-builder0c2a:amd64 (2.1.1-14, automatic), ntrack-module-libnl-0:amd64 (016-1.3, automatic), libmpeg2-4:amd64 (0.5.1-7, automatic), li...
In theory, you should be able to "undo" this installation by removing kchmviewer and all automatically installed packages: apt-get remove kchmviewer && apt-get autoremove but pay attention to the packages removed by the second command. Auto-removal may not produce the results you're after though: by default, if an au...
how to easisly uninstall the packages listed in the history?
1,697,325,872,000
I downloaded the Linux beta .deb package of Unity3D from the official place with the official links. (I'm too lazy to recover the link and include it; it doesn't really matter anyways.) I ran sudo dpkg -i unity3d.deb, and the package installed. I don't want Unity, and now neither which nor sudo locate unity3d return a...
It seems that the package either isn't installed, or it's name is different than you expect. You can use --info option on .deb file to check proper name: dpkg --info unity3d.deb If you're concerned about contents and their locations, OSS or not, typically you can check them with --contents option: dpkg --contents uni...
Where did Unity3D just install?
1,697,325,872,000
A few days ago I compiled GTK+ 3.12 on my Ubuntu 14.04 and Linux Mint 17 (with Cinnamon) distros. It messed up the appearance. How can I remove it totally and safely? I didn't change the default installation location when compiling. I also have versions 3.10 and 2.24 (installed by default.)
Source packages which use autotools -- ./configure; make; make install -- usually have a make uninstall target as well. However, that target doesn't exist until you run ./configure (because there's actually no makefile), so if you get the error: make: *** No rule to make target 'uninstall'. Stop. That is likely the ...
How to uninstall compiled GTK+
1,697,325,872,000
Note: Originally posted question on Ask Ubuntu and they kindly directed to this StackExchange as more appropriate for a non-official Ubuntu derivative. Background information. Currently Running POP_OS 20.04 Installed mousepad text editor when OS version was at 18.10 and used it as default text editor throughout upgra...
sudo apt autoremove will not break anything or remove dependencies that are required by other packages. Running it with the extra argument for mousepad, sudo apt autoremove mousepad will only add mousepad & it's unique dependencies to the list of orphans to be removed.
Safe to remove Mousepad dependencies in POP_OS?
1,495,645,416,000
On Unix systems path names have usually virtually no length limitation (well, 4096 characters on Linux)... except for socket files paths which are limited to around 100 characters (107 characters on Linux). First question: why such a low limitation? I've checked that it seems possible to work around this limitation ...
Compatibility with other platforms, or compatibility with older stuff to avoid overruns while using snprintf() and strncpy(). Michael Kerrisk explain in his book at the page 1165 - Chapter 57, Sockets: Unix domain : SUSv3 doesn’t specify the size of the sun_path field. Early BSD implementations used 108 and 104 byte...
Why is socket path length limited to a hundred chars?
1,495,645,416,000
So I've read lots of information on unix-stream ancillary data, but one thing missing from all the documentation is what is supposed to happen when there is a partial read? Suppose I'm receiving the following messages into a 24 byte buffer msg1 [20 byes] (no ancillary data) msg2 [7 bytes] (2 file descriptors) msg3...
Ancillary data is received as if it were queued along with the first normal data octet in the segment (if any). -- POSIX.1-2017 For the rest of your question, things get a bit hairy. ...For the purposes of this section, a datagram is considered to be a data segment that terminates a record, and that includes a sour...
What happens with unix stream ancillary data on partial reads?
1,495,645,416,000
After some period of time, I'm experiencing problems with starting applications, for example, Viber. $ /opt/viber/Viber QSqlDatabasePrivate::removeDatabase: connection 'ConfigureDBConnection' is still in use, all queries will cease to work. Maximum number of clients reached (Viber:1279): Gtk-WARNING **: cannot open di...
I've found how to fix it situationally. Following command made a hint for me $ lsof -U +c 15 | cut -f1 -d' ' | sort | uniq -c | sort -rn | head -3 382 zenity 256 dbus-daemon 212 chrome I've took the top process name and have read little about it. From Wikipedia Zenity is free software and a cross-platfo...
Can't start applications due to "Maximum number of clients reached" error
1,495,645,416,000
There's a great answer on StackOverflow about providing a better lock for daemons (synthesized from Eduardo Fleury) that doesn't depend on the common PID file lock mechanism for daemons. There are lots of good comments there about why PID lock files can sometimes cause problems, so I won't rehash them here. In short, ...
Yes, linux automatically "cleans up" abstract sockets to the extent that cleaning up even makes sense. Here's a minimal working example with which you can verify this: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <sys/un.h> int main(int argc, char **...
Does Linux automatically clean up abstract domain sockets?
1,495,645,416,000
On my Android device there is the file called /proc/net/unix who's content does not conform to that of any standard linux distribution (which show the unix domain sockets.) First few lines: Num RefCount Protocol Flags Type St Inode Path 00000000: 00000002 00000000 00000000 0002 01 5287581 /data/misc/wifi/soc...
The code that generates this file is in the unix_seq_show() function in net/unix/af_unix.c in the kernel source. Looking at include/net/af_unix.h is also helpful, to see the data structures in use. The socket path is always the last column in the output, and the Android kernel source matches the stock kernel in this ...
What is the meaning of the contents of /proc/net/unix?
1,495,645,416,000
Short question: How do I connect to a local unix socket (~/test.sock) via ssh? This sockets forwards to an actual ssh server. The obvious does not work and I can't find any documentation: public> ssh /home/username/test.sock "ssh: Could not resolve hostname: /home/username/test.sock: Name of service not known" Long Q...
You should be able to do utilizing socat and ProxyCommand option for ssh. ProxyCommand configures ssh client to use proxy process for communicating with your server. socat establishes two-way communication between STDIN/STDOUT (socat and ssh client) and your UNIX socket. ssh -o "ProxyCommand socat - UNIX-CLIENT:/home/...
SSH connect to a UNIX socket instead of hostname
1,495,645,416,000
I am using network namespaces such that I can capture network traffic of a single process. The namespace is connected through the "host" via a veth pair and has network connectivity through NAT. So far this works for IP traffic and named Unix domain sockets. A problem arises when a program needs to communicate with th...
Connecting to a DBus daemon listening on an abstract Unix socket in a different network namespace is not possible. Such addresses can be identified in ss -x via an address that contains a @: u_str ESTAB 0 0 @/tmp/dbus-t00hzZWBDm 11204746 * 11210618 As a workaround, you can crea...
Connect with D-Bus in a network namespace
1,495,645,416,000
Linux documents the default buffer size for tcp, but not for AF_UNIX ("local") sockets. The value can be read (or written) at runtime. cat /proc/sys/net/core/[rw]mem_default Is this value always set the same across different Linux kernels, or is there a range of possible values it could be?
The default is not configurable, but it is different between 32-bit and 64-bit Linux. The value appears to written so as to allow 256 packets of 256 bytes each, accounting for the different per-packet overhead (structs with 32-bit v.s. 64-bit pointers or integers). On 64-bit Linux 4.14.18: 212992 bytes On 32-bit Linu...
What values may Linux use for the default unix socket buffer size?
1,495,645,416,000
I have a local unix socket tunneled to another unix socket on a remote instance over SSH: ssh -N -L $HOME/my.sock:/var/run/another.sock however, when I terminate ssh gracefully (i.e. ctrl+C or SIGTERM), the $HOME/my.sock remains. It looks like this is not cleaned up properly. Is there an option/flag for this? This is...
Short answer, you can control this with a command line flag: -o 'StreamLocalBindUnlink=yes' Long answer: See ssh_config(5): StreamLocalBindUnlink Specifies whether to remove an existing Unix-domain socket file for local or remote port forwarding before creating a new one. If the socket file already...
OpenSSH not cleaning up the domain socket upon termination
1,495,645,416,000
Is it OK for two or more processes concurrently read/write to the same unix socket? I've done some testing. Here's my sock_test.sh, which spawns 50 clients each of which concurrently write 5K messages: #! /bin/bash -- SOC='/tmp/tst.socket' test_fn() { soc=$1 txt=$2 for x in {1..5000}; do echo "${txt}" | so...
That is a very short test line. Try something larger than the buffer size used by either netcat or socat, and sending that string in multiple times from the multiple test instances; here's a sender program that does that: #!/usr/bin/env expect package require Tcl 8.5 set socket [lindex $argv 0] set character [str...
Concurrently reading/writing to the same unix socket?
1,495,645,416,000
Is there a way to serve a webpage from a locally running tcp server listening on a unix domain socket instead of localhost:<port>? something like: file:///tmp/webpage.sock my only real motivation is to avoid port conflicts in the 2000-5000 range.
Yes It is easy to serve it. No But harder to get the client to use it. An alternative However because you told me why you are doing it, I have another solution. You want several web-servers to serve to only the local machine, but not have conflicts of port. It may also be nice if they all used the same port number. Lo...
Display webpage with unix domain socket
1,495,645,416,000
When you create a UNIX socket using socat and send data to it, but do not have another socat instance connecting to that socket, what will happen then? What happens if you write massive amounts of data to a UNIX socket and never read it? Is there a buffer that overflows? Is it ring-buffered?
Unix sockets are reliable. If the reader doesn't read, the writer blocks. If the socket is a datagram socket, each write is paired with a read. If the socket is a stream socket, the kernel may buffer some bytes between the writer and the reader, but when the buffer is full, the writer will block. Data is never discard...
Do UNIX Domain Sockets Overflow?
1,495,645,416,000
I work on the application that uses Unix domain socket for IPC. The common way as I know is to place the socket file inside /var/run. I work with Ubuntu 18.04 and I see that var/run is a symlink for /run. Unfortunately the folder is accessible for root only: ls -Al / drwxr-xr-x 27 root root 800 Apr 12 17:3...
There's nothing wrong with creating the socket in a dotfile or dotdir in the home directory of the user, if the user is not some kind of special, system user. The only problem would be with the home directory shared between multiple machines over nfs, but that could be easily worked around by including the hostname in...
Unix domain sockets for non-root user
1,495,645,416,000
We have a webserver that performs scientific calculations submitted by users. The calculations can be long-running, so we use The Torque resource manager (aka pbs_server) to distribute/schedule them on a handful of compute nodes. Torque makes use of a unix domain socket in the /tmp directory for communication but the...
In 2013, trqauthd stopped using IP sockets and switched to a Unix domain socket in the server's home directory. Later that same year, trqauthd switched from the home directory to /tmp. As you can see, the only option that Adaptive Computing has given to you for altering /tmp/trqauthd-unix is to re-compile the programs...
How can a service with PrivateTmp=true access a unix socket in the /tmp directory (e.g. to submit Torque jobs from PHP running in Apache)
1,495,645,416,000
I am using a third party .NET Core application (a binary distribution used by a VS Code extension) that unfortunately has diagnostic logging enabled with no apparent way to disable it (I did already report this to the authors). The ideal solution (beside being able to disable it), would be if I could specify to system...
In short, have your library loaded by LD_PRELOAD override syslog(3) rather than connect(3). The /dev/log Unix socket is used by the syslog(3) glibc function, which connects to it and writes to it. Overriding connect(3) probably doesn't work because the syslog(3) implementation inside glibc will execute the connect(2) ...
How to prevent a process from writing to the systemd journal?
1,495,645,416,000
netstat -a reports Recv-Q (amount of unread data pending for a reading application) for AF_INET sockets, but not AF_UNIX sockets (at least not for SOCK_DGRAM). Does anybody know a way to obtain this information for AF_UNIX sockets from outside of the process itself? Barring reporting the amount, is there a way to tell...
I figured out a way. On Linux the ss program is kind of like netstat on steroids - it provides much more information, including the amount of data pending in receive buffers for AF_UNIX sockets. I like ss -ax for my purposes. Man page: http://man7.org/linux/man-pages/man8/ss.8.html See also my answer here: How to s...
How to report receive queue size for AF_UNIX sockets
1,495,645,416,000
I am trying to have a local Unix domain socket, say, ~/docker.sock. I want it to proxy everything to a remote Unix domain socket running elsewhere over SSH. (You can find a diagram of what I’m trying to do below). OpenSSH supports this (an example here). For instance, this command will proxy MySQL client connections o...
The man page for ssh offers two complementary options: -R for remote forwarding to local, and -L for local forwarding to remote. In your case just use -L instead of -R.
Proxying traffic on local unix to a remote unix socket over SSH
1,495,645,416,000
I'm trying to access a process' stdio streams from outside its parent process. I've found the /proc/[pid]/fd directory, but when I try $ cat /proc/[pid]/fd/1 I get a No such file or device error. I know for certain that it exists, as Dolphin (file explorer) shows it. I also happened to notice the file explorer lists ...
tl;dr; As of 2020, you cannot do that (or anything similar) if /proc/<pid>/fd/<fd> is a socket. The stdin, stdout, stderr of a process may be any kind of file, not necessarily pipes, regular files, etc. They can also be sockets. On Linux, the /proc/<pid>/fd/<fd> are a special kind of symbolic links which allow you to ...
/proc/[pid]/fd/[0, 1, 2]: No such file or device - even though file exists
1,495,645,416,000
I found a Unix socket being used in the output of the lsof command: COMMAND PID TID TASKCMD USER FD TYPE DEVICE SIZE/OFF NODE NAME screen 110970 username 4u unix 0xffff91fe3134c400 0t0 19075659 socket The "DEVICE" column holds what looks like a mem...
To find the file associated with the UNIX socket, you can use the +E flag for lsof to show the endpoint of the socket. From the man pages: +|-E +E specifies that Linux pipe, Linux UNIX socket and Linux pseudoterminal files should be displayed with endpoint information and the files of the endpoints should also be d...
Interacting with Unix Socket found in lsof
1,495,645,416,000
From that article, I realized that: a UNIX domain socket is bound to a file path. So, I need to sniff DGRAM Unix socket through the socat as mentioned here. But when I try to retrieve the path for this purpose, I find that the target application uses a socket without file path. The ss -apex command shows results bot...
Question #1 Q1: From the ss man page I can't find out, what does it mean e.g. * 8567674 without file path. From the docs it explains the Address:Port column like so: excerpt The format and semantics of ADDRESS_PATTERN depends on address family. inet - ADDRESS_PATTERN consists of IP prefix, optionally followed by c...
How can I sniff unix dgram socket without having file path?
1,495,645,416,000
Is there any way I can control a tmux server and send commands to it like switching to a specific window in a session, or make some queries about the panes through the socket it creates? I've looked into libtmux for python and it appears to be lacking in some ways. Is there an official reference for the tmux api where...
It is not difficult to do the tasks you ask using python-tmux. E.g. if you start a new server with session name foo tmux new-session -s foo you can attach to it via python tmux (assuming the python library is installed) from ipython via import libtmux server = libtmux.Server() session = server.find_where({ "session_n...
tmux socket api
1,495,645,416,000
Is there a command or system call for listing all the abstract unix sockets currently open? Update: It was suggested that I use netstat -x, which theoretically works, but does not list the names of the abstract sockets, only those with paths. bash-5.0$ netstat -xeW Active UNIX domain sockets (w/o servers) Proto RefCnt...
Abstract sockets Their path name starts with the NUL characters, making their path length 0. They can use the remaining 107 characters to define a unique identifier, which other programs can use to connect. they are not represented in the file system. Most unix come with lsof (list of open files) command. If not you c...
Is there a command to list all abstract unix sockets currently open?
1,495,645,416,000
If I bind() an AF_INET socket (for a TCP connection), then later close() it, next time I run my program, I may have issues, since despite the close(), the kernel can still have the resources associated with the open socket. I am not very clear on this issue with the Unix Domain Sockets, though. So far I have seen I n...
In this context, it's important to understand the rationale for why the kernel has the TIME_WAIT state for TCP connections. This state is intended to allow any packets associated with the connection (that may have taken longer routes or otherwise been delayed) to drain from the network before a new connection on the ...
Unix Domain Socket bind, reuse address
1,495,645,416,000
I'm following this guide and I'm running into issues. https://www.tecmint.com/initial-ubuntu-server-setup-guide/ I am trying to create a linux machine in Ubuntu in wsl2 and then rename it using hostnamectl but have the error Failed to create bus connection: No such file or directory I have tried to follow these solut...
At the core, the problem is that hostnamectl is a systemd utility, which acts on the systemd-hostnamed.service. WSL doesn't currently provide support for systemd. Also, WSL sets the hostname to the name of the Windows computer hosting the instance. While you can change it by changing the Windows hostname (Control Pa...
hostnamectl command causes Failed to create bus connection: No such file or directory
1,495,645,416,000
What happens when I set up two processes to listen to the same Berkeley socket? Do messages get routed to both? Neither? One of the two? If so, how? Concretely, I can start two gunicorn processes with the same path for --bind unix: and no obvious error occurs: gunicorn --bind=unix:/path/to/some/socket This seems lik...
Two processes cannot bind (and listen) to the same unix socket. A process which tries to bind to an already existing unix socket will get an EADDRINUSE error. Concretely, I can start two gunicorn processes with the same --bind unix:/ and no obvious error occurs It's probable that your gunicorn process is actually re...
What happens when two processes listen on the same Berkeley/Unix [file] socket?
1,495,645,416,000
Consider /var/run/acpid.socket. At any point I can connect to it and disconnect from it. Compare that with nc: $ nc -l -U ./myunixsocket.sock Ncat: bind to ./myunixsocket.sock: Address already in use. QUITTING. nc apparently allows only single-use sockets. Question is then, how do I create a socket analogous to /var/...
You do it with the -k option to nc. -k Forces nc to stay listening for another connection after its cur- rent connection is completed. It is an error to use this option without the -l option. When used together with the -u option, the server socket is not connected and it can receive...
How to create a public unix domain socket?
1,495,645,416,000
From man 7 unix SCM_RIGHTS Send or receive a set of open file descriptors from another process. The data portion contains an integer array of the file descriptors. The passed file descriptors behave as though they have been created with dup(2). There are also other concepts with SCM in them; what does SCM me...
SCM in this context stands for “socket-level control message” (see also the processing implementation).
What does SCM mean in unix sockets context (SCM_RIGHTS etc.)?
1,495,645,416,000
I have two processes (Client and server) that communicate with each other using a Unix socket /tmp/tm.ipc. Both processes (Client and Server) don't support TCP. Client -> /tmp/tm.ipc -> Server Now, I want to separate both processes to run on two different machines that run in the same subnet. Therefore, I want to buil...
OpenSSH of a sufficient version (OpenSSH 6.7/6.7p1 (2014-10-06) or higher) can do this, if the SSH is initiated from the client to the server system one could write something like ssh -L /path/to/client.sock:/path/to/server.sock serverhost and then the client would connect to /path/to/client.sock and the server would...
Building a Unix socket bridge via TCP
1,495,645,416,000
The ss command (from the iproute2 set of tools which comes as a newer alternative to netstat) has in its --help the following options -0, --packet display PACKET sockets -t, --tcp display only TCP sockets -S, --sctp display only SCTP sockets -u, --udp display only UDP so...
A raw socket is a network socket (AF_INET or AF_INET6 usually). It can be used to create raw IP packages which can be used for troubleshooting or to implement your own TCP implementation without using SOCK_STREAM: Raw sockets allow new IPv4 protocols to be implemented in user space. A raw socket receives or sends th...
ss command: difference between raw and unix sockets