Tag Info

New answers tagged

0

Welcome to Ubuntu. I am guessing you're using the latest version of Minecraft launcher(the new Minecraft launcher since Minecraft 1.6) with the title `Minecraft Launcher 1.5.3)right? With the command you state above, it will only start Minecraft launcher with Java 8 instead of Minecraft(the game) with Java 8. If you want to launch Minecraft with Java 8, ...


0

You can create a .desktop file that will do this. Bash file are usually run from the terminal, while .desktop files simply run a command, not necessarily needing a Terminal. As for launching Minecraft, that's simple enough. Run nano ~/.local/share/applications/minecraft.desktop in Terminal Copy/paste this in to the file you just opened: [Desktop Entry] ...


0

You can increase the bash history size. Basically you can increase it to unlimited. export HISTSIZE= export HISTFILESIZE= The above lines can be added in ~/.bashrc of the user or /etc/bash.bashrc


1

Your function needs to be ldr () { ls -dlrta "$@"; } use the quoted form "$@" to use all the arguments, with whitespace protected.


0

You've mixed all up. ConEmu is a terminal but not a shell. git-bash is a shell. ssh is a console tool providing remote connection. (Local) terminal is a tool that just displaying output of running console applications (shells and other tools). So, it's irregularly to compare ConEmu with git-bash. They are different type of tools. What shell are you ...


1

What should work anyway is to kill it by its pid: run ps -ef (or ps -efww if the lines are too long to read the end) find the scriptname, and you will have its pid kill it with: kill <pid> (mind you: not pkill, which is to used as pkill <application>, not as pkill <pid>) Note: Using the command: ps -ef | grep testscript will list ...


2

I'm running the command ... in ConEmu, if that changes anything. It changes everything. That's how your terminal emulator renders the character that's send for CtrlC (End-of-text, or ETX, hexdecimal 0x03). You can try this out with printf '\x03'. Switch to another if you find it annoying, but I don't know if any emulators in Windows don't have this ...


2

The equivalent of command1 | command2 is command2 < <(command1) This can be extended to three (or more) commands too. command3 < <(command2 < <(command1)) $ lspci | grep 'Network' 02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) $ grep 'Network' <(lspci) 02:00.0 Network controller: ...


0

A rewrite: #!/bin/bash minutes=$1 trace_path=$2 bkup_path=$3 if [[ ! -d "$trace_path" ]]; then echo "Error: trace_path '$trace_path' is not a directory" >&2 exit 1 fi if [[ ! -d "$bkup_path" ]]; then echo "Error: bkup_path '$bkup_path' is not a directory" >&2 exit 1 fi echo "Moving files which are older than $minutes ...


-1

Sorry if I wasted anyone's time. The answer is in Bash script with execution permissions won't run with dbl click -- which I found in Linked and Related. Thank you for UBUNTU.


0

Strange, the "accepted" answer didn't work for me as I got chsh: PAM: Authentication failure To solve this issue edit your /etc/passwd and make sure it points to the zsh location. (You can find this by running "which zsh") In my case my user called "webmaster" looked like this:


-1

Try the below command, sudo chmod a+rw -R After this run, .rvm Then try to install ruby. Hope this helps.


0

Bash fancy menu Try it out first, then visit my page for detailed description ... No need for external libraries or programs like dialog or zenity ... #/bin/bash # by oToGamez # www.pro-toolz.net E='echo -e';e='echo -en';trap "R;exit" 2 ESC=$( $e "\e") TPUT(){ $e "\e[${1};${2}H";} CLEAR(){ $e "\ec";} CIVIS(){ $e "\e[?25l";} DRAW(){ $e ...


0

You need to create a desktop launcher for your program. It must have .desktop extension.Open a text editor first,write necessary lines and then save it with .desktop extension. For example tor.desktop [Desktop Entry] Version= version of the program(like 0.5,etc) Name=tor Comment=tor browser (any comment you wish) Exec=a path to the start command ...


0

The gnome-terminal manual shows an option to execute a command in the terminal it opens. -x, --execute Execute the remainder of the command line inside the terminal. But the catch is that once the command finishes, the terminal will close. This thread has a solution for that: gnome-terminal -x bash -c "echo 'hello ...


