Install byobu for normal user in home directory - server

I use byobu at my local workstation, and would like to use it on the work server too. Unfortunately, I only have normal user rights on the server ( so no sudo apt-get but read/write to the home directory). Both tmux and screen are installed on the server.
The solution would be to install byobu in my home directory, since it seems to essentially be a wrapper around screen/tmux. All the articles I've seen seem to assume superuser rights (for apt-get/yum etc). Is there a way to do this?

Related

Install vscode for all users

I updated to the version here where it installs it per user instead of all.
How do I install for all users instead? Do I need to install for each user now?
Look for the system installer instead of the user setup installer. The system installer will give you the option to:
1. Install for all users
2. Choose a directory.
Download here (oficial page): https://code.visualstudio.com/download
Can't find it? The system installer is below the big blue button to download. You'll see 3 options. The middle option will say system installer.
Applications that are global are stored in /Applications directory as opposed user specific installation that are installed under Applications under the user home directory. So moving the installed folder to /Applications directory might work.

Linking postgresql in homebrew

I already installed postgresql, but it says I did not link to it.
I am running this in the command line and getting the following error:
myname#MacBook-Pro-8 ~> brew install postgresql
Warning: postgresql 10.4 is already installed, it's just not linked
You can use `brew link postgresql` to link this version.
myname#MacBook-Pro-8 ~> brew link postgresql
Linking /usr/local/Cellar/postgresql/10.4...
Error: Could not symlink share/man/man7/ABORT.7
/usr/local/share/man/man7 is not writable.
myname#MacBook-Pro-8 ~> sudo brew link postgresql
Password:
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system.
I also tried:
brew prune; brew link postgresql
which gave me the same error:
Error: Could not symlink share/man/man7/ABORT.7
/usr/local/share/man/man7 is not writable.
Why is that folder not writable and what can I do to change that?
It was really painful solving this problem, so I figured I would leave it here for others to see.
Issue:
Homebrew install of Postgresql will not execute successfully. $ brew link postgresql results in failure due to directory not writable. New version of Homebrew will not allow sudo commands and System Integrity Protection prevents changing permissions.
Details:
I tried to use homebrew to install postgres and kept running into issues with syslink. When I ran $ brew link postgresql as homebrew suggested, I kept running into an error that it couldn't be completed because certain folders were not writable. I thought this would be easily remedied by running sudo but unfortunately the most current version of homebrew no longer allows the use of sudo commands due to security risks. My next thought was to my root user and use the macOS GUI interface to change the permissions on this folder because I am not sure how to do this on the terminal. Regardless of being logged in as 'root,' the OS would not let me change the permissions of the folder. I also attempted to use sudo and change the permissions in terminal and it did not work either. After several days of banging my head against the wall try all kinds of things to find a solution, I discovered that since El Capitan, macOS introduced System Integrity Protection aka 'SIP' or 'rootless.' As it turned out, once I disabled SIP, logged back into 'root' and changed my regular accounts permissions to Read/Write on the problem directories, I was able to go back to my regular account and successfully execute $ brew install postgresql.
(Assuming you currently have postgresql installed through homebrew but unable to link due a scenario like the one mentioned above, here is what I suggest to resolve your issue...)
Run $ brew link postgresql
Write down the directory path that the error says it is not able to write to. (e.g. usr/local/share/man/man7) NOTE: you'll want to actually write this down on paper or take a picture of the screen on your phone because you will not be able to use copy and paste)
Enable your 'root' user account if you have not already done so.
(instructions here) NOTE: make sure to make a really good password for this account and write it down somewhere safe. This is a powerful account and there's no way to recover the password.
Disable System Integrity Protection.
(instructions here)
Log into 'root' user account
In Finder menu bar select GO > GO TO FOLDER... (CMND + SHFT + G) and type in the path from Step 2.
Right-Click/ Cntrl-Click the folder and select Get Info
Click the plus sign at the bottom of Sharing & Permissions
Add your regular account to the list and change the permission to Read & Write
Go back to your regular account, run $ brew uninstall postgresql, then $ brew update and $ brew doctor . If those are all set run $ brew install postgresql.
You should be able to install without any problems now. However, if you run into a linking and permissions problem again, run $ brew link postgresql to figure out the problematic directory and repeat Steps 5 - 10 with whatever other directories are giving you trouble.
If everything is up and running properly. It is probably best to at least enable SIP again (instruction in the article linked in Step 4).
(To check that everything is working. I recommend running $ brew services start postgresql then $ createdb 'test' . In my case, it was when I originally tried to run createdb and got "command not found" that I realized something was wrong.)
Running this solves it. This gets around SIP.
sudo chown -R $(whoami) $(brew --prefix)/*
brew link postgresql

centos install] how to install program in the user account using yum

I'm now using centos5.8 .
And I'm not administrator, I mean I'm just have user account, not root.
Currently I'm installing program in this way.
Download source and move to the my account and install using make.
But current way is too difficult to me.
So I really want to use more easy way.
Like sudo apt-get install.
Yum looks like that.
But when I tried to use yum, he required root account.
I know root password but..
Can I use yum?
I'm afraid about it can destroy the whole system.
I just want to change my account not shared directory and file.
I want to install program in /home/ME/
not ../../etc ../../bin
How can I do this?
And is it safe to use yum?
Thank you in advance,
If you want to use Yum, you need to have root access.
You can compile and run application in your home directory without root access, but systemwide installing using yum is not possible without root access.

Installing external packages into Canopy Python using easy_install as non-admin

I am user of a Windows computer without admin rights and just installed Canopy Python from Enthought (and I was really excited that I was able to do this without admin rights). I would now like to install an external package (that is not available in Canopy Python as an academic user). The instructions on the support page from Enthought suggest that to install an external package, we can just open a command window, make sure that Canopy Python is on the SHELL path, and then "follow standard Python installation procedures from the command line," with the suggested approach being to use easy_install. However, as a non-admin, when trying to use easy_install, a dialog box pops up requesting a admin username/password (which I do not have as a regular user). Does anyone know if it is possible to use easy_install as a non-admin or if there is an alternative solution to install external packages for non-admin users for Canopy Python?
Is it possible that you are picking up the easy_install of another Python distribution on your machine?
The default location of easy_install in Canopy is
C:\Users\YourName\AppData\Local\Enthought\Canopy\User\Scripts\easy_install
Please try using the full address explicitly and see if that works, in theory you should not need admin rights.
Update: The problem is due to one of the heuristics used by Windows UAC to determine if an application requires privilege escalation: If there is the word "setup" or "install" in the name, it will prompt for elevation. (See the answer below by Mona regarding which files to rename.) It's probably easier to rename easy_install, and use it to install pip (easy install pip), and use that instead.
As an update, after searching some more on User Access Control (UAC) on windows (and coming across something that mentioned that having "install" in the name of a program may cause problems, but I do not know for sure if this was the cause of a problem in my case), I just tried the following "hack" which worked for me (but perhaps someone else can suggest a more elegant solution or can provide more feedback as to why this works):
Go to C:\Users\YourName\AppData\Local\Enthought\Canopy\User\Scripts\
Rename easy_install.exe to easy.exe
Rename easy_install-script.py to easy-script.py
Run "C:\Users\YourName\AppData\Local\Enthought\Canopy\User\Scripts\easy.exe PackageName" from the command line.
(Wait for package to be installed and check for success by opening Canopy Python and trying to import the package.)
Some additional comments: I received an error if I didn't perform step #3 above (renaming the .py file as well). Also, I needed to type the full path to easy.exe in this case from the command line.
This worked for me (and I can use the external package), but again, my guess is that there should be a more "official" solution that does not require renaming easy_install.

Install oAuth PECL error: Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user

I'm trying to instal oAuth on OS X, but I am getting this error in the Terminal:
Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user
How do I allow it to be writable?
First find out where the php_dir is. You can do this by using the 'config-get' command:
pecl config-get php_dir
After this you can either:
Change the ownership of that folder (and any needed child folders)
sudo chown <username> <php_dir>
or
Set the php_dir to a different folder
pecl config-set php_dir /path/to/new/dir
The easiest way is probably to append sudo to the front of your install command.
See http://linux.about.com/od/commands/l/blcmdl8_sudo.htm to read more about the handy "super user" command.
For further references, on OS Catalina, due to write permission on /usr/bin - lib folders, you should move all config folders on pecl to some writable location (except php_bin which is php directory, this one should point to your php folder).
This is due to a feature in Mac OS called System Integrity Protection (SIP). SIP prevents the editing of critical system files and directories.
To get around SIP restrictions for the purposes of installing oAuth, you can disable it temporarily. Boot into recovery mode and run the command csrutil disable. After that, rebooting normally and attempt the install again.
After the install has been completed, re-enable SIP by booting back into recovery mode and running the command csrutil enable. Note: it's highly recommended that you re-enable SIP to protect your computer.