#StackBounty: #command-line #software-installation #shortcut-keys #auto-completion TextSuggest Universal Autocomplete Installation Error

Bounty: 50

I followed the instructions to install the autocomplete tool TextSuggest but now I’m stuck at this part:

Run the command textsuggest-server in the background, and set it to
run on startup.

Set the command textsuggest to a keyboard shortcut.
Type a word, select it, press the shortcut and TextSuggest will give
you autocomplete.

After running the command in the terminal this error comes up:

doit@tox:~$ textsuggest-server
textsuggest-server: command not found

Same error if I run it in the CD of textsuggest.
Also I got this error after the installation:

/usr/include/dbus-c++-1/dbus-c++/dispatcher.h:249:13: note:
conversion of argument 3 would be ill-formed: Makefile:416: recipe for
target ‘textsuggest-ui.o’ failed make: *** [textsuggest-ui.o] Error 1

How to get it to work? I’m using gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0


Get this bounty!!!

#StackBounty: #command-line #bash #zsh Zsh or Bash: Pass all command output through pager like app automatically?

Bounty: 50

Is there a way in bash or zsh to automatically pipe all output from any commands I run through another program?

For example, if I ran this command

$ cat /tmp/it

I’d like it to run like I had written it like so:

$ cat /tmp/it | tee /tmp/cmdoutput

where the | tee /tmp/cmdoutput part could be any command at all. My use cases are for colorization and for saving output for commands I run so I can edit them in vim, or search them in vim. I do these things already manually but want to know if there’s a way to do this automatically, and am looking for a general solution!


Get this bounty!!!

#StackBounty: #command-line #nautilus #18.04 #thumbnails #gthumb Automatically generate raw thumbnails only with gThumb

Bounty: 50

I would like to generate camera raw file thumbnails (Nikon .NEF) in Nautilus with gThumb, without opening the app, and when no additional thumbnailer is installed. Some script or a Terminal command, I guess. When a folder with pictures is opened in gThumb’s folders browser it generates thumbnails in /home/.thumbnails if the thumbnail for that file is not already there. Also, can it be done just by opening the folder with the raw files in Nautilus, as a thumbnailer would do it? For the moment gnome-raw-thumbnailer and ufraw-batch are buggy for 18.04, gdk-pixbuf-thumbnailer generates low quality thumbnails for raw files, so I’m not using any of them. Thanks!


Get this bounty!!!

#StackBounty: #command-line #apt #microsoft How to install mssql-cli at UBUNTU 18 LTS?

Bounty: 50

I am using apt install mssql-cli in a fresh UBUNTU 18 LTS, and, even after used this answer (mssql-server installed with successes) and this other one (executed all commands), there are “unmet dependencies”,

apt install mssql-cli:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mssql-cli : Depends: libicu52 but it is not installable or
                      libicu55 but it is not installable or
                      libicu57 but it is not installable
E: Unable to correct problems, you have held broken packages.

note

A similar problem when apt install powershell:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 powershell : Depends: libcurl3 but it is not going to be installed
              Depends: libicu55 but it is not installable
E: Unable to correct problems, you have held broken packages.

dumps

/etc/apt/sources.list.d/microsoft.list:

 deb [arch=amd64] https://packages.microsoft.com/ubuntu/17.10/prod artful main

/etc/apt/sources.list:

deb http://mirrors.digitalocean.com/ubuntu/ bionic main restricted
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic main restricted

deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates main restricted
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates main restricted

deb http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe

deb http://mirrors.digitalocean.com/ubuntu/ bionic multiverse

deb http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic universe
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates universe

deb http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic multiverse
deb http://mirrors.digitalocean.com/ubuntu/ bionic-updates multiverse
deb-src http://mirrors.digitalocean.com/ubuntu/ bionic-updates multiverse


Get this bounty!!!

#StackBounty: #linux #command-line #debian #apt Upgrade Debian Squeeze to Stretch

Bounty: 50

Doing apt-get update gets the following errors:

Ign http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_GB
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_GB
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_GB
Ign http://security.debian.org squeeze/updates Release
Ign http://security.debian.org squeeze/updates/main Sources
Ign http://security.debian.org squeeze/updates/contrib Sources
Ign http://security.debian.org squeeze/updates/non-free Sources
Ign http://security.debian.org squeeze/updates/main amd64 Packages
Ign http://security.debian.org squeeze/updates/contrib amd64 Packages
Ign http://security.debian.org squeeze/updates/non-free amd64 Packages
Err http://security.debian.org squeeze/updates/main Sources
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/contrib Sources
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/non-free Sources
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/main amd64 Packages
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/contrib amd64 Packages
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/non-free amd64 Packages
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
25% [Connecting to ftp.de.debian.org (141.76.2.4)]^C
root@ks3309152:/# nano /etc/apt/sources.list
root@ks3309152:/# nano /etc/apt/sources.list.backup
root@ks3309152:/# nano /etc/apt/sources.list
root@ks3309152:/# apt-get update
Ign http://debian.mirrors.ovh.net squeeze Release.gpg
Ign http://debian.mirrors.ovh.net/debian/ squeeze/main Translation-en
Ign http://security.debian.org squeeze/updates Release.gpg
Ign http://debian.mirrors.ovh.net/debian/ squeeze/main Translation-en_GB
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_GB
Ign http://debian.mirrors.ovh.net squeeze Release
Ign http://debian.mirrors.ovh.net squeeze/main Sources
Ign http://security.debian.org squeeze/updates Release
Ign http://debian.mirrors.ovh.net squeeze/main amd64 Packages
Ign http://security.debian.org squeeze/updates/main Sources
Ign http://security.debian.org squeeze/updates/main amd64 Packages
Err http://security.debian.org squeeze/updates/main Sources
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://security.debian.org squeeze/updates/main amd64 Packages
  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]
Err http://debian.mirrors.ovh.net squeeze/main Sources
  404  Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
Err http://debian.mirrors.ovh.net squeeze/main amd64 Packages
  404  Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]
W: Failed to fetch http://debian.mirrors.ovh.net/debian/dists/squeeze/main/source/Sources.gz  404  Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]

W: Failed to fetch http://debian.mirrors.ovh.net/debian/dists/squeeze/main/binary-amd64/Packages.gz  404  Not Found [IP: 2001:41d0:202:100:213:32:5:7 80]

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/main/source/Sources.gz  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]

W: Failed to fetch http://security.debian.org/dists/squeeze/updates/main/binary-amd64/Packages.gz  404  Not Found [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.

I realize I am 3 major versions away from the current, what do I need to do from here to upgrade to Debian Stretch properly based from the errors I get?


Get this bounty!!!

#StackBounty: #bash #command-line #kill #interrupt Interrupt shell command line expansion

Bounty: 50

Warning: DO NOT attempt the commands listed in this question without knowing their implications.

Sorry if this is a duplicate. I am surprised to learn that a command as simple as

echo $(yes)

freezes my computer (actually it is lagging the computer very badly rather than freezing, but the lag is bad enough to make one think it has frozen). Typing CtrlC or CtrlZ right after typing this command does not seem to help me recover from this mistyped command.

On the other hand

ls /*/../*/../*/../*/../*/

is a well-known vulnerability that also lags the computer badly to the best and crashes the computer to the worst.

Note that these commands are quite different from the well-known fork bombs.

My question is: Is there a way to interrupt such commands which build up huge amount of shell command line options immediately after I start to execute them in the shell?

My understanding is that since shell expansion is done before the command is executed, the usual way to interrupt a command does not work because the command is not even running when the lag happens, but I also want to confirm that my understanding is correct, and I am extremely interested to learn any way to cancel the shell expansion before it uses too much memory.

I am not looking for how the kernel works at low memory. I am also not looking for SysRq overkills that may be helpful when the system already lags terribly. Nor am I looking for preventative approaches like imposing a ulimit on memory. I am looking for a way that can effectively cancel a huge shell expansion process from within the shell itself before it lags the system. I don’t know whether it is possible. If it is impossible as commented, please also leave an answer indicating that, preferably with explanations.

I have chosen not to include any system-specific information in the original question because I want a general answer, but in case this matters, here are the information about my system: Ubuntu 16.04.4 LTS with gnome-terminal and bash 4.3.48(1), running a x86_64 system. No virtual machines involved.


Get this bounty!!!

#StackBounty: #16.04 #command-line #vpn Command line connect to L2TP Windows Server VPN

Bounty: 50

I have been searching for a couple of days not much luck as and everything i come across relies on using the Network Manager UI.

Could someone provide me with a noobish tutorial on how I would configure the ubuntu server to automatically (on startup) connect to an L2TP over IPSec VPN with Windows Login credentials?

It does not have to be L2TP over IPSec, I do also have the Windows Server configured to allow PPTP VPN connections but I would prefer L2TP as it’s more secure.

I would also need to know if there is a special configuration I need to prevent the Internet connection being tunneled through the VPN as I know windows does this by default and it has to be turned off on the VPN Network Adapter in windows if the same need to happen on the Ubuntu server I will need to know how to do that so I don’t lock myself out of the server by it losing its internet connection 😀

The reason for this is that I have quite a lot of attempts on the SSH Port’s so I want to set the Hardware Firewall in front of the server to not allow SSH through it and make it so the only way to connect to the SSH server is via the Corporate VPN.


Get this bounty!!!

#StackBounty: #linux #command-line #bash #shell #shell-script How can I get bash command line completion to complete a partial argument…

Bounty: 50

Imagine I have a command ‘command’ which takes arguments foo:bar foo:foo bar:bar or bar:foo
I can write a command line completion script that I can source into my environment to give me completion that looks like the following:

function _command_opt()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="foo:bar foo:foo bar:bar bar:foo"
    if [[ ${prev: -7} == 'command' ]]
    then
        COMPREPLY=( $(compgen -W "${opts}"  -- ${cur}) );
        return 0;
    fi
}
complete -F _command_opt -o bashdefault -o default 'command'

However if I type command f[tab][tab] I get foo:bar and foo:foo listed, but neither is completed onto my command line (because they aren’t yet distinct. What I would like to accomplish is that this produces command foo: and leaves my cursor at the end of the current word (rather than adding a space) to allow me to then type b or f and then tab again to finish the command. The example problem is just to show what I mean… the real case the prefix:suffix combinations are quite long, so partial completion would be really beneficial. e.g. 25 different commands that all begin with prefix translationupdateprocess: and translationupdateprocess is one of 25 different equally long prefixs with that many options.

Does anyone know of a way to get bash complete to operate this way?


Get this bounty!!!