How can I remove this folder? - linux-mint

I have a folder that appeared suddenly and I want to get rid of it.
I'm using Linux Mint btw.
The location is ~/.local/share/Trash/files/AhCBFJnAYJ
It is about 1GB in size and I have no memory of creating it. I can't list the folder's contents either. I've tried emptying the trash bin and using bleachbit, but nothing seems to help.
I would greatly appreciate any advice. Thanks for reading!

To remove a folder with its contents just type
rm -rf ~/.local/share/Trash/files/AhCBFJnAYJ
This should be able to be removed by giving root permission.
As this didnt work then it requires you to take ownership again:
sudo chown -R $USER:$USER ~/.local/share/Trash/files/AhCBFJnAYJ
where $USER stands for your user name in the path name.

Related

I can't change permissions

So my "code ." command doesn't work. I get the error
/usr/local/bin/code2: line 6: python: command not found
/usr/local/bin/code2: line 10: ./MacOS/Electron: No such file or directory
I saw that I just have to change python to python3 in the code file in /usr/local/bin. Except when I change the file, I'm unable to save it with the change. I get all sorts of errors telling me I don't have permission to change it. So then I look up how to change it, and it says to click on get info on the file, and then change the permissions in the sharing and permissions section. But my get info doesn't HAVE a sharing and permissions section!
What do I do?
PS: I realized I can see permissions if I do get info on the whole bin directory. I made it so everyone can read & write. Except I still can't save the altered version of the code file. I still don't know what to do anymore.
Ok I still have no idea how to save an edited version of the code file, but here is how I got around it for now.
brew install python
ln -s /usr/local/bin/python3 /usr/local/bin/python
Now I can use code . but I'm still very upset with my computer for not cooperating with me. 😡

Where is the Trash directory?

The trash spec tells me that the Trash directory is here: $XDG_DATA_HOME/Trash
Looking at my environment variables on my Linux Mint system, I find a bunch of XDG stuff, but no XDG_DATA_HOME
I've done some looking, but so far I have not been able to locate the Trash directory. Where is it?
your home trash directory MUST be available and defined.
Usually it's under ~/.Trash or ~/.local/share/Trash as default
you can echo $XDG_DATA_HOME to display it, if you get nothing, you can set it by yourself.
XDG_DATA_HOME=/usr/local/share/
export XDG_DATA_HOME
and
XDG_DATA_DIRS=/usr/local/share/
export XDG_DATA_DIRS
for details see setting XDG_DATA_DIRS and XDG_DATA_HOME
and I recommend that you make trash-cli as an alternative for the rm, it's the command line interface to FreeDesktop.org Trash,
see https://pypi.python.org/pypi/trash-cli/0.12.9.14
https://github.com/andreafrancia/trash-cli
your home trash directory MUST be available and defined.
Usually it's under ~/.Trash or ~/.local/share/Trash as default
you can echo $XDG_DATA_HOME to display it, if you get nothing, you can set >it by yourself.
First it is impossible to set something you cannot find in the first place.
Secondly env | grep XDG does not return any variable XDG_DATA_HOME, so that provided no help whatsoever. Thirdly, Google search on e.g. "where is linux Trash folder stored" does indeed turn up results -- namely this page and others like it. Search engines are source referrers, not source providers. If someone hasn't already posted it somewhere, it won't show in Google or anywhere else. Suggesting a Google search as an answer is not helpful.
So indeed, find / -iname trash will find it (recommend adding 2>/dev/null to eliminate all errors that will occur for inaccessible files), but novices have a lot of trouble with find's syntax.
So yes, it is usually ~/.Trash or ~/.local/share/Trash.
As for trash-cli, yes very helpful, but the correct instructions for it are:
sudo apt install trash-cli -y
alias rm=trash-put
alias rm >> ~/.bashrc ( or >> ~/.bash_aliases)
Now, I would like to know, if I set XDG_DATA_HOME to /tmp, will trashing a file move to /tmp instead? The concept of a Trash folder is great, but I'd like a little more sophistication like an Archive folder where I can archive-put little used files that I still want to keep but keep out of my main folder stash to eliminate clutter. I'm no linux novice, but I do have limited time--so that is why we collaborate--I save you time, you save me time!! I hope. Less is more, more or less.

