byobu won't start automatically - byobu

I am using the lovely byobu for a while, but I know it's "wrong" to lunch it inside .zshrc, since I get the message
"sessions should be nested with care, unset $TMUX to force"
I tried the classical way, that is, pressing F9 and I toggled on login startup, which dows not seems to work.
Do you know how to fix it?
What I need to know to debug this problem? I have the feeling I am missing something in the architecture of a shell.

.zshrc is executed every time a new zsh instance is created. .profile is running on each login. You should start your byobu in the .profile, not in .zshrc.

Related

Problem: GNU octave displaying every line of any program run in command window

I'm new to octave (and any kind of programing in general). It doesn't matter the code that I run, every time i do it the command window displays every line of it and every step, which can get overwhelming when doing cyclical algorithms. And this doesn't seem to happened to every other user I personally know. Even using exactly the same .m file, i get all the lines displayed and some other person doesn't.
I've searched in every configuration window possible, I tried reinstalling but nothing helped. And I've seen nobody else having this problem, is it just a configuration that I'm not aware of?
I'm running Octave 5.2.0 in Linux Mint 19.3
have you tried adding ";" at the end of your command lines ?
Basically if your code is something like:
x=5
y=4
Then your command window will display:
x=5
y=4
Whereas if you add the semicolons at the end of your code like so:
x=5;
y=4;
Then your values will be store and registered but nothing will be displayed in the command window.

How to solve a stuck Gitlab CI pipeline?

We've been using Gitlab CI for some months, and in the last 1 week, we've been using the specific runner installed on a VPS. Currently, we are using "shell" as the executor.
Today our pipeline got stuck out of sudden, when we looked into the server free RAM, it's only 48MB out of 996 MB, FYI, we're using CentOS 6.
We've been struggling to get the answers, but we're stuck at the moment, and would like to know :
What's causing the pipeline from getting stuck?
is it true because of low free RAM?
Should we use another executor, perhaps SSH or even docker?
What is the best practices to deal with this kind of problem?
We would appreciate any kind of help or directions.
In my case the pipeline was stuck because the only available runner had the option "Can run untagged jobs" set to "No" and the job was really untagged. One can fix this issue by changing the "Can run untagged jobs" option or by adding a tag to the appropriate section of the ".gitlab-ci.yml" file in the repository. In my case it was section default:tags:.
(It seems that your case is much more complicated. However I've came across this issue twice a month, and I've forgotten the decision at the second time. Thus I've came to this page which looks appropriate to save the decision. Hope the answer will help someone else.)
In my case, the pipeline was stuck because of two things:
The tags specified in the .gitlab-ci.yml do not match those in the runner configuration.
If you specify the simulator in the build command, ensure that you write the right version of the simulator.
Once I did these changes, everything worked well!
Good luck.
In my case, It happened on a container that was off for a couple of days for maintenance reasons, I had to clear runner caches, and it worked!
In my case the windows gitlab-runner service was not running. Starting it solved it.

How can I stop PhpStorm optimizing imports when reformatting code?

OK, I've scoured the internet trying to figure out which bit I have to change in PhpStorm to make it stop doing this.
Right now when I run "reformat code" on some PHP, it also decides to optimize imports for me. While normally I'd say "gee, that's great" - in some cases PhpStorm doesn't recognize that some of the imports it thinks are unused are, in fact, actually used.
Comments as code, and all that.
Please tell me someone out there knows how to make PhpStorm stop doing this. It's driving me mad that I have to undo changes to my imports whenever I auto-format my code.
As it turns out, #LazyOne hit the nail on the head in the comments up above. Once I opened the reformat file dialog, all of my problems suddenly went away.
Very obscurely hidden setting, since it's not something easy to find in general preferences :-)
Mac users can use keyboard shortcut: ⌥⇧⌘L
This available to all Jetbrains products.

Sublime Text 2 packages ignored

So after switching over to Sublime Text last year, it has become my editor of choice, and I have installed several different packages via the excellent Package Control and basically customized it all to my liking. After a couple months of infrequent use, I jumped back into a code-intensive project and fired up ST2 only to find that none of my packages are working.
After some digging, it finally occurred to me to open my preferences file, only to find all of my installed packages in the "ignored_packages" list. WTF?
Has anyone else experienced this or know what would have caused this? I do some funny things in my sleep sometimes, but not this!
My earlier comment notwithstanding, I think I've figured out what's going on. The issue seems to be Package Control, most likely the new version update to 2.0. I just restarted ST2 after having it open for the past few days, and happened to have the console (Ctrl`) open, and saw that several of my packages, including Tag, Terminal, and SublimeREPL, were added to the ignored packages list. This typically happens when a package is being updated or removed, and is done so it can't be used halfway through the operation before everything is synced. At any rate, for me there was some sort of error, and I had to force quit Sublime and restart it. I immediately checked my preferences, and sure enough several packages were in the "ignored_packages" array.
So, I'm guessing something like this happened to you, and for whatever reason the packages weren't removed from the ignored list, possibly because the system update didn't complete normally. Hopefully this won't happen again, but if it does you'll know where to look. Additionally, if it does happen again, I'd submit an issue on Github, as this may be a bug.
Update
My issue on Github has been merged into this one, and if you scroll all the way down to the bottom wbond has a fix for now: Download Package Control 2.0.1-beta, put it in your Installed Packages folder (removing the one that's already there), and adding the repository https://sublime.wbond.net/prerelease/packages.json by selecting Preferences -> Package Control -> Add Repository. Restart ST2, and see what happens, especially after restarting multiple times. If you still have bugs or odd behavior, please add to the issue.
I am adding this even if it's an old thread because the answer did not solved my problem, but it pointed me in the right direction.
Since it was a problem due to Package Control trying to update packages and I didn't want to mess with repos and stuff, first I tried to upgrade the packages "manually" using Package Control and I noticed that there was a 1-to-1 match between the items in the ignored_packages array and the packages that needed to be upgraded.
After updating, just remove the packages from the array and restart ST2: no more weird ignored packages in the array.

expect script running out of sync?

I'm currently modifying a script used to backup cisco ACE modules' contexts & crypto files. it works absolutely beautifully with one device. however, when i use it on another module, it seems to go completely out of sync and it messes up the script.
From what I can see, the differences are in the presence of a line that the ACE module throws up as so: Warning: Permanently added '[x.x.x.x]' (RSA) to the list of known hosts.\r\r\n this just seems to throw the rest of the script off, even though none of my expect statements are even looking for this!
I've had nothing but nightmares with expect and the way in which it interprets information from ace modules; can anyone shed any light on this issue or provide any advice as to how to make these devices behave when I try to script for them?
If you're handling one connection at a time, you should make sure you fully terminate one before opening the next. The simplest way of doing that is to put:
close
wait
At the end of the (foreach) loop over the things to connect to.
If you were doing multiple connections at once, you'd have to take care to use the -i option to various commands (notably expect, send and close) and make everything work right in addition to fixing the things I mentioned earlier. It can be done, but it's considerably more tricky and not worth it if you don't need the parallelism.