Hot answers tagged

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


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


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


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

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


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

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


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


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

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



Only top voted, non community-wiki answers of a minimum length are eligible