1

You don't even have to use SIGTERM. tail listens for SIGINT and SIGQUIT too. I'm not sure if there's any difference between signals (it's all specific to tail) but any of these would be better than SIGKILL. It's quite easy to test too: $ tail -f /dev/null > /dev/null & [1] 26599 $ kill -SIGINT $! [1]+ Interrupt tail -f /dev/null > ...


1

SIGTERM sends a signal to the command and will tell the command to stop itself. If there is a need to clean-up files due to the kill the command can do that. SIGKILL sends a signal to the init system. The command itself does not get even told it is going to get killed. So you can use both; but SIGTERM should be preferred (it is more graceful). Will ...


1

best I could find on my own (and I'm a newbie) was just running 'apt-get check' for a clue as to how things turned out following an install. Also running 'script' prior to running an 'apt-get install' will capture all the output from the command to file so that you don't have to worry about it scrolling away.


0

Well I see a few people checking this question out and I figured out how to do it. So I'll make a small beginner's guide to rsyslog. If you just want to forward syslog data to a remote server: Add this line to the bottom of /etc/rsyslog.d/50-default.conf (based on protocol): UDP: *.* @remoteserverIP:PORT #usually port 514 TCP: *.* @@remoteserverIP:PORT ...


2

For me, this is logical: the $PATH is searched from the beginning to the end and the first matching executable will be run. See the following Q&A's on the same topic: Order of files to be executed in linux and how to change it How to correctly add a path to PATH? How does unix search for executable files? So, first found, first used!


1

Most commands that output data on stdout, (which includes grep and sed,) buffer their output when it's not going to a terminal. That is, they wait for a large chunk of output to gather (like 4KiB) before flushing the chunk to the file or pipe. This is generally more efficient. Some commands allow you to override this, like GNU grep which has a ...


0

You can use cron. cron allows you to set scheduled tasks in Linux. crontab -e @reboot <path-to-script>/boot-up #add to end of file


0

Aliases are specific to the shell and most likely xfce4-mailwatch-plugin knows nothing about them. That is why it isn't working for you. The || and & are also shell-specific. I suggest you create a 2-line script (the first line being #!/bin/sh) that does what needs to be done, save it and make it executable. Then configure xfce4-mailwatch-plugin to ...


0

You can do something like this: the_ppa=... # set appropriately if ! grep -q "$the_ppa" /etc/apt/sources.list /etc/apt/sources.list.d/*; then # commands to add the ppa ... fi Notes: grep exits with success if it finds a match The ! negates this, so the commands will be executed if there is no match = ppa not added The -q flag makes grep quiet, so ...


0

Removing list.save files, sources, ensure only deb lines and count it for "fogger" ppa: ppa_added=`grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -v list.save | grep -v deb-src | grep deb | grep fogger | wc -l` echo $ppa_added


0

xbindkeys should be able to do this. Install it with: sudo apt-get install xbindkeys Now run: xbindkeys -k and press the think vantage button. Your output should look something like: Press combination of keys or/and click under the window. You can use one of the two lines after "NoCommand" in $HOME/.xbindkeysrc to bind a key. "NoCommand" ...


1

You could use d command from sed. To remove all lines containing word John, you would do sed --in-place /John/d ./file In case of Multiple criterions, use the -e command sed --in-place -e '/John/d; /John Smith/d' ./file


0

Several possible methods. I tend to use "awk": awk "!/John/" file_original > file_new This will use awk and "parse" file_original into file_new where it excludes (the !) any line that contains the word John. You can also use grep or sed to do the same: grep -v "John" file_original > file_new sed -n "/John/!p" file_original The last one changes ...


0

more simpler way. make a new file that will contain your search key-word, one per line. grep --file=<filename containing search keys> <filename to find into>


1

You don't need [[ operator, just: if grep -qwE "${first}|${last}" Datafile.txt; then echo "This name already exists" else echo "This name doesn't exist yet" fi


1

I'm not sure what you mean by 'run at all times', so I can't answer that part, but for the rest. https://help.ubuntu.com/community/EnvironmentVariables has a great explanation under the 'System-wide environment variables' section. But here's what you need to know. Login shells and interactive non-login shells are controlled by different files. So if you ...


3

...why? Probably there is a better solution, so if you state why probably we can suggests some more sound solutions. Remember that the shell is used not only by users, but also by a lot system processes. Anyway, bash (the default shell) when starts it will (but see later) execute a series of system-wide scripts. The shell can start as interactive or ...


2

The View_Entry() block isn't closed. i.e. it should be View_Entry() { echo "Go Flight" pause } Fixing this makes the script work for me. If you use a text editor with syntax hightlighting (e.g. vim or kate, perhaps gedit?) this is easy to spot.


2

In if [ "$brightness" -lt 3] there needs to be a space before the ]: if [ "$brightness" -lt 3 ]


