Hot answers tagged

83

Actually, this is what timeout is for: TIMEOUT(1) User Commands TIMEOUT(1) NAME timeout - run a command with a time limit SYNOPSIS timeout [OPTION] DURATION COMMAND [ARG]... timeout [OPTION] DESCRIPTION Start COMMAND, and kill it if still running after DURATION. lx@lxtp:~$ dpkg ...


57

There are (at least) two programs that provide this functionality: NAME timelimit — effectively limit the absolute execution time of a process SYNOPSIS timelimit [-pq] [-S killsig] [-s warnsig] [-T killtime] [-t warntime] command [arguments ...] and NAME timeout - run a command with a time limit SYNOPSIS timeout [...


30

What solved my issue was using less than 3 GB of ram in the virtual box session. I was originally attempting to utilize roughly 6 GB. You are trying to allocate >3GB of RAM to the VM. This requires: (a) a 64 bit host system; and (b) true hardware pass-through ie VT-x.


29

What's happening is a name collision. 127.0.53.53 is a special IPv4 address that will appear in system logs alerting system administrators that there is potential name collision issue, enabling a quick diagnosis and remediation. The "53" is used as a mnemonic to indicate a DNS-related problem owing to the use of network port 53 for the DNS service. ...


23

if you want to remove and reset the Linux subsystem, open command line prompt and enter the following commands. lxrun /uninstall /full lxrun /install. Sources: How to reset\reinstall Bash on Windows 10 https://www.slightfuture.com/technote/lxss-lxrun Installing Fish Shell on Ubuntu on Windows 10 HOWTO: Ubuntu on Windows | Ubuntu Insights


22

Felix Krull also maintains a PPA with the latest Python 2.7 release. You can use the same process like krondor describes, but use instead or additionaly this PPA: ppa:fkrull/deadsnakes-python2.7. It also has packages for Ubuntu Precise Pangolin / 12.04 LTS available. sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7 sudo apt-get update sudo apt-get ...


18

I will answer my own question... I hope this will help someone! :) After struggling a bit, I found some useful commands: /dumpmsnp - show details about your connection /showplaces - show where you are currently connected You can execute them in any chat window. /dumpmsnp command was showing "LoggedOut", but I was online and talking almost normally (...


18

While this question is somewhat opinion based to a degree: Yes this procedure is viable - I believe that it would accomplish what you are looking for and it is something I have done in the past with other linux distributions. The only real pitfall is around disk spacing... make sure that your students machines have sufficient disk space to handle the size ...


17

Dell laptops that come with Ubuntu preinstalled have a selection of hardware selected for optimal compatibility with Ubuntu that is different from the same model Dell laptops that come with Windows preinstalled. In addition to this, the default UEFI settings of Dell laptops that come with Windows preinstalled are optimized to run Windows well. So in addition ...


16

For others: sudo apt-get install php-gettext might be the answer (especially with php7 as it seems that this is not included by default, maybe because it is a pear extension).


16

Warning, this process will restore Lxss to initial config To reinstall the Lxss open Windows cmd as administrator and run: C:\WINDOWS\system32>LxRun.exe /uninstall Then: C:\WINDOWS\system32>LxRun.exe /install


14

When you refer to proxies, it’s usually just about HTTP (and HTTPS), sometimes also FTP. Ping does not use HTTP but ICMP. That means it’s not affected by whatever HTTP proxy you set. Other tools, like wget (a command line HTTP downloader), respect the http_proxy environment variable. This variable may or may not be set when you change the GUI settings. You ...


13

Answering your question exactly, if you need to tailor the VM and hand them a deliverable VirtualBox VM, I recommend using Packer to prepackage the VM with all the required dependencies. It is built for just this purpose and allows you to spin up an image from an ISO, perform any provisioning you want against that image, and then creates a deliverable ...


12

Fixed it. Ran: apt-get remove upstart then apt-get remove udev then apt-get autoremove and it all seems to be working now.


11

Pure bash built in, without coreutils I found that this solution works in bash relying on a built-in command without calling an external executable. It works on system where eventually are not even been installed the coreutils [1] YourCommand & read -t 300 ; kill $! # 1st version YourCommand & read -t 300 || kill $! ...


10

I tried dd. Didn't work. Tried unetbootin. Didn't work. Looked for winusb. Couldn't find it, and heard it doesn't work for win10, anyway. But! This did work for me! http://onetransistor.blogspot.com/2014/09/make-bootable-windows-usb-from-ubuntu.html Note that I had to add "--force" on the grub-install command. The steps are basically as follows: ...


10

No, that's not an email address. The something@domain syntax is used in many other places, and SSHv2 uses it for naming all "nonstandard" extensions (ciphers, subsystems, and so on). So this particular request has @openssh.com because it was invented by OpenSSH, and hasn't been made part of the "main" standard documents. Its purpose is ...


10

For your particular case, most implementations of ping support -c or --count to terminate after a particular number of pings: ping -c 300 host.example.com For a more general solution, see the other answers.


9

This is an MS-Outlook format. There is a command line tool called MSGConvert (see www.matijs.net/software/msgconv) which converts .msg files into .eml. You can open those with Thunderbird or Evolution. On Ubuntu you should be able to install the tool using sudo apt-get install libemail-outlook-message-perl libemail-sender-perl from a command line. Use ...


9

Perfectly feasible. The alternative would be Vagrant, Puppet, Chef or something similar to build the VM's from scratch but that is a lot of work to setup. The development team on one of my sites does the same to get new developers quickly up and running. 1 pre-set account (with sudo-rights) in the image and a short instruction-document with the steps they ...


8

inotifywait (part of inotify-tools) is the right tool to accomplish your objective, doesn't matter that several files are being created at the same time, it will detect them. Here a sample script: #!/bin/sh MONITORDIR="/path/to/the/dir/to/monitor/" inotifywait -m -r -e create --format '%w%f' "${MONITORDIR}" | while read NEWFILE do echo "This is the ...


8

Windows somehow decided to list this partition, but due to the fact that Windows lacked ext2/3/4 filesystem driver it is not able to understand the contents of it. You can hide this in Disk Manager by deleting the assigned drive letter. Or you can leave it as is and find a ext2/3/4 driver for Windows so you can read (maybe and write) contents to the Linux ...


8

Move vbox1 to a different subnet: Change its IP address on eth0 from 192.168.1.65 to 192.168.0.65 (or some other free IP address in the subnet 192.168.0.0/24). Then, vbox1 knows via which interface p4 (192.168.0.70) is accessible (--> via eth0). vbox1 automatically adjusts its routing table then. Now you should be able to access p4 from vbox1. If you want to ...


8

You can do it with a simple script like this: #!/bin/bash # # $1 is the time to let the program run, and $2, $3, ... are the command itself. # "${@:2}" & PID=$! sleep "${@:1:1}" kill -2 $PID (signal SIGINT=2 used as per Matija Nalis' suggestion in the comment below). An explanation of the (uncommon?) bash expression $@:...: the positional ...


7

Single commands can be omitted from history (and up/down recall) by prepending with a space: $ echo "foo" # saved $ echo "bar" # <-- not saved Otherwise, you can turn off history by adding to ~/.bashrc: set +o history (to reenable, use set -o history) If you want to disable it for the current session only: $ unset HISTFILE


7

"add the binary to your path to make it available on the command line" In unix, the PATH is the environment variable which defines where the shell looks for executable programs to run when you enter them on the command line. If you do a: echo $PATH You can see what your PATH looks like. All of the directories on the PATH are then searched (in order) ...


7

It seems to be a problem with the sources. Go to System Settings -> Software & Updates -> Download from -> Select best server For more additional details, refer this thread.


7

When foreign documents use an unknown font you don't have installed, that font's name still gets displayed in LibreOffice Writer, but it automatically picks one of your installed fonts that it thinks is most similar to what you might want to see. So what you describe is the perfectly normal and intended behavior in the situation that you just don't have ...


7

It might be your router, but it might be your ISP: I have seen ISPs blocking all DNS (UDP 53) requests to other IPs than their DNSes - they do this to either monetize (make their DNS resolve ad-sites worng on purpose) or sometimes for legal reasons (DNS-based blocking of sites). And before you ask: Yes, they deliberately break DNS.


7

The Windows installer (more importantly the automated creation of the boot manager/BCD data) doesn't have the ability to identify other installed OSes (such as Ubuntu) and therefore give you the choice upon boot. In contrast, however, the Linux installer (again, more importantly the GRUB2 installer) DOES have the ability to identify that other OSes exist on ...



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