date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,355,581,038,000 |
Why linux /proc/meminfo show:" 1 MemTotal: 7038920 kB " (proc most likely is to mean Kibibyte) in a PC of 8 GB memory RAM, although its Kibibyte is 7812500 ?
|
BIOS may reserve some RAM which the OS cannot use.
The iGPU does reserve a decent chunk of RAM.
PCI Express devices may ask the BIOS to reserve some RAM for them (I'm not totally sure about that but I've heard something like that).
sudo dmesg | grep -i reserv will show you a lot.
Here I have more than 1GB of RAM res... | Memory total shown on Linux on 8GB memory PC is only 7038920 kB |
1,355,581,038,000 |
vmalloc(size) allocates a memory of size long which is virtually contiguous but the physical mapping would not be contiguous. Does that mean the the virtually allocated size long memory actually lies in different page frames of physical memory?
|
Yes, it means just exactly that.
| Is vmalloc() allocate bytes of memory which is virtually contiguous maps to memory area from different physical pages? |
1,355,581,038,000 |
The excerpt below is from the OS text by Galvin et. al.
When we use a paging scheme, we have no external fragmentation: any free frame can be allocated to a process that needs it. However, we may have some internal fragmentation. Notice that frames are allocated as units. If the memory requirements of a process do no... |
The answer is that you set yourself up exactly in the situation that does not create internal fragmentation, as defined by the text, which says,
If the memory requirements of a process do not happen to coincide with page boundaries
But above, you set things up so that they did coincide. So... no fragmentation. Excep... | Understanding how internal fragmentation occurs in systems using only paging with huge page size |
1,355,581,038,000 |
If this question depends on the linux distribution, please answer it in a "general way" (i.e. the most common implementation on linux distributions).
In the page table of a process we can find the physical direction where the page we are looking for is mapped in main memory or a pointer to disk if the page we are look... |
The page table entry for a page which is swapped out contains bits to indicate that fact (at least one; the details depend on the architecture), and a two-part pointer to the information describing the swapped page. Each swap device or file has a corresponding swap_info structure, and each of those has a map which lin... | Page table content when the physical page we are looking for is in swap area |
1,382,943,583,000 |
Some might say this doesn't work, but it does, this website does what I want. Can you do this with any common tool like ffmpeg? Or maybe there is a python script somewhere? I couldn't find anything on the net.
|
With waon:
waon -i inputfile -o outputfile.mid
| Is it possible to convert audio to midi with the shell? |
1,382,943,583,000 |
How do I print and connect jack-audio and midi ports from the command line, similar to aconnect -io or aconnect 20:0 132:1 for inputs and outputs of ALSA MIDI?
|
jack_lsp [options] [filter string]
is able to print all jack ports (Audio and MIDI).
From the help-text:
List active Jack ports, and optionally display extra information.
Optionally filter ports which match ALL strings provided after any options.
Display options:
-s, --server <name> Connect to the jack serv... | Print and connect Jack Audio and MIDI ports from the command line |
1,382,943,583,000 |
I have a physical MIDI keyboard that also features some control keys, such as "play" and "stop". When pressed, they send the MIDI codes 115 and 116 respectively over the MIDI bus. Is it possible to hook up these commands to the usual media controls (play and pause) of Linux, so that when I press "play", the playback s... |
In the comments, dirkt suggested to write a custom program. So, I wrote a short working proof of concept script in Python that reads inputs from a MIDI controller and then simulates the required key press. I tested it on Ubuntu 20.04. Unfortunately, it requires superuser privileges to run, otherwise /dev/uinput cannot... | Use MIDI signals for media control |
1,382,943,583,000 |
I need a simple way to connect the midi keyboard to pulse audio and leave it active. ( i'm not worried about low latency.)
So far, I've looked at Ted's Linux MIDI Guide and followed all of that, but I reverted to normal latency kernel, when the low-latency caused trouble with my input devices. Following Ted's instruc... |
For beginners who don't need to fuss with studio-grade settings...
executable file pulsepiano, adapted from Ted's Linux Midi Guide to use Pulse instead of Jack.
So far I only can't get the script to hook up the MIDI-out from the keyboard, but that might be another topic.
You have to install fluidsynth, vmpk, and get ... | Simple way to connect midi keyboard to pulseaudio without using Jack |
1,382,943,583,000 |
I have connected a MIDI device to my UART RX / serial port /dev/ttyAMA0 using some electronics as described here.
I have properly configured the right baud setting (31250 baud, etc.).
It works: I can open the serial port, read some data, and I see the data coming when I play notes on the MIDI keyboard.
How to redirect... |
There is a driver that replaces the standard driver for the ISA UART 16550 chip on IBM-compatible PCs (documentation), but this does not work on different architectures.
To connect an existing /dev/tty* device with ALSA, try a daemon such as ttyMIDI.
| See a serial port as a MIDI IN device |
1,382,943,583,000 |
I seem to be having issues with my Alsa sequencer. I am using Parabola (Arch variant) and I don't use Pulseaudio, I use Alsa directly. I am trying to play a game via Wine that has MIDI audio. I have fluidsynth installed and it works - I can play a midi file and it sounds fine. However, if I start the fluidsynth server... |
If the /dev/snd/seq special file does not exist it is most probably because your system does not get the appropriate driver loaded.
The appropriate driver is part of any linux distribution and is built at kernel make time depending on the CONFIG_SND_SEQUENCER config option.
Say yes to Sequencer Support (Location: Devi... | Alsa sequencer issue - no file /dev/snd/seq |
1,382,943,583,000 |
I have a MIDI keyboard "Impulse", and a raspi3. I want to connect the keyboard to the raspi, and having sounds without touching anything.
So I use fluidsynth with jack as audio driver. Fluidsynth is launched by systemd service. There is no problem with it.
So I made a script, where I "jack_connect" the ports, and "ac... |
Ok after a few research, I found out a way out.
First, use udevadm monitor before plugging and plug it. Here is the output :
KERNEL[126.555200] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2 (usb)
KERNEL[126.555888] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
KERNEL[126.5... | How to fire a udev rule after the kernel has registered a driver? |
1,382,943,583,000 |
I have created a MIDI file using Anvil Studio in Windows. When playing the file with the MIDI editor Rosegarden in Linux (openSUSE Tumbleweed), the MIDI file sounds different.
Now, I know that MIDI files don't contain any music themselves and that it depends on the device which sound is played.
From what I have read s... |
Get the gm.dls file out of \windows\system32\drivers\;
convert it into a .sf2 sound font with a tool like Viena or Awave;
configure the Linux synthesizer (probably TiMidity++ or FluidSynth) to use that file.
| How do I make MIDI files sound the same in Linux as in Windows? |
1,382,943,583,000 |
I am having trouble getting a midi controller (piano keyboard) to work on a raspberry pi. It works on my linux laptop, and another midi keyboard does work on the pi. It is listed under lsusb, so I know the vendor/model id's, but not under amidi -l or aconnect -i. The pi also has a version of a few years old. So I am g... |
udevd is just responsible for creating symlinks in /dev, running additional programs on creation or removal of devices etc. If you can't see the device in ALSA, no matter what you do with udevadm, you won't be able to get it recognized that way.
Hardware recognition by the kernel is baked into the corresponding module... | How to use udevadm to fix unrecognized usb device |
1,382,943,583,000 |
I am trying to use ALSA for MIDI purposes in C.
My problem is, snd_rawmidi_open() sort of "crashes" (waits forever like a while loop) when using valuable arguments :
#include <stdio.h>
#include <stdlib.h>
#include <alsa/asoundlib.h>
int main(int argc,char** argv)
{
snd_rawmidi_t *handle_in = 0;
int err;
f... |
By default, snd_rawmidi_open waits until the requested port is available.
If you do not want this, add the SND_RAWMIDI_NONBLOCK flag (and reset it afterwards with snd_rawmidi_nonblock() if you want the read/write calls to be blocking).
| snd_rawmidi_open() waits forever - no error message |
1,502,555,900,000 |
I've got a partition P1 (which contains my Linux OS) on a drive A.
I've just gotten a completely new drive B (that is larger than partition P1 AND the entire drive A).
I'd like to copy across the partition from drive A to drive B, and possible resize it later on.
Can this be done with dd? I could easily create a new p... |
Yes ,that's what dd is for. Assuming:
sxb is the drive to copy from
sxc is the drive to copy to
sxb4 is the fourth partition on the second drive that you want to copy from
sxc1 is the partition you've created to be of equal size to sxb4
do :
parted /dev/sxc
GNU Parted 3.2
Using /dev/sxc
Welcome to G... | How can I move a single partition to another empty drive? |
1,502,555,900,000 |
I somehow messed up my partitions when I was trying to clean reinstall Linux Mint. Now whenever I type sudo fdisk -l, it would always give me warnings:
$ sudo fdisk -l
[sudo] password for sneknotsnake:
Disk /dev/sda: 465,78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: ST500DM009-2DM14
Units: sec... |
It's a non-issue.
Your sda3 is an extended partition that holds logical partitions sda5 and sda6. The only non-aligned number points to the first extended boot record (EBR). This record takes 512 bytes, one logical sector. In no circumstances this can span over two physical sectors. There is no alignment problem here.... | Extended partition not aligned to physical sectors. All other partitions aligned. Is this an issue? How can I fix this? |
1,502,555,900,000 |
I am trying to resize an encrypted physical volume so that I have free space to make a dual boot system.
So far, I've successfully decrypted the PV, resized the filesystem and the LVs but when I try to resize the PV I run into issues relating to the sector extents of my LVs.
root@ubuntu:/home/ubuntu# pvresize --setph... |
pvmove is the right tool:
pvmove /dev/mapper/cryptdisk:52899:56980 /dev/mapper/cryptdisk:40355
will move the extents.
However since we’re talking about swap I’d just remove the LV and recreate it...
| How to change extents of logical volume on LVM physical volume |
1,502,555,900,000 |
I have one issue.
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.8G 5.8G 3.5G 63% /
udev 11M 0 11M 0% /dev
tmpfs 1.3G 9.5M 1.3G 1% /run
tmpfs 3.2G 74M 3.1G 3% /dev/shm
tmpfs 5.3M 4.1k 5.3M 1% /run/lock
tmpfs 3.2G 0 3.2... |
As @jordanm pointed out in a comment, it's much safer to symlink into a new location in an existing partition than to try to resize partitions while keeping their current content.
In your situation, this would be achieved by something like:
cd /var
sudo mv -i www /home/
sudo ln -s /home/www .
(as a side note: it's us... | Change size of /home partition and move /var/www on new partition |
1,502,555,900,000 |
I made a separate partition for /home, but during installation process I forgot to mount it and hence no entry was made in fstab.
I had everything in partition under the root ( well not the swap and efi system partition). I realised what I did, very late and by that time I had already installed packages and wrote data... |
Because you already have an home partition, we should be able to do this with out a live OS.
mount the new home on /mnt
move files from old-home (/home), to new home (/mnt). (/home should now be empty).
remount new-home to /home (bind mount sudo mkdir -p /home && sudo mount --bind /mnt /home (you can also use --move,... | Add (already created) partition for /home after OS installation |
1,502,555,900,000 |
Background: I am running Manjaro Linux in a 750 GB HDD Laptop with 30 GB root. I had a Win installation but I've removed it now.
Now I want to move my root in a larger space, say 60GB, in another place of my HDD. Now what is the most efficient way to do that? I have separate /home and /boot
Note: I've searched the int... |
I don't know about the most efficient way, but a way that is easy for the end-user is something like this:
Have a Linux system which can boot from an external medium (e.g. CD, USB). – Many installers have a "Try Linux" mode. They are fine.
Start gparted as root and have a tool with a nice GUI. You can literally cut a... | Moving the root partition to another partition |
1,502,555,900,000 |
My aging computer will need a replacement. That will happen in a couple of months but, in the mean time, I would like to learn techniques related to improving performance and resilience of data.
I also have an empty 2 TB usb external HDD, which is like 3-4 times the size of my current laptop's HDD. So.... I would like... |
Unfortunately, this problem can be solved literally in millions of ways.
KISS approach would be:
format the new drive as completely new device (you don't need to bother with lvm really)
use some "manual" syncing mechanism like cp -a, tar|tar or rsync, to sync the old /home to new drive manually, or something like lsy... | Move around data between boxes taking advantage of an external HDD |
1,502,555,900,000 |
TL;DR
I have a dd image disk.dd which has multiple partitions. The end goal is to reduce the size of this dd image file.
After deleting and recreating a higher numbered partition with a start sector offset lower than it was before, (i.e expanding the partition to the left) I have a partition which has a filesystem in ... |
It's not possible with fsck. In a filesystem, everything has offsets and if you change the start sector, all of these offsets change. fsck simply has no facility to re-write all offsets for everything (superblocks, journals, directories, file segments, etc.). And even if you could do that, it would only work if the ne... | Move filesystem to the left after expanding partition to the left |
1,502,555,900,000 |
I have this setup of Ubuntu 18:
two identical disks. In one (sda) there is / and /boot/efi. In the other disk (sdb) there is /home.
The free space in sda is enough to hold what is used in sdb.
I would like to move /home to sda. It could be the same partition sda1, or it could be a new partition, say sda3.
Here is what... |
If you use sudo or su instead of logging in directly, you will still lock the home directory and you will be unable to umount /home. If you cannot login directly, you should probably use a live CD.
Another option however would be:
create a user safemove, with a home directory /tmp.
add safemove to the sudoers file wi... | Is it possible to move /home mount point from one disk to the disk where / mount point is? |
1,502,555,900,000 |
I am having the famous warning "low disk space" on my Linux Mint in var/cache/apt/archive directory, and I want a permanent solution ( aka not apt-get autoclean because the mentioned directory is not enough for all the packages so cleaning it doesn't solve the problem)
What are the possible solutions to this problem?
... |
The easiest way is to move the directory to another partition and then create a symlink from the old location to the new.
You seem to have lots of space free on /home, so use that:
apt-get clean
This step is optional, but highly recommended. It will delete all of the downloaded .deb files currently in /var/cache/apt... | Low disk space “apt/archives” |
1,502,555,900,000 |
Good day,
I have a 120GB SSD, and 1TB HDD on my system. And on my SSD I have Windows installed. Afterwards, I added Linux Mint as dual boot. Before I install, I shrinked space from the HDD and created all /,/home,swap etc. on HDD. But when I launch Windows vs. Mint, it makes me feel the difference a lot, so I thought ... |
Ok, since you might get confused from the comments, I've decided to write an answer. Though what I'm suggesting is not a simple procedure and if you're not experienced enough, you will end up with unbootable linux, or even worse - broken partitions and lost data.
I would not suggest you to follow it unless you're expe... | Dual Boot System, Moving Linux Mint to SSD |
1,502,555,900,000 |
I am using Ubuntu 22.04 LTS in a windows dual boot setup. This is the state of the partitions at the moment. (Windows Screenshot)
On my Ubuntu, I have the following
df -H
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.4G 3.0M 3... |
There are multiple things you need to understand:
a partition contains a file-system, usually but not necessarily with the same size as the partition
partitions can be expanded (or reduced) on their end only, because otherwise the file-system always has to start at the beginning of the partition. If you change the st... | Ubuntu resize partition in in backward direction |
1,502,555,900,000 |
This question relates to a Windows/Linux dual boot system on a DOS-partitioned SSD (i.e. none with GPT/UEFI). Originally, the computer only had Windows 10 on an HDD. Then I managed to transfer this system to the SSD, resize the partitions and install Xubuntu 20.04 alongside Windows 10, and it all worked fine.
There al... |
The presence of /usr/lib/grub/x86_64-efi and /usr/lib/grub/x86_64-efi-signed indicates that the Xubuntu was installed as an UEFI-booting system, suggesting that your system is in fact UEFI-capable.
The fact that your sda disk includes a Windows installation and is partitioned in MBR style indicates your Windows must b... | How do I permanently recover from grub rescue? |
1,502,555,900,000 |
This is what my partitions look like. The first one is the /root partition that I need to extend, second one is the /home partition and the third is the unallocated space that I want to add to the /root. How can I do that?
|
It’s a good idea to take backups of any data on your computer that you cannot afford to lose before doing this. It’s not dangerous but it is possible to mess up and lose data.
You need to boot your system into a live environment that has GParted included. An Ubuntu installation iso is ideal or there is also a GParted ... | How can I extend the root/filesystem to take unallocated space? |
1,502,555,900,000 |
I installed Linux Mint in a dual boot alongside Windows 11, however now I am trying to get completely rid off Windows 11, however I haven't been able to combine the two partitions that I used for personal data storage (one of them is empty, so no need of keeping files).
This is what my partitions look like on lsblk:
N... |
You can merge two partitions only if they are adjacent. If they are not adjacent, you can always use LVM to initialize each partition as a Physical Volume, add the two Physical Volumes to a Volume Group, and create a Logical Volume from the Volume Group; then format the Logical Volume as usual.
The commands would be m... | How to combine two partitions? |
1,502,555,900,000 |
I am trying to expand the size of my root directory as I am running low on space. I have tried resizing it from a Live USB and it won't let me.
The text in red is the mounting point (according the partition manager) when booting from the drive. /dev/sdc5 mounts to /boot/efi and /dev/sdc6 mounts to /
fdisk -l /dev/sdc... |
You don't have any unallocated space after the extended partition into which you can resize it. You can either reinstall or if you want to take the arguably more fun approach, perform the following gymnastics:
Create two primary partitions using the unallocated space: one will be your new ESP, which you can make 256M... | Resize extended partition containing /boot/EFI and root |
1,487,617,670,000 |
I was just introduced to multipathing in our production environment and had never heard of the concept prior. After some digging I think I'm starting to get a handle on how the concept works in theory but I'm having some trouble extrapolating that to what I'm seeing on the box I'm working on.
From multipath -ll I get ... |
Your multipath'ed device is just an abstraction of multiple paths to one disk. So the corresponding relationship you are asking about is that the mpathN device is the same as the underlying device at the far end of whatever fabric you have.
As you saw, you can view the partition table on the mpath device and it's cons... | Understanding multipath and mountpoints |
1,487,617,670,000 |
SERVER:~ # pvs
Found duplicate PV Wb0b2UTCKtpUtSki0k2NnIB24qNj4CEP: using /dev/mapper/36005076304ffc2500000000000004903 not /dev/mapper/36005076304ffc2990000000000004903
PV VG Fmt Attr PSize PFree
/dev/mapper/36005076304ffc2500000000000004903 application l... |
In my personal experience, "duplicate PV" is usually caused by the system having multipath access to a particular SAN LUN but LVM hasn't been configured to filter out the block devices for the individual paths. The device mapper name even looks like a WWNN/WWPN (although I don't have enough experience with SLES to kno... | "Found duplicate PV" |
1,487,617,670,000 |
I am setting up multipaths for Veritas backup on SAN storage. I noticed that lsblk shows duplicate disks, which is quite confusing.
For example, both sdc and sdd represent the same disk, and similarly, sde and sdf represent the same device.
sdc 8:32 0 50G 0 disk
├─sdc1 8:33... |
sdc1, sdd1, sde1, sdf1 are paths to storage device, known as LUN, for a single LUN, you can have many of them (usualy 2 or 4, sometime 8, depending on SAN configuration).(*)
mpathb and san69 are "logical" devices, you build up LVM, or in your case partition on them.(*)
mpathb's data can be access either on sdc1 or sdd... | Multipath Duplicate Drives |
1,487,617,670,000 |
I have a multipath device I'm interested in:
[root@xxx dm-7]# multipath -ll mpathf
mpathf (3600601609f013300227e5b5b3790e411) dm-7 DGC,VRAID
size=3.0T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=130 status=active
| |- 7:0:1:5 sdl 8:176 active ready running
| `- 8:0:1:5 sdx ... |
Short Answer:
Device mapper in kernel versions after 2.6.31 (released September 9th 2009) includes support for "request-based" dm targets. So far only the only request-based dm target is dm-multipath.
For the targets that remain BIO (i.e everything except multipath) scheduler selection is still present but irrelevant... | Does dm-multipath schedule I/O? |
1,487,617,670,000 |
How do I configure multipath in testing VM (purpose is purely academical)?
I made new logical volume, modified multipath.conf to be as follows:
defaults {
udev_dir /dev
user_friendly_names yes
}
blacklist {
}
blacklist_exceptions {
device {
vendor "VMware,"
product "VMware Virtua... |
try this
multipathd -k
show config
On my system it seems that an empty blacklist is ignored and it contains, in addition to vendors blacklisted devices, these devnodes paterns:
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
devnode "^dcssblk[0-9]*"
It matches "dm-"
you could try to add the... | Multipath to a logical volume in a staging VM |
1,487,617,670,000 |
My goal is to make,for testing purpose
a multipath lvm iscsi
I have setup two debian
iscsi server,workings
I have setup the multipath on
a debian client and i can
create dirs,etc on ext4 fs.
But if server1 goes down
the fs is stucked(hang)
Why?
This is my multipath.conf
defaults {
udev_dir /dev... |
The answer is: not possible
Dual-primary DRBD, iSCSI, and multipath: Don’t Do That!
“Dual-primary” iSCSI targets for multipath: does not work. iSCSI is a
stateful protocol, there is more to it that than just reads and
writes. To run multipath (or multi-connections per session) against
distinct targets on separa... | Linux and iscsi multipath |
1,487,617,670,000 |
I had a RHEL machine booting from local disk.
Later I removed local disk & booted from a SAN disk and installed RHEL on it.
Now I have read about a grub.conf file:
root (hd0,0)
kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/hda1 vga=0x317 showopts
initrd /boot/initrd-2.6.18.2-34-default
Grub stage1 boo... |
When grub goes to stage 2, it will present the kernel selection menu.
The best way to configure this is to use either the SAN disk or the local disk as your MBR (master boot record) then update the /boot/grub/grub.conf file to include both stanza entries from the local HDD and the SAN disk.
Then use the default=0 entr... | RHEL 5 Booting from Local Hardisk & SAN Harddisk via grub |
1,487,617,670,000 |
I found a script to create alias for multipath for Nimble volumes and I modified it to work in freenas
the content of it is
#/bin/bash
# This script will scan the system for attached Nimble Volumes
# and output a list of multipath alias statements for the linux
# /etc/multipath.conf. This will allow for the volume t... |
Comment the lines starting with OFFSET= and NIMBLEVOL= and insert
NIMBLEVOL=$(echo $SUBSTRING | sed -e 's/^\(.*\)-lun.*/\1/')
right below the commented lines.
...
#OFFSET=$(echo $SUBSTRING | awk --re-interval 'match($0, /\-[v][a-z0-9]{16}/) { print RSTART-1 }')
#NIMBLEVOL=${SUBSTRING::$OFFSET}
NIMBLEVOL=$(echo $SUBS... | Script to Create multipath.conf Alias |
1,487,617,670,000 |
I have Debian 9 with successfully configured iSCSI and multipath:
# multipath -ll /dev/mapper/mpathb
mpathb (222c60001556480c6) dm-2 Promise,Vess R2600xi
size=10T features='1 retain_attached_hw_handler' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 12:0:0:0 sdc 8:32 active ready running
`-... |
Since you seem to have a single physical volume, I really wonder how partial activation can happen in your case. It should be all or nothing. But here are a couple of issues to take care of anyway:
You need persistent multipath device names. I'm not sure where mpathb comes from, but I recommend against enabling user_... | Proper way to activate LVM partition on multipath during the boot |
1,487,617,670,000 |
I have two multipath devices configured
mpathb (36005076300808b3e9000000000000007) dm-1 IBM,2145
size=16T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 1:0:1:1 sde 8:64 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
`- 1:0:0:1... |
The error is because LVM had opened the disk device for access first (before the multipath subsystem had a chance to do it), and still holds a handle for accessing the PV of vg0 as just /dev/sdb (= major:minor device 8:16, as indicated by the error message) as opposed to /dev/mapper/mpatha (= major:minor device 254:0)... | LVM VG/LV is not activated at system startup |
1,487,617,670,000 |
On CentOS 7 trying to create physical volume using mpath device. But it throwing this error message.
How to resolve this issues?
pvcreate /dev/mapper/mpathb1
Device /dev/mapper/mpathb1 excluded by a filter.
# grep 'filter =' /etc/lvm/lvm.conf |grep -v "#"
filter = [ "a|^/dev/sda[1-9]$|", "a|/dev/mapper/.*... |
This post gave me the information to resolve my issue.
https://serverfault.com/questions/87710/debian-lenny-san-lvm-fail
I have use the slice 1 to create the PV.
# pvcreate /dev/mapper/mpathb1
Physical volume "/dev/mapper/mpathb1" successfully created.
FYI:
used this script to create the disk partition
# cat a.sh
... | Device /dev/mapper/mpathb1 excluded by a filter |
1,450,910,572,000 |
I use Linux Mint 13 MATE, and I'm trying to set up notifications when I plug/unplug devices.
First of all, I found udev-notify package, but unfortunately it almost doesn't work for me: it works for very little time (1-2 minutes), and then, if I connect/disconnect any device, it crashes:
Traceback (most recent call las... |
Well, after many hours of googling and asking on forums, I got it working (it seems). Anyone who wants to get nice visual and/or audio notification when some USB device is plugged/unplugged can install my script, see installation details below.
First of all, answers on my own questions.
1. How to get actual title of t... | Call notify-send from an udev rule |
1,450,910,572,000 |
Let's say I use notify-send with this long messages:
notify-send 'd: title, up/down: zoom, w: win_to_img, </>: rotate, *: orig, Enter/0: blah blah blah'
But it truncates the message, showing only a part of it with no option to view the full message:
With Fedora 21 I was able to view the full message (pop up at botto... |
notify-send works like this:
notify-send [OPTION...] <SUMMARY> [BODY]
Now, as you only have one (quoted) string, that's being used for the SUMMARY and the BODY is empty. Just use blank or whatever for the SUMMARY and the BODY will display the whole message (but only when you hover over the pop-up with your mouse)1:
n... | notify-send - How to display full message when message is longer than one line? |
1,450,910,572,000 |
I am running linux mint and use the notify-send command for various purposes, and of course also receive notifications from regular applications e.g. discord or MS Teams
When using Cinnamon DE, they look pretty normal, and I can even add icons to my custom notify-send calls to make it clear what is going on
However, I... |
Systems that do not use a desktop environment usually require installing a separate notification daemon to handle notifications. It appears that you already have the dunst notification daemon installed.
To configure its appearance, you can edit ~/.config/dunst/dunstrc. If it is not available, you can create a copy fro... | How to customise the appearance of notify-send? |
1,450,910,572,000 |
I am using Linux Mint 17.
I want to be informed every 50 min, at every hour for small break.
Here is cron job:
nazar@desktop ~ $ crontab -l
DISPLAY=:0.0
XAUTHORITY=/home/matrix/.Xauthority
00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_2
50 * * * * /home/nazar/Documents/scripts/pc_break.sh # J... |
You need to set XDG_RUNTIME_DIR as well. Change your crontab to this:
DISPLAY=":0.0"
XAUTHORITY="/home/nazar/.Xauthority"
XDG_RUNTIME_DIR="/run/user/1001"
00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_2
50 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1
* * * * * /home/nazar/Docume... | Notify-send doesn't work at Cinnamon |
1,450,910,572,000 |
I am using Ubuntu 16.04 LTS. There is an alias in my .bashrc which uses notify-send:
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
I can append alert to other commands as somecommand; alert or someco... |
Monitoring the dialogue of a program and send an alert
You can monitor the activity of
a fifo or
an xterm log file, now with an interactive mode
and let it start a zenity info message, when there is input from the monitored program. If you wish, you can also install espeak and let it send an audio message.
1. Start ... | Send a notification or alert when bash asks for input from user |
1,450,910,572,000 |
I have wrote this script, when the increase volume button is pressed to display desktop notifications with "notify-send".
when the button is pressed:
notify-send "Current volume 'pamixer --get-volume'"
The problems is that the notifications get stacked e.g.
Is there a way to prevent the notifications from stacking a... |
The notification api has a means to specify the id of a current notification that should be updated instead of creating a new popup, but notify-send does not provide for this. If you are willing to use a small amount of python, you can retrieve the id of a notification when you make it, and then try to update that id... | Prevent "notify-send" from stacking |
1,450,910,572,000 |
here are my notifications and I would like each notification to replace the one before it
by the way I am using dunst for my notifications
|
You should use dunstify instead of notify-send, because first one allows you to use notification ID and replace older notifications with newer ones. Here is link to info about dunstify, and link to example of creating volume level indicator.
| How to make dunst show repeated notifications of the same program as one single notification |
1,450,910,572,000 |
I am on Linux Mint 18.1, MATE.
I am using the notify-send command to visualize the name of keys (such as <enter>), while sending them to the current window via a python script.For about two weeks, notify-send has shown a weird behavior. I know the basic syntax in bash is notify-send [OPTIONS] <summary> [body].
Basic p... |
The notification spec says that body can include simple markup, so any tags inside "<...>" will be removed and interpreted if possible. For example, "<b>hello</b>" will show the word in bold.
You can use the standard html entity mechanism and show a < with < and
> with > giving, for example,
notify-send 'Summar... | libotify / notify-send: body text is not printed if it contains '<' or '>' |
1,450,910,572,000 |
Is it possible to generate a brief notification every time mpv starts a playback? Maybe through notify-send?
|
mpv can run lua user scripts, some of which are listed here. One of these, notify will generate a sophisticated notify-send. It has a few dependencies, and I wasn't able to get it to work in my setup, but the followed greatly simplified code worked for me. Place this file in
~/.config/mpv/scripts/mynotify.lua (create... | Add notification to mpv through notify.send? |
1,450,910,572,000 |
According to Bash: Special Parameters:
($!) Expands to the process ID of the job most recently placed into the background, whether executed as an asynchronous command or using the bg builtin
I can utilize this as follows:
$ leafpad &
[2] 3962
$ kill $!
This works and kills the most recent process (eg. leafpad) but... |
notify-send doesn't run for any length of time: It starts, connects to notify-osd, delivers the notification message to be displayed, and terminates.
By the time you run the kill command, notify-send has already terminated on its own. The notification you're seeing is served by notify-osd.
| Why can't I use `kill $!` with parameter expansion in Bash, when the most recent process is "notify-send"? |
1,450,910,572,000 |
I am trying to get libnotify (notify-send) to pop-up a notification once a certain character is found while I tail a log file.
Without grep it works fine ...
Here is my code:
tail -f /var/log/mylogfile | grep ">" | while read line; do notify-send "CURRENT LOGIN" "$line" -t 3000; done
When I include grep it passes no... |
This page explains grep and output buffering, in short you want to use the --line-buffered flag:
tail -f /var/log/mylogfile | grep --line-buffered ">" | while read line; do notify-send "CURRENT LOGIN" "$line" -t 3000; done
About the font, this AskUbuntu question mentions it's not officially possible, but describes a ... | libnotify with bash and grep |
1,450,910,572,000 |
I've been trying to write a shell script that will interface with cmus and then notify me of the track info using notify-send. Right now it is not working, mainly because xargs does not seem to pass 2 arguments to notify-send. It only sends one and I cannot figure out why. I've done everything I can think of with sed ... |
xargs is working as intended; each line is taken as a parameter. If you want multiple parameters, separate them with newlines.
{echo "$title"; echo "$artist"; echo "$album"} | xargs notify-send
That said, you're doing far too much work for something quite simple:
title="$(echo "$info" | sed -n 's/^tag title //p')"
a... | why isn't xargs parsing my input correctly? |
1,450,910,572,000 |
Suppose I have a command like:
foo() {
echo a
echo b >&2
echo c
echo d >&2
}
I use the following command to process stdout in terminal but send error via notify-send
foo 1> >(cat) 2> >(ifne notify-send "Error")
The issue i am having is, I want to view the stderr (in this case b d) as notify-send body... |
With your try with "$(cat)" you're almost there, but you need this cat to read from ifne, not along ifne.
In case of ifne notify-send "Error" "$(cat)", cat reads from the same stream ifne does, but not simultaneously. The shell handling this part of code can run ifne only after cat exits (because only then it knows wh... | notify-send with stderr in notification body if there is stderr |
1,450,910,572,000 |
I was making a battery notifier script for my raspberry pi3. The script is executing when I do
/usr/bin/python /home/pi/Documents/shutdown.py
and showing the popup notifications. However the service is not executing it or not showing the notification. I can see the python process if I do sudo systemctl status batte... |
Edited to add: Your program tries to access the graphical desktop of a user (pi), however, it is itself executed by systemd. That is, it will run as root per default and not as the user pi. Moreover, there might not even be a graphical desktop yet at the time this is started.
Therefore, you could go several paths:
S... | systemd service not executing the python script |
1,450,910,572,000 |
On my system, notify-send requires 3 enviorment variables to run, which are kept in a file which is generated automatically on logon:
/home/anmol/.env_vars:
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-PwezoBTpF3
export DBUS_SESSION_BUS_ADDRESS
XAUTHORITY=/home/anmol/.Xauthority
export XAUTHORITY
DISPLAY=:0
expo... |
It is working after replacing
* * * * * /home/anmol/display-notif.sh
with
* * * * * sudo -u anmol /home/anmol/display-notif.sh
| notify-send from root cron |
1,450,910,572,000 |
I am using Plasma-desktop notifications for all kinds of things, often from scripts using kdialog or notify-send. My Plasma desktop uses a dark background with a light foreground (text). Until a few months ago, all was well, but after a system update (in May?) my notifications kept their dark background but started ... |
Luckas' answer pointed me in the direction of a workaround (rather than a solution):
In /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml
@@ -230,7 +230,7 @@ ColumnLayout {
// HACK RichText does not allow to specify link color and since LineEdit
... | How can I change the text colour in a Plasma-desktop notification? |
1,450,910,572,000 |
There is both zenity and notify-send. (on Fedora/GNOME at least, both seems to be pre-installed.)
So considering I want to show notifications, what are the differences between these too ones?
Is there anyone that is installed in more distros or so (by default)? Is the process of showing notifications any different? Is... |
Functionality comparison
zenity --notification is equivalent to notify-send for the most simple cases.
For example, these two commands are equivalent:
$ zenity --notification --text=Title
$ notify-send Title
and so are these:
$ notify-send Title 'Long text message'
$ zenity --notification --text='Title\nLong text mes... | What are the differences/(dis)advantages of zenity vs notify-send? |
1,450,910,572,000 |
As continuation of this question (How can I send a notification with polkit 0.106?), I've discovered that I have to execute notify-send as the user who I want to send notification.
But, with my current config, I can't do this, because polkit execute the script as polkitd user, and I can't do su $user without known use... |
After doing a few test, I got this results:
polkitd is a nologin user
If I execute this command, to execute my script with polkitd user, shows an error:
sudo su polkitd -s /bin/bash -c aux_scripts/send_notify.sh almu
Error executing command as another user: Not authorized
This incident has been reported.
So, I think... | How to allow running notify-send as another user with pkexec? |
1,450,910,572,000 |
I am developing a application to don't forget the pendrive.
This app must lock the shutdown if a pendrive is connected to the machine. As this form, if the user wants to shutdown the system while a pendrive is connected, the system shows a notification to alert about it must disconnect the pendrive to unlock shutdown.... |
Finally, I created a dbus client, launched as user, which receives signal from systembus and shows notification to user.
The dbus client code is in https://github.com/AlmuHS/Pendrive_Reminder/blob/work-in-progress/dbus-client/client.py
In the send-notify.sh script, I only added
dbus-send --system /org/preminder/mensa... | How can I send a notification with polkit 0.106? |
1,450,910,572,000 |
I want to display a notification for user via notify-send when power button is pressed.
Power button has a special script attached which allows to shutdown only when specified amount of time has passed.
In that time when user cannot shutdown the device I want to display a notification which says something like "Please... |
Inside your script write a file on hdd ("touch alreadyPressed"). Each other call should check the existence of this file and leave the script. When the script notified the user delete the script. If this is too early, then delete it on startup.
| Elegant way for notification when power button pressed |
1,450,910,572,000 |
I'm trying to send a notification through a notify-send
notify-send 'System' 'Dist files is already' $(du -h /var/cache/distfiles/ | tr -d '/var/cache/distfiles/')
But the spacer that I need cannot be displayed for some unknown to me reason, it outputs:
Invalid number of options.
But If I'll remove the spacer in the... |
The command tr doesn't work as you intended:
-d, --delete
delete characters in SET1, do not translate
Meaning that tr removes single characters from the SET1, for example:
$ echo foobar | tr -d fb
ooar
Now let's see man notify-send:
SYNOPSIS
notify-send [OPTIONS] {summary} [body]
So you have to pass 2 a... | Problem with a spacer |
1,450,910,572,000 |
I want to use notify-send to show a notification every n minutes to tell me the vpn status.
The command would be running in a popup terminal I have already set up, hidden from view until I need to stop the while loop, then I'd just do ctrl-c.
I wrote the command below, but it errors out infinitely: Invalid number of o... |
The command takes one or two arguments:
SYNOPSIS
notify-send [OPTIONS] {summary} [body]
So, you'll simply wrap the result of your command in double quotes:
while :; do
notify-send "$(command)"
done
| How do I notify-send a long command? |
1,627,423,012,000 |
I tried to use the following command:
gtk-launch nvim file.txt
But it gave me this error:
gtk-launch: error launching application: Unable to find terminal required for application
How am I supposed to set the terminal required for application? I already set my $TERM and $TERMINAL environmental variables:
export TERM... |
As of 18-09-2023: The list of hardcoded terminals here is
static const struct {
const char *exec;
const char *exec_arg;
} known_terminals[] = {
{ "xdg-terminal-exec", NULL },
{ "kgx", "-e" },
{ "gnome-terminal", "--" },
{ "mate-terminal", "-x" },
{ "xfce4-terminal", "-x" },
{ "tilix... | Error With gtk-launch: Unable to find terminal required for application |
1,627,423,012,000 |
I use neovim in tmux in gnome-terminal on Fedora 25. Here I found out, that I do not have true color support because terminal is not linked to some libvte of correct version. Since many nvim color schemes need true color support (and also I want this from a general perspective) I'd like to activate it!
However, the po... |
Those instructions do not actually provide the correct test for the version of libvte used on Fedora, since our gnome-terminal-server is in /usr/libexec. Instead, I'd suggest
$ rpm -qR gnome-terminal|grep vte
libvte-2.91.so.0()(64bit)
vte291(x86-64) >= 0.46.0
Here, we see that 0.46.0 is greater than the 0.36 your tu... | Enable true color for neovim in Fedora 25 |
1,627,423,012,000 |
I have a script with which I toggle between a dark and a light colorscheme. The terminal emulator I use (termite) rereads its configuration when receiving the signal USR1, so when toggling my colorscheme I send USR1 to all termite instances so that the colorscheme is updated immediatly.
Does there exist some possibili... |
One can remotely control vim via the remote feature. For neovim I found the neovim-remote which makes it easy to send a command to an already running nvim process. The following snippet iterates through every nvim process (discovered by neovim-remote) and sends a command to source the config file:
for path in $(nvr --... | Signal neovim to reread its configuration |
1,627,423,012,000 |
The terminal i'm using is termite, and it is very good, but i'm having a problem with vim colorschemes and some colors in the terminal itself too when using tmux. It happens as follows:
As you can see in the screenshot, when i open nvim or vim with tmux, the case on the left, the colorscheme gets altered, this happe... |
So, if anyone is still interested in finding a fix; for those who still have the same problem: I was able to get it working nicely without doing much.
I had forgotten about this matter and stopped using tmux for a long time until I decided to ask about it on a Linux group on Telegram and a cool lad helped me with the ... | Terminal colors look wrong when using tmux with termite |
1,627,423,012,000 |
I want to set nvim(Neovim) as my default editor, I have tried to edit my .bashrc and add this two line:
export EDITOR=nvim
export VISUAL=nvim
and then
$ source .bashrc
but it didn't work. Proof:
$ sudo visudo
visudo: no editor found (editor path = /usr/bin/vi)
How can I set that correctly?
|
sudo by default sanitizes your environment: variables you set for your user account won't be visible in the process started by sudo. You can run sudo with the -E (--preserve-env) flag:
sudo -E visudo
You can add VISUAL and EDITOR to the list of environment variables that sudo preserves by default by editing /etc/sudo... | Can't change Arch default editor |
1,627,423,012,000 |
Background:
I'm just setting up an install of Arcolinux. I have a keyboard shortcut SUPER+Enter to launch alacritty.
What I want is to have alacritty automatically create and start in a new tmux session if there are none that havent been attached to.
Or attach to an existing tmux session if nothing is attached to it.
... |
I hope this helps someone:
I solved this but I'm still a little confused.
When I ran :checkhealth from nvim it was confirmed that there was an issue with the TERM variable. It reported that TERM was set to tmux-256color and gave this warning:
WARNING Neither Tc nor RGB capability set. True colors are disabled.
|'term... | Colors different when running nvim through tmux using alacritty config |
1,627,423,012,000 |
How can I search a string in vim and thereby ignoring any whitespace (or particularly line breaks) between any characters?
And probably thereby making a function that can search ignoring all whitespace.
I found a way to ignore whitespace in regex. No really elegant. Just insert \s* between any character. So therefor m... |
The Search for visually selected text topic on the Vim Tips Wiki has a mapping that searches for the current visual selection, irrespective the amount and type of whitespace in between the words. You can use it like the built-in * mapping, to search (ignoring spaces) for the current selection. Very handy!
However, you... | How to search in vim ignoring all whitespace (and making it a function) |
1,627,423,012,000 |
I added and updated Debian's experimental distribution to my source list which should contain neovim 0.5.0-1.
deb http://deb.debian.org/debian experimental main contrib non-free
When I run apt-cache policy neovim I can see only 0.4.4-1
Installed: (none)
Candidate: 0.4.4-1
Version table:
0.4.4-1 500
... |
If you scroll down to the bottom of the neovim package page for experimental, you can see that it’s not available on amd64. That’s because it fails to build there (the build timed out).
A useful tool to figure this out locally is rmadison, in the devscripts package:
$ rmadison neovim
...
neovim | 0.5.0-1 | ... | Why I cannot see and install the latest version of NeoVim 0.5? |
1,627,423,012,000 |
In neovim 0.4.3-3 in normal mode this command :
:put=range(1,4)
will put numbered list from 1 to 4
but when i want to put numbers only in blank lines like this:
:g/^$/norm :put=range(1,14)
it is not working as expected - only highlighting empty lines but put is not working, why ?
|
The :normal command only executes complete commands and your :put Ex command is missing an "Enter" at the end to actually execute it.
From :help :normal:
{commands} should be a complete command. If {commands} does not finish a command, the last one will be aborted as if <Esc> or <C-C> was typed. A : command must be c... | nvim norm command |
1,627,423,012,000 |
How can can I start nvim with a bindsym from i3? If I just type
bindsym $mod+F1 exec nvim
nvim doesn't show, since it just runs in the background without a terminal. So how can I invoke nvim with a keybind in i3?
|
Since you tagged your question as Manjaro and rxvt, I'm supposing that the terminal emulator you're using is rxvt-unicode. In this case, you can use:
bindsym $mod+F1 exec --no-startup-id urxvt -e nvim
Even if you use a different terminal, most emulators have a similar option to execute a command on startup.
| Start nvim with a bindsym in i3 |
1,627,423,012,000 |
I have just finished installing Fedora 36 and was in the process of installing my usual software. I personally prefer nvim over vim, but I got used to typing vim; so, I just use an alias alias vim='nvim' in .bashrc.
Using vim directly uses nvim and uses the init.vim; however, using sudo vim doesn't seem to use any of ... |
As far as I can see, sudo changes your user id, so all configurations you made specifically for your normal user do not apply when you call something with sudo (meaning if you have a .vimrc it will not apply when calling vim with sudo). In addition to that, as far as I know sudo cannot read 'aliases' you created for b... | sudo vim and vim open different editors |
1,627,423,012,000 |
Each time I open NeoVim, I have to type :so .vimrc (it is located inside of my $HOME folder) for it to load the file.
I've tried googling my way out of it, but I can't seem to get any results on what I want to do. The results are stuff like "auto source vimrc when saved", "reload vimrc without restart" etc. and none o... |
The NeoVim editor uses ~/.config/nvim/init.vim.
See the vimrc-intro section in the NeoVim manual.
You could also set VIMINIT to the Ex command so ~/.vimrc to force the sourcing of the ~/.vimrc file, as described in the $MYVIMRC section.
| How can I set NeoVim to automatically source .vimrc? |
1,627,423,012,000 |
I'm trying to run the command:
nvim "./some-file" '+/Text (with/slash)'
But I get the following error:
Error detected while processing command line:
E486: Pattern not found: Text (with
And the command line arguments after running :exe '!tr "\0" " " </proc/' . getpid() . '/cmdline' gives me:
nvim /tmp/.tmpxn2hIQ +/Gi... |
It is not a shell issue. It is nvim doesn't understand this pattern as a valid search pattern. I'm afraid the only solution would be to use backslash:
nvim "./some-file" '+/Text (with\/slash)'
By the way my nvim gives me the different error:
$ cat afile
a
Text (with/slash)
c
$ nvim -u NONE afile '+/Text (with/slash)... | Neovim open file with search pattern not escaped? |
1,627,423,012,000 |
I want to create a simple script to launch nvim (not gvim) in separate terminal window (I'm using urxvt term). Currently I have:
#!/usr/bin/env bash
exec urxvt -hold -e "vim"
It seems legit and works but the problem is that vim theme is not loaded when opening the terminal (probably because .bashrc is not read or so... |
Ok, so I solved the problem. It turned out that -e flag runs a command without actually launching interactive bash shell which means that bash doesn't read .bashrc on startup.
As base16-shell initializes terminal theme (which is indeed a dependency of vim's base16 theme) running a script from a .bashrc in the end nvi... | Exec vim in new urxvt window preserving theme |
1,627,423,012,000 |
I'm using yamlfix with ale in vim.
I followed these steps because I wanted to remove the automatic "---" adding on top of the file every time I save my work (and some others default configurations).
For some reason, the file is correctly fixed, but my configuration is skipped..
So I decided to try with CLI in order to... |
When running yamlfix directly from the command line (or via a shell spawned from Vim, and not via e.g. maison), your TOML configuration file should contain no section headers:
$ cat myconfig.toml
explicit_start = false
You may then run yamlfix from the command line like so:
$ cat test.yml
---
test: some test data
$ ... | yamlfix not using configuration + (neo)vim usage |
1,438,790,520,000 |
I'm trying to use OpenConnect to connect to my company's Cisco VPN (AnyConnect)
The connection seems to work just fine, what I'm not understanding is how to set up routing. I'm doing this from the command line.
I use the default VPN script to connect like this:
openconnect -u MyUserName --script path_to_vpnc_script my... |
This answer is as follows:
Use the following bash wrapper script to call the vpnc-script. In the wrapper script, the routes to be used for the VPN connection can be specified via a ROUTES variable.
#!/bin/bash
#
# Routes that we want to be used by the VPN link
ROUTES="162.73.0.0/16"
# Helpers to create dotted-quad n... | OpenConnect: Setting default routes |
1,438,790,520,000 |
I have ssh and openconnect installed but when I proceed to start or stop the ssh service, I get the following error:
Failed to start ssh.service: Unit ssh.service not found.
Also, when I try sudo apt-get install ssh I get the following:
sudo apt-get install ssh
Reading package lists... Done
Building dependency tree ... |
The ssh binary, the SSH client, is provided by the openssh-client package, which is installed on your system.
The ssh service runs the SSH server, provided by the openssh-server package, which isn’t installed on your system.
The ssh package is a meta-package which installs both the client and the server.
| ssh installed but I get the error: Failed to start ssh.service: Unit ssh.service not found |
1,438,790,520,000 |
I am going to connect to a VPN using openconnect on CEntOS 7 terminal. I only have one terminal because I am on a SSH session. I need to connect to the VPN using openconnect. I do so like this:
openconnect -u username us.myprovider.net
I need to run the VPN in the background and then do other things in the foreg... |
According to the Openconnect documentation, the option you would want to try would be:
-b,--background
Continue in background after startup
| How can I use openconnect in the background |
1,438,790,520,000 |
I have been having some problems with openconnect in my Arch Linux (Antergos to be precise) and I have no idea what's causing it. (Although I'm used to linux and all, I'm very new to VPNs and openconnect.)
I'm trying to connect to my University's VPN via 2 methods. I start by following the instructions, which simply s... |
After I created a tunnel device using this link the CLI approach worked, even though the GUI approach still failed. I also installed networkmanager-vpnc through pacman, but I don't think that is related to anything.
I also found out through the IT people that adding the --http-auth=Basic flag gets rid of some the erro... | Openconnect won't connect in Arch Linux |
1,438,790,520,000 |
I tried using openconnect today for the first time to connect to my organization's VPN. However, once connected, it runs in the foreground of the terminal and the only way I could see to close the connection was to use CTRL-C. Is this an acceptable way to close the openconnect session cleanly? If not, what is the pref... |
Yes, Ctrl-C (i.e. SIGINT) cleanly shuts it down, according to https://www.infradead.org/openconnect/manual.html#heading5.
Personally I run openconnect in a terminal and use Ctrl-C to shut it down; some people might prefer to use NetworkManager, systemd-networkd, etc. to manage openconnect connections.
| How to shut down openconnect cleanly? |
1,438,790,520,000 |
I recently upgraded to fedora 25. Since then my VPN connection via openconnect (Cisco AnyConnect Compatible VPN) ceased to work.
When I now try to define a new equivalent VPN connection, I get the message
Error: unable to load VPN connection editor
This appears under both, Wayland and X. I have
OpenConnect version v7... |
You need to install:
NetworkManager-openconnect-gnome
| openconnect VPN ceased to work after Fedora upgrade |
1,438,790,520,000 |
Currently I am using the following command for executing authentication request to obtain the server certificate (FINGERPRINT) and OpenConnect-Cookie:
openconnect --authenticate --user=<username> "VPN host"
Hereby I always have to enter my password in a later appearing user prompt.
Is there an option available to pa... |
Usually, VPN software does not allow as input the password for a user, because it is considered a security risk.
A possible solution is feeding the password via a pipe as in:
echo -e "Tunnel all\nYourPassword" | openconnect --authenticate --user=<username> "VPN host"
If we are talking about you being interested in th... | OpenConnect: Passing-over user password when executing authentication request? |
1,438,790,520,000 |
I've been working at my company for over a year, and have never had this particular issue with my VPN. Unfortunately, I don't know much about networking so I'm a little confused at what's happening. Here's the behavior on a Fedora 25 workstation totally fresh install.
run sudo openconnect --juniper somevpn.com
cat /... |
Systemd-Resolved usually handles changing /etc/resolv.conf based on the network you're connecting to:
When connecting to a network, it will change /run/systemd/resolve/resolv.conf, in some cases on your system, this file may be symlinked to /etc/resolv.conf - If that is the case, systemd-resolved will change /etc/res... | Namservers reverted to normal shortly after connecting VPN using Openconnect |
1,438,790,520,000 |
I want to access my personal network drive at my university via VPN from home. In the past I have been using NetworkManager for this what worked completely fine. However, recently I moved to ConnMan and I don't know very well how to set it up there.
Thanks to GAD3R I figured out there is a graphical input mask availab... |
Thanks to a comment from GAD3R and the Connman developer mailing list, a friend figured out on how to set up the VPN connection. Although there is still a small error existent we got it work mostly.
1. Initial situation
The following packages have to be installed on your client machine from where you want to access t... | ConnMan: How to set up OpenConnect VPN with CSD-Wrapper correctly? |
1,438,790,520,000 |
On a lightweight Debian machine I am using ConnMan instead of NetworkManager. For this I installed ConnMan based on the following packages:
connman
connman-vpn
cmst
Ethernet, wifi, virtual bridges etc. are working completely fine.
However, it seems to be impossible to graphically add a VPN-connection (openconnect) v... |
To configure your VPN file you can use connman_dmenu:
# apt install suckless-tools
$ git clone https://github.com/march-linux/connman_dmenu.git
$ cd connman_dmenu
# ./connman_dmenu
You will be able to connect/disconnect to the configured VPN from the cmst GUI.
Edit :
cmst (connman-ui) have a VPN Editor , it can be e... | Debian 9: Is there any GUI to add OpenConnect VPN-connection in ConnMan? |
1,438,790,520,000 |
Update: Solved thanks to comment by @NotTheDr01ds
Original question
(Details of the machines I'm using at end)
I connect to a my Uni's VPN using:
sudo /sbin/modprobe tun && sudo openconnect gucsasa1.cent.gla.ac.uk
I get this output:
POST https://gucsasa1.cent.gla.ac.uk/
Got CONNECT response: HTTP/1.1 200 OK
CSTP conn... |
I wasn't able to reproduce this myself using a similar configuration, but it sounds like (and confirmed from the comments) that there may be a mismatch with the termcap and $TERM (st-256color) on the host.
There are a few things I'd try:
First, see if the same issue happens with a different terminal. In this case, g... | In tmux on remote machine, each new line in terminal is indented to the end of the previously displayed line [closed] |
1,438,790,520,000 |
I frequently use the OpenConnect plugin for NetworkManager to access VPN resources. However, each time I activate the VPN profile it asks me if I would like to accept the certificate. Is there a way to pull the remote VPN certificate so I can persistently put it in my trusted certificate store?
I am using nm-applet t... |
As openconnect/anyconnect are ssl based, you might try openssl:
: | openssl s_client -connect example.com:443 -prexit 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p'
the first certificate returned would be the servers, the last certificate would be the ca certificate. you could then copy them to ... | How to pull VPN Certificate to put in Cert Store? |
1,438,790,520,000 |
Take a look at all openconnect versions & this.
What is the correct way to install openconnect(ocserv-0.12.3) package on CentOs 7?
I tried these commands :
sudo yum -y install epel-release
sudo yum repolist enabled
sudo yum info ocserv
But it shows me version 0.12.2, not version 0.12.3!
Now how can i install... |
As version 0.12.3 is EPEL candidate you can install it via downloading the package (RPM) and install it. Or compile it from source. But I will recommend you to install available in EPEL package and do not hurry up. The command you can use is:
wget https://kojipkgs.fedoraproject.org//packages/ocserv/0.12.3/1.el7/x86_64... | What is the correct way to install openconnect(ocserv-0.12.3-1.el7) package on CentOs 7 |
1,438,790,520,000 |
The following bash script is working completely fine:
#!/bin/bash
echo '!PaSsWoRd!' | openconnect --csd-wrapper=/home/user/.cisco/csd-wrapper.sh --authenticate --user=abcde123 --authgroup="tunnel My Company" --passwd-on-stdin vpn.mycompany.com
However, I want to replace the previous input parameters with variables ... |
The lack of quotes around the assignment to a variable containing ! is the problem here. The shell tries to interpret the ! character to run the history expansion first before assigning it to the variable. The quoting should prevent the shell from interpreting the contents within as '..' as special and keep it as-is.
... | Bash-Script: How to insert Variables into Bash-Script? |
1,438,790,520,000 |
I config OpenVPN service on CentOS 7 and Clients could connect to the server with no problem.
the problem occurred when OpenVPN server connect to another VPN(openconnet VPN).at this time clients lost internet while the server has internet.
I added forwarding rule between OpenVPN and OpenConnect in iptables.
-A INPUT -... |
regarding derober comment, it correct.
-A POSTROUTING -s OpenVpnRange -o OpenConnectNICName -j MASQERADE
| OpenVPN client internet lost when connecting OpenVPN server to another VPN while OpenVPN server has the internet |
1,438,790,520,000 |
In OS Windows I used openconnect-gui. After I changed the OS on Debian, I didn't find a version for Debian and I don't understand how to build openconnect-gui for Debian.
|
From the application sources you're linking:
Supported Platforms
Microsoft Windows 7 and newer
macOS 10.11 and newer
This isn't made readily available for Linux.
There is no need to compile a GUI for openconnect, it's already available as a NetworkManager plugin called network-manager-openconnect-gnome at Debian. ... | How to build openconnect-gui? [closed] |
1,438,790,520,000 |
I have VPN network based CentOS 8 with OpenConnect Package. I need to allow VPN clients to use their local internet for browsing instead of server side. Currently all VPN clients utilising server side internet for browsing.
ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default ql... |
it was solved by disabling default route and ad local route in ocserv.conf file
route = xx.xx.xx.0/xx
route = 10.10.10.0/255.255.255.0
route = 192.168.0.0/255.255.0.0
route = fef4:db8:1000:1001::/64
#route = default
| How can i route specific traffic through VPN Client |
1,387,949,048,000 |
I am installing hadoop on my Ubuntu system. When I start it, it reports that port 9000 is busy.
I used:
netstat -nlp|grep 9000
to see if such a port exists and I got this:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN
But how can I get the PID of the process which is holding it?
|
Your existing command doesn't work because Linux requires you to either be root or the owner of the process to get the information you desire.
On modern systems, ss is the appropriate tool to use to get this information:
$ sudo ss -lptn 'sport = :80'
State Local Address:Port Peer Address:Port
LISTEN ... | Finding the PID of the process using a specific port? |
1,387,949,048,000 |
I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.
|
kill -9 (SIGKILL) always works, provided you have the permission to kill the process. Basically either the process must be started by you and not be setuid or setgid, or you must be root. There is one exception: even root cannot send a fatal signal to PID 1 (the init process).
However kill -9 is not guaranteed to work... | What if 'kill -9' does not work? |
1,387,949,048,000 |
Sometimes I want to start a process and forget about it. If I start it from the command line, like this:
redshift
I can't close the terminal, or it will kill the process. Can I run a command in such a way that I can close the terminal without killing the process?
|
One of the following 2 should work:
$ nohup redshift &
or
$ redshift &
$ disown
See the following for a bit more information on how this works:
man nohup
help disown
Difference between nohup, disown and & (be sure to read the comments too)
| How can I run a command which will survive terminal close? |
1,387,949,048,000 |
I want to have a shell script like this:
my-app &
echo $my-app-pid
But I do not know how the get the pid of the just executed command.
I know I can just use the jobs -p my-app command to grep the pid. But if I want to execute the shell multiple times, this method will not work. Because the jobspec is ambiguous.
|
The PID of the last executed command is in the $! shell variable:
my-app &
echo $!
| How to get the pid of the last executed command in shell script? |
1,387,949,048,000 |
I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to terminate its process, then re-run the command. How can I terminate it?
I haven't closed its shell window. But as you know it doesn't stop using Ctrl+C and Ctrl+Z.
|
There are many ways to go about this.
Method #1 - ps
You can use the ps command to find the process ID for this process and then use the PID to kill the process.
Example
$ ps -eaf | grep [w]get
saml 1713 1709 0 Dec10 pts/0 00:00:00 wget ...
$ kill 1713
Method #2 - pgrep
You can also find the process ID us... | How to terminate a background process? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.