Sound notification in Ubuntu terminal [duplicate] - command-line

This question already has answers here:
In a bash script/command how can I make a PC beep noise, or play a sound file?
(9 answers)
Closed 4 years ago.
When running commands such as bundle install (for Ruby apps), I'd like to hear a small sound (or popup) notification when the command finishes. How can I do this?

Install the tool 'beep'.
$ sudo apt-get install beep
Now you append "; beep" to whatever command you run.
$ bundle install; beep

To get a pop-up notification, you can use notify-send. This gives you a notification using the same bubble pop-up as you see the OS using for new mail, etc. It is non-modal, so it will only last for a set amount of time though. You can extend the amount of time with the -t option.
Zenity will give you a modal pop-up than you can clear manually. Use something like:
zenity --info --text="message text"

Related

Cannot install Flutter on MacOS blg sur terminal

I am not able to install flutter on my mac book.
There is no problem entering the SDK.
But after that is the problem. Run the terminal app and enter the path.
I watch lectures, watch YouTube, and follow them, but I can't.
i changed "bash -> zsh", and write 'vim ~/.zshrc'
and enter, but see a message like the one below.
what is the problem?....
enter image description here
enter image description here
VIM created a .swp file so you can't open two instances of the same file.
You may want to use nano command which is less complex to use than VIM to update your path in your .zshrc file

How can I step through a Perl program using Padre?

How can I step through a Perl program using Padre?
After much effort I installed CPAN Module Padre-1.00 on my home computer, which uses Windows 64bit and version 5.24.1 of Strawberry.
I also installed Padre's dependencies "Wx" and "Alien::wxWidgets", but all I can do with Padre at the moment is edit and save a Perl program, and run a Perl program from start to finish.
I see no icons for doing the normal debug activities, such as step into the next line, execute a function, and step out of a function
Can anyone help? There is a Padre web page saying you can use a Tools->Advanced option to get some additional icons on the toolbar but it doesn't work. Nor does there seem to be any key-binding for debug commands.
When I click the Padre’s "Bug" button – which supposedly puts Padre into a line-by-line debug mode – a DOS window titled "padre.exe -d " appears, and within the DOS it says "Press any key to continue".
I have seen internet comments that Padre has bugs and has not been changed in a year.
Can anyone help?. Have you found a way to run a Perl program in Padre line-by-line?
It's actually quite simple. You can launch debugger by clicking on one of the top menus:
Now, in the right panel there will be step to next and step over buttons:

Displaying current path in the window title with byobu on centos

I am used to displaying my current path in the linux terminal window title when using rxvt with something like:
PS1="\[\033]0;\u#\h: \w\007\][${LOGNAME}#${HOSTNAME}] > "
from my .bashrc
I can't find a way to do that in byobu (with tmux) on centos. Does anyone have a clue on how to do that, or in the byobu status line?
Thanks
I've found out the way to do that in the byobu status bar.
The problem with CentOS 6, is that the tmux version that comes from the standard repo. is v1.6, and we need at least 1.8 to achieve the result.
So install tmux from the latest sources like explained here: https://gist.github.com/sturadnidge/4185338
NB: Kill old tmux sessions before running byobu again.
And then use the following setting in your $HOME/.byobu/.tmux.conf
set -g status-left '#{pane_current_path} '

how to open emacs via OSX terminal [duplicate]

This question already has answers here:
How to launch GUI Emacs from command line in OSX?
(15 answers)
How to start "emacsformacosx" in terminal
(5 answers)
Closed 9 years ago.
how do you open emacs for OSX?
I have it downloaded in my Applications, but I don't know how to open it via my terminal (calling it "emacs test.cpp")..
I checked out some sites, but their solution didn't work for me.
I have this in my .bashrc (or .zshrc) file.
alias emacs="open -a Emacs.app"
ysakamoto's answer is correct.
I've taken it a step further, I'm using a shellscript using emacsclient to open a file in a running instance of Emacs, or launch a new one if there's none running. Alternatively, it just focuses Emacs/opens an empty session when I don't give it a file. Take a look.

Run Fiji from command line?

Here is what I want to do:
I want to run Fiji from command-line, to do something like batch image processing. I imagine by typing some command at some console, some batch file can be launched to execute some macro. In this case, the Fiji GUI will not show up, but the processing will be running behind the scene.
Here is what I have done:
I simply tried the FIji headless , but when I tried ./Build.sh misc/headless.jar as the web suggested, the console prompt returns could not find project for artifactID 'headless';
I also tried Javassist,pretty much just built it, but have not figure out how to use it.
Here is the problem I am encountering:
When I type fiji --headless HelloWorldMacro.ijm, nothing happened, where inside the HelloWorldMacro.ijm is printf("Hello world!");
I am wondering, how should I run FIji from command line? Is what I have tried on the right track? If so, what additional work/changes needed to make it work? Thanks a lot.
For the record:
Johannes Schindelin answered this question on the ImageJ mailing list (additionally pointing out why the ImageJ mailing list is the most suitable place for this kind of discussions).
In short, either of the following should work:
fiji --headless --console HelloWorldMacro.ijm
or
fiji --headless HelloWorldMacro.ijm > output.txt
cat output.txt