Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
0
answers
18
views
xfreerdp multimonitor shows default desktop screen mirrored in fullscreen on CachyOS with KDE Plasma
I'm trying to connect to use remote servers in multi monitor setup with following command ``` xfreerdp3 /d:foobar.intranet /u:myuser /v:xx.xx.xx.31 \ +clipboard +sound -wallpaper /cert:ignore \ /multimon:force /monitors:0,3 ``` The problem is that both monitors are mirrored in full screen and are no...
I'm trying to connect to use remote servers in multi monitor setup with following command
xfreerdp3 /d:foobar.intranet /u:myuser /v:xx.xx.xx.31 \
+clipboard +sound -wallpaper /cert:ignore \
/multimon:force /monitors:0,3
The problem is that both monitors are mirrored in full screen and are not interactable (it's like they show a default desktop without any input).
My monitors are:
❯ xfreerdp3 /list:monitor
* 2560x1440 +2560+0
1920x1080 +7680+0
2560x1440 +5120+0
2560x1440 +0+0
The thing which makes no sense to me is that in the window preview both monitors are rendered correctly but if opened it's still frozen.
I'm using CachyOS with KDE Plasma, both on the newest default release.
Hille
(101 rep)
Aug 6, 2025, 08:49 AM
• Last activity: Aug 6, 2025, 10:37 AM
19
votes
3
answers
10242
views
How can I create a swap file?
I know how to create and use a swap partition but can I also use a file instead? How can I create a swap file on a Linux system?
I know how to create and use a swap partition but can I also use a file instead?
How can I create a swap file on a Linux system?
Vlastimil Burián
(30505 rep)
Oct 26, 2015, 09:47 PM
• Last activity: Aug 6, 2025, 10:04 AM
4
votes
1
answers
2209
views
Disabling gpgcheck with tmprepo plugin
I want to install an rpm from a repo just once and not have to add it to my yum.repos.d/ directory using the tmprepo plugin. However, I’m blocked on how to install an rpm with no gpg signature. The ‘—nogpgcheck’ option doesn’t work with the tmprepo plugin and I need to manually append ‘pkgs_gpgcheck...
I want to install an rpm from a repo just once and not have to add it to my yum.repos.d/ directory using the tmprepo plugin. However, I’m blocked on how to install an rpm with no gpg signature. The ‘—nogpgcheck’ option doesn’t work with the tmprepo plugin and I need to manually append ‘pkgs_gpgcheck=false’ to /etc/yum/pluginconf.d/tmprepo.conf.
sudo yum --tmprepo=http://edge.artifactory.example.com:8000/artifactory/chef_rpms/rhel/chef_rpms.repo --nogpgcheck install chef
## ^^ this fails as —nogpgcheck doesn’t work with tmprepo which defaults to gpgcheck unless I manually edit /etc/yum/pluginconf.d/tmprepo.conf
Any way this can be done when calling yum on command line? I don’t want to go about changing a file on the system for a one-time thing. Thanks!
- Faheem
Faheem
(61 rep)
Sep 9, 2014, 11:57 PM
• Last activity: Aug 6, 2025, 10:04 AM
4
votes
2
answers
35569
views
How to switch nvidia driver from "nouveau" to nvidia proprietary
i'm using Linux Mint. I recently updated my workstation, and from this moment, my drivers went nuts. I was working fine before, with the `nvidia-361` drivers, and, when i finished my updates, and after rebooting the PC, il was running in "software rendering mode". I finally get to have a correct des...
i'm using Linux Mint.
I recently updated my workstation, and from this moment, my drivers went nuts. I was working fine before, with the
nvidia-361
drivers, and, when i finished my updates, and after rebooting the PC, il was running in "software rendering mode".
I finally get to have a correct desktop, but now, i'm quite sure the card isn't fonctionning properly, because i can't launch any simple game with 3D (like blazeRush for example, wich was running fine before).
This is the result of a lspci -vnnn
01:00.0 VGA compatible controller : NVIDIA Corporation GF104 [GeForce GTX 460] [10de:0e22] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd GF104 [GeForce GTX 460] [1458:34fc]
Flags: bus master, fast devsel, latency 0, IRQ 124
Memory at dc000000 (32-bit, non-prefetchable) [size=32M]
Memory at d0000000 (64-bit, prefetchable) [size=128M]
Memory at d8000000 (64-bit, prefetchable) [size=64M]
I/O ports at e000 [size=128]
Expansion ROM at de000000 [disabled] [size=512K]
Capabilities: Power Management version 3
Capabilities: MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14
Capabilities: Virtual Channel
Capabilities: Power Budgeting
Capabilities: Vendor Specific Information: ID=0001 Rev=1 Len=024
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375
As you can see, the kernel driver in use is "nouveau", but i would like to use nvidia_375 instead.
I already tried to purge with apt like this
sudo apt purge *nvidia* xserver-xorg*nouveau* bbswitch*
but when i do that, after a reboot, "nouveau" is still here ... i can try to install again the proprietary drivers, but i will be back in the same situation as before the purge.
I'm running out of options.
Carpette
(399 rep)
Mar 21, 2017, 01:55 PM
• Last activity: Aug 6, 2025, 09:52 AM
0
votes
0
answers
25
views
getting a POSIX file descriptor from a GNU libstdc++ stream
Assuming (on GNU linux, with GNU libstdc++ and C++17 -not C++23- compiled by [GCC](https://gcc.gnu.org/) version 15 or later) I have a `std::ifstream* f;` pointer to a valid input stream (presumably opened). How can I get the POSIX input file descriptor? (e.g. to use [poll(2)](https://man7.org/linux...
Assuming (on GNU linux, with GNU libstdc++ and C++17 -not C++23- compiled by [GCC](https://gcc.gnu.org/) version 15 or later) I have a
std::ifstream* f;
pointer to a valid input stream (presumably opened).
How can I get the POSIX input file descriptor? (e.g. to use [poll(2)](https://man7.org/linux/man-pages/man2/poll.2.html) or [fstat(2)](https://man7.org/linux/man-pages/man2/stat.2.html) ...)
I tried f->get_fd()
and it does not compile.
Same question for std::ofstream
and the POSIX output file descriptor.
Thanks.
Basile Starynkevitch
(10709 rep)
Aug 6, 2025, 09:01 AM
• Last activity: Aug 6, 2025, 09:28 AM
1
votes
1
answers
26
views
Is there a default or recommended directory to store source files ('configure', 'Makefile', etc) of *user* installs?
Suppose I have downloaded the source of some software I want to install *just for myself*, not system-wide; say Emacs or whatever. Typically the source is downloaded zipped, then it's unzipped in some directory. This directory contains files like "Makefile", "LICENSE", "configure", and so on. **Ques...
Suppose I have downloaded the source of some software I want to install *just for myself*, not system-wide; say Emacs or whatever. Typically the source is downloaded zipped, then it's unzipped in some directory. This directory contains files like "Makefile", "LICENSE", "configure", and so on.
**Question: where should such a source directory be stored (for future check or use) within one's $HOME directory?**
I checked the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/) , but I don't manage to recognize any guidelines there – also because I'm a noob and I don't know if such files are considered "data files" or "state files" or other technical denomiations.
A lot of (old) questions ask about where to install the local *executables*, for instance [this question](https://askubuntu.com/q/1148/1519798) or [this question](https://unix.stackexchange.com/q/127076/515980) or [this question](https://unix.stackexchange.com/q/316765/515980) (my system Kubuntu 24.04 confirms that
~/.local/bin
is a good place, it's added to $PATH by default).
Only [this question](https://unix.stackexchange.com/q/362642/515980) asks about the source files, but it seems to refer to system-wide ones, not local-user ones. It seems strange to me to have to save the source in system-wide /usr/src
or the like.
pglpm
(152 rep)
Aug 6, 2025, 08:52 AM
• Last activity: Aug 6, 2025, 09:04 AM
3
votes
5
answers
3494
views
Centos 7 and Windows 10 Dual Boot Grub Not Saving Last Choice
I have a dual boot system with CentOS 7 and Win10. My install was totally vanilla (CentOS then Win10) and went fine. Everything is great except that grub does not appear to save my "last" choice from the boot load menu. I dug through all the grub configuration files (e.g. `/boot/efi/EFI/centos/grub....
I have a dual boot system with CentOS 7 and Win10. My install was totally vanilla (CentOS then Win10) and went fine. Everything is great except that grub does not appear to save my "last" choice from the boot load menu.
I dug through all the grub configuration files (e.g.
/boot/efi/EFI/centos/grub.cfg
) and all the code seems there for recording the last choice.
My /etc/default/grub
shows:
GRUB_TIMEOUT=5
...
GRUB_DEFAULT=saved
...
GRUB_SAVEDEFAULT=true
Is there anything obvious I am missing or need to do to enable this?
My /etc/efi/EFI/centos/grubenv
never apperas to record the latest selection.
It always has:
saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
##########[...snip...padding to 1k]
I can't see this file from a Windows boot, but I did test via the "rescue Centos entry".
I manually set the value in grubenv
to Windows Boot Manager (on /dev/sda2)
(the Windows entry) and this works out okay. However, booting back into CentOS fails to change it.
It just seems I am missing something to enable this "save the last choice" behavior. Any ideas?
Tim
(153 rep)
Apr 21, 2016, 06:34 PM
• Last activity: Aug 6, 2025, 09:00 AM
3
votes
1
answers
2035
views
Xfce Run Preferred Web Browser with Argument
I am running Arch Linux and have Xfce4 installed along with Chromium. I want to make Chromium my default web browser, but unless I pass the option `--user-data-dir=/home/chris`, it doesn't start because I am the root user. I have tried going to `Applications->Settings->Preferred Applications` in Xfc...
I am running Arch Linux and have Xfce4 installed along with Chromium. I want to make Chromium my default web browser, but unless I pass the option
--user-data-dir=/home/chris
, it doesn't start because I am the root user.
I have tried going to Applications->Settings->Preferred Applications
in Xfce and setting the web browser to /usr/bin/chromium "%s" --user-data-dir=/home/chris
(I have also switched "%s"
and the option). However, when I click on the web browser icon in the bottom panel, I get the normal Chromium error (can't run as root) and another error
Failed to Execute default Web Browser - Input/Output Error
So, my question is how can I make Chromium the default web browser and pass the required argument every time it is started?
j_lentini
(131 rep)
Apr 8, 2015, 05:56 PM
• Last activity: Aug 6, 2025, 08:04 AM
2
votes
1
answers
33
views
Debian virsh-install unattended install stuck at "loading initial ramdisk" on first boot after install
Installing Debian on a virtual machine interactively: ``` virt-install --virt-type kvm --name debian-13-x64 \ --memory 4096 \ --vcpus 4 \ --cdrom /mnt/data/iso/debian-testing-amd64-DVD-1.iso \ --os-variant debiantesting \ --disk size=64 ``` Boots into the desktop environment as expected. However, wh...
Installing Debian on a virtual machine interactively:
Before rebooting, I captured the last lines of output from the unattended install log:
virt-install --virt-type kvm --name debian-13-x64 \
--memory 4096 \
--vcpus 4 \
--cdrom /mnt/data/iso/debian-testing-amd64-DVD-1.iso \
--os-variant debiantesting \
--disk size=64
Boots into the desktop environment as expected.
However, when performing an unattended install:
virt-install --virt-type kvm --name debian-13-x64 \
--memory 4096 \
--vcpus 4 \
--os-variant debiantesting \
--disk size=64 \
--graphics none \
--location /mnt/data/iso/debian-testing-amd64-DVD-1.iso \
--initrd-inject /mnt/data/debian-13-preseed.txt \
--extra-args "auto=true priority=critical preseed/file=/debian-13-preseed.txt console=ttyS0,115200n8"
It hangs after the "Loading initial ramdisk" message upon completing the installation and rebooting.

Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/10update-initramfs
Jul 26 22:40:58 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/15cdrom-detect
Jul 26 22:40:58 cdrom-detect: Unmounting and ejecting '/dev/sr0'
Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/20final-message
Jul 26 22:41:10 finish-install: /usr/lib/finish-install.d/20final-message backed up
Jul 26 22:41:10 main-menu: INFO: Menu item 'finish-install' succeeded but requested to be left unconfigured.
Jul 26 22:41:10 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Jul 26 22:41:10 systemd-boot-installer: systemd-boot is only usable on 64bit EFI systems, not amd64/generic
Jul 26 22:41:10 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Jul 26 22:41:10 systemd-boot-installer: systemd-boot is only usable on 64bit EFI systems, not amd64/generic
Jul 26 22:41:21 main-menu: INFO: Menu item 'di-utils-shell' selected
It appears to be attempting to write BIOS to an EFI partition. Why the difference in behavior between interactive and unattended installs? As far as I can tell the selections are the same.
From this I based debian-13-preseed.txt. Here's the content:
#_preseed_V1
#### Contents of the preconfiguration file (for trixie)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US.UTF-8
# Keyboard selection.
d-i keyboard-configuration/xkb-keymap select us
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
### Mirror settings
# Mirror protocol:
# If you select ftp, the mirror/country string does not need to be set.
# Default value for the mirror protocol: http.
#d-i mirror/protocol string ftp
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
### Account setup
# Skip creation of a root account (normal user account will be able to
# use sudo).
d-i passwd/root-login boolean false
# To create a normal user account.
d-i passwd/user-fullname string Debian User
d-i passwd/username string debian
# Normal user's password, either in clear text
d-i passwd/user-password password insecure
d-i passwd/user-password-again password insecure
### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string US/Eastern
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
### Partitioning
# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm: use LVM to partition the disk
# - crypto: use LVM within an encrypted partition
d-i partman-auto/method string lvm
# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# You can choose one of the predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /var, and /tmp partitions
# - server: separate /var and /srv partitions; swap limitted to 1G
# - small_disk: scheme dedicated to small harddrives (under 10GB)
d-i partman-auto/choose_recipe select atomic
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
# This makes partman automatically partition without confirmation.
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
### Base system installation
# Configure APT to not install recommended packages by default. Use of this
# option can result in an incomplete system and should only be used by very
# experienced users.
#d-i base-installer/install-recommends boolean false
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
#d-i base-installer/kernel/image string linux-image-686
### Apt setup
# Choose, if you want to scan additional installation media
# (default: false).
d-i apt-setup/cdrom/set-first boolean false
### Boot loader installation
# Grub is the boot loader (for x86).
# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
# This one makes grub-installer install to the UEFI partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true
# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev string default
### Finishing up the installation
# During installations from serial console, the regular virtual consoles
# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
# line to prevent this.
d-i finish-install/keep-consoles boolean true
# Avoid that last message about the install being complete.
#d-i finish-install/reboot_in_progress note
Dan
(121 rep)
Jul 31, 2025, 03:49 AM
• Last activity: Aug 6, 2025, 07:32 AM
2
votes
2
answers
2270
views
How to create a socket forwarder as a server?
I'm looking for a tool that starts a socket server, and forwards incoming requests on that socket port to another internal one. I found `socat` is able to forward socket ports in general: socat tcp-l:8080,fork,reuseaddr tcp:127.0.0.1:12345 This forwards the "official" port `8080` to internal socket...
I'm looking for a tool that starts a socket server, and forwards incoming requests on that socket port to another internal one.
I found
socat
is able to forward socket ports in general:
socat tcp-l:8080,fork,reuseaddr tcp:127.0.0.1:12345
This forwards the "official" port 8080
to internal socket port 12345
successfully.
BUT: my problem is that clients should be able to connect to port 8080
*even* if internal port 12345
is currently unavailable.
The problem with socat is that it does not seem to create a real socket server, but justs remapps the port, and just puts the port on LISTENING.
I'm looking for a tool that tells the client "You connected successfully, please send me your input". And if my local port 12345
is not available, the clients should get an error when trying to send data.
So in case my local application is down, clients should still be able to establish a connection to that official ort.
Is that possible without having to write my own tool?
membersound
(490 rep)
Jul 8, 2019, 11:22 AM
• Last activity: Aug 6, 2025, 07:06 AM
0
votes
1
answers
2353
views
systemd & python logging
I wrote a simple python3 skript and want to make a service from it. Here are the two files #!/bin/python3 while True: print('True') Systemd Service: [Unit] Description=True Service [Service] Type=simple ExecStart=python3 /root/print_true.py StandardOutput=journal+console [Install] WantedBy=multi-use...
I wrote a simple python3 skript and want to make a service from it. Here are the two files
#!/bin/python3
while True:
print('True')
Systemd Service:
[Unit]
Description=True Service
[Service]
Type=simple
ExecStart=python3 /root/print_true.py
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
The service is starting but i cant see the output anywhere. Not in
-u true-service.service
, not in status true-service
and not in
. I want to have it only in journal but how can i accomplish that? I cant seem to find a working answer.
Nico
(123 rep)
Jun 28, 2020, 08:57 AM
• Last activity: Aug 6, 2025, 06:05 AM
0
votes
1
answers
32
views
How is an overlayfs different from just mounting another disk/partition over a directory?
I have OpenWRT installed on some of my routers and to add additional storage for settings as well as programs that might be installed on the router and maybe logs, OpenWRT recommends you plug storage into it and use an overlayfs. I also have a SBC where I just mount an external drive overtop of my h...
I have OpenWRT installed on some of my routers and to add additional storage for settings as well as programs that might be installed on the router and maybe logs, OpenWRT recommends you plug storage into it and use an overlayfs.
I also have a SBC where I just mount an external drive overtop of my home directory on boot to store the home directory externally off of the SD Card that the bootloader and OS are installed on; since the storage on the external drive is more reliable than the SD Card, despite running slower.
What is the difference between these two strategies? They are both basically Single Board computers with Linux, and when the external drive fails to mount, in both cases we're left with a directory full of the content of the original directory, where the drive would have been mounted before.
The only think I can think of that is different, is that the settings directory for OpenWRT (
/etc
) is being mounted on the external drive, where this is not the case on the SBC.
leeand00
(4927 rep)
Aug 5, 2025, 08:58 PM
• Last activity: Aug 6, 2025, 05:22 AM
5
votes
1
answers
4411
views
How to get DNSMASQ to work?
I'm using Elementary OS Freya (Ubuntu 14.04). I've install DNSMASQ and running the command and getting the error below: $ sudo service dnsmasq start * Starting DNS forwarder and DHCP server dnsmasq dnsmasq: bad command line options: try --help [fail] In the `/var/log/syslog`, I found: Dec 22 10:34:1...
I'm using Elementary OS Freya (Ubuntu 14.04).
I've install DNSMASQ and running the command and getting the error below:
$ sudo service dnsmasq start
* Starting DNS forwarder and DHCP server dnsmasq
dnsmasq: bad command line options: try --help [fail]
In the
/var/log/syslog
, I found:
Dec 22 10:34:10 Marcelo-PC dnsmasq: bad command line options: try --help
Dec 22 10:34:10 Marcelo-PC dnsmasq: FAILED to start up
Running sh -x /etc/init.d/dnsmasq
I get:
marcelo@Marcelo-PC:~$ sh -x /etc/init.d/dnsmasq start
+ set +e
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/dnsmasq
+ NAME=dnsmasq
+ DESC=DNS forwarder and DHCP server
+ ENABLED=1
+ [ -r /etc/default/dnsmasq ]
+ . /etc/default/dnsmasq
+ ENABLED=1
+ CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
+ [ -r /etc/default/locale ]
+ . /etc/default/locale
+ LANG=en_US.UTF-8
+ export LANG
+ test -x /usr/sbin/dnsmasq
+ [ -f /lib/lsb/init-functions ]
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/01-upstart-lsb ]
+ . /lib/lsb/init-functions.d/01-upstart-lsb
+ unset UPSTART_SESSION
+ _RC_SCRIPT=/etc/init.d/dnsmasq
+ [ -r /etc/init//etc/init.d/dnsmasq.conf ]
+ _UPSTART_JOB=dnsmasq
+ [ -r /etc/init/dnsmasq.conf ]
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/50-ubuntu-logging ]
+ . /lib/lsb/init-functions.d/50-ubuntu-logging
+ LOG_DAEMON_MSG=
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ [ ! ]
+ [ != yes ]
+ [ -x /sbin/resolvconf ]
+ RESOLV_CONF=/var/run/dnsmasq/resolv.conf
+ [ ! ]
+ DNSMASQ_USER=dnsmasq
+ test 1 != 0
+ log_daemon_msg Starting DNS forwarder and DHCP server dnsmasq
+ [ -z Starting DNS forwarder and DHCP server ]
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm != x ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput xenl
+ /usr/bin/tput cols
+ COLS=169
+ [ 169 ]
+ [ 169 -gt 6 ]
+ /usr/bin/expr 169 - 7
+ COL=162
+ log_use_plymouth
+ [ n = y ]
+ plymouth --ping
+ printf * Starting DNS forwarder and DHCP server dnsmasq
* Starting DNS forwarder and DHCP server dnsmasq + /usr/bin/expr 169 - 1
+ /usr/bin/tput hpa 168
+ printf
+ start
+ [ ! -d /var/run/dnsmasq ]
+ start-stop-daemon --start --quiet --pidfile /var/run/dnsmasq/dnsmasq.pid --exec /usr/sbin/dnsmasq --test
+ start-stop-daemon --start --quiet --pidfile /var/run/dnsmasq/dnsmasq.pid --exec /usr/sbin/dnsmasq -- -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
dnsmasq: opções inválidas de linha de comando: tente --help
+ return 2
+ log_end_msg 1
+ [ -z 1 ]
+ [ 162 ]
+ [ -x /usr/bin/tput ]
+ log_use_plymouth
+ [ n = y ]
+ plymouth --ping
+ printf \r
+ /usr/bin/tput hpa 162
+ [ 1 -eq 0 ]
+ printf [
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op
+ echo ]
]
+ return 1
+ exit 1
And I can't put the DNSMASQ to work. The only uncommented line in my dnsmasq.conf
is (you can see the entire file here ):
address=/nintendowifi.net/192.168.0.8
How can I see what the problem is?
Marcelo Rodovalho
(161 rep)
Dec 22, 2016, 01:35 PM
• Last activity: Aug 6, 2025, 05:04 AM
36
votes
12
answers
56172
views
How to compare a program's version in a shell script?
Suppose I want to compare `gcc` version to see whether the system has the minimum version installed or not. To check the `gcc` version, I executed the following gcc --version | head -n1 | cut -d" " -f4 The output was 4.8.5 So, I wrote a simple `if` statement to check this version against some other...
Suppose I want to compare
gcc
version to see whether the system has the minimum version installed or not.
To check the gcc
version, I executed the following
gcc --version | head -n1 | cut -d" " -f4
The output was
4.8.5
So, I wrote a simple if
statement to check this version against some other value
if [ "$(gcc --version | head -n1 | cut -d" " -f4)" -lt 5.0.0 ]; then
echo "Less than 5.0.0"
else
echo "Greater than 5.0.0"
fi
But it throws an error:
[: integer expression expected: 4.8.5
I understood my mistake that I was using strings to compare and the -lt
requires integer. So, is there any other way to compare the versions?
Abhimanyu Saharan
(911 rep)
May 27, 2016, 02:01 PM
• Last activity: Aug 6, 2025, 04:04 AM
0
votes
1
answers
2064
views
Advanced access control solutions for managing execution permissions on Fedora systems
I would like to learn about solutions/alternatives for managing execution access to applications in Linux-based systems (specifically Fedora flavours). I already researched possibilities like Integrated Measurement Architecture, fapolicyd, or Microsoft Integrity Policy Enforcement. I am more interes...
I would like to learn about solutions/alternatives for managing execution access to applications in Linux-based systems (specifically Fedora flavours).
I already researched possibilities like Integrated Measurement Architecture, fapolicyd, or Microsoft Integrity Policy Enforcement.
I am more interested in solutions with more capabilities than simply comparing the hash value of the executable against a known list, but at this point pretty much any suggestion is welcome.
The purpose for which I need this mechanism is to enforce the users of specific machines (which I own and manage) to only be able to execute code that I have authorised them to.
Tedy S.
(1 rep)
Nov 13, 2020, 02:08 PM
• Last activity: Aug 6, 2025, 04:04 AM
8
votes
1
answers
2401
views
Tmpfs with overflow on disk?
I'm looking for a way to have a tmpfs-like file system that can be unlimited in size, but will use a specified amount of RAM after which the "oversize" data will be stored on another disk-backed filesystem [![tmpfs][1]][1] I'm running on a SSD-only system, with low available space (usually < 3 GB),...
I'm looking for a way to have a tmpfs-like file system that can be unlimited in size, but will use a specified amount of RAM after which the "oversize" data will be stored on another disk-backed filesystem
I'm running on a SSD-only system, with low available space (usually < 3 GB), so I don't want to reserve any space for SWAP or similar (that's my main requirement)
Do you know of any solution that would fit my use-case ?
mickael9
(181 rep)
Apr 22, 2016, 10:12 PM
• Last activity: Aug 6, 2025, 03:08 AM
3
votes
2
answers
2283
views
Btrfs, checksum corruption
I have Btrfs setup on 3 disks with metadata and data in RAID1. But now I have a checksum error which it cannot recover. The checksum is the same on both copies and only differs from the expected checksum by one flipped bit. Therefore I suspect there was a bitflip on the checksum before it was writte...
I have Btrfs setup on 3 disks with metadata and data in RAID1. But now I have
a checksum error which it cannot recover.
The checksum is the same on both copies and only differs from the expected checksum
by one flipped bit. Therefore I suspect there was a bitflip on the checksum
before it was written to the disks (the computer does not have ECC RAM).
I have a copy of the actual file on another computer from before it was written
to this filesystem but as shown below I cannot read out the data due to I/O
error from the filesystem so I cannot compare them.
How should I go on to fix this error?
Some details:
$ uname -a
Linux stan 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v4.15.1
$ sudo btrfs fi usage /media/btrfs/
Overall:
Device size: 7.28TiB
Device allocated: 3.91TiB
Device unallocated: 3.36TiB
Device missing: 0.00B
Used: 3.83TiB
Free (estimated): 1.72TiB (min: 1.72TiB)
Data ratio: 2.00
Metadata ratio: 2.00
Global reserve: 512.00MiB (used: 0.00B)
Data,RAID1: Size:1.95TiB, Used:1.91TiB
/dev/sdb 1.95TiB
/dev/sdc 998.00GiB
/dev/sdd 1001.00GiB
Metadata,RAID1: Size:4.00GiB, Used:2.63GiB
/dev/sdb 4.00GiB
/dev/sdc 3.00GiB
/dev/sdd 1.00GiB
System,RAID1: Size:64.00MiB, Used:304.00KiB
/dev/sdb 64.00MiB
/dev/sdc 64.00MiB
Unallocated:
/dev/sdb 1.68TiB
/dev/sdc 861.95GiB
/dev/sdd 861.02GiB
Scrub:
$ sudo btrfs scrub status /media/btrfs/
scrub status for xxxxxx
scrub started at Mon Aug 24 11:23:27 2020 and finished after 03:41:54
total bytes scrubbed: 3.81TiB with 2 errors
error details: csum=2
corrected errors: 0, uncorrectable errors: 2, unverified errors: 0
Dmesg error after scrub.
$ dmesg
...
196755.786038] BTRFS warning (device sdb): checksum error at logical 3099310968832 on dev /dev/sdb, physical 1300730499072, root 5223, inod
e 6521311, offset 7614464, length 4096, links 1 (path: users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2)
[196755.786168] BTRFS warning (device sdb): checksum error at logical 3099310968832 on dev /dev/sdb, physical 1300730499072, root 5303, inod
e 6521311, offset 7614464, length 4096, links 1 (path: users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2)
[196755.786245] BTRFS warning (device sdb): checksum error at logical 3099310968832 on dev /dev/sdb, physical 1300730499072, root 5302, inod
e 6521311, offset 7614464, length 4096, links 1 (path: users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2)
...
[196755.788274] BTRFS error (device sdb): bdev /dev/sdb errs: wr 0, rd 0, flush 0, corrupt 2, gen 0
[196755.814044] BTRFS error (device sdb): unable to fixup (regular) error at logical 3099310968832 on dev /dev/sdb
Inspect-internal on block:
$ sudo btrfs inspect-internal logical-resolve -v 3099310968832 /media/btrfs/
ioctl ret=0, total_size=4096, bytes_left=3456, bytes_missing=0, cnt=78, missed=0
ioctl ret=0, bytes_left=4023, bytes_missing=0, cnt=1, missed=0
/media/btrfs//snapshots/stansafe.20200601T032501+0200/users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2
ioctl ret=0, bytes_left=4023, bytes_missing=0, cnt=1, missed=0
/media/btrfs//snapshots/stansafe.20200910T032501+0200/users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2
ioctl ret=0, bytes_left=4023, bytes_missing=0, cnt=1, missed=0
/media/btrfs//snapshots/stansafe.20200909T032502+0200/users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2
...
Trying to verify the file:
$ sha256sum /media/btrfs//stansafe/users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2
sha256sum: /media/btrfs//stansafe/users/joachim/Bilder/Canon/270CANON/IMG_7003.CR2: Input/output error
$ dmesg
...
[1642985.509498] BTRFS warning (device sdb): csum failed root 259 ino 6521311 off 7614464 csum 0x151ad4ce expected csum 0x150ad4ce mirror 1
[1642985.509942] BTRFS warning (device sdb): csum failed root 259 ino 6521311 off 7614464 csum 0x151ad4ce expected csum 0x150ad4ce mirror 2
jlublin
(31 rep)
Sep 10, 2020, 05:59 AM
• Last activity: Aug 6, 2025, 02:06 AM
0
votes
1
answers
2911
views
Connect to RemoteApp Linux Mint 18.3
At our company we run a Remote Desktop Gateway with RemoteApps Does anyone have a good and easy way to connect and use these from within Linux Mint 18.3? Been trying different things and a work around is an openVPN server and just connect directly to the Domain Controller and Remote Desktop Server....
At our company we run a Remote Desktop Gateway with RemoteApps
Does anyone have a good and easy way to connect and use these from within Linux Mint 18.3?
Been trying different things and a work around is an openVPN server and just connect directly to the Domain Controller and Remote Desktop Server.
It would how ever be very neat to be able to just launch the RemoteApp instead.
Datmocc
(1 rep)
Feb 1, 2018, 09:58 AM
• Last activity: Aug 6, 2025, 01:03 AM
0
votes
4
answers
1869
views
create variables from CSV with varying number of fields
Looking for some help turning a CSV into variables. I tried using IFS, but seems you need to define the number of fields. I need something that can handle varying number of fields. *I am modifying my original question with the current code I'm using (taken from the answer provided by hschou) which i...
Looking for some help turning a CSV into variables. I tried using IFS, but seems you need to define the number of fields. I need something that can handle varying number of fields.
*I am modifying my original question with the current code I'm using (taken from the answer provided by hschou) which includes updated variable names using type instead of row, section etc.
I'm sure you can tell by my code, but I am pretty green with scripting, so I am looking for help to determine if and how I should add another loop or take a different approach to parsing the typeC data because although they follow the same format, there is only one entry for each of the typeA and typeB data, and there can be between 1-15 entries for the typeC data. The goal being only 3 files, one for each of the data types.
Data format:
Container: PL[1-100]
TypeA: [1-20].[1-100].[1-1000].[1-100]-[1-100]
TypeB: [1-20].[1-100].[1-1000].[1-100]-[1-100]
TypeC (1 to 15 entries): [1-20].[1-100].[1-1000].[1-100]-[1-100]
*There is no header in the CSV, but if there were it would look like this (Container, typeA, and typeB data always being in position 1,2,3, and typeC data being all that follow): Container,typeA,typeB,typeC,tycpeC,typeC,typeC,typeC,..
CSV:
PL3,12.1.4.5-77,13.6.4.5-20,17.3.577.9-29,17.3.779.12-33,17.3.802.12-60,17.3.917.12-45,17.3.956.12-63,17.3.993.12-42
PL4,12.1.4.5-78,13.6.4.5-21,17.3.577.9-30,17.3.779.12-34
PL5,12.1.4.5-79,13.6.4.5-22,17.3.577.9-31,17.3.779.12-35,17.3.802.12-62,17.3.917.12-47
PL6,12.1.4.5-80,13.6.4.5-23,17.3.577.9-32,17.3.779.12-36,17.3.802.12-63,17.3.917.12-48,17.3.956.12-66
PL7,12.1.4.5-81,13.6.4.5-24,17.3.577.9-33,17.3.779.12-37,17.3.802.12-64,17.3.917.12-49,17.3.956.12-67,17.3.993.12-46
PL8,12.1.4.5-82,13.6.4.5-25,17.3.577.9-34
Code:
#!/bin/bash
#Set input file
_input="input.csv"
# Pull variables in from csv
# read file using while loop
while read; do
declare -a COL=( ${REPLY//,/ } )
echo -e "containerID=${COL}\ntypeA=${COL}\ntypeB=${COL}" >/tmp/typelist.txt
idx=1
while [ $idx -lt 10 ]; do
echo "typeC$idx=${COL[$((idx+2))]}" >>/tmp/typelist.txt
let idx=idx+1
#whack off empty variables
sed '/\=$/d' /tmp/typelist.txt > /tmp/typelist2.txt && mv /tmp/typelist2.txt /tmp/typelist.txt
#set variables from temp file
. /tmp/typelist.txt
done
sleep 1
#Parse data in this loop.#
echo -e "\n"
echo "Begin Processing for $container"
#echo $typeA
#echo $typeB
#echo $typeC
#echo -e "\n"
#Strip - from sub data for extra parsing
typeAsub="$(echo "$typeA" | sed 's/\-.*$//')"
typeBsub="$(echo "$typeB" | sed 's/\-.*$//')"
typeCsub1="$(echo "$typeC1" | sed 's/\-.*$//')"
#strip out first two decimils for extra parsing
typeAprefix="$(echo "$typeA" | cut -d "." -f1-2)"
typeBprefix="$(echo "$typeB" | cut -d "." -f1-2)"
typeCprefix1="$(echo "$typeC1" | cut -d "." -f1-2)"
#echo $typeAsub
#echo $typeBsub
#echo $typeCsub1
#echo -e "\n"
#echo $typeAprefix
#echo $typeBprefix
#echo $typeCprefix1
#echo -e "\n"
echo "Getting typeA dataset for $typeA"
#call api script to pull data ; echo out for test
echo "API-gather -option -b "$typeAsub" -g all > "$container"typeA-dataset"
sleep 1
echo "Getting typeB dataset for $typeB"
#call api script to pull data ; echo out for test
echo "API-gather -option -b "$typeBsub" -g all > "$container"typeB-dataset"
sleep 1
echo "Getting typeC dataset for $typeC1"
#call api script to pull data ; echo out for test
echo "API-gather -option -b "$typeCsub" -g all > "$container"typeC-dataset"
sleep 1
echo "Getting additional typeC datasets for $typeC2-15"
#call api script to pull data ; echo out for test
echo "API-gather -option -b "$typeCsub2-15" -g all >> "$container"typeC-dataset"
sleep 1
echo -e "\n"
done < "$_input"
exit 0
Speed isnt a concern, but if I've done anything really stupid up there, feel free to slap me in the right direction. :)
Jdubyas
(45 rep)
Jul 12, 2017, 05:09 AM
• Last activity: Aug 6, 2025, 12:04 AM
1
votes
1
answers
44
views
`echo 2 > /proc/sys/vm/drop_caches` decreases active pages
Before running `echo 2 > /proc/sys/vm/drop_caches` the active page count was: ``` Active(anon): 36185016 kB ``` after the flush, active page count became: ``` Active(anon): 26430472 kB ``` every other meminfo metrics stayed mostly the same and the system shows that 10GB of ram was freed. These 10GB...
Before running
echo 2 > /proc/sys/vm/drop_caches
the active page count was:
Active(anon): 36185016 kB
after the flush, active page count became:
Active(anon): 26430472 kB
every other meminfo metrics stayed mostly the same and the system shows that 10GB of ram was freed. These 10GB are not attributed to any of the processes.
What could explain such behavior? I am running on kernel 6.8.
Update:
This happens when **madvise(MADV_DONTNEED)** is used to decommit RSS. If I use *MADV_FREE* instead then surpringly I do not see **hidden** kernel memory and total used memory is tightly correlated with the RSS of the main process.
Roman
(111 rep)
Aug 3, 2025, 06:56 PM
• Last activity: Aug 5, 2025, 11:07 PM
Showing page 2 of 20 total questions