How to set virtualenv to another directory?

I had a problem come up when I was forced to change my project directory name.
First Virtualenvwrapper didn't see my projects, so I changed the environment variable of WORKON_HOME to the new project directory. I could then activate my envs. But now when my project is doing anything, it thinks it's in the old directory, not the new one. I can't figure out how to change this. I've looked in the reference material, and looked for the place that actually points to where the projects are, but I had no luck with either. Please help.
It sounds like you want to set an already-created virtual environment to a directory that contains your project. One way that I am familiar with to do the following, based on the virtualenvwrapper documentation.
Activate your desired virtual env
workon myvirtualenv
Change your directory to your desired project directory
$ cd my/project/dir
Set your virtualenv project to the current directory
$ setvirtualenvproject
The default is to use the current directory. The full syntax is:
$ setvirtualenvproject [virtualenv_path project_path]
I hope this helps!

How to solve undefined labels in suiteCRM

I am getting this error in SuiteCRM:
"NetworkError: 404 Not Found -
/cache/jsLanguage/Home/en_us.js?v=9W_DRN8pphMvoAsvU564UA"
Please help me that how can I solve it?
Go to Admin > Repair and do a "Quick Repair & Rebuild".
Execute any changes shown at the bottom of the page.
If that doesn't work, go to Admin > Repair and do "Rebuild .htaccess file"
and afterward, Admin > Repair and do a "Quick Repair & Rebuild" again.
Simply remove the cache folder from your instance files, and make a hard reload.
Here are the commands you need to execute in the directory to fix this issue.
find -type d -exec chmod 755 {} \;
find -type f -exec chmod 644 {} \;
These 3 directories in SuiteCRM should be 777. or at least 775.
Cache
upload
custom
As lot of files re-generate while repair or cache build up, it needs to be full permission on those directories.
the issue for me was super simple and none of these: my .htaccess file had an old directory listed so I did a control F, changed the directory name of where suitecrm should have been and currently is, and then saved it, and boom. all 'undefined' errors gone. Hope this helps
This is related to RewriteBase in .htaccess. Either you can manually update it by modifying .htaccess or execute Rebuild .htaccess file
I had this same problem and the above answer did not work.
I found that the file/folder permissions were wrong, once these were updated 644/755 respectively everything started to work as it should.

No app name specified in owncloud

I am trying to create an app which displays "Hello World". This app is explained in Owncloud developer manual. I have followed all the procedure explained in manual. But the app is not enabling. What is the problem? It shows the message "No app name specified". Please help me how to enable this app.
According to http://doc.owncloud.org/server/9.0/developer_manual/app/info.html the id field in appinfo/info.xml should be the same as the name of the app folder. If you have app in the folder 'test_app', then in 'test_app/appinfo/info.xml' you must have
<info>
<id>test_app</id>
...
</info>
Your probleme is the name of app in the file and the name of folder
apt-get install libxml-xpath-perl
cd owncloud/apps/myPlugin;
realName=$(xpath -e '//id' appinfo/info.xml |sed -e 's,.*<id>\([^<]*\)</id>.*,\1,g');
cd ..;
mv myPlugin $realName
This script will automate extraction of the plugin folder name should be.
Then , it renames that folder by the name found at appinfo/info.xml
The problem is the name of folder is not equal to id attribute on xml.
To resolve this, you only rename plugin folder.
You can refer to the "info.xml"(which locates in /apps/{plugin_folder}/appinfo/) as you can find what name the plugin is called, as the others have stated, then rename the {plugin_folder} to the name that you found, and then... just go to enable it.
All done!