2

To redirect only stderr of evince to /dev/null and send it to the background at the same time you need to specify evince name.pdf 2> /dev/null &


1

Use find instead: find /some/path -name '*~' -type f -delete -name '*~' for filenames ending in ~ -type f for regular files (skipping directories, etc.) -delete ... well?


0

I found out what was wrong. #!/home/jesse/Desktop interpret Needed to be: #!/home/jesse/Desktop/interpret /usr/bin/env is a command itself. Python is an argument passed to it. Thanks to @muru for this.


4

You needn't check if it exists, the checks for read and write permissions are enough: From help test, a selection of relevant tests: -a FILE True if file exists. -e FILE True if file exists. -f FILE True if file exists and is a regular file. -r FILE True if file is readable by you. -s FILE True if file exists and is not ...


0

Somehow I overlooked that apple remote only work with built-in infrared.http://support.apple.com/en-za/HT201584


0

Never mind I found out the answer, there was carriage returns and an ^M char which I had never seen. This question can be deleted.


0

Using sed: sed -r 's/([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})/\4.\3.\2.\1/' Match IP address and print from last to first(reverse)


0

Here is a native function. Call it like reverseip 12.34.56.78 to have it print 78.56.34.12. Call it like reversed=$(reverseip 12.34.56.78) to capture the output into a variable. reverseip () { local IFS IFS=. set -- $1 echo $4.$3.$2.$1 }


3

To convert input to arguments, use xargs: some command | xargs gedit Since you "don't like" the correct method, be careful of spaces in filenames and the like. Just so you know, the most suitable way is: gedit "$(command -v some_script)"


1

You're looking for the program that handles the desktop notifications... I'm not sure if it's the same on every desktop, but on XFCE it's notify-send - a program to send desktop notifications from the package libnotify-bin. It's a dependency of xubuntu-desktop, ubuntu-gnome-desktop, ubuntu-desktop, mythtv-frontend, so it sounds fairly universal. It's handy ...


0

Ubuntu already places battery percentage (and optionally time) in on the tray when running on battery, and produces a popup exactly like you described on battery critical. Under what other circumstances would you want this popup?


1

The exec line should look like this: Exec=env PULSE_LATENCY_MSEC=30 LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype %U


0

You need to use pre-seeding. The debconf-set-selections command presets answers asked by debconf before installing the package. E.G. sudo debconf-set-selections <<< "shared/accepted-oracle-license-v1-1 boolean true" Then install the package. sudo apt-get install -y oracle-java7-installer


0

To permanently add a new environment variable in Ubuntu (tested only in 14.04), use the following steps: Open a terminal (by pressing CtrlAltT) sudo -H gedit /etc/environment Type your password Edit the text file just opened: e.g. if you want to add FOO=bar, then just write FOO=bar in a new line Save it Once saved, logout and login again. Your required ...


0

In addition to the: sudo update-rc.d noip2 defaults you should also set permissions of: chmod 755 /etc/init.d/noip Then you should be able to start and stop. tested on Ubuntu 14.04 LTS following these directions from: How To Install No-ip2 On Ubuntu 12.04 LTS In Order To Host Servers On A Dynamic IP Address


1

Use curl with -s option. From man curl -s, --silent Silent or quiet mode. Don't show progress meter or error mes‐ sages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it. It will not show the additional details such as progress meter or ...



Top 50 recent answers are included