I am new to linux and I want to add lib64/librt.so.1
to linker commnad line. Can anyone suggest how can i do this?
Thanks in advance
Ubuntu – How to add a directory to linker command line in linux
command line
Related Solutions
Using your method
gksudo firefox -install-global-extension addon-1865-latest.xpi
seems to do the trick for you. That will install the extension to all users on your system.
To install the extension only for your user use the extension path as an argument
firefox addon-1865-latest.xpi
You still need to click the Install
button though!
Automating the installation
Firefox
does not need the addon file name but the identifier from the addon as a package name. That means that if you are planning on installing an addon without user intervention you need to extract it to a folder with the name of the addon identifier string, not the name of the addon.
The identifier string can be found on the first lines of the addon install manifest file install.rdf
and it looks like this: <em:id>{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}</em:id>
. Everything within the {}
(including the curly braces) is the identifier.
To get an addon to work you need to extract the package, rename the folder that contains the files to the addon identifier string and place it either on the global addon folder or within the user addon folder.
Global addon install
If you want to install an extension automatically to all users in your system you need to extract it, rename the folder that contains the addon to the addon's id string and copy it to the firefox
global extensions folder /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
, anything that you use there will be called up automatic when a user opens firefox
.
User specific install
If you want to install an extension automatically to just one user in your system you need to extract it, rename the folder that contains the addon to the addon's id string and copy it to the firefox
user extensions folder /home/user_name/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
(create it if it does not exist), anything that you use there will be called up automatic when a user opens firefox
.
How-to prepare an addon for automatic install - Example
Make an extensions
folder in your home and download the addon in to it
mkdir ~/extensions
cd ~/extensions
wget https://addons.mozilla.org/firefox/downloads/latest/1865/addon-1865-latest.xpi
Extract it and delete the original
unzip ~/extensions/addon-1865-latest.xpi
rm ~/extensions/addon-1865-latest.xpi
Read the first line in the install.rdf
file to get the addon's id (in this case it will be {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}). and create a folder with that name
mkdir ~/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
Move all the files in your extensions
folder into the newly created ~/extensions/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
and you are ready to install by moving the {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
folder, as described, for a local install or for a global install.
How-to set the default home page
To change your homepage without using the preferences inside firefox you have to edit ~/.mozilla/firefox/*.default/prefs.js
(where *.default
is a folder inside ~/.mozilla/firefox
created for your user) and add this line to the end of it
user_pref("browser.startup.homepage", "http://uptechtalk.com");
or using this command
echo "user_pref("browser.startup.homepage", "http://uptechtalk.com");" >> ~/.mozilla/firefox/*.default/prefs.js
You need to do it after closing firefox
or the program will overwrite the setting on exit.
If your user has not used firefox
yet and you want to set the homepage for all new users (set homepage globally) use this command
echo "user_pref("browser.startup.homepage", "http://uptechtalk.com");" >> /etc/xul-ext/ubufox.js
Comments about your question
-silent
does not exist, you will be prompted to install that xpi
extension anyways and you have to click the button to install it;
-setDefaultBrowser
will not set your homepage, it will make firefox
your default browser
Mount OneDrive on Ubuntu
This instruction follows RCLONE - Microsoft OneDrive
1. Download and install Rclone
sudo apt install rclone
or download the latest one
wget https://downloads.rclone.org/v1.42/rclone-v1.42-linux-amd64.deb
sudo apt install ./rclone-v1.42-linux-amd64.deb
2. Add a new OneDrive remote to Rclone
rclone config
Select the New remote option by entering n and pressing the Enter key:
$ rclone config Current remotes: Name Type ==== ==== mega mega e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> n
Enter a name for the new remote, here
onedrive
is used:name> onedrive
After pressing the Enter, a list of supported cloud storage services is displayed. You need to select the Microsoft OneDrive option by entering its corresponding number ("16" right now but it may change in the future):
Type of storage to configure. Choose a number from below, or type in your own value [snip] ... ... xx / Microsoft OneDrive \ "onedrive" ... ... [snip] Storage> onedrive
For the next two steps, press Enter without entering any information since there's no need to enter the Microsoft App Client ID or Secret:
Microsoft App Client Id Leave blank normally. client_id> Microsoft App Client Secret - leave blank normally. client_secret>
Choose the OneDrive account type (enter
b
for Business orp
for Personal OneDrive accounts):Remote config Choose OneDrive account type? * Say b for a OneDrive business account * Say p for a personal OneDrive account b) Business p) Personal b/p> p
Depending on your setup, you'll have to enter auto configuration or manual for the next step. For desktop users, type y to use the auto configuration:
Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) No y/n> y
A new tab should open in your default web browser, asking you to give Rclone access to your OneDrive account. Allow it and you can close the tab.
Rclone runs a webserver on your local machine (on port 53682) to retrieve the authentication token. You may need to unblock it temporarily if you use a firewall.
Now you'll need to check if everything is correct and save the settings by typing y:
[onedrive] type = onedrive client_id = client_secret = token = {"access_token":"GoKSt5YMioiuCWX1KOuo8QT0Fwy+Y6ZeX7M","token_type":"bearer","refresh_token":"7OMvoEAO3l*8BbhS2AMxpTbJW0Y6np9cdql!bwEdYAhJ6XBG0tnR0UK","expiry":"2018-07-26T15:15:13.696368366+03:00"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
Exit the Rclone configuration by typing q:
Current remotes: Name Type ==== ==== onedrive onedrive e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q
3. Create a new folder
mkdir ~/OneDrive
4. Mount OneDrive
rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive
You can stop and unmount it by pressing Ctrl + c to close Rclone.
5. (Optional) Mount OneDrive on system startup
To mount OneDrive on startup, open Startup Applications, and in Startup Applications click Add.
After clicking Add, use the following:
Name: Rclone OneDrive Mount
Command: sh -c "rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive"
There are other ways of mounting OneDrive automatically, like adding a line in your /etc/fstab file
, using systemd, etc.
Best Answer
If you are compiling something and you want the compiler to search a specific directory, you can add the -L flag. Like this:
You can also add this directory to the environment variable 'LD_LIBRARY_PATH'. Like this:
You can also use
ldconfig
to add a directory to the search path. Like this:Finally, you can add the directory to
/etc/ld.so.conf.d/mylibs.conf
(and rerunsudo ldconfig
) to make this change permanent.