date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,305,944,454,000
Albert Einstein quote Insanity: doing the same thing over and over again and expecting different results Often-times, Linux drives me mad because I'm doing the same thing over and over again and getting different results from box to box. (See my previous question). For me, the biggest area of confusion is taking ...
Whenever I have a good reference system and a misbehaving one, I try to compare them with vimdiff. What I compare varies with the problem, e.g. 1) When comparing servers at the package level, I create sorted lists of packages on each server, send the results to files and diff them, e.g. On server1: dpkg --get-selectio...
tool or technique to get a diff of two different linux installations
1,305,944,454,000
I am learning command top, know how to change color and columns mod, switch from one mode to another. After closing top's window and running again, all comes to default configuration - 4 default modes of columns and colors . Is there any way to save changes befor closing top's window.
Once you have your configuration set the way you want, type W (that is a capital W) and your configuration will be saved. From the top manpage: ´W´ :Write_the_Configuration_File This will save all of your options and toggles plus the current display mode and delay time. By issuing this command just before quitting...
linux command top: saving configuration
1,305,944,454,000
It seems like, by default, the tmux status bar clock granularity is set to 2s, however it would be nice to be able to bring that up to a one-second granularity. Is there any way to set the granularity in a .tmux.conf? I haven't been able to find anything about this under man tmux.
There is a status-interval session option which by default is set to 15 seconds. This determines how frequently the status line is redrawn. With set-option -s status-interval 1 in your .tmux.conf file, this would be would be changed to 1 second.
Is there any way to adjust the clock granularity under tmux?
1,305,944,454,000
I've been trying to write a simple bash script which I'll be using to install an application and update it's config file. I'm having hard time to have get it's config file modified. # DBHost=localhost DBName=test # DBPassword= any suggestions how I can get above modified as below? DBHost=localhost DBName=database DB...
The best way depends on whether you expect the file to be also modified by humans, how complex the file is, and whether you want your script to take precedence if it looks like someone else wants a different value. That is, if the file already contains DBPassword=swordfish, do you want to keep that, or replace it by D...
Editing config file via a bash script
1,305,944,454,000
Is there any developed automatic linux kernel configuration tool? I have found a method of make localmodconfig, but it is certainly very limited. I have searched the web but unfortunately have not come to any acceptable result. Although I am quite conversant in kernel configuration issues, I would like to optimize my ...
Now, that we talked about this a bit in the comments the answer for you is: no, there isn't. The main reason for that conclusion is that I think you are not looking for a tool to configure a kernel, but to automatically tune the kernel for your specfic (and yet unstated) use case. As stated in the comments, you can sk...
Automatic kernel configuration tool
1,305,944,454,000
Configuration of KDE desktop applets, like the launcher ("Kickoff") or the clock is held in ~/.config/plasma-org.kde.plasma.desktop-appletsrc (at least for KDE 5). I'd like to configure the applets on a fresh system to my liking using Ansible, but I can't find a robust way to do that. I know I can use kwriteconfig5 to...
A simplified solution on bash: config="plasma-org.kde.plasma.desktop-appletsrc" grp="" while IFS= read -r line do [[ $line == *Applets* ]] && grp="$line" [[ $line == *org.kde.plasma.digitalclock* ]] && break done < "$HOME/.config/$config" ContGrp=$(echo "$grp" | awk -F\] '{print $2}' | awk -F\[ '{print $2}') A...
Robust command line (CLI) configuration of Plasma (KDE) applets
1,305,944,454,000
Right now pkg-config looks only in /usr/lib/pkgconfig. I can adjust it for a user by exporting the PKG_CONFIG_PATH environment variable, but once again I forgot to do it for root and wasted time wondering, why my plugin is not installed properly (the makefile used pkg-config). So how can set it system wide, so it woul...
The traditional place to define an environment variable system-wide is /etc/profile. This file is read by Bourne-style shells (including bash, ksh, ash) when you log in for a text-mode session, either locally (on a text mode console) or remotely (over ssh). If you log in in a graphical environment, /etc/profile may or...
Tell pkg-config to look *.pc files also in /usr/local/lib/pkgconfig, system-wide
1,305,944,454,000
I work in a relatively heterogeneous environment where I may be running different versions of Bash on different HPC nodes, VMs, or my personal workstation. Because I put my login scripts in a Git repo, I would like use the same(ish) .bashrc across the board, without a lot of "if this host, then..."-type messiness. I l...
Check if direxpand is present in the output of shopt and enable it if it is: shopt | grep -q '^direxpand\b' && shopt -s direxpand
How can I prevent unsupported 'shopt' options from causing errors in my .bashrc?
1,305,944,454,000
I know that in ~/.bashrc one must not put spaces around = signs in assignment: $ tail -n2 ~/.bashrc alias a="echo 'You hit a!'" alias b = "echo 'You hit b!'" $ a You hit a! $ b b: command not found I'm reviewing the MySQL config file /etc/my.cnf and I've found this: tmpdir=/mnt/ramdisk key_buffer_size = 1024M inno...
I'll answer that in a more general way - looking a bit at the whole "Unix learning experience". In your example you use two tools, and see the language is similar. It just unclear when to use what exactly. Of course you can expect there is a clear structure, so you ask us to explain that. The case with the space aro...
When are spaces around the = sign forbidden?
1,305,944,454,000
There are many packages which have grub in their names and part of the GRUB (the Grand Unified Boot Loader). The ones which are installed on my system are - grub-common grub-emu grub-pc grub-pc-bin grub-theme-starfield grub2 grub2-common grub2-splashimages I first looked at it to see whether it is a symlinke...
In such cases you can find the relevant package by looking through the post-installation scripts: grep /etc/default/grub /var/lib/dpkg/info/*.postinst This reveals that the file is created by grub-pc.
In Debian, which package is responsible for creation of /etc/default/grub?
1,305,944,454,000
I'm pretty sure that all Red Hat and Debian based distributions follow the convention of shipping the kernel configuration in /boot/config-*, but what of other distributions? Or, if this convention is extremely common, which distributions don't follow it?
Debian and derivatives (Ubuntu, Linux Mint, …) The configuration for the kernel /boot/vmlinuz-VERSION is stored in /boot/config-VERSION. The two files ship in the same package, linux-VERSION or kernel-VERSION. Arch Linux, Gentoo (if enabled) The configuration for the running kernel is stored in the kernel binary and c...
Where can I find the kernel configuration on each Linux distribution?
1,305,944,454,000
How can i do this in a single line? tcp dport 53 counter accept comment "accept DNS" udp dport 53 counter accept comment "accept DNS"
With a recent enough nftables, you can just write: meta l4proto {tcp, udp} th dport 53 counter accept comment "accept DNS" Actually, you can do even better: set okports { type inet_proto . inet_service counter elements = { tcp . 22, # SSH tcp . 53, # DNS (TCP) udp . 53 # DNS (UDP) } And then: ...
How to match both UDP and TCP for given ports in one line with nftables
1,305,944,454,000
Is there a command that can be used to figure out which packages are installed system-wide in NixOS? For instance, I can list packages installed for my current user with nix-env -q. I don't know of any way to list packages installed on the whole system from /etx/nixos/configuration.nix. There are two separate instan...
There's no specific tool for this. You may like the system.copySystemConfiguration option (see the docs for "caveats"). You'll get relatively close with nix-store -q --references /run/current-system/sw – the list of nix store paths directly contained in systemPackages, but note that various NixOS options may add pack...
how to find which packages are installed system-wide in NixOS?
1,305,944,454,000
I am chasing an error trying to apply a new tune to postgres. The exact error is: 2018-11-07 22:14:49 EST [7099]: [1-1] FATAL: could not map anonymous shared memory: Cannot allocate memory 2018-11-07 22:14:49 EST [7099]: [2-1] HINT: This error usually means that PostgreSQL's request for a shared memory segment excee...
As you point out in your question, there are several limits in play: the System V IPC ones, such as shmall, shmmax, etc. the RLIMIT ones (which are often set and inspected by the ulimit command in the shell, so you might know them by that name.) the cgroup limits (particularly the memory cgroup, in your case), which ...
How do I identify all of the configured memory limits for a service started using systemd?
1,305,944,454,000
I've searched for an answer for the differences and using for these two configuration parameters in the openssl-config-file. certs = ... # Where the issued certs are and new_certs_dir = ... # default place for new certs In the Network Security with OpenSSL O'Reilly book also these two parameters in the defa...
As shown in the documentation https://www.openssl.org/docs/man1.1.0/apps/ca.html new_certs_dir is used by the CA to output newly generated certs. certs is not used here. However its referenced in the demoCA: "./demoCA/certs - certificate output file" Certs is ALSO not used for certificate chains as shown here: https:/...
OpenSSL, basic configuration, new_certs_dir, certs
1,305,944,454,000
It's long time I'm trying to fix my .conkyrc configuration file in order to set real transparency. There are many post out there about it, but none of them helped in my case, it seems the solution depends on many factors(windows manager, desktop environment, conky version and probably others). Actually it seems that ...
-You just define: own_window yes own_window_transparent yes own_window_type conky own_window_argb_visual yes own_window_class override ...and you can get the transparency on the desktop.
.conkyrc - how to set real transparency
1,305,944,454,000
I would like to display Chinese characters in dwm's status bar. More specifically I would like the symbols to represent the different tags in dwm. Using an online converter, I found that the unicode representation for the symbols I want is: 憤怒 unicode: &#24996;&#24594; Putting the unicode characters directly into my ...
I don't think you'll get Unicode support from dwm without patching it (and adding additional dependencies, notably pango). If that's an option for you, the pango patch from the official list of patches seems to work, just run patch command in the dwm folder passing the patch file to the standard input: $ tar xzf dwm-6...
Unicode characters in uxterm and dwm statusbar
1,305,944,454,000
Is there a way to use Emacs to sync with Google Calendar and Google Contacts, ideally keeping a local copy so I can access them offline?
Unfortunately, I am unable to give a complete answer. All I have is advice about some possible paths to wander down. The easiest route would be if the emacs-g-client that Gilles mentioned in the SU version of this question works. If that doesn't work, I would look into the following: At the very least you should be...
Emacs sync w/ Google Calendar and Contacts?
1,305,944,454,000
One can select testing packages on a gentoo stable system by adding a line with the following syntax to keywords list: cat /etc/portage/package.keywords =dev-python/ipython-0.13.2 ~amd64 # and many lines later =dev-python/ipython-0.14.1 ~amd64 # and many lines later >=dev-python/ipython-0.13.4 ~amd64 This file will g...
There is an official package now for this task called app-portage/portpeek. It can find obsolete USE flags and obsolete KEYWORDS and clean the files, if -f (fix) is added as parameter.
How to tidy up the .keywords file on a gentoo system?
1,305,944,454,000
I've been trying to use udev to make a Debian system run a bash script when a wireless card is connected. So far I created this file /etc/udev/rules.d/wifi-detect.rules: ACTION=="add", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="9271", RUN+="/root/test.sh" And for now, I'm trying to make test.sh with this contents wo...
I had a similiar problem a while ago and the solution was to change the RUN+= part to RUN+="sh -c '/root/test.sh'". Now, I don't know if you need that in this case as the rule is calling a script, not a command. Another observation: try removing the ! from the "test!" string or replace the double-quotes with single q...
Auto-run script when Wifi card is plugged in (udev)
1,305,944,454,000
I'm using an xrandr script to set screen size and rotation. In this case one screen is in landscape mode and the other is rotated. How can I detect this rotation in the Awesome WM configuration? The goal is to set the tag layout so that the windows are divided along the short axis of the screen. That is, a tag which u...
Today this is rather easy. Assuming you have the following layouts defined in your rc.lua: awful.layout.layouts = { awful.layout.suit.tile, awful.layout.suit.tile.bottom, } With awful.screen.connect_for_each_screen(func) you can call a function for each existing and created-in-the-future screen. It is very li...
How to use screen rotation in Awesome WM configuration?
1,305,944,454,000
All I want to do is pass mailto: links to urxvt -e mutt -F ~/path/to/muttrc with the rest of the mailto: URL appended. I've tried every script I can find online that purports to do this, from simple: #!/bin/sh exec "urxvt -e mutt -F /path/to/muttrc \"$@\"" to complex, and the most they do is open a terminal window f...
Remove the quotes, or the shell will try to execute the full string as a command (which obviously does not exist). #!/bin/sh exec urxvt -e mutt -F /path/to/muttrc "$@" Not tested, but the presence of quotes is the explanation for the vanishing of the terminal.
How to make Firefox open mailto: links with mutt in terminal
1,305,944,454,000
I have tried to install ISPConfig3 on Debian Jessie 8.1, and it couldnt connect to mySQL (mariaDB 10.1). So I CTRL+C to kill the install and I tried to manually login to mySQL, but I failed. It was complaining about the socket. So I purged and removed mariaDB and mySQL: service mysql stop apt-get --purge remove "mysql...
Try the following: apt-get remove --purge mysql* apt-get remove --purge mysql apt-get remove --purge mariadb apt-get remove --purge mariadb* apt-get --purge remove mariadb-server apt-get --purge remove python-software-properties Note: When prompted if you want to dump your current Databases, say no. But you can deco...
MariaDB - dependency problems - leaving unconfigured
1,305,944,454,000
What is this file anyway? Documentation makes no mention of it. And it's not supposed to be run automatically (version 4.3, 2 February 2014): Invoked as an interactive login shell, or with --login When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads...
From Debian's bash README: What is /etc/bash.bashrc? It doesn't seem to be documented. The Debian version of bash is compiled with a special option (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc for interactive non-login shells. So, on Debian systems, /etc/bash.bashrc is to ~/.bashrc as /etc/...
When is /etc/bash.bashrc invoked?
1,305,944,454,000
Say I have a window in kitty and press ctrl+shift+enter to open a new window. The new window always uses ~/ as current working directory. I'd like the new window to use the same working directory that the last window used. Is this possible?
In your kitty.conf, instead of using map ctrl+shift+enter new_window, use map ctrl+shift+enter new_window_with_cwd. Couldn't find this in the documentation but the author mentions it in this issue.
Make kitty terminal emulator to use the current working directory for new windows
1,305,944,454,000
I have openssh-server installed on a Debian Jessie host and am trying to find the original version of the sshd_config file. But that was apparently not installed by openssh-server: root@apu ~$ dpkg -S /etc/ssh/sshd_config dpkg-query: no path found matching pattern /etc/ssh/sshd_config What am I missing? Are there co...
There are quite a few configuration files which aren't managed by dpkg; they're managed by maintainer scripts instead. In this case, in Debian 9 the original file is available as /usr/share/openssh/sshd_config; that's copied to /etc/ssh/sshd_config by openssh-server.postinst. In Debian 8 the original contents are stor...
Where is my /etc/ssh/sshd_config coming from?
1,305,944,454,000
On nixos, I face a postgres error psql: FATAL: Peer authentication failed for user "postgres" similar error to this question, and would like to edit the authentication settings to resolve the issue as described in an answer there: edit pg_hba.conf to use md5 password authentication instead of peer authentication for...
Following this example configuration, I set the NixOS option services.postgresql.authentication. I managed to get past the 'peer authentication failed' error when the postgres section of my /etc/nixos/configuration.nix had been set to # postgres services.postgresql.enable = true; services.postgresql.package = pk...
How do I configure postgres's authorization settings in nixos?
1,305,944,454,000
At this page you can download a configuration file that lets you target a particular notebook architecture during the compilation of a new 32-bit Linux kernel. I need a 64 bit version. What do I have to do? I compiled a kernel 2-3 times in my life but I never touched a config file, I always have used an interactive me...
The recommended answer, as the comment suggests, is to save it as .config in the top-level source directory, and then run make xconfig (GUI, easier) or make menuconfig (TUI) on a 64-bit system. That said, to simply switch from 32-bit to 64-bit without changing anything else, a little editing at the beginning is all th...
How do I convert a kernel .config file from 32-bit to 64-bit?
1,305,944,454,000
The only way I can install majority of packages without rejection from signature database is to put SigLevel = Never in pacman.conf. Its not supposed to be the right way, but I don't seem to be able to get pacman going any other options for SigLevel. Is what I'm doing right? And is it a frequent and common security th...
As of the end of this month, March 2012, all of the packages in the main databases (Core, Extra, Community and Multilib) and their Testing variants are signed. This means that you are able to, and should consider if you are interested in securing your machine, use Required in your SigLevel. Once you have checked and s...
Arch: Is "SigLevel = Never" the only convenient way?
1,305,944,454,000
I have been setting up Linux desktops for a non-profit radio observatory. For me, this was the first time I had to think about "deploying" several identical machines, centralizing login, home directories and so on. It quickly became clear to me that, perhaps contrary to intuition, the "everything is textual" philosop...
Using Puppet or CFEngine or Chef is the right solution for your problem. Of course it will consume some time and trial & error approach to write the Puppet script which just work. These tools are widely used for automating complex installations on cloud and have simplified the lives of admins like us. :)
What are your best practices and future plans for deploying unixoid desktops? [closed]
1,305,944,454,000
I want to replicate the Debian installation choices made for my system's current configuration in the installation of a new system. Debian can be pre-configured through a "pre-configuration" (aka "preseed") file, which basically contains the answers to the questions the installer will ask. The documentation states tha...
Short answer From the Debian wiki page dedicated to D-I preseed : Do not work off a debconf-get-selections (--installer) generated preseed.cfg but get the values from it and modify the example preseed file with them. The preseed example file provided by Debian should be enought to start but you can find a lot of ot...
What values from debconf-get-selections should not be preseeded?
1,305,944,454,000
I'm writing a script to automate setting up Puppet agent configuration files in Docker. Basically, I need to ensure that the following section is in /etc/puppet/puppet.conf: [agent] server=$PUPPETMASTER_HOSTNAME masterport=$PUPPETMASTER_PORT What I've been doing so far in my Puppet agent runit script is this: functio...
Here are a few script examples. These are bare minimum and don't bother with error checking, command line options, etc. I've indicated whether I've run the script myself to verify its correctness. Ruby Install the inifile rubygem for this script. This script is tested. #!/usr/bin/env ruby # filename: ~/config.rb r...
Editing INI-like files with a script
1,305,944,454,000
Is there a way to read a .vimrc file for only a single ssh session? That is, when I log in I perform some operation so that vim uses say /tmp/myvimrc until I log out? I do not want to permanently overwrite the current .vimrc, I just need to use a different set of settings for the duration of my login every once in a ...
Suppose you have this other set of settings in /tmp/myvimrc. If my reading of man vim is correct you can start vim with this set of settings using the following: $ vim -u /tmp/myvimrc Thus, to make this an option for the rest of the session, I would create a function that sets this as an alias for vim. Thus, in bas...
Temporary .vimrc
1,347,520,499,000
What are the main differences between the Windows registry and the approach used in UNIX/Linux, and what are the advantages and disadvantages of each approach?
There is no real cognate in UNIX, but as wollud1969 says, /etc comes close. That, though, is only part of the story. You'd also need to consider things under /var (for information about installed software, running services, etc), /usr/local/etc (at least on FreeBSD and certain Linux distros) for configuration informat...
Differences between Windows registry and UNIX/Linux approach [closed]
1,347,520,499,000
I installed Redhat 6 x86_64. I am using the Network connection screen to set a static IP address like below (I want two PC's in my house to see each other: one Redhat PC and one Mac) 192.168.0.5 255.255.255.0 192.168.0.1 When I run ifconfig it displays only lo and virbr0 information. I don't know what these it...
You can provide static IP by editing the file /etc/sysconfig/network-scripts/ifcfg-eth0 as root user in Redhat. It should look like this: DEVICE=eth0 BOOTPROTO=STATIC IPADDR=192.168.0.5 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 ONBOOT=yes After saving this file. You need to restart the network daemon using following ...
Setup static IP in redhat 6
1,347,520,499,000
I want to automatically configure my fstab in python by running a script. I thought of using ConfigParser in python, but I am unable to use it properly.
You can using fstab module. Its documentation here. Example: fstab = Fstab() for entry in fstab.entries: pprint.pprint(entry)
how to read and modify fstab in python?
1,347,520,499,000
What is the difference between ssh configuration file settings: At the top (global) level In a Host * scope? Assuming there is a difference, in which cases would each be preferred?
The SSH configuration documentation touches on this indirectly: For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. Since the first ...
ssh config: global settings vs `Host *`
1,347,520,499,000
I'm trying to understand what cloned_interfaces in FreeBSD's rc.conf really does. Manual page says: cloned_interfaces: (str) Set to the list of clonable network interfaces to create on this host. Further cloning arguments may be passed to the ifconfig(8) create command for each interface by setting the create_arg...
cloned_interfaces is one of the several settings in rc.conf, rc.conf.local, et al. that control the setting up and shutting down of network interfaces. In the Mewburn rc system it is /etc/rc.d/netif that is mostly responsible for using these settings. With nosh system management the external formats import subsystem...
What does 'cloned_interfaces' in rc.conf accomplish?
1,347,520,499,000
I want to generate xorg.conf but for that X needs to not be running. How do I stop X or start without it? I tried ctrl + alt + F2 but the X server is still running. I'm running Lubuntu 14.10.
I ended up doing the following: sudo service lightdm stop Then I had to run ctrl + alt + F2 and log in the second terminal, otherwise it would just sit there with dark screen. To start it back up: sudo service lightdm start
stop/restart X server
1,347,520,499,000
Only sometimes, I forget to make a backup of a given linux file such as /etc/rc.local, /etc/rsyslog.conf, /etc/dhcpcd.conf, etc, and later wish I did. Distribution agnostic, is there a good approach to later getting a copy of an unf'd up copy?
While the topic of configuration files backup/versioning might seem simple on the surface, it is one of the hot topics of system/infrastructure administration. Distribution agnostic, to keep automatic backups of /etc as a simple solution you can install etckeeper. By default it commits /etc to a repository/version co...
How to get copies of default Linux etc files
1,347,520,499,000
Under Debian Jessie i had for the first time backports in my package-source. I had some collision in apt, because some packages i had installt from http://www.deb-multimedia.org/ have higher versions in backports. First pin-priority for multimedia was 100. I try to set the priority for backports to -1, but it didn't...
You only need one entry with the appropriate archive name: Package: * Pin: release a=jessie-backports Pin-Priority: -1 Note that backports are pinned to 100 by default so they are not installation candidates unless you specify -t jessie-backports. I don't know how that plays with packages from other sources though, e...
Where is the pin-priority for debian-backports defined?
1,347,520,499,000
Using jq, is it possible to update property value of an object that contains a specific value in some other property? In the example below I'd like to set the value of the "value" property of all objects that have "keyname" = "foo". The example .json file looks like this: "root" : { "instances": [ { "name"...
Assuming that your JSON document is well formed, which the example that you show is not as it contains multiple issues: $ cat file { "root": { "instances": [ { "name": "1", "configs": [ { "keyname": "foo", "value": "" }, { "k...
Use jq to update property of object that contains other property with specific value
1,347,520,499,000
I want to be sure that whatever string I pass into the line wpa-ssid "abc" in /etc/network/interfaces won't be used to break out of the configuration. All I can find in the manual is that \ can be used at the end of a line to continue on the next line. But what about \" in the middle of a line? My worries is an SSID s...
In Debian's /etc/network/interfaces (or any other distribution using Debian's ifupdown utility), a backslash-newline sequence is removed, and backslash is not special anywhere else. A double quote character is not special either. The character # starts a comment if it's the first non-whitespace character on a (non-con...
escape characters in /etc/network/interfaces
1,347,520,499,000
In Firefox we have two options at Firefox->Preferences->Preferences->Fonts and colors->Colors menu, Use system colors and Sites can use other colors. I would like keep the first one checked (and this is ok) and change the second on a quick way. A quick way could be pressing a shortcut on keyboard, running a terminal c...
I had found a solution... I asked on mozilla forum and they returned a answer to me. The solution is: Install a extension called PrefBar. With this extension we can put a checkbox on mozilla that will change the property browser.display.use_document_colors. We can set a shorcut too (for example, F1). With this extensi...
How to change a firefox option on a quick way (via shortcuts, command line,..)?
1,347,520,499,000
When modifying config files from the command line, I often want to find the setting in the config file and modify that line if that setting exists. If that setting doesn't exist, I want to add it to the end of the file. I end up doing something like: if [ `grep -c '^setting=' example.conf` == 0 ] then echo "set...
Here is a confset Perl script that I just wrote that I'm going to put in my path: Can work with multiple files in a single invocation Can modify multiple config values in each file in a single invocation Separator can be specified (with --separator) Option to be liberal about white space around names Usage: confset...
Change a value in a config file, or add the setting if it doesn't exist?
1,347,520,499,000
Are the files in /etc/sudoers.d read in a particular order? If so, what is the convention for that ordering?
From man sudoers, the exact position found with this command: $ LESS='+/sudo will suspend processing' man sudoers Files are parsed in sorted lexical order. That is, /etc/sudoers.d/01_first will be parsed before /etc/sudoers.d/10_second. Be aware that because the sorting is lexical, not numeric, /etc/sudoers.d/1_whoo...
Are the files in /etc/sudoers.d read in a particular order?
1,347,520,499,000
I use a drawing program called Inkscape, which has both a GUI and a command line interface. When used on the command line, it has a large number of options that can only be controlled through a user-specific config file, which is hardcoded to be: $HOME/.config/inkscape/preferences.xml This config file always contains...
Inkscape has a feature for this as of 0.47: $ INKSCAPE_PORTABLE_PROFILE_DIR=/some/other/path inkscape --args Put your script's custom preferences.xml file in /some/other/path. It should be a dedicated directory, because Inkscape will populate it with all the other files it normally puts in ~/.config/Inkscape when you...
Clean way to temporarily replace a config file?
1,347,520,499,000
Is it possible to set up a keybinding in Openbox for switching between open windows within an application? Just like you can in gnome 3 with alt + [key above Tab] .
I have implemented this function by using wmctrl. The relevant part in rc.xml of openbox: <keybind key="A-space"> <action name="execute"> <execute>wmctrl-switch-by-application</execute> </action> </keybind> below is the code in wmctrl-switch-by-application: # taken from https://unix.stackexchange.com/question...
Can you switch between windows within an application in Openbox?
1,347,520,499,000
Since a few days, my web/mailserver (centos 6.4) is sending out spammails by the bunch, and only stopping the postfix service is putting an end to it. SMPT is set up to only accept connections over ssl and using username/pwd. And I already changed the password of the (suspected) infected emailaccount. Email was set up...
Pravin offers some good general points, but doesn't really elaborate on any of them and doesn't address your likely actual problems. First, you need to find out how postfix is receiving those messages and why it's choosing to relay them (the two questions are very likely related). The best way to do it is by looking a...
My Postfix installation is sending out spam; how to stop it?
1,347,520,499,000
I have been trying to get this to work for hours now! I would like to set up a simple web server. My web files shall be in /var/www. I also want to have phpmyadmin. I created a directory /var/phpmyadmin. Now I want to acces the normal web files in the standard way. For instance: The file /var/www/test.php should be a...
Your goal is to completely separate your "regular" web files from your phpMyAdmin installation. It should be stressed that each server configuration in Nginx can (and should) have only one webroot. That being said, these are your options: Install phpMyAdmin in a directory under your webroot, which in your case is /va...
nginx server config with multiple locations does not work
1,347,520,499,000
I've encountered a relatively common problem with ASIX AX88179 USB 3.0 Gigabit Ethernet adapter, where it was not working at all, or was working sporadically, and dmesg was showing errors like [23552.344134] ax88179_178a 2-1:2.1 eth1: Failed to read reg index 0x0000: -32 Searching on-line, I've found reports of this ...
A similar, but slightly cleaner strategy also involving a file in modprobe.d/ is to use the softdep feature to tell modprobe to load cdc_mbim before ax88179_178a. In /etc/modprobe.d/ax88179.conf: softdep ax88179_178a pre: cdc_mbim
How to fix an apparenlty missing kernel module dependency declaration?
1,347,520,499,000
This is my first question and I'm still pretty new so please forgive me if I've missed or botched something, or if this is an obvious solution. I'm using CentOS 5.8 (yes I know it's ancient) and trying to test some squid configurations From the Squid wiki: NP: Squid must be built with the --enable-http-violations con...
The question is about using RPM metadata to retrieve information about package specific compile time options. The information you're looking for isn't present in the RPM metadata. Either you need to have more than just an RPM (ideally a package build log or some of the files from the build directory), or you need to u...
How do I determine which configuration options an rpm package is built with?
1,347,520,499,000
I'm trying to setup Debian Squeeze (ala Dreamplug) as a router. I can't seem to get the pieces to fit together. ETH0: Upstream/internet - DHCP-Client ETH1: Downstream/Lan - 192.168.0.1 DHCP-Server sudo vim /etc/network/interfaces auto lo br0 iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 ifa...
Don't bridge your internal and external interfaces. Your box is a router, not a switch. To make your machine a router you have to tell it to ,,forward'' packets between interfaces. I do so by echo 1>/proc/sys/net/ipv4/ip_forward. IIRC the way(TM) to do it is adding a line net.ipv4.ip_forward=1 to /etc/sysctl.conf and...
Debian Squeeze as a router
1,347,520,499,000
Does lubuntu have an anti-blue light feature?
Yes, at least you can use Redshift on it — install the redshift-gtk package. Some desktop environments such as GNOME have similar features built-in, I’m not sure Lubuntu’s does.
Does lubuntu have an anti-blue light feature?
1,347,520,499,000
I have changed some stuff within the sshd_config file and want to reset the file to its default settings. How would I go about doing this?
The ssh default config file is on /private/etc/ssh/sshd_config, you can copy it to .ssh directory by the following command sudo cp /private/etc/ssh/sshd_config ~/.ssh/config Then restart SSHD: sudo launchctl stop com.openssh.sshd sudo launchctl start com.openssh.sshd
How to reset the sshd_config file to its default settings
1,347,520,499,000
I am running Fedora 25. I am unable to locate the file rsyslog.conf under /etc/ The output of the command ls /etc/*.conf is asound.conf kdump.conf radvd.conf brltty.conf krb5.conf request-key.conf chrony.conf ld.so.conf resolv.conf dleyna-server-servi...
Rsyslog is not installed by default on Fedora Workstation (although it is in some other flavors of Fedora). Many use cases can be served by querying the systemd journal directly with journalctl or other tools. Or, you can install and configure rsyslog — sudo dnf install rsyslog, and then find the config file you were ...
rsyslog.conf file is not present under /etc/ in Fedora 25
1,347,520,499,000
I am confused why Apache is not responding on port 80 ... $ wget http://localhost:80 --2014-05-06 15:32:44-- http://localhost/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused. ... but instead on post 8080 ... $ wget http://localhost:8080 ...
What's the value of the Listen directive in the config file in /etc/apache2/ports.conf? Yours says 8080 and 8800, not 80, which is why you got those results.
Why is Apache running on port 8080 instead on port 80?
1,347,520,499,000
TL;DR: when I was trying to compile a driver for USB DAQ device I have reconfigured the kernel. The driver refused to compile under the default distro's kernel but everything works with my tweaked kernel. The driver consists of 2 kernel modules. I know which options I changed but I want to know which particular config...
After some further experimenting I can confirm my claim made in one of my comments: the CONFIG_USB option has to have value Y; m is "not enough". Incidentally, the kernel in openSUSE 11.4 has it Y by default and the kernel in SLES11SP3 has m. It's a pity that the error message does not state it clearly. An easy way o...
How do I know which kernel configuration option enabled my driver?
1,347,520,499,000
Many projects these days use more than one programming / scripting language, and in standard DRY tradition these should not have separate configuration files if they need the same information. After a small survey in /etc, it looks like a lot of incompatible syntaxes are used in Ubuntu: varname=value - /etc/adduser.c...
The first 3 are serialization formats which aren't configuration formats. These formats are easy for machines to read and write but not as easy for humans to read and write. Do not use them for configuration. Your users will likely hate you for it. Also some of these files are simply NAME value pairs. Others might not...
Language agnostic configuration file format
1,347,520,499,000
Is there any way to change the height of a conky window? .conkyrc background no update_interval 1 cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale yes double_buffer yes no_buffers yes text_buffer_size 2048 #imlib_cache_size 0 # Window specifications # own_window_class Conky own_window yes own_window_type...
Just add ${voffset 200} at the end of the .conckyrc file and play with the value.
Increasing conky height
1,347,520,499,000
I have some Debian desktop machines, and during installation I left the domain name field blank, because I don't host any websites and I do not have a static IP (whatsmyip.org gives a different IP every few months). What should the domain name be in this situation?
You have several choices. You can use the .local domain name, which is reserved for machines that are not accessible from the Internet. (You can use it on a machine that can make outgoing connections to the Internet, or even from a machine that can but normally doesn't receive incoming connections from the Internet.) ...
Correct domain name for a non-server desktop machine
1,347,520,499,000
I'm trying to setup two network profiles in Centos. One for at home, one for at work. The home profile has a fixed IP address, fixed gateway and DNS server addresses. The work profile depends on DHCP. I've created a 'home' and a 'work' directory in /etc/sysconfig/networking/profiles. Each has the following files conta...
As it follows from the RedHat's documentation on networking profiles, you should not use base interface name (eth0) for profile interfaces, but have one called as eth0_work and so on. BTW, you don't need to restart network configuration, since profile switching handles it by its own. An example: # system-config-networ...
How to configure network profiles in Centos?
1,347,520,499,000
I have the following output whenever I issue task: TASKRC override: /path/taskrc TASKDATA override: /path/.task It's because I put the config and data files in non-default external location specified by $TASKRC and $TASKDATA environment variables of Taskwarrior. How could I make task to be quiete and not warn me ever...
You need to lower the verbosity by removing header from verbose. By default, verbose=yes, so you need to manually list each type of message that you want to see. For example, I fixed this by fully defining verbosity minus a few items: verbose=blank,footnote,label,new-id,affected,edit,special,project,sync,unwait in my...
How to override warning in Taskwarrior?
1,347,520,499,000
I don't like big text configuration files. So, I would like to split my rc.xml file into multiple files: rc.xml rc.keyboard.xml rc.mouse.xml
Why don't you just split it in the files you propose and then just cat them all together? cat rc-something.xml rc.keyboard.xml rc.mouse.xml > rc.xml The only problem is that you will need to cat them each time you modify one of the individual files, but that should be trivial..
How can I split Openbox `rc.xml` into multiple files?
1,295,448,882,000
I am making a script that needs to access the computer's monitor(s) configuration. How can I do that? Is there a command or a file I could read where I can access this information? At the moment, I do: xwininfo -root But I only have the total resolution and not the details. What I need is the resolution of each scree...
This is heavily dependent on the set up of the system. One way to get the information would be if xrandr is being used: xrandr --query This will display something like: Screen 0: minimum 320 x 200, current 3046 x 1050, maximum 8192 x 8192 VGA1 connected 1680x1050+1366+0 (normal left inverted right x axis y axis) 473...
How to retrieve monitors configuration from the command line?
1,295,448,882,000
I'm new on linux user I try to run crontab to backup my database with vagrant user * * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1 when the crontab runs there is no backup file in the folder (my backup/all has the permission sch...
Of course, the error is that you don't have a mailer (sendmail,postfix, etc) implemented and active. That being said your other problem is that the >/dev/null 2>&1 ONLY only applies/associates to the LAST command in this case gzip. Thus there must be some type of output going to STDERR for your mysqldump. The corre...
crontab error with (No MTA installed) but I use >/dev/null 2>&1
1,295,448,882,000
How to disable ChaCha20-Poly1305 encryption from ssh under Debian? I tried (as root): echo 'Ciphers [email protected]' > /etc/ssh/sshd_config.d/anti-terrapin-attack echo 'Ciphers [email protected]' > /etc/ssh/ssh_config.d/anti-terrapin-attack systemctl restart sshd But my ssh -Q cipher is still showing [email protec...
ssh -Q cipher always shows all of the ciphers compiled into the binary, regardless of whether they are enabled or not. This is true also for algorithms which are insecure or disabled by default. The configuration you have set up should be sufficient to disable the algorithm, assuming you're using a recent version of ...
How to disable ChaCha20-Poly1305 encryption to stop the terrapin ssh attack
1,295,448,882,000
My server is running on debian Wheezy and htop 1.0.1 but it does not display any values on the meters bar except the 100.0% value of CPUs. Is it possible to show always the values of a meter? This is the current display of htop on my server: But I want to have the numbers always on my meters like on this screenshot f...
Well, you create a htoprc file, mine is located in ~/config/htop/htoprc, I don't know how it is under Ubuntu, but that should work too. inside you just have to put: left_meters=AllCPUs Memory Swap left_meter_modes=1 1 1 That should give you the output you want. You can also change the number of the color_scheme. May...
Display numbers in meters of htop
1,295,448,882,000
To make things more readable, I'd like to put a little more margin between lines of text. I couldn't find an answer with man terminator_config or any of the Preferences panes.
Nowadays, Terminator luckily supports this. In Preferences/Global, you can set the "cell height". It does exactly what @egmont described in his answer. I've actually been browsing the source code in order to add this feature before discovering… it was already there.
How to change the line spacing in Terminator?
1,295,448,882,000
Whenever I open an image in feh, the background is set to the standard, dark gray and gray checkboard pattern like this: As you can see, it's the checkboard background. How do I permanently change this to black? I've search Google and other places, but I can't seem to find a straight answer. I'm guessing feh's config...
It seems that you cannot put your desired default options in a config file. If you know about $PATH you can resort to a hack. Create this script: #!/bin/sh feh --bg-color black "$@" Call it feh and place it in your $PATH before /usr/bin/ (assuming that feh itself is in /usr/bin/). Some distros have ~/bin/ in $PATH by...
How to permanently set default color of feh's background to black?
1,295,448,882,000
This is all on Debian Testing (= Stretch as of now). I am trying to configure opendkim, but it won't use the socket I want it to. According to man opendkim.conf, the Socket can be configured in /etc/opendkim.conf. I have also tried creating the file /etc/default/opendkim as I see it in my Jessie box, but that did not ...
You are configuring it correctly, but this is an open bug with Debian Stretch where it ignores configuration: See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864162
How to configure the socket for opendkim on Debian Testing/Stretch
1,295,448,882,000
On my Linux machine - I do the following: $ env | grep -i LESSOPEN LESSOPEN=|/usr/bin/lesspipe.sh %s So from env command I see that: LESSOPEN=|/usr/bin/lesspipe.sh %s I want to change the variable LESSOPEN, so I do the following search in order to find where it's located, so I can make this change. $ grep -Ril "LESS...
On Red Hat and CentOS systems, it is defined in /etc/profile.d/less.sh. On version 5, this contains # less initialization script (sh) [ -x /usr/bin/lesspipe.sh ] && export LESSOPEN="${LESSOPEN-|/usr/bin/lesspipe.sh %s}" On other systems, such as version 7, the value may be ||/usr/bin/lesspipe.sh %s; there is a slight...
Which file defines the LESSOPEN environment variable?
1,295,448,882,000
I am looking for a clean, "modern" way to configure, start, and stop the dummy0 network interface (from the dummy kernel module). My /etc/network/interfaces used to work on an older system but now fails silently on ifup dummy0: iface dummy0 inet static address 10.10.0.1 netmask 255.255.255.0 # post-up ip link...
The interface wasn't "created" previously; ifupdown relied on it magically appearing as soon as the 'dummy' kernel module was loaded. This is old compatibility behavior, and (AFAIIRC) it also interfered with explicit creation of the same interface name, so it was disabled through a module parameter. Now dummy0 has to ...
Modern way to configure dummy0 in /etc/network/interfaces or similar?
1,295,448,882,000
I recently installed kmscon on my system. Now I want to configure it to use a different keyboard layout (neo2) and, while I am at it, a different font, too. I stumbled across this question here when searching for configuration file examples. But nowhere I could find an example configuration file or instructions how to...
Further investigation brought me to this page. Now my config file looks like the following: # config file for kmscon linux console xkb-layout=de xkb-variant=neo font-name=Inconsolata font-size=10 This answers both my questions.
How can I configure /etc/kmscon/kmscon.conf to use specific a) font and b) keyboard layout?
1,295,448,882,000
TLDR In sshd_config(5), this config segment: Match Address fe80::/10 PasswordAuthentication yes ... is not matching link-local IPv6 addresses as expected. Why and how to fix? I am trying to configure sshd to only allow password authentication when connecting from local addresses. Otherwise public key authent...
After trying just about everything I could think of, I was able to find a solution that worked for me. I wanted to allow password auth to users on my LAN but only allow key based auth from outside the LAN which is why I ended up finding this post. From other reading I saw some indication that square brackets should be...
sshd_config - "Match Address <IPv6>" not matching
1,295,448,882,000
I have seen lines like the one below, in a number of config files (xmobar has one of these and dmenu too has this) '-*-fixed-*-*-*-*-18-*-*-*-*-*-*-*' What is the meaning of each token which is separated by a hyphen (-)? Where can I see a list of fonts which I can use in these configs? There is another variation of...
xfontsel will allow you to view, select and adjust all of these fields: You can also use the command xlsfonts to see a list of installed fonts. This will list all fonts, so you may want to pipe it through grep to view required subsets, eg,: xlsfonts | grep droid Similarly, fc-list will display a list of all installed...
Meaning of different tokens in a font config string
1,295,448,882,000
I need to work on a Solaris server over ssh from my Ubuntu (Lucid) laptop. I got Home/End Insert/Delete Page Up/Down working in csh and bash using bindkey and ~/.inputrc, respectively. But I can't figure out how to get them working in less. How can I figure out what the problem is, and fix it?
I found the answer here, in section 4.4. less (1). to use it with the movement keys, have this plain ASCII file .lesskey in your home directory: ^[[A back-line ^[[B forw-line ^[[C right-scroll ^[[D left-scroll ^[OA back-line ^[OB forw-line ^[OC right-scroll ^[OD left-scroll ^[[6~ forw-scroll ^[[5~ ba...
Why don't Page U/Down, Home/End work in less on Solaris over ssh from Ubuntu?
1,295,448,882,000
I was just wondering why echo $MANPATH does not work (on my system (Debian Jessie x86_64 GNU/Linux 3.16.0-4-amd64)). The manpath command alone works well: user@host:~$ manpath /usr/local/man:/usr/local/share/man:/usr/share/man /etc/manpath.config - exists and contains uncommented lines, according to the ones listed b...
From my man manpath (Ubuntu 16.10 - as you didn't mention your system details): If $MANPATH is set, manpath displays its value rather than determining it on the fly. So $MANPATH is more of an override to the otherwise default configuration held by /etc/manpath.config. Note also: DESCRIPTION If $MANPATH is set, ma...
Why does 'manpath' work and 'echo $MANPATH' does not?
1,295,448,882,000
I've got 2 PCs connected on an Ethernet crossover cable. On PC1 I run: sudo ip addr add 192.168.2.1 peer 192.168.2.2 dev eth0 sudo ip link set dev eth0 up On PC2 I run: sudo ip addr add 192.168.2.2 peer 192.168.2.1 dev eth0 sudo ip link set dev eth0 up sudo ip route add default via 192.168.2.1 What's the cleanest wa...
Here's the interfaces(5) "native" way to describe a point-to-point connection (written for PC2): iface eth0 inet static address 192.168.2.2 pointopoint 192.168.2.1 gateway 192.168.2.1 It's also useful to know that in a pinch, if you have an unusual configuration that interfaces(5) doesn't support, you can...
Static IP for 2 PCs on crossover cable in interfaces(5) file?
1,295,448,882,000
So fat, I am setting up microphone settings : $ amixer set 'Rear Mic' 90% mute cap $ amixer set 'Rear Mic Boost' 80% But, after some sys. update, my default recoding chanell changed to 'Front Mic' : $ amixer sget 'Input Source' Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Front Mic' 'Rear Mic...
I found solution here: http://thenerdshow.com/index30e5.html there I've found : $ amixer -c0 cset iface=MIXER,name='Input Source',index=1 'Front Mic' # (Record from Front Mic) slightly modified according to my sound-card and setup (default sound-card, different items ordering) : $ amixer cset name='Input Source',in...
amixer - How to change recording channel?
1,295,448,882,000
Is there any chance to create a configuration that does the following job? Only connect to available WiFi if it's signal is stronger than 30 % At many places, I stay in the border area of barely available wifi-signals. Thereupon those inevitable signal-abortions are just annoying, so I always have to switch between ...
I tried writing a script in python (python3, but works in 2 as well) that you can use for that. I've tried it until the connecting and disconnecting part, so that you can use the method that you prefer: with open("/proc/net/wireless", "r") as f: data = f.read() link = int(data[177:179]) level = int(data[182:185]) noi...
How to create a configuration to only connect to WiFi if signal is ≥ 30 %?
1,295,448,882,000
I do not want to store my sent file for mutt in my home directory. I would like to move this file to the .mutt directory. Inside my muttrc I did this - set record="~/.mutt/" but this causes an error and is non functional. I do not want to deactivate the sent file. I just want to move it. How do I move this file usin...
You need to specify the full filename using record: set record = "~/.mutt/sent" You could also use + to place your sent mail in a mailbox alongside your other mailboxes (thanks to grochmal for the suggestion): set record = "+sent" The mailbox location is set using the folder variable, and is ~/Mail by default.
Mutt sent file in home directory - how to relocate
1,295,448,882,000
I use vim in many different contexts ... actually, probably most people do: There is the editing of configuration files, programming, documenting, email and so forth. I very frequently found myself wishing for a facility that lets me put a vimrc into a directory and whenever I start vim from within that directory a lo...
Central configuration If it's okay to configure the local exceptions centrally, you can put such autocmds into your ~/.vimrc: :autocmd BufRead,BufNewFile /path/to/dir/* setlocal ts=4 sw=4 On the other hand, if you want the specific configuration stored with the project (and don't want to embed this in all files via m...
Customised vimrc for subfolders and projects
1,295,448,882,000
Long story short: I've used only distributions with "imperative configuration management/packaging" approach, so far. And,... I'm annoyed by hard to trace breakages/issues with imperative configuration management (when experimenting). I've found NixOS, which advertises: NixOS has a completely declarative approach to ...
The NixOS configuration consists of two files (although you can break it up into more files): configuration.nix and hardware-configuration.nix. Both files are stored in /etc/nixos and they are text files. Hence, you can certainly put them in a GIT repo.
Can I manage my NixOS configuration in version control like git?
1,295,448,882,000
In order to troubleshoot an issue I'm looking in my kernel configuration settings for: CONFIG_SECCOMP, CONFIG_HAVE_ARCH_SECCOMP_FILTER and CONFIG_SECCOMP_FILTER. The first one is present in the kernel's config file as: CONFIG_SECCOMP=y but the other two are simply not present. This leaves me wondering how to interpret...
For boolean or tristate yes/no/module settings, missing and n are equivalent. Boolean settings correspond to a C preprocessor macro which is either defined or not. Source files check whether the macro is defined with #ifdef. If the setting is n, the macro is not defined, which is equivalent to the default state. Yes/n...
Should settings missing in a kernel's config be interpreted as `<setting>=n` or are `defaults` used?
1,295,448,882,000
Has anyone here found the best way to STIG a version of RHEL 6.x automatically? The other answers I have found are either out of date or do not completely STIG the machine. Even an image that has a STIG of RHEL will help.
This project sounds like what you're looking for, titled: stig-fix-el6. excerpt DISA STIG Scripts to harden a system to the RHEL 6 STIG. These scripts will harden a system to specifications that are based upon the the following previous hardening provided by the following projects: DISA RHEL 6 STIG V1 R2 ...
STIG (Security Technical Implementation Guides) automation
1,295,448,882,000
I want to extract the default keybindings from my .i3config file and source it from another file I did that like this: #~/.i3config ... #source default keybindings . ~/.path_to_other_file But this doesn't work. Restarting i3 causes an error "you have a syntax error in your config file!" I can't think why this would...
There is actually a simple reason why this does not work as you expect. i3's config file is not a shell script. So, the question is, why would you want to do this? If you are hoping to be able to run commands in your i3 config specified in the script you mention, then it's not going to work. It seems like you're hopin...
Possible to source a file in .i3config
1,295,448,882,000
I have an Apache 2 server set up on my computer that I use for local testing. To be clear, it is not hosting sites on the internet. It's just for local debugging and designing. I was using Ubuntu Linux, but now I have a new computer using Linux Mint. What I'd like to do is take all the Apache sites and settings that I...
Your server settings, like any system-wide program settings, are to be found under /etc. The exact location depends on the distribution, but /etc/apache or /etc/apache2 are good bets. Both Ubuntu and Mint use /etc/apache2. If you have the same plug-ins installed and versions of Apache that aren't too far apart, you ca...
Can I duplicate my Apache server settings on a new Linux install?
1,295,448,882,000
I love lynx. I love browsing without tabs. Call me a luddite, but I only use a modern browser if I have to. Which is about twice a day, for a few minutes at most. There's one thing I really really hate about lynx, though. It's not immediately apparent how to customize lynx's behavior when it comes to filetypes. If I e...
Lynx does the standard thing (unlike Firefox and Chrome) and uses the system's mailcap database. The system mailcap is in /etc/mailcap, and the per-user file is ~/.mailcap. Add entries like application/x-bittorrent; transmission-cli '%s'; needsterminal application/pdf; pdftotext '%s'; copiousoutput application/ogg; vl...
Customize Lynx's filetype behavior
1,295,448,882,000
For some reason, I want to use a trackball Logitech (aka Logicool) Marble Mouse (aka Trackman Marble) upside down. Is there a way to reverse the left and right rolling and up and bottom rolling respectively software-wise, without modifying the hardware? I tried this by writing a configuration file in /etc/X11/xorg.co...
In gaming we just refer to this as "invert mouse". From the Xorg mouse(4) man page: Option "InvX" "boolean" Invert the X axis. Default: off. Option "InvY" "boolean" Invert the Y axis. Default: off.
Reversing the direction of a trackball
1,295,448,882,000
The file /proc/config.gz isn't updated when I rebuild kernel with changed configuration (from make menuconfig). For instance, I have rebuilt kernel with BLK_DEV_IO_TRACE which works fine but config.gz is still showing # CONFIG_BLK_DEV_IO_TRACE is not set. Isn't the .config file in the root directory of kernel source w...
I should have done more research prior to posting this question, but I thought might be I was missing something. For reference, the problem reveals to be specific to my kernel source. Custom kernel developer applied a patch to always include an older configuration in kernel binary. So this should be undone (considerin...
Why does “/proc/config.gz” show wrong configuration?
1,295,448,882,000
I want to default Guake to open as a floating window under i3. I created an entry under ~/.i3/config that reads as the following. My code is - for_window [class="guake"] floating enable My xprop for the window is - $ xprop GDK_TIMESTAMP_PROP(GDK_TIMESTAMP_PROP) = 0x61 WM_STATE(WM_STATE): window state:...
The correct command is - for_window [instance="guake"] floating enable Add the above to ~/.i3/config in order to allow guake to function and float as normal.
Make Guake Float in i3wm
1,295,448,882,000
I would like deadline to be the default IO scheduler for my system, and I don't want to lose that config when I reboot. What is the proper way of doing that? (I'm using Debian) Some hints: have a startup script doing echo deadline >| /sys/block/sda/queue/scheduler, use the kernel parameter elevator=deadline on GRUB ...
Depends on the situation really. All things equal, I would prefer the GRUB approach, purely because it is simple and you get your chosen scheduler right at the start of the boot. The main issue with it is that it is a system wide setting and if you have more than one disk and want different schedulers on each, then it...
What is the recommended way of setting a default IO scheduler on Linux?
1,295,448,882,000
How to autologin a specified user with xdm? I know it's possible with other display managers but I wasn't able to figure out how xdm has to be configured to autologin a certain user. Is it possible? Or should I rather remove xdm and simply use an initscript with startx?
I haven't used xdm in a long while but as far as I know autologin is not supported by xdm (and, as per one of the devs, not needed).
How to autologin with XDM?
1,295,448,882,000
When there is no .zshrc file in a user's home directory and zsh is started, an interactive configuration utility is run instead of directly giving access to the shell prompt. I set up zsh to be the default shell on my Debian Wheezy systems. Therefore every newly created user gets zsh as login shell if I do not change ...
from: http://www.zsh.org/mla/users/2007/msg00398.html The shell then executes code in the file scripts/newuser in the shared library area (by default /usr/local/share/zsh/<VERSION>/scripts/newuser). This feature can be turned off simply by removing this script. The module can be removed entirely from the configured ...
Disable the configuration tool in Zsh
1,295,448,882,000
My hands get tired everytime clicking on Ctrl+b to activate tmux (prefix) and then q to switch between panes (pane numbers). I want to map them to F1 and F2 respectively. I understand I need to change something in the configuration file ~/.tmux.conf but I'm not sure what, especially how to refer to Function Keys while...
Your question isn't clear as q by default prints the numbers of the panes, it doesn't switch between them... Nevertheless, you can achieve what you are after with some simple binds: first, resetting the prefix key to q and then setting F1 to move to the left pane and F2 to the right. With that knowledge, you can adapt...
How can I change specific keybindings in Tmux?
1,401,581,406,000
I often find myself in the situation where I need to look up the syntax and logic for a configuration file of some program on my computer. While I can do man mosquitto, this will not necessarily yield the help section for the file /etc/mosquitto.conf. What I am searching for is something like man /etc/mosquitto.conf o...
TL/DR: There's no centralized repository of information. Most up-to-date source of information of a an application / tool / etc. is in its documentation. Otherwise there are man pages, info pages, tldr pages, html documentation, literature, internet... Man pages are just one form of software documentation. The fastes...
Manpage for configuration file
1,401,581,406,000
Say I have a shell configuration file config like this: HOST=localhost PORT=8080 Now I have a template template like this: The host is <%= @HOST %> The port is <%= @PORT %> How do I substitute placeholders in template with values in config file? I can certainly do it like this: $ . config $ sed -e "s/<%= @HOST %>/$H...
You could do something like: eval "cat << __end_of_template__ $(sed 's/[\$`]/\\&/g;s/<%= @\([^ ]*\) %>/${\1}/g' < template) __end_of_template__" That is, have sed replace all the <%= @xxx %> with ${xxx} after having escaped all the $, \ and ` characters and let the shell do the expansion. Or if you can't guarantee th...
Substitute placeholders in template
1,401,581,406,000
root@debian:/home/debian8# cat /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_b...
#includedir /etc/sudoers.d is not a comment, #includedir is a directive. The hash sign is part of it. Just re-add it.
sudo: parse error in /etc/sudoers near line 27
1,401,581,406,000
On Arch Linux with GNOME 3.24.2 and Firefox 53.0.3 (soon to be upgraded to 54 when it comes into the repository) I have found in my about:support section that it says: Multiprocess Windows 0/1 (Disabled by add-ons) So I was wondering if there is any way that I can check which add-on(s) is doing this?
If Multiprocess Windows is listed as "Disabled by add-ons", open about:addons and disable all your add-ons, then enable them one-by-one to find which add-on is disabling e10s. Although Firefox will not allow incompatible add-ons to load - add-ons can be incompatible with e10s and thus their developers have chosen to d...
How to check which add-on(s) in Firefox is disabling e10s on Arch?