Recent Questions - Unix & Linux Stack Exchange |
- How to install Jekyll with rbenv on a Debian-based distro?
- SSH permission denied error on ssh to localhost, freshly reset SSH keys
- How can I use a prefix in the <glob> element of a mime info file?
- Does tc (traffic control) enqueue packets or frames?
- how do I install the yast clone_system module from a command line
- remove specific folder and files on remote machine
- Interactive bash in Docker under mingw on Windows
- Fresh Fedora 35 - what are these active internet connections doing?
- How to sync time across operating systems in a triple boot setup?
- Escape characters in sed transliterate
- How is simultaneous i2c bus access handled by Linux kernel?
- Read file from user input with a list of prefixes, then call file with prefixes in while loops
- Fine-grained restriction of remote sudo execution
- How to search for a string in a very large file with very long lines?
- Search and replace lines AFTER a regex match using "sed"
- How to restore a broken sudoers file without being able to use sudo?
- rsync not working with Linux Mint 20 as remote
- Bash command-history stopped working
- Problem while maximizing Google Chrome in Xubuntu 20.04
- Unable to change files/folder attributes on NAS sharing through samba server
- Multiple dummy monitors on remote headless Linux for VNC to local multiple monitors
- Increase System Tray Icon Size in KDE
- extundelete - How to solve 'Block bitmap checksum does not match bitmap when trying to examine filesystem'?
- No usable default provider could be found for your system (VM not recognized)
- Command to view which version of NixOS my machine is running?
- Cannot boot into Linux off live USB
- How to run a shell script (bash) on a chromebook?
- Find all occurrences in a file with sed
- How can I use Unix to rename all html files by their titles?
- Stay at same working directory when changing to sudo
How to install Jekyll with rbenv on a Debian-based distro? Posted: 16 Nov 2021 11:47 AM PST What I have tried: Installing ruby with: Then installing Jekyll with gem: Error messages: I also tried the instalation script again: OS: Trisquel ( Ubuntu based ) Thanks for any help you can provide! |
SSH permission denied error on ssh to localhost, freshly reset SSH keys Posted: 16 Nov 2021 11:41 AM PST I'm running into (what I think is) a very odd situation. I was having some trouble connecting a specific user to another host via SSH. So, I thought I'd try a simple re-initialization of all SSH keys for this user. So, I did: Which I thought would have totally reset my SSH connection. But now, when I do: I get: If I do: I see: I don't understand what's going on. It seems to me, a simple ssh to localhost should work just fine. Any clues? Thanks! |
How can I use a prefix in the <glob> element of a mime info file? Posted: 16 Nov 2021 11:23 AM PST I have a bunch of files in the form of I read up on mime types and found out, that I can add a mime-info file to The file I came up with looks like this: But it doesn't catch. It seems like only The free desktop standard mentions nothing about not supporting certain glob features or what have you, so I'm completely in the dark on this. |
Does tc (traffic control) enqueue packets or frames? Posted: 16 Nov 2021 11:16 AM PST Assume we are working with TCP/IP connection. According to https://wiki.linuxfoundation.org/networking/kernel_flow tc works on Layer 2. However, everywhere else in the internet (man, lartc, ..) the term "packet" is used to describe the units of data that tc works with. What does tc actually enqueue - Packets or Frames? The answer is important to help me understand following scenario: Assume we use PRIO qdisc with 2 classes. A big packet (say 100Kbytes) comes from |
how do I install the yast clone_system module from a command line Posted: 16 Nov 2021 11:03 AM PST is the error I get after booting Why nothing is enabled is confusing ... and finally allows the So is there some shortcut that would have allowed me to skip all the setup (AND the hours spent searching for these few simple command lines) - what am I missing? |
remove specific folder and files on remote machine Posted: 16 Nov 2021 10:40 AM PST I need to remove all the files from specific folder that is copied to remote machine using following command: I see all the files from test_sandy has been copied to remote machine, now I wanted to remove these files after say one minute: But I don't see those file getting deleted, but if, I run the delete it directly from remote machine (instead doing "ssh my_home_vm") it worked. |
Interactive bash in Docker under mingw on Windows Posted: 16 Nov 2021 11:24 AM PST I'm using a bash shell (Mingwg64) on windows, to run bash from a docker container. gives the result: Anyone know a good fix for this? |
Fresh Fedora 35 - what are these active internet connections doing? Posted: 16 Nov 2021 10:49 AM PST To get to this point I had a Fedora workstation 34 install- iso about a week old - ran update, rebooted, click Install Fedora 35 as it was on offer from gnome Software. Hadn't even opened Firefox yet. Didn't install anything else. I ran netstat just to see what was happening by default. There were a couple established connections to Cloudflare addresses which had no additional whois info to go on, ok and one to an oscp-router.gno (assuming thats Gnome extensions), But this one really stands out: Why did Fedora connect to proxy14.fedorapro ? I can't find any information about this. fedorapro.com is a parked domain. |
How to sync time across operating systems in a triple boot setup? Posted: 16 Nov 2021 10:17 AM PST I have installed Windows, Ubuntu and Kali Linux on my laptop but when I switch OS the system time changes. I tried following a Youtube tutorial and created a new file called "RealTimeIsUniversal" in the TimeZoneInformation folder of Regedit in Windows. Then I set it's value data as 1. But this did not solve the problem. Anyone know how to solve it? |
Escape characters in sed transliterate Posted: 16 Nov 2021 11:14 AM PST I want to use I would expect this to work just as well as using the However, when I go to perform this same operation with sed, I see the following error: This makes some sense, as I expect to need to escape the My current work-around is to either (1) just use This is however unsatisfying and suspicious. It's also not very safe, e.g. when What's the correct way to escape a character in a sed transliteration without sed treating the escape character itself a part of the translation? |
How is simultaneous i2c bus access handled by Linux kernel? Posted: 16 Nov 2021 09:35 AM PST I have two sensors with different slave addresses connected on an i2c bus in my custom board. If two different programs try to read the different sensors a same moment of time, will it lead to an contention in i2c subsystem for Linux kernel? I tried doing that on the board with both the sensors but was not able to produce the contention. And didn't find any definitive documentation which suggest either way. Is there any document which explains how a simultaneous read call to different slave address on a given i2c bus is handled by Linux kernel? |
Read file from user input with a list of prefixes, then call file with prefixes in while loops Posted: 16 Nov 2021 10:48 AM PST I am trying to direct user input file into while loop, but kept on failing when ran the script. The user input file genelist: This is the script I have been testing on. In order to execute raxml-ng tool, I need to input files for --msa, --model, --tree, --workers and --prefix for output file name. I need to repeat the process with multiple files, each 012.laln need to match with 012.model and generate output file named 012-rT. The input files for tree and workers are the same for all the files. I kept on getting error: Modifying the way I call the user input file "genelist" in a few ways but with no avail. Before this, I have been using for loops, i.e., the one-liner below. It worked well. I would like to try on while loops if possible. Questions: What is the correct and neat way to call the user input file There are some example I found in here but those are using numbers/number sequences in the loops. The answers suggested using C in for/while loops to solve the issue. But that doesn't seemed to be relevant for my case. Meanwhile, any better alternative for for/while loops in this case is also welcome! |
Fine-grained restriction of remote sudo execution Posted: 16 Nov 2021 09:21 AM PST My customer has many important scripts in their sudoers file, and they want to be able to deny the execution of these scripts if the user is logged in remotely. I have not figured out a good way to go about this, as it seems like most paths I could go down only restrict by things like users, TTY, remote hostname, IP, etc., but not by something as fine-grained as restricting by script and remote vs. local. They want there to be some concept of a blacklist of scripts, these scripts being the ones that can't be executed remotely (or visa versa w/ a whitelist). I also don't want to block the use of sudo for reasons other than running special scripts. My problem involves creating a process that catches when someone calls `sudo ``, checks if the user is remote or local, and checks the blacklist for that script, allowing the script to run with privilege once it's confirmed that either the user is local or the user is remote and the script doesn't exist in the blacklist (but does exist in sudoers), and denying execution otherwise. Is this feasible in any way? They might want something that can't be done. I've been looking at custom PAM modules. The only issue I see is getting that script from stdin/command line once I also want to look at SELinux as a possible solution, but I do not know much about it. I'm wondering if I need to restructure what they want and find a different solution entirely, or if this could work somehow. Does it make more sense to have different groups of privileged/unprivileged/remote/local users to have access to these scripts? This is a large distributed system and I don't think they like the idea of creating more users. |
How to search for a string in a very large file with very long lines? Posted: 16 Nov 2021 11:07 AM PST I have a very large file (over 100 GB) with very long lines (can't even fit in 8 GB RAM) and I want to search it for a string. I know So far the best solution I've come up with is: I'm actually happy with this solution, but I'm just wondering if there is some more intuitive way to do it. Maybe some other implementation of |
Search and replace lines AFTER a regex match using "sed" Posted: 16 Nov 2021 09:11 AM PST This kind of feels like it would be easier in I'd like to write an in-place regex that finds the second I'm not really looking for "clever" solutions that only apply to this input. I want to learn if there is a general-purpose way to search and replace after a match with I thought the solution would be somewhere in the |
How to restore a broken sudoers file without being able to use sudo? Posted: 16 Nov 2021 10:20 AM PST I'm getting the following error from Of course I can't I honestly don't know how the system got into this mess, but now it's up to me to resolve it. Normally I would boot into recovery mode, but the system is remote and only accessible over a VPN while booted normally. For the same reason, booting from a live CD or USB stick is also impractical. The system is Ubuntu 16.04 (beyond EOL, don't ask), but the question and answers are probably more general. |
rsync not working with Linux Mint 20 as remote Posted: 16 Nov 2021 10:40 AM PST I'm using hangs. I've experimented with available debug options and saw all goes fine up to the authentication (either via SSH key or password). If I present a wrong password, I get the proper "exit". But if I provide the correct password/key, immediately after authentication the session hangs with no more clues given. The last thing I see is As a last resort and work-around I've started a temporary and then used Edits: As one might assume some output from remote
Any ideas what the culprit might be, how to solve the issue, or even how to further narrow down? As for debugging, I've used For reference, the use chroot = true hosts allow = 192.168.0.0/24 transfer logging = true log file = /tmp/rsyncd.log log format = %h %o %f %l %b [share] comment = Share path = /mnt/share read only = no list = yes uid = nobody gid = nogroup |
Bash command-history stopped working Posted: 16 Nov 2021 09:57 AM PST For some reason there are no more new entries in my but it didn't help either. Does anybody know what might have triggered this behavior and how to re-enable history from this point? EDIT:: here are a few useful details |
Problem while maximizing Google Chrome in Xubuntu 20.04 Posted: 16 Nov 2021 11:13 AM PST |
Unable to change files/folder attributes on NAS sharing through samba server Posted: 16 Nov 2021 10:41 AM PST My situation:
Any suggestions? |
Multiple dummy monitors on remote headless Linux for VNC to local multiple monitors Posted: 16 Nov 2021 11:23 AM PST I submit defeat. I have been trying to configure my remote Linux box to have two dummy monitors so that I can use multiple local monitors to VNC into it. I'm surprised that no one else has needed help with this to find something on the web. I've also tried creating a monitor on the Linux box that is double wide. Then use x11vnc to -clip an area for each display. But I'm having issues creating a monitor that large with the dummy driver. I do have a graphics adapter installed that has two DisplayPorts but am not planning to use it. When I was using the real adapter, I was getting sluggish behavior. When I tried the dummy, it was very responsive. So I'm hoping to just create another dummy. I'm using KDE DM. I have seen many examples of using VIRTUAL1 but I can't get that working with the dummy driver. I tried adding Option "VirtualHeads" "2" into the config but the dummy driver doesn't recognize it. I've seen suggestions of using Xvfb but it has been deprecated by the dummy driver since 2016. Here are some details. /usr/share/X11/xorg.conf.d/xorg.conf is empty The following was gleaned from searching the internet. Once I got it working I stopped tweaking it so it may have flaws but that don't seem to affect me. /usr/share/X11/xorg.conf.d/dummy-1920x1080.conf has the following which gets me my single 1920x1080. I can see from xrandr that my monitor is called "default". So I tried this: The last line gives me: I tried to increase VideoRam to 512000 (double) to make sure I had room. Not sure what to do there. I have 32G ram. And ALL xrandr commands give me: I'm currently Working within the VNC session. Do I need to shut down x11vnc to get xrandx to complete? I'm at my wits end. I'm starting x11vnc like this: The linux box is within my local net so I'm not concerned with authentication/passwords. Edit 2021-05-27: More lurking and I found some options. I was able to get a double wide screen and then create two x11vnc instances. But this isn't optimal. The Linux box still sees this as a single screen. Now is there a way to take that screen and tell the Linux box to split it? For example, if I maximize a window in KDE it will not span both local screens? Xorg conf file: I can then connect to VNC displays :0 and :1 and arrange them on local monitors and resize the windows to fit those monitors. When a dialog window appears, many times it's in the middle of the Linux "big screen" which for me spans both monitors... Edit 2021-11-12: One solution: https://superuser.com/a/1188573/514658 The real issue is not being able to get my VNC viewer to go full screen and only span two of my three monitors. The only option available in the viewer is to use ALL monitors which then blocks my use of the Windows side. DisplayFusion at above link did the trick. Now I can seamlessly drag between my two monitors and not get stuck on the edge of one. Edit 2021-11-16: "SOLVED": Instead of using DisplayFusion, which is a big hammer, more searching led me to Windows PowerShell. No need for a third party utility. I only need to move/resize a specific window to fit on two of my three monitors full screen. Here it is: |
Increase System Tray Icon Size in KDE Posted: 16 Nov 2021 10:51 AM PST How can I increase the size of these System Tray Icons? : Update: In Debian 11, KDE Plasma 5.20.5, there is now an option to scale system-tray icons to the panel's height. Here's is a short video showing that. Thanks goes to KDE! |
Posted: 16 Nov 2021 11:04 AM PST The OS is Ubuntu 17.10 and I've been trying to recover(undelete) with extundelete. (The File System is ext4.) This didn't work. So, I tried with And It worked. However, I got another problem. I couldn't find any information about it. How can I solve this problem? |
No usable default provider could be found for your system (VM not recognized) Posted: 16 Nov 2021 09:01 AM PST I am having problems with Vagrant,it does not recognize Oracle VM When I try: CLI shows my VirtualBox version: And Vagrant version: What is wrong with my settings? |
Command to view which version of NixOS my machine is running? Posted: 16 Nov 2021 11:37 AM PST At https://nixos.org/ I can view the recent releases of NixOS. Is there a command I can run to see which version is on my machine? |
Cannot boot into Linux off live USB Posted: 16 Nov 2021 10:07 AM PST I am trying to dual boot Linux on my laptop (Dell XPS 15) which is running Windows 10 Pro. I did not have any problem dual booting the two operating systems on my desktop. I cannot boot up ANY Linux Distro, I have tried Mint, Ubuntu and Elementary OS. Whenever I try to boot from a live USB, I get the this message on all attempts: GNU GRUB version 2.02~beta2-9ubuntu1 Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists are possible device or file completions. grub> When I type in "boot" I get the error: you need to load the kernel first. Secure boot is disabled, and I have tried both in legacy and UEFI BIOS mode. I have never come across this error before, what causes it? |
How to run a shell script (bash) on a chromebook? Posted: 16 Nov 2021 09:38 AM PST I have a shell script and I need to run it in order to connect to a remote ubuntu linux machine having encrypted HDD, in order to enter the passphrase. There's a shell script for this, but I have a chromebook most of the time when away. Can this be done from a chromebook? I have already seen chrome extensions like mosh. |
Find all occurrences in a file with sed Posted: 16 Nov 2021 11:13 AM PST Using OPEN STEP 4.2 OS... I am currently using the following This command will find one instance in a file with the IP of 141.299.99.1 and also include 3 lines before it which is all good, with the exception that I would also like to find all the instances of the IP and the 3 lines before it and not just the first. |
How can I use Unix to rename all html files by their titles? Posted: 16 Nov 2021 10:16 AM PST As in, rename all HTML files in a directory by the text contained in TEXT? Could a combination of grep, sed, and mv work? For example, I have a file contained 1.html. The title of 1.html is contained in the HTML file as TEXT (it is contained within the title tags TEXT. I would like to rename 1.html to TEXT.html If a file is named as 5.html, and the title of 5.html is TEST2, then I want to rename 5.html to TEST2.html. |
Stay at same working directory when changing to sudo Posted: 16 Nov 2021 11:00 AM PST When working on the command line, I often change to sudo using |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment