date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,401,581,406,000 |
I'm thinking about restarting a client's Apache server, but I'm reluctant to do so because I know he's currently running HTTPS and I don't want to get stuck with the server prompting me for the SSL Passphrase (which I don't have and he's not sure if there is one or not).
Is there a quick/easy way to check whether Apac... |
You could check whether the private key is password protected by running
$ openssl rsa -in /path/to/private.key -check -noout
If this prompts you for the password, the key is obviously password protected.
| Checking if Apache requires SSL pass-phrase |
1,401,581,406,000 |
In XFCE4, there is a list of items to be started when an XFCE4-session is started
(XFCE4 Settings xfce4-settings-manager → Tab "Application Autostart"):
I'm wondering where this list is stored.
In ~/.config/autostart I have three .desktop files, which are available in the aforementioned list, but there are many more ... |
The entries you see are populated from:
~/.config/autostart (user-specific)
and
/etc/xdg/autostart/ (system-wide)
If you want to disable something from the second system-wide location, you create the appropriate entry to your start-up directory with this content:
[Desktop Entry]
Hidden=true
E.g. I have /etc/xdg/autos... | XFCE4 - Session and Startup: where are autostart items saved? |
1,401,581,406,000 |
I'm talking about files like ~/.foo found on a user's home dir. I'm working on a program that reads from such a file, and I'd also like to clean up my user root directory if I can.
Is there a POSIX-specified variable, such as ~/$(conf) where config like .emacs can be found?
|
POSIX
Searching through the specification for the strings "user config" or "configuration files" turned up zero hits, so I would say no it doesn't specify this in any way.
http://pubs.opengroup.org/onlinepubs/9699919799/
FHS
Looking at the FHS - Filesystem Hierarchy Standard it had this bit:
User specific configura... | Is there a standards-specified location for user configuration files? |
1,401,581,406,000 |
I am deploying systems that must be configured using the Red Hat 6 (v1r2) Security Technical Implementation Guide(STIG) published by the Defense Information Systems Agency (DISA).
Link to site.
I've started developing a Kickstart file to automate many of these settings based on other KS files I've found via Google.
Do... |
I have some scripts that are probably still "beta" from a project on GitHub by the RedHatGov organization (Red Hat, Inc. government sector employees).
https://github.com/RedHatGov
While their project is not complete, nor universally applicable, it is a great start and I plan on forking, contributing, and requesting pu... | Automate DISA STIG controls for RHEL/CentOS? |
1,401,581,406,000 |
I have a VPS running Ubuntu 13.10 on Digital Ocean.
I'd like to install postfix on the server, but I want it to be able to send e-mails only to my e-mail address whenever a system message wants to be sent to root.
Now I have my postfix installed as local only. This sends the messages to /var/mail/root.
Instead, I'd li... |
There are several ways to do this
Using SSMTP:
You can find a detailed article here. (Please consider Zulakis' comment below regarding security: I let ssmtp solution here for your knowledge, but prefer postfix solution)
Install ssmtp
sudo aptitude install ssmtp
Edit the configuration file:
sudo vim /etc/ssmtp/ssmtp.c... | How to install postfix for sending mails to admin only? |
1,401,581,406,000 |
What would be the best way to set Vim up to always put the cursor in insert mode at the end of the first line (to account for commit message templates) when running git commit? This would basically do something identical to pressing ggA every time. Ideally this should be a Vim configuration (presumably in ~/.vim/after... |
Adapting one of the autocommands given in the Vim Wikia, this seems to work fine with git commit -t /tmp/COMMIT_EDITMSG for me:
" ~/.vim/ftplugin/gitcommit.vim
au! VimEnter COMMIT_EDITMSG exec 'norm gg' | startinsert!
I used exec 'norm gg' | instead 1 | because :1 | is equivalent to :1p | and there's a small delay as... | How to start Vim in insert mode at end of first line when committing Git changes? |
1,401,581,406,000 |
In previous versions of gtk it was easy to launch one instance of an application with default gtk settings:
GTK2_RC_FILES= epdfview
But for version 3, it won't work anymore:
GTK3_RC_FILES= evince
has no effect. Is this convenience definitely gone?
|
Ok the implementation has changed and details can be found in the documentation for the GtkCssProvider class. To use plain default settings, one can now use following:
GTK_DATA_PREFIX= gtk3-app
| Launch a GTK3 aplication without customized gtk settings? |
1,401,581,406,000 |
I'm configuring a CentOS7 host (through ansible) running authconfig. Now I need to add/configure pam_exec module to the setup but it seems it is not supported by authconfig (cf. man authconfig and /etc/sysconfig/authconfig).
I'm afraid (as mentioned in some /etc/pam.d/*conf headers) subsequent authconfig call will ove... |
authconfig will only change the PAM configuration in the /etc/pam.d/*-ac files. Those files are not included directly into the configuration of individual services, but via a symbolic link. For example, /etc/pam.d/system-auth-ac is by default linked as /etc/pam.d/system-auth, and the include lines in files like /etc/p... | How to make changes to pam config such that further execution of authconfig will not overwrite them? |
1,401,581,406,000 |
Is it possible to automatically run "source .bashrc" every time when I edit the bashrc file and save it?
|
One way, as another answer points out, would be to make a function that replaces your editor call to .bashrc with a two-step process that
opens your editor on .bashrc
sources .bashrc
such as:
vibashrc() { vi $HOME/.bashrc; source $HOME/.bashrc; }
This has some shortcomings:
it would require you to remember to type... | How to run "source .bashrc" automatically after I edit and save it? |
1,401,581,406,000 |
I want to use different dns server (not tor, any dns server I set) for certain terminal command.
Say it would looks like
$ DNS_SERVER=8.8.8.8 dnsify ping example.com
and it uses Google dns.
I know there's socksify, torrify and other tools like that. I look for any tool, hack, or other way I can set it explicitly for ... |
I'm not aware of any method to override the system resolvers simply by using environment variables. You can override resolv.conf options using RES* environment variables but those can't be used to override the nameserver definitions (see the resolv.conf manual page for more information).
The best option would be to u... | Proxify dns queries at the command-line |
1,401,581,406,000 |
Some Emacs keyboard shortcuts are intercepted by KDE. I know that KDE lets you configure keyboard shortcuts via GUI, but I am tired of sifting every time all the menus. I would like to open the files where KDE stores its shortcuts, both at the system level and at the user level, and change all the shortcuts that int... |
The global ones are in ~/.kde4/share/config/kglobalshortcutsrc.
Different apps/services may have specific ones in their own config files - many in the same dir.
Note: the ~/.kde4 path is seen on OpenSUSE, on other distributions the path may exist under ~/.kde instead.
| Where does KDE 4 store its keyboard shortcuts? |
1,401,581,406,000 |
This question is about best practices. I know logging in over secure shell or switching users su, and su -l have different effects. Also, in the event you make a typo in the configuration, you still want to be able to log in. Where is/are the/some ideal place/s to store color definitions? At the moment I have them in... |
I would put environment variables in .bash_login or .bash_profile, since they are (when exported) inherited to subshells and don't need to be reset for every shell invocation. Not that resetting them would cost practically anything, but in case I want to set an envvar to something else for the duration of a subshell. ... | Where should I save color codes for the PS1 command line / terminal? [closed] |
1,401,581,406,000 |
How to enable promiscuous mode on network adapter. I have tried by adding PROMISC=yes in /etc/sysconfig/network-scripts/ifcfg-ensxxx
but no effect even after network restart or rebooting the system.
|
CentOS 7 /usr/share/doc/initscripts-9.49.24/sysconfig.txt says:
No longer supported:
PROMISC=yes|no (enable or disable promiscuous mode)
ALLMULTI=yes|no (enable or disable all-multicast mode)
So for enabling you have to run:
ip link set ethX promisc on
Or if you want to happen on boot you can use systemd servic... | Enable Promiscous mode in CentOS 7 |
1,401,581,406,000 |
Since linux 2.6.30, filesystems are mounted with "relatime" by default. In this discussion, Ingo Molnar says he has added the CONFIG_DEFAULT_RELATIME kernel option, which:
makes 'norelatime' the default for all mounts without an extra kernel
boot option.
I don't really get it, I wonder if that means that without C... |
Ingo Molnar proposed a patch, but this patch wasn't accepted into the kernel tree. Linus Torvalds made relatime the default setting in 2.6.30, unconditionally, and this is still true in 3.0. If you want relatime to default off in the kernel, you need to apply Ingo Molnar's patch in your copy of the source.
| How to configure CONFIG_DEFAULT_RELATIME to disable relatime |
1,401,581,406,000 |
Many configuration files are based on the format Key value or Key=value with one line for each of them.
Many packages provide a default configuration file where theses available configuration keys are already written with their default value and/or are commented.
I'm wondering if there is a tool that allows to change... |
as far as i know there is no generic config line changer tool. i imagine it would be hard to create such a tool because there are so many different config file syntaxes.
if you want to change a specific value in a specific config file then you can write a specialized tool for that specific task.
here are two examples ... | Command line for editing a configuration file value without an interactive editor |
1,401,581,406,000 |
On NixOS, I'm using a FHS environment to supply libraries (unixODBC and sqlite-odbc) to libreoffice.
{ pkgs ? import <nixpkgs> {} }:
( pkgs.buildFHSUserEnv {
name = "odbc-sqlite-libreoffice";
targetPkgs = pkgs: with pkgs; [libreoffice unixODBC unixODBCDrivers.sqlite];
}).env
However, this works in conjunction wi... |
So I decided to look into the source, since the documentation is pretty terrible.
Apparently, if you add to buildTargets a derivation outputting files in /etc or /var folders, buildFHSUserEnv will automatically copy them to their respective places in the FHS environment.
For my situation, I wrote a simple derivation t... | NixOS: Modifying config files on a buildFHSUserEnv environment |
1,401,581,406,000 |
Similar to this question, I have some applications (Calibre, texdoc) open PDFs with Mendeley. Opening PDFs from Thunar, Thunderbird, Firefox etc. opens evince, the expected default.
It seems that those applications use xdg-open since:
$ xdg-mime query default application/pdf
mendeleydesktop.desktop
I tried to find wh... |
The question remains: where did xdg-open get the idea that Mendeley should
be the default PDF viewer from?
This is an eminently reasonable question.
Here's a somewhat long answer in three parts.
Option 1: read the documentation
For example, the FreeDesktop standard
on mimetype associations has this to say:
Associat... | Why does xdg-open use Mendeley as default for PDFs? |
1,401,581,406,000 |
I want to do a backup of my cups configuration to transfer it to a new system. But where does cups actually store the printer settings? I've watched /etc/cups/ but the only thing that happened when adding a new printer was that the PPD was added to /etc/cups/ppd/.
Edit: A remark, the configuration actually is in /etc/... |
In Debian Jessie, the whole configuration is in /etc/cups:
classes.conf
interfaces
raw.convs
subscriptions.conf
cups-browsed.conf
ppd
raw.types
subscriptions.conf
cupsd.conf
printers.conf
snmp.conf
cups-files.conf
ssl
Is your system "non-linux"?
| Where does cups store its configuration? |
1,401,581,406,000 |
I would like to protect my laptop from thieves. I would configure Prey, but I can't find any tutorial for Debian/Ubuntu users. I tried to go to the control panel on the project, but whenever I try to add a device, the server redirect me to download page. I have no idea how to go ahead. Who can help me? I have installe... |
Go to https://panel.preyproject.com/login and register for an account.
A free account will allow you to track three devices.
After registering and logging in, you will find an api key on your account
page. Add the api key in the config file /etc/prey/config.
Then just be patient.
The default install on Debian (jessie... | Prey anti-theft configuration on Debian |
1,401,581,406,000 |
I'm trying to send mail from shell(GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)) using;
mail [email protected]
After I complete the command, the mail won't show up in the mailbox. What could be wrong, how can I check is my configuration is correct. Thanks.
|
Like every unix program that occasionally has cause to send email notifications, mail assumes that there is a functioning MTA on localhost that is 1) capable of accepting mail and 2) knows how to pass it on.
To find out what mail server you're running, try telnet localhost 25 and look at the identifier string.
The com... | How to send mail? |
1,401,581,406,000 |
As a rule in the Debian 10 hardening guide, and various other audit guides of the Center for Internet Security (CIS), setting the use_pty sudoers option is recommended for the following rationale:
Attackers can run a malicious program using sudo which would fork a background process that remains even when the main pr... |
When you're using the command-line through a serial port or other character-oriented device, you're doing so through a terminal (tty). Any programs connected to you through that terminal have a connection to that terminal via one or more open file descriptors (typically, their stdin, stdout, and stderr "files" at fd n... | How does the use_pty sudoers option prevent a persistence attack? |
1,401,581,406,000 |
In order to make the statically assigned IP work, I have already modified the file /etc/sysconfig/network-scripts/ifcfg-eth0 as follows:
DEVICE=eth0
IPADDR=10.33.17.143
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
Any other configuration files that I might need to take care of before the static IP could be used?... |
You may also need to set a default route (often known as your default gateway) in /etc/sysconfig/network-scripts/route-eth0 as follows:
default via 1.2.3.4
Just make sure you substitute the correct Default Gateway for 1.2.3.4 otherwise Bad Things Will Happen... ;)
| Changing Redhat Network Settings From DHCP to STATIC IP Via Configuration Files |
1,330,601,237,000 |
I am working on an audio stream between two virtual servers. For that, I have set up a dummy soundcard (as the vservers don't have a hw card) using modprobe snd-dummy.
That seems to work fine - I am able to tweak volume levels using alsamixer. Unfortunately, I am not able to record any playback. I used arecord -r 4800... |
arecord will record from your sound card, which is a dummy, so its not surprising it contains rubbish. You want to record from the network. There are lots of ways to do that, but snd-dummy won't help. You could try pulse-audio - it has good support for network sound, or you could use jack audio - a bit harder to set-u... | ALSA dummy device - how to configure? |
1,330,601,237,000 |
I fear I may have to revert to system defaults if I can't get this sorted out.
I'm trying to set various system configurations for more robust ext4 for a single-user desktop environment. Trying to assign desired configuration settings where they will take effect properly.
I understand that some of these should be incl... |
Given the discussion that has transpired as comments on my original post, I am prepared to conclude that the many changes to the Kernel over the 2+ years since my original install of the UbuntuMATE 20.04 LTS distro are the source of the differences in behaviour observed by the set of 8 ext4 filesystems that were creat... | OS seems to apply ext4 filesystem options in arbitrary fashion |
1,330,601,237,000 |
I am using RHEL6, but I could not find the Ethernet interface configuration file ifcfg-eth0 under /etc/sysconfig/network-scripts. Issuing ifconfig -a shows that eth0 does exist. Could it be that the configuration file is hidden or saved in some other directory? If not, could I create such a file in the default directo... |
You could find an example in /usr/share/doc*/initscript*, can't remember the exact name, but I'll provide a comprehensive example here:
All fields are fairly easy to understand
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.0.1.0
NETMASK=255.255.255.0
IPADDR=10.0.1.27
Docs here
| Where could I find the ifcfg-eth0 file? |
1,330,601,237,000 |
We have the following line in a file on Linux:
discovery.uri=http://master.navada.com:8800
we want to add the word koko before master, so I just do:
sed –i 's/master/kokomaster/' file
which gives:
discovery.uri=http://kokomaster.navada.com:8800
but what we want is to add koko only if koko isn't already present befo... |
You can replace a bit more to avoid this problem:
sed -i sX/masterX/kokomasterX file
This replaces “/master”, so the next time you run it, nothing will be replaced, since “/kokomaster” doesn’t match.
| sed + add word before string only if not exists |
1,330,601,237,000 |
Ok this may not be a very concrete question, and is perhaps subject to taste, yet I'm struggling to get this right so here it goes.
I have a computer.
This computer has linux on it (thank god). Arch Linux to be specific (with awesome wm).
I am the single user on this computer.
As to good practice I've set up two users... |
One day you're going to change your computer, or to give someone else (a family member, for example) an account on your computer.
If you want to keep a setting on your next computer, put it in your home directory.
If the other person might want a different setting, put it in your home directory.
If the setting is com... | configuration ethics (esthetics): /etc vs $HOME |
1,330,601,237,000 |
After moving the hard drive of a makeshift server to another compatible hardware (64-bit, same processor "generation", laptop->desktop) configuration, networking fails to initiate.
Specifically:
ifconfig only shows lo
sudo service networking restart shows:
-
stop: unknown instance:
networking stop/waiting
quite obv... |
One of the things to look out for when cloning Linux systems is udev's persistent network device naming rules.
udev may create and update the file /etc/udev/rules.d/70-persistent-net.rules to map MAC addresses to interface names. It does this with the script /lib/udev/write_net_rules. Each MAC address (with some excep... | No eth0 after HD transplant |
1,330,601,237,000 |
I'd like to reset the timezone through editing /etc/timezone. However, after I was done editing and saved the file, the system time did not change accordingly.
On the other hand, when I take advantage of the command dpkg-reconfigure tzdata to change the timezone, the time will change immediately. Plus, the /etc/timezo... |
Take a look at /var/lib/dpkg/info/tzdata.postinst, which I think is what is being run when dpkg-reconfigure tzdata is called.
Note in particular the following command, which runs after /etc/timezone has been updated.
cp -f /usr/share/zoneinfo/$AREA/$ZONE /etc/localtime.dpkg-new && \
mv -f /etc/localtime.dp... | How to make an Ubuntu time zone change stick? |
1,330,601,237,000 |
I am configuring the Linux kernel version 3.9.4. I am being asked questions about RCU (seen below). Specifically, what are each of these and what are the advantages and disadvantages of enabling or disabling some of these?
Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?]
Tree-based hierarchi... |
There are some details about these options over on the LTTng Project site. RCU's are (read-copy-update). These are data structures in the kernel which allow for the same data to be replicated across cores in a multi-core CPU and they guarantee that the data will be kept in sync across the copies.
excerpt
liburcu is ... | Understanding RCU when Configuring the Linux Kernel |
1,330,601,237,000 |
So there is a directory full of torrent files:
debian.iso.torrent
fedora.iso.torrent
I can start downloading them with a:
rtorrent *.torrent
command, when the working directory is the same where the torrents are.
But. Every time when I start rtorrent in this way it calculates all the hashes..it takes looong time ... |
You can set up a "session directory" so that some data is stored and, when you exit rtorrent cleanly, you can open it without going through the hashing.
According to the manpage, this can be done using the -s path option, so -s ~/torrentdir would use that as session directory. But you probably want to set this through... | How to add a torrent to a running rtorrent download? |
1,330,601,237,000 |
I want to uninstall tmux on my machine. My tmux version is:
tmux next-3.4
and which tmux gives me:
/usr/local/bin/tmux
I tried to uninstall it with sudo yum remove tmux, and I get:
Updating Subscription Management repositories.
No match for argument: tmux
No packages marked for removal.
Dependencies resolved.
Nothin... |
You didn't install a tmux package, you compiled and installed tmux yourself - so the package management tools, e.g. yum, know nothing about your self-installed version of tmux.
In short: you installed it manually, you'll have to uninstall it manually.
Some possibilities that might make this easier:
Some programs come... | How do you uninstall a package that you manually cloned from git |
1,330,601,237,000 |
I made a short script which can export various KDE settings from user home directory to use as a basis for a quick setup of the desktop environment on a different machine.
I was successful with all the settings that were of interest to me, but only one is elusive: I can't seem to find where the chosen keyboard layout... |
After some time of searching and playing with grep, I was able to locate the configuration file: ~/.config/kxkbrc.
| Where does KDE 5 store user-specific keyboard layout choices? |
1,330,601,237,000 |
I have a computer (in fact, a Banana Pi Pro) with a touchscreen which I have configured to emulate the right click via xorg.conf:
Section "InputClass"
Identifier "Touchscreen"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "750"
Option "EmulateThirdButtonThreshold" "30"
EndSection
... |
xinput controls input settings. It has the same role for input that xrandr has for the display.
Run xinput list to list devices. Each device has a name and a numerical ID. You can use either this name or this ID to list properties of the corresponding device. Device IDs can depend on the order in which the devices are... | How to disable Xorg right click emulation at runtime |
1,330,601,237,000 |
Here is an example that will explain better:
I have a selected the audio driver from the picture and i would like to browse through its source. How do i get to the path of the source files from here?
|
You have to use grep -r CONFIG_SND_SOC_MXS_SGTL5000.
Each of these config options just represents a #define macro. Many of them don't belong to a single file but instead are checked in multiple source files. CONFIG_64BIT for example appears in around 1k source code files.
| How to relate a kernel config setting to the source files? |
1,330,601,237,000 |
I've got setuptools set up and have read through the list of what's in /etc/setuptools.d
I'm interested in installing timeconfig as well, but I only need the TUI version (no GUI). Which RPMs do I need? (I'll be including these RPMs in a CentOS ISO installation)
|
You need the package system-config-date.
In CentOS it is not installed by default but you can install it by typing
sudo yum install system-config-date
and that should get you the tui tool you need which you can run by typing
sudo system-config-date
| What RPMs do I need for timeconfig? |
1,330,601,237,000 |
I am using Arch Linux with a custom kernel stored as /boot/vmlinuz-linux1. Some features I would like to have don't work in it, but there is also a /boot/vmlinuz-linux kernel where those features work. How can I retrieve the .config kernel configuration file from the second vmlinuz file in order to compare it with the... |
As far as I'm aware, extracting the .config configuration file from a kernel is possible only if you've compiled it with the configuration option CONFIG_IKCONFIG (available in the configuration menu as entry General setup > Kernel .config support). Here is the documentation of that configuration option:
CONFIG_IKCONFI... | Can I get .config file from vmlinuz file? |
1,330,601,237,000 |
I was successfully using a small (20,000 entries) zone file with bind9 server, but today my data provider sent an update which caused the zone file to become 300,000+ entries large (30Mb+).
The problem is the server would not start with this zone file. The named-checkconf would not report any errors. No log messages a... |
I have seen your zone file: it appears to be a list of more than 350k domains, at the moment, where it is defined the local BIND server as the master. The domains are with the following format:
zone "xxxx.com" { type master; notify no; file "null.zone.file"; };
As per memory requirements, I would say as a ballpark fi... | Large zone file for bind9 : ad-blocking |
1,330,601,237,000 |
I am trying to get a list of wireless networks nearby while the adapter is acting as an access point but iwlist returns the following error:
$ sudo iwlist wlan0 scan
wlan0 Interface doesn't support scanning : Operation not supported
Is there another way of getting this list, perhaps with another utility? My Tomat... |
iwlist is seriously deprecated. Remove it from your system and never use it again. Do the same with iwconfig, iwspy. Those tools are ancient and were designed in an era where 802.11n didn't exist. Kernel developers maintain a ugly compatibility layer to still support wireless-tools, and this compatibility layer often ... | Getting a list of WiFi networks nearby when the adapter is in AP mode |
1,330,601,237,000 |
I'm currently exploring creating a startup script in the form of a system process located in the /etc/init.d/ on my Fedora 14 Linux installation. It sounds like the following two lines are bare minimum requirements?
#!/bin/bash
# chkconfig: 345 85 15 (however on this one I've seen different combos)
What's the purpose... |
Look at the docs file /usr/share/doc/initscripts-*/sysvinitfiles (On current F14, /usr/share/doc/initscripts-9.12.1/sysvinitfiles). There's further documentation here: http://fedoraproject.org/wiki/Packaging/SysVInitScript.
The chkconfig line defines which runlevels the service will start in by default (if any), and ... | Are certain parts of startup scripts necessary or just good practice? |
1,330,601,237,000 |
I got some trouble in order to understand how profile.d works. As far as I know, the scripts get executed whenever a user logs in. Currently, I'm running CentOS 6.10 on my Server and got the following weird behavior:
In /etc/profile.d I got a script called logchk.sh which is meant to send an email to the admin email a... |
All about bash
Let's start with this bit from the bash man page:
When bash is invoked as an interactive login shell, or as a non-
interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file
exists. After reading that file, it looks for ~/.bash_profile,
~/.... | When exactly do the scripts in /etc/profile.d get executed? |
1,330,601,237,000 |
I accidentally overwrote my .zshrc file after a misexecuted command, which contains several hundred lines of configs. However, I still have 5 terminals that had zsh open before this incident, and as a result, they are unaffected. However, any new shell I open loses the entire zsh config, and I have no backup for it.
I... |
I would have suggested using /proc/PID/fd/ directory, but zsh closes the file descriptor pointing to its configuration after parsing it. From that, my best guess is that your file in its original form is gone.
However, there are ways to dump zsh's current configuration, which may help you rebuild it. This other questi... | Recover overwritten .zshrc with still-running zsh |
1,330,601,237,000 |
I'm experimenting with different kernel configuration files and wanted to keep a log on the ones I used.
Here is the situation:
There is configuration file called my_config which i want to use as a template
I do make menuconfig, load my_config make NO changes and save as .config.
When i do diff .config my_config, th... |
Why would here be differences
Because you loaded my_config into menuconfig, made changes, then saved it as .config. Of course they are different. If you saved it twice, once with each name, then they would be the same.
If you mean, they are more different than you think they should be, keep in mind there is not a ... | Saving a kernel config file through menuconfig results with different options? |
1,330,601,237,000 |
I am using Fedora 19, there is no ~/.gconf/networking/NetworkManager directory, and system-wide /etc/NetworkManager has no files required.
I want to export my user's NetworkManager configurations, that is Wireless, VPN credentials (ip, username, password) to a file, or at least find the directory where they are stored... |
In Fedora seems that /etc/NetworkManager doesn't work, it's always empty. Take a look at /etc/sysconfig/network-scripts, I found mine here.
| Exporting NetworkManager configurations |
1,330,601,237,000 |
Here's the thing. I'm running Mint 19, relatively fresh install. I heard a lot of hype about Dwarf Fortress, and installed it once; then, needing to leave in a hurry, closed it with Control-C. Ever since then, every time I attempt to run it, I get the output:
/tmp/dwarf-fortresss7j3cousrun/df: 6: /tmp/dwarf-fortresss7... |
TL;DR: Use the following script to clean your $XDG_DATA_HOME/$HOME from left-overs and unmount previous unionfs:
#!/bin/sh
set -eu
echo "Killing currently running Dwarf Fortress instances"
killall -q -9 Dwarf_Fortress || true
echo "Removing old Dwarf Fortress unionfs mounts and mount points"
find /tmp/ -maxdepth 1 -... | Weird problem with Dwarf Fortress install |
1,330,601,237,000 |
I have a problem similar to this:
Unable to get Broadcom wireless drivers working on Arch Linux
But in my case, loading the broadcom-wl-dkms driver did not work. I am new to this, so maybe the solution is quite simple (hopefully).
What I did so far:
I installed various drivers with yaourt and pacman, ending up with ... |
I finally got it working.
My working environment: 4.16.5-1-ARCH [rname -r]
My Desktop: GNOME
My Network-Env.: network-manager-applet 1.8.11dev+12+ga37483c1-1
My Wlan-Card: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] [lspci -vnn -d 14e4:]
What I did:
I looked at https://wireless.wiki.kerne... | Broadcom Wireless PCI Card BMC4360 14e4:43a0 cannot get drivers working |
1,330,601,237,000 |
Is it a bad practice to run a command which requires sudo in ~/.profile?
If really want to do that, how can I make the command run at rebooting Ubuntu?
make the command running with sudo and under my user account not require password, by editing /etc/sudoers?
provide my password in the command with sudo in ~/.profil... |
If you put the command in your ~/.profile, it will run every time you launch a login shell. Some terminal emulators allow you to use a login shell for each terminal window. Do you want your command running that often?
If you want to be allowed to use sudo for that command without entering a password, use the visudo co... | How do you run a command with sudo in `~/.profile`? |
1,330,601,237,000 |
How does linux kernel Makefile understands .config? Does it have a parser of defconfig file? It has to produce a lot of #defines for each enabled option from defconfig and also maintain a lot of minor Makefiles which are compiled or not, based on directives in .config file.
|
The syntax of the .config file is compatible with make; for example a line like CONFIG_CRC16=m sets the make variable CONFIG_CRC16 to the value m. It's parsed by make and included indirectly in the toplevel Makefile:
Makefile contains -include include/config/auto.conf
include/config/auto.conf is built by recursively ... | How does linux kernel Makefile understands .config? |
1,330,601,237,000 |
We just updated our server from CentOS 6 to RHEL 7 and after setting up our HP LaserJet 600 from ppd, I'm noticing that all print jobs now have about a 2" margin at the top of the page.
Is it possible to define margins in a configuration file? This reply suggests that margins can be set with some arguments to lpr, b... |
Standard options can be set with the lpoptions command.
If run as a normal user the file $HOME/.cups/lpoptions is set.
If run as the root user then the system defaults /etc/cups/lpoptions is set.
This can be used to change various settings (eg double sided printing) and page-top.
| Set default margins in cups? |
1,330,601,237,000 |
I need to configure xfreerdp to be set as 15 bpp every time is launched, without the need of use the
# xfreerdp --sec rdp -a 15 --no-bmp-cache srvaddr
Opening the config.txt of xfreerdp, shows me the IP of the server, and if I add /bpp:15 or -a 15, the program won't launch.
What is the correct syntax for this config ... |
Sad to say there is no such option as storing settings in a config file with xfreerdp.
What you could do instead is use a scripting language and wrap xfreerdp by adding this functionality support.
For new cli versions of xfreerdp:
xfreerdp /bpp:15 ...
For deprecated cli versions:
xfreerdp -a 15 ...
| Configure xfreerdp to always pass some options |
1,330,601,237,000 |
In setting up fail2ban there are what appear to be variables at the top of the jail.conf that look like this:
mytime=300
.
.
.
[ssh]
bantime=%(mytime)s
Or in this more complicated form like this:
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"].
Questions
How d... |
If you take a look at the rules that are included with fail2ban you'll notice that they use these variables to make things neater and more parameterized. For example in the included jail.conf they've used them to make general action rules that they can then use when defining the various jails.
Example
Here are some ba... | What are these %(...)s strings in fail2ban's jail.conf file, and how do they work? |
1,330,601,237,000 |
When I work with the terminal and use su or sudo to execute a command with the root user's permissions, is it possible to apply the configuration of my "non-root user" (from which I am invoking su or sudo) stored in this user's home directory?
For instance, consider that (being logged on as a non-root user) I would li... |
Use sudo -E to preserve your environment:
$ export FOO=1
$ sudo -E env | grep FOO
FOO=1
That will preserve $HOME and any other environment variables you had, so the same configuration files you started with will be accessed by the programs running as root.
You can update sudoers to disable the env_reset setting, whic... | Use non-root user configuration for root account |
1,330,601,237,000 |
I have the following rules
Host *
Compression yes
Host sop
HostName 192.168.56.101
if i ssh sop will the compression flag also be added?
|
Yes, all matching blocks are applied.
If you say ssh -v sop it will show you exactly which lines of the config are applied in this case.
| Do ssh_config rules cascade? |
1,330,601,237,000 |
What happens if the last line of fstab is not terminated by a newline?
Why do people get a warning when that last line is not terminated by a newline?
|
A line is a sequence of characters terminated by a newline character. The characters that appear after the last newline of a file are not part of a line.
Such a file that has characters after the last newline is not a text file as per the POSIX definition of a text file, and the behaviour of text utilities is unspecif... | Is the last new line on fstab important? |
1,330,601,237,000 |
I have full disk encryption on my arch linux laptop. When i power on the machine it prompts me for my disk password. My system is encrypted by following the LVM on luks archwiki page.
the prompt says something like "a password is required for the cryptlvm volume" i would like to change this to feature some imformation... |
I found out that that you can make a custom initramfs module with mkinitcpio that prints out such information. Ensure you follow this correctly, otherwise your kernel will panic. To do so, you can create files under:
/usr/lib/initcpio/hooks/MODULENAME
/usr/lib/initcpio/install/MODULENAME
/usr/lib/initcpio/install/M... | custom prompt for system encryption password entry on startup |
1,330,601,237,000 |
If I check under
tools > options > Language Settings > Languages > Language of > User interface:
it only contains "Default - English (USA)" and "English (USA)", however I would like to change to "German (Germany)" or "Deutsch (Deutschland)"
So I would like to install the german language pack of LibreOffice on Fedora... |
Check with dnf list libreoffice-langpack-de if it is installed/installable.
run: sudo dnf install libreoffice-langpack-de
This answer is based on this post.
| LibreOffice install language package from official dnf-repositories |
1,330,601,237,000 |
I have recently moved to fish from bash. I'm immediately in love with the out-of-the-box functionality, but I'm a little bit at a loss when it comes to configuring the shell.
I've read through the documentation, particularly the section about initialization, and it states:
On startup, Fish evaluates a number of confi... |
As far as purpose, I'd say there are several good reasons to support both.
First, and probably most importantly, as @Zanchey points out in the comments, conf.d support came about in release 2.3.0, so getting rid of config.fish at that point would have been a breaking change.
Second, as you said, freedom for the users ... | What is the purpose of (and possibly the convention of using) multiple locations for user configuration in fish shell |
1,330,601,237,000 |
I have a NUC 5i3RYH and I wanted to set up a customized xorg.conf file, because using a mini DisplayPort to HDMI adapter (cheaper than mini HDMI to HDMI adapter) overscans (does not fit the screen).
Xorg Configuration
We want to set the resolution and transform it a bit as we would with xrandr -display :0 --output HD... |
It seems like based on don's input, I need to look in the Xorg log. The problem is that with Xorg, you need to know the driver group in advance or install all drivers as Patrick Mevzek suggested.
Only then can you identify the "intel" driver specifically.
Searching for the words "Module" and "driver" and then reading... | How am I supposed to arrive at the conclusion that my video driver is called "intel"? |
1,474,879,267,000 |
It's there a way to start instances of xterm using different configuration files. Ex: xterm -load .Xresources-1, xterm -load .Xresources-1
Using xrdb -load ~/.Xdefaults changes the configs globaly which I try to avoid.
|
That's usually done by changing the instance name, which by default is the name of the program which is run, but can be overridden using the -name option. (If you make a symbolic link to a program and run that link, that's a quick way of renaming a program as well).
If you have a resource file with settings like
xter... | Start xterm instance with different configurations |
1,474,879,267,000 |
I am doing a restoration test of backup files on a computer. Without putting much thought into it, I did an rsync to replace all files in /etc folder with the ones in the backup. Then, I realize I shouldn't really be doing it as the passwords and user names for the two computers are not the same.
After a reboot, the c... |
There are very few files that absolutely must be different between two machines, and need to be regenerated when cloning:
The host name /etc/hostname.
The SSH host keys: /etc/ssh_host_*_key* or /etc/ssh/ssh_host_*_key* or similar location.
The random seed: /var/lib/urandom/random-seed or /var/lib/random-seed or simil... | Which config files in /etc folder must be unique for each computer? |
1,474,879,267,000 |
Just rebooted my system to this warning
:: Starting Syslog-NG [BUSY]
WARNING: Configuration file format is too old, please update it to use the 3.2 format as some constructs might operate inefficiently;
WARNING: the expected message format is being ... |
Its probably related to this change in 3.2:
syslog-ng traditionally expected an optional hostname field even
when a syslog message is received on a local transport (e.g.
/dev/log). However no UNIX version is known to include this
field. This caused problems when the application creating the log
message has ... | Converting syslog-ng 3.0? format to 3.2 format |
1,474,879,267,000 |
I'm just wondering: why does less store its configuration in a binary file .less, which you have to generate with lesskey from the text-file .lesskey?
What could be the benefits of this behavior? Speed? But parsing a tiny human-readable configuration file can't take that long.
|
The source code for lesskey says:
* Copyright (C) 1984-2015 Mark Nudelman
which gives a hint that performance might have been a factor in deciding to use a compiled configuration file. Machines were a little smaller and slower 32 years ago.
| Why does less store its configuration in a binary file? |
1,474,879,267,000 |
I would like to edit the keyboard shortcuts used by the Enlightenment window manager and I would like to do so textually by editing some text/XML file. Sort of like how I edit ~/.config/openbox/lxde-rc.xml to change the keybindings used by openbox. Is this possible? I know of the GUI editor of keyboard shortcuts but I... |
Enlightenment's configuration is stored in ".cfg" files using the Eet library. This is not human-readable, but you can use the vieet command to edit a textual representation of a file. For the key bindings, I believe these are stored in ~/.e/e/config/standard/e_bindings.cfg by default. Vieet also needs a 'section' to ... | Is there any file I can edit to change the keybindings of Enlightenment 19? |
1,474,879,267,000 |
In the past, I've used bash consistently, because it's everywhere.
But recently I started to try zsh. I don't want to give up updating my .bashrc fil which is rsync'ed to all my servers .
So, in my .zshrc, I sourced my old .bashrc using the command source ~/.bashrc.
Everything goes well, except every time I open a new... |
emulate -R ksh -c 'source ~/.bashrc'
This tells zsh to emulate ksh while it's loading .bashrc, so it'll by and large apply ksh parsing rules. Zsh doesn't have a bash emulation mode, ksh is as close as it gets. Furthermore when a function defined in .bashrc is executed, ksh emulation mode will be enabled during the ev... | Source .bashrc in zsh without printing any output |
1,474,879,267,000 |
tmux ignores the configuration files: both /etc/tmux.conf and ~/.tmux.conf. Even I pass the path to the configuration file, using tmux -f path/to/tmux.conf it still doesn't load it.
The configuration file contains:
set -g default-terminal "screen-256color"
set -g status-bg "#105C8D"
set -g status-fg white
set-window-... |
Found a solution... which is probably not the best, but its working.
Open tmux with: tmux -2 which force tmux to assume the terminal supports 256 colours.
| tmux ignores the configuration files |
1,474,879,267,000 |
Short form:
You can limit the bandwidth the scp uses with the -l switch, you pass a number that's in kbits/sec.
I'd rather set this in my .ssh/config file for certain names machines.
What's the equivalent named setting for -l? I haven't been able to find it.
Followup question:
Generally, not sure how to map back and f... |
Alas, as was mentioned, there doesn't see to be a config option to limit bandwidth. (I checked source code!)
Some possible solutions are to use an alias for scp, or perhaps a function. Bash is typically the default shell on both mac & linux, so this could work:
alias scp='scp -l 1000 '
-or-
alias scp-throttle='s... | Equivalent of scp -l bandwidth_cap for .ssh/config? |
1,474,879,267,000 |
This works:
nmap <silent> <S-t> :call InventTab()<CR>
function InventTab()
set expandtab!
if &expandtab
retab
echo 'spaces'
else
retab!
echo 'tabs'
endif
endfunction
I've tried to change it to a one-liner:
nmap <silent> <S-t> :set expandtab!<CR>:if &expandtab<CR>:retab<... |
Does replacing the <CR>'s you have between commands with ^V| (where ^V is a literal ^V inserted by typing Ctrl-vCtrl-v) work?
| Rewrite a Vim function to a one-line map |
1,474,879,267,000 |
I'm using the Linux kernel's configuration tool Kconfig to manage the configuration of my own project.
(Please could someone with sufficient rep add "Kconfig" tag or whatever tag would be more appropriate). I didn't tag as "linux" or as "kernel" since my actual project is not the Linux kernel.
Given the following con... |
As I can't reply, Ciro Santilli is not exactly right.
To quote the answer from there:
It is not possible to use select for non booleans according to > kernel docs v4.15
https://github.com/torvalds/linux/blob/v4.15/Documentation/kbuild/kconfig-language.txt#L104 says:
- reverse dependencies: "select" <symbol> ["if" <ex... | Kconfig - "select" a choice |
1,474,879,267,000 |
I want to run a distro of my choice on my desktop, my laptop, and my work desktop. I'm about to switch from Ubuntu to Fedora, and I'm posting this thread is because I would like some advice on how to make this kind of labor a bit easier.
Installing all the stuff I need / customizing GNOME (or possibly Cinnamon) the wa... |
So there are actually a couple of things you need to worry about:
1) Installing same software on all machines. This is fairly easy to do either by cloning via clonezilla or just getting a list of installed packages and having the package manager install a matching set on the other machines. Package names that are ar... | Same customized installation on multiple computers |
1,474,879,267,000 |
I haven't really got prior *nix systems experience to draw on, although I tried to set up a GUI based Linux some years back; this time I'm jumping directly to BSD because I like its philosophy and tight attention to quality and its resulting slightly conservative approach to release development cycles, and because I'v... |
A lot of the work can be isolated. There are a lot of the commonly edited files in /etc which can be mirrored in /usr/local/etc. Put your local changes in those, and generally they'll be picked up.
rc.conf is a bit messy, but you can put one line in there to grab stuff from elsewhere. periodic.conf works in much the s... | Saving config/pkg dirs on existing BSD install for reuse on clean install, and safe ways to do it? |
1,474,879,267,000 |
I am about to start working on an embedded system which runs kernel v2.6.x.
It is configured to use its serial line as a TTY (accessible via e.g. minicom, stty), but I want to run IP over the serial line so that I can run multiple multiplexed sessions over the link (e.g. via UDP/TCP or SSH).
I don't have much more inf... |
You would first disable getty running on your serial port device /dev/ttyS0 (or whatever it is named for your hardware) to free it (for example, by editing /etc/inittab and running telinit q - if you managed to steer away from systemd) and then you would run pppd(8) on it (either manually with appropriate parameters ... | How to configure embedded kernel to use serial line for PPP instead of TTY |
1,474,879,267,000 |
The kernel configuration contains an NLS_UTF8 option. It can be found under File systems → Native language support. What does it do?
Its description maintains that it is needed for using a FAT or JOLIET CD-ROM filesystem. Is it necessary for an ext[234] filesystem?
|
FAT filenames (not file contents) are encoded in a country-specific manner, DOS called those "codepages". They need to be present in the kernel so your console con correctly display the characters.
This also counts for the UTF-8 encoding of the Unicode charater set.
This doesn't apply to ext FS though, read up here.
| What does the CONFIG_NLS_UTF8 kernel option do? |
1,474,879,267,000 |
What are the valid values (and what are they used for) for the static option in /etc/dhcpcd.conf file?
I'm configuring a network interface of a Raspberry (running raspbian stretch) by editing the /etc/dhcpcd.conf file.
Altough I was able to set up it correctly, I am curious about all the configuration options provided... |
I was wondering the same thing and also couldn't find any definitive answers out there, so I went digging.
I don't know if this is an exhaustive list, but here is a list of valid values for the static option that I have been able to glean from looking at the source code (available here):
ip_address
subnet_mask
broadca... | Configure static values in /etc/dhcpcd.conf |
1,474,879,267,000 |
I'm setting Arch Linux and I'd like to modify the standard dock bar, which is the file that I should edit?
EDIT: like this
I don't want to use docky
|
Panel settings are saved here ~/.config/xfce4/panel but you could also try the xfce4-settings-manager.
And to learn how it works you can just download many nice looking examples from here http://xfce-look.org/ and look into the config files that come with these themes.
| How to modify dock bar in XFCE4? |
1,474,879,267,000 |
I have two x86_64 kernels compiled on the same machine against the same code (4.15.0 in Linus' source tree).
The config files were produced by running make localmodconfig against that source, using different, larger original config files coming from different distros: Arch and Slackware respectively. I'll nickname the... |
I believe the picture is as in my last edit above; I just did not know enough about the process of reserving memory to realize when I asked the question: it all boiled down to the larger kernel having more of the drivers built in rather than modularized.
Incidentally, I did want to put this to some (remotely) practic... | different kernels report different amounts of total memory on the same machine |
1,474,879,267,000 |
I have a number of versions of GNOME installed on a number of different hosts. All users have network mounted home directories. In some cases GNOME works poorly when reading configuration from the .gnome2 directory. I would like to read config files from version specific directories. Is there any way to specify this w... |
Looking at the developer documentation it doesn't look as if it was possible to use other directories than the default. You could have version-dependent directories and link them to ~/.gnome2 at login, however this breaks as soon as a user is logged in at two different hosts at a time.
| How do I read alternate GNOME configuration files |
1,474,879,267,000 |
I am wondering how I can run a daemon, in this case NTP, with custom parameters.
For example in my Ubuntu PC I observe that I've got ntpd running this way:
$ ps aux | grep ntpd
ntp 5936 ... 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 119:127
You may notice that -g parameter.
But in my Gentoo PC I run the same c... |
Guessing from the Gentoo Wiki, editing NTPD_OPTS in /etc/conf.d/ntpd probably does the trick (regardless of the question if -g is advisable, no idea).
| How can I run a daemon with custom parameters |
1,474,879,267,000 |
I'm trying to setup nginx and cgit on FreeBSD but nginx can't access /var/run/fcgiwrap/fcgiwrap.sock.
In my /etc/rc.conf I already set fcgiwrap_user="www", and www is also the user nginx runs as.
When I make fcgiwrap.sock owned by www by performing chown www /var/run/fcgiwrap/fcgiwrap.sock, everything works the way I ... |
The RC script is located at /usr/local/etc/rc.d/fcgiwrap.
Looking at the code, fcgiwrap_user sets the owner of the process running the daemon (default root).
You need to set fcgiwrap_socket_owner="www" to set the owner of the socket.
| Nginx on FreeBSD: fcgiwrap.sock permission denied |
1,474,879,267,000 |
I am using Red Hat Enterprise Linux Server release 5.9 (Tikanga).
For installation of any application, it is very important to know the system configuration, is it 32 bit or 64 bit system, Installed OS is 32 bit or 64 bit etc...
Is there any command which provides me information about my system configuration just lik... |
Use uname:
uname -i
For more information, see
man uname
If you get x86, it means you have 32 bit Linux OS and if you get x86_64, it means you have 64 bit Linux.
| Redhat Linux: How to know my system configuration? |
1,474,879,267,000 |
With regard to this question: How to script make menuconfig, what is the difference between running make and make oldconfig?
I assume that if you run make, it uses the old .config anyway.
|
make oldconfig is used to apply your old .config file to the newer
kernel.
For exapmle, you have .config file of your current kernel and you
downloaded new kernel and want to build your new kernel. Since very likely new kernel will have some new configuration options, you will need to update your config. The easiest ... | What is the difference between 'make' and 'make oldconfig' |
1,474,879,267,000 |
# Automatically generated file; DO NOT EDIT
Is at the header of the kernel configuration file: /usr/src/linux/.config
My question is why shouldn't you edit this file? If I know exactly what I need, or what I want to remove, then what is the problem with editing this file directly?
|
It's considered unsafe to edit .config because there are CONFIG-options which have dependencies on other options (needing some to be set, requiring others to be turned off, etc.). Other options aren't meant to be set by the user at all, but are set automatically by make config (resp. Kconfig to be correct) depending ... | Why should you not edit the .config kernel configuration file? |
1,587,666,937,000 |
I am trying to compile the 5.4 kernel with the latest stable PREEMPT_RT patch (5.4.28-rt19) but for some reason can't select the Fully Preemptible Kernel (RT) option inside make nconfig/menconfig.
I've compiled the 4.19 rt patch before, and it was as simple as copying the current config (/boot/config-4.18-xxx) to the... |
Please enable EXPERT mode after launching make nconfig/menuconfig. Then you'll be able to select Fully Preemptible Kernel (RT) option.
| Trouble selecting "Fully Preemptible Kernel (Real-Time)" when configuring/compiling from source |
1,587,666,937,000 |
I’m using Amazon Linux,
[davea@mymachine ~]$ uname -a
Linux mymachine.mydomein.org 4.4.35-45.83.amzn1.x86_64 #1 SMP Wed Jul 27 22:37:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
In my /etc/ssh/sshd_config, I have no value set for “ServerAliveInterval”. In this answer — What options `ServerAliveInterval` and `ClientAl... |
The value for ServerAliveInterval means that "if no data has been received from the server within this time then send a NULL message to the server".
Similarly, ClientAliveInterval means that "if no data has been received from the client within this time then send a NULL message to the client".
The default values are t... | What is default value of ServerAliveInterval? |
1,587,666,937,000 |
What's the best way to edit the /etc/nsswitch.conf file other than just using sed -i to edit it in place or overwrite it in total.
For our build we need to make changes to this file without destroying it if future changes occur in later packages.
I was hoping there was a tool to HELO interact with it but, that doesn't... |
Take a backup as, cp /etc/nsswitch.conf /etc/nsswitch.conf.orignal
Now you can use sed -i or open /etc/nsswitch.conf with some editor like vim and do the changes.
If error occurs, you can revert back to the original version,
cp /etc/nsswitch.conf.original /etc/nsswitch.conf
I got this tool suggestion by Ulrich in ... | Editing nsswitch.conf file safely |
1,587,666,937,000 |
When configuring the Linux kernel, what are the advantages and disadvantages of enabling UTS namespaces? Would the new system be harmed if UTS namespaces were disabled?
|
UTS Namespaces are per-process namespaces allowing a process to have different namespaces for different resources. For example, a process could have a set of namespaces for the following:
mountpoints
PID numbers
network stack state
IPC - inter process communications
NOTE: the use of namespaces was limited only to ro... | Enabling UTS Namespaces in the Linux Kernel |
1,587,666,937,000 |
I've used several unix tools to display PDFs, like xpdf, evince, epdfview…
What I'm looking for is not very complicated.
I'd like to display a full page inside the application window with reduced margins (no margins or very small margins) and be able to go to the next/previous page by simply pressing one button.
I don... |
I much enjoy using mupdf. There's no visible UI and the default keybindings are fine.
| Looking for an efficient way to display PDFs |
1,587,666,937,000 |
I compiled a package for Solaris 11 Express that has some library dependencies, which I also compiled from source and installed in the usual /usr/local. (And Solaris doesn't even have /usr/local pre-created!) So, my program runs correctly, but I have to run it with
LD_LIBRARY_PATH=/usr/local/lib ./myprogram
or it com... |
Check out the section about setting up the linker: http://bwachter.lart.info/solaris/solfaq.html
You want the crle command.
| Does Solaris have an equivalent to /etc/ld.so.conf? |
1,587,666,937,000 |
I have been trying to run a command to clean up some of my temporary files every time I exit a shell.
I initially thought that this would be the job of .zlogout but it doesn't seem to be executed if I, for example, have multiple shells open in my terminal emulator (kitty).
From what I have found in the doc, .zlogin an... |
There's an example in this zsh guide which sources ~/.zlogout for non-login shells
using the TRAPEXIT function. This seems to be exactly what you want.
TRAPEXIT() {
# commands to run here, e.g. if you
# always want to run .zlogout:
if [[ ! -o login ]]; then
# don't do this in a login shell
# b... | How to run a command every time that I exit a zsh shell (including non-login shells) |
1,587,666,937,000 |
Inside the xorg.conf.d/ for example, we have three files:
00-keyboard.conf 10-monitor.conf 30-touchpad.conf
I know that the 2-digit number determine the precedence that each file is read so 00-keyboard.conf is read before 10-monitor.conf.
But I noticed that documentation on different sites all seems to use the same... |
There is no mapping to devices or anything like that. The numbering is only used to enforce an order, and you don’t even have to name your configuration files with a number at the start — it’s just easier to reason about order with numbers.
So you can use any scheme you want.
| What is the numbering convention in .conf files(inside a conf.d)? |
1,587,666,937,000 |
I am using vi with
set ts=4
set number
configuration and I am tired of settings these each time I open the vi editor on command line. So I want to configure vi with a configuration file that I can embed the settings listed above however, I could not find the config file for vi in Ubuntu. What is the exact location of... |
Open a new file in your home directory called .exrc, and put your configurations therein.
| How to configure vi in Ubuntu |
1,587,666,937,000 |
I am trying to change the font of dmenu. I am running the i3 window manager.
$ dmenu_run -v
/bin/bash: line 1: dmenu-4.5,: command not found
$ dmenu_run -fn "-xos4-terminus-medium-r-*-*-14-*"
cannot load font '-xos4-terminus-medium-r-*-*-14-*'
I ... |
I was able to resolve my issue.
In my .i3/config file I am using this line -
# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym $mo... | Custom font with dmenu_run in i3 |
1,587,666,937,000 |
Sendmail works through sending to a smarthost, but can't find local users.
# sendmail -bv [email protected]
[email protected]... User unknown
# grep LocalUser /var/log/maillog
Sep 8 03:48:30 myhost sendmail[6678]: r887mUs3006678: [email protected]... User unknown
but ...
# ls /home|grep LocalUser
/LocalUser
and ..... |
Sendmail and local users with uppercase letters
Diagnose
Sendmail's default configuration converts local user/mailbox names to all lowercase letters before delivery attempt. In your case email to [email protected] is delivered by sendmail to non existing localuser instead of existing LocalUser.
Possible fixes
Do not u... | Sendmail can't find local users (with uppercase letters) |
1,587,666,937,000 |
My .muttrc file is starting to get quite large.
What I would prefer is to create a ~/.mutt/config directory to store various
config files for the account, status bar, composition,... etc and then source them all into my main .muttrc file.
How do you do this?
|
Create a folder ~/.mutt
Split up your configuration in your folder
source all the config files in your folder, i.e. (from my ~/.mutt/muttrc):
.
source ~/.mutt/rc
source ~/.mutt/hooks
source ~/.mutt/macros
source ~/.mutt/ml
source ~/.mutt/gnupg
| Separate .muttrc into parts |
1,587,666,937,000 |
I need to deploy my Firefox configured and with extensions in NixOS. I want to do that declaratively (in configuration.nix) and I do not want to use home-manager.
Via user profile:
Configuring possible via preference files
Loading extensions is not possible, support has ended with Firefox 74
Via installation direct... |
I took a glance at the firefox Nix expressions and didn't see a way to provide a policies.json.
If you modify the package such that you can provide the policy as an input to the derivation, it would work but then users would be forced the burden of compiling Firefox; Because the file would be a build input.
If Firefo... | How to use Firefox Policies in NixOs / How to add config files to a Nix package? |
1,587,666,937,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,587,666,937,000 |
I'm currently running Fedora on an old Thinkpad T530 and just configuring it to my needs. I'm using GDM/Gnome Desktop (on Xorg, not Wayland). I've installed and configured the proprietary NVIDIA driver.
Now I want to extend my battery's lifetime by forcing the driver running on lowest performance mode (current situati... |
I got it! After searching the web again, I've found this site on reddit.
Basically the change is:
PerfLevelSrc to 0x2233, which means: fixed for battery (22) and dynamic for AC (33)
PowerMizerDefaultAC to 0x2, which means: set AC to dynamic/adaptive behaviour.
For clarification, setting PowerMizerDefault (same appl... | Xorg Conf: NVIDIA performance settings for AC/battery? |
1,587,666,937,000 |
I would like to create a key binding, using the key sequence C-x r, to reload the configuration of bash, stored in ~/.bashrc, and the one of the readline library stored in ~/.inputrc.
To reload the configuration of readline, I think I could use the re-read-init-file function which is described in man 3 readline:
re-re... |
Don't inject a command into the command line to run it! That's very brittle — what you're trying assumes that there's nothing typed at the current prompt yet. Instead, bind the key to a shell command, rather than binding it to a line edition command.
In bash, use bind -x.
bind -x '"\C-xr": . ~/.bashrc'
If you also wa... | How to create a key binding re-sourcing the shell configuration without a new command being saved in the history? |
1,587,666,937,000 |
To authenticate in a corporate network I have to run the following command:
$ sudo wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant/mywired.conf -B
The configuration script loaded thereby looks like this:
# global configuration
ctrl_interface=/var/run/wpa_supplicant
#ctrl_interface_group=wheel
ap_scan=0
# 802.... |
Just put your command in /etc/rc.local. Make sure it's on a single line.
sudo wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant/mywired.conf -B
I assume that your connection is stable and not dropping. Do comment if your connection drops. I'll make a script. Have to sleep now.
| How to automatically apply wpa_supplicant configuration? |
1,587,666,937,000 |
I've installed jack2 as a substitution for jack from official repositories (I'm on Arch Linux):
# pacman -S jack2
I need to use jack2 because it provides jackd (it's needed for another application), while jack2_dbus does not provide it.
According to this manual, in order to configure such parameters as sampling rate,... |
You only choose audio card once when starting jackd. You can list cards available to alsa with aplay -l (aplay is part of alsa-utils). Then you can start the jack daemon, and pick the card to use with jackd -d alsa -d hw:<card>,<device>.
| How to configure which sound card jack2 will use |
1,587,666,937,000 |
I'm trying to dial-up with my Huawei modem EM680 using wvdial.
My modem is found properly on /dev/ttyUSB1 but when I execute wvdial I get this:
# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 +FCLASS=0... |
This wvdial.conf worked on ZTE 3G Modem below:
[Dialer Defaults]
Modem = /dev/ttyUSB0
Init1 = ATZ
Init3 = AT+CGDCONT=1,"IP","apnname"
Phone = *99***1#
Username = user
Password = user
New PPPD = yes
Stupid Mode = 1
You can try it with my wvdial.conf.
| getting "bad init string" when dialing with wvdial |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.