New answers tagged

0

I still haven't found anything in terms of a configuration web server as stated in my question, but this article addresses the general problem really well and lays out the current options. Essentially options include: Wi-Fi protected setup including USB flash drive configured from an AP (rare) PIN Push button (possibly the best solution when there is ...


1

Where to export After having read https://bitbucket.org/padavan/rt-n56u/wiki/EN/UsingCron a good way to export configuration variables for both crontab and shell usage, is to insert the /opt related variables into /opt/etc/profile. Where and how to source To use ("source") the variables in cron it is suggested to: create a shell-wrapper script source ...


2

I use a simple function: mpvs() { local file="$1" mpv --sub-file="${file%.*}".srt "$file" } If you want to test for the presence of subtitle files with different extensions, you could use a more complex approach: #!/usr/bin/env bash # Play subtitles for a film if they exist movie="$1" mdir="${movie%/*}" name="${movie##*/}" cd "$mdir" for file in ...


0

You could pass the full pathname of the config file to the sub-script. For example: #!/bin/bash . ./config ./sub-script ./config The sub-script could then do something like this: cfg="$1" shift . "$cfg" You could even have a default for $cfg, just in case $1 is empty. cfg=${1:-/path/to/default/config}


1

If you can set your script up this way #!/bin/bash . config . /path/to/sub-script Any variables initialised in config should become available to the main script and any scripts it sources. Explanation It seems your script was launching a new non-interactive shell process, shell variables initialised in the parent script would not have been available ...


1

You can export your variables: VAR=foo export VAR or: export VAR=foo However, these variables will be visible in the environment of all subprocesses.


1

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 ...


0

There's a patch allowing full-fledged scripting inside tmux, attaching tcl language to its internals. http://ershov.github.io/tmux/ Also, it allows to specify as many actions as you want for 'mode' keystrokes. Using that, your code would look like: bind R tcl { source-file "$HOME/.tmux.conf" ; display-message "Configuration reloaded." } or even more ...


0

A possible solution is to prepend the Emoji font like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit name="family" mode="prepend_first"> <string>Emoji One Color</string> </edit> </match> ...


1

Use -r switch instead. e.g node -r ./config.js It will preload that module, and keep the shell for you.


2

In a shared web-hosting environment, there are a couple issues that you need to address right off the bat. Regarding directory permissions and only being able to access your files: what you want to do is set home directory permissions such that the "others" group has no permission whatsoever. Remember that eXecute permission is needed to cd into ...


1

If you don't have r permission for a directory, but only x permission, you cannot "scan" the directory, but you can access any file in it that you know the name of. If you do ls -ld /bin you might see the mode setting to be drwxr-x--x to see that the "other" of /bin is able to use programs in it, such as /bin/ls, but not access (view) the directory in a ...


1

Xorg logs to /var/log/Xorg.n.log where n is the server log file for display n. In newer implementations1, the log file may be found at $HOME/.local/share/xorg/Xorg.n.log. The log will contain all of the currently loaded values for the running display, including any configuration options loaded through conf files in /etc/X11/xorg.conf.d/. 1. From Xorg ...


1

It turned out to be a small config mistake by myself. After 8 hours of brain-pain and fulle rebuilding the config file the fault turned out to be in the TransferLimit line where also the group was specified. (which is not needed because we use class definitian). TransferRate APPE,RETR,STOR,STOU 1000 group speedlimit should have been: TransferRate ...



Top 50 recent answers are included