You shall pass (arguments)

"Passing an argument" means adding a parameter after a specific command. The program launched by that command will behave consequently.

As an example, the command "cp" is used to copy a file and requires two arguments. Firstly the SOURCE FILE and secondly the DESTINATION FILE (or destination directory). Please notice that syntax order is very important here.

cp <SOURCE FILE> <DESTINATION FILE>

Let's assume that you want to copy "file.txt" to "copy_of_file.txt". You have to run the command:

cp file.txt copy_of_file.txt

It will create a new file, in the same directory (the directory from which you ran the command, where the source file "file.txt" should be)

Both SOURCE FILE and DESTINATION FILE are arguments passed to the command "cp".

Need some --help ?

If you want to know what or how many arguments a command needs, or what optionals arguments it accepts, you can do:

<command> --help

for example:

cp --help

or

cat --help

It will display the "How to use your command" into your terminal.

Curiosity won't kill the cat

Let's take a look at the cat command.
If you run cat with a single argument, let's say a text file :

cat my_file.txt

It will display the contents of that file on the terminal.

If you run cat with two arguments, it will display both file's contents:

cat my_first_file.txt my_second_file.txt

The redirection operator ">"

Now, the > (redirection operator) looks a bit more complex, but it's actually very simple.

It's a redirection. You have to look at everything that your terminal displays as an output from a command. The output usually goes to the terminal. If you run :

cat my_file.txt

The command is 'cat', the argument is "my_file", and the output is the content of that file. The output goes to the terminal. Well, when you use  the redirection operator ">", which requires an argument, what you actually do is redirecting the output to another destination. So, what happens when you run

cat my_file.txt > new_file.txt

is that instead of displaying the content of the file into your terminal, it will be written into a file, "new_file.txt".

There is two ways about it.

So basicaly, the result of

cat my_file.txt > copy.txt

and

cp my_file.txt > copy.txt

are the same : you create a new text file, with the content of another. But the process is very different.

One last thing :

> file.txt

while create an empty file (you redirect... nothing to file.txt, so it's empty. Pretty obvious isn't it ?)

Without more context, I'm not sure what the authors means, but I hope this helps. Good luck in learning unix, it's a bit hard to start with, but it ends with a lot of fun.

EDIT 1 :

I almost forgot to answer :

"passing a filename argument" means passing an argument, and that argument must be a filename, so the name of a file, let's say "file.txt". It could also be the full path to the file, something like :

/home/user/Documents/file.txt


Retrieving information from an online database using a list of ID numbers

You can use a shell loop to process the IDs, curl or wget to get the data, and tools like pup to get process the HTML. For example, say the IDs are in a file named foo, then you can do:

while read id
do
    curl -sL "https://www.ebi.ac.uk/chembl/compound/inspect/$id" |
      pup 'tr:parent-of(td:contains("Canonical SMILES")) td:nth-child(2) text{}'
done < foo

Here, I have used the pup command to:

look for a table containing Canonical SMILES - td:contains("...")
get the parent row of that - tr:parent-of(...)
and print the second cell in that row: td:nth-child(2) text{}

I get output like:

CC1=CN([C@H]2C[C@H](N=[N+]=[N-])[C@H](O2)C(=O)N)C(=O)NC1=O

NC(=O)[C@H]1O[C@H](C[C@@H]1N=[N+]=[N-])N2C=CC(=O)NC2=O

NC1=NC(=O)N(Cc2cn(nn2)[C@H]3C[C@H](O)[C@@H](CO)O3)C=C1

CC1(C)CC[C@@]2([C@H](O)C[C@]3(C)C(=CC[C@@H]4[C@@]5(C)CCC(N)C ...
Download SMILES

COC(=O)c1nn(c2cccc(F)c2)c3c4ccccc4S(=O)(=O)N(C)c13

COC(=O)[C@H](C)NP(=O)(OC[C@H]1O[C@@H](N2C=CC(=O)NC2=O)[C@](C ...
Download SMILES

CCO[C@]1(CO)O[C@H]([C@H](O)[C@@H]1O)N2C=CC(=NC2=O)N

I'll leave it to you to examine the HTML and figure out the other filters.


How do I run emacs from terminal? This is my first time using ubuntu

First you need to install it (unless it's already installed)

Open a terminal Ctrl+Alt+T
And enter emacs

You may see this

$ emacs
The program 'emacs' can be found in the following packages:
 * emacs23
 * emacs23-nox
 * e3
 * emacs23-lucid
 * jove
Try: sudo apt-get install <selected package>

Install the package by typing for example sudo apt-get install emacs23

You can now run emacs by typing emacs in a terminal.

Note: emacs is a powerful but not very intuitive editor you will need to learn how to use it.  There is a tutorial here to get you started.


You have to set the computer to boot from your DVD drive. While your system is booting up (POST-ing to be precise), it should let you to select device to boot from. (pressing F12 works for many PCs.)
You may also try changing/overriding boot options in your BIOS. To get to BIOS on most PCs you have to stroke DEL while booting up.
 Your PC or motherboard manual should tell you how to enter BIOS if it's something exotic


What are the steps needed to set up SSH on ubuntu 16.04?

You need to install the ssh server.

sudo apt install openssh-server

Then, if you wish to only use key-based logins, follow the procedure in the wiki here to transfer the keys.


Sound not working on Xubuntu but ok with Gnome Ubuntu 18.04

Try to reload alsa mixer using terminal like this :-

 sudo alsa force-reload

If this doesn't work then try to reinstall alsa mixer

 sudo apt remove --purge alsa-base pulseaudio

 sudo apt install alsa-base pulseaudio


how to config l2tp ip sec for multiple connection from each ip

I assume you are using strongSwan. The issue you seem to be facing is that two L2TP/IPsec clients behind the same NAT, can't be distinguished.

See the "Multiple L2TP-IPsec clients behind same NAT" issue on the following page:

https://wiki.strongswan.org/issues/365

As mentioned there, you can use the strongSwan connmark plugin to distinguish multiple clients.

Rebuilding strongSwan with the connmark plugin and patching xl2tpd will take a bit of work


Can I delete "generic" kernel if I use "low latency"?

Yes, if you are only ever using the low latency kernel, and it is working and the packages for it are installed, then you can remove the packages that provide the generic kernel. You might prefer not to, but if you need space in /boot and removing old kernels is insufficient, this is reasonable. Nothing bad is likely to happen, except that if you decide you want to run the generic kenrel then you'll have to install it first.

You've checked that you actually are running the low latency kernel, and that the version number matches kernel packages you have installed, by checking the output of uname -r. So it's fine to remove the -generic packages.  Be careful to avoid removing more packages than you intend.

You should also make sure that you will receive updates to your low latency kernel. The linux-lowlatency package, which is a metapackage, declares dependencies on the most recent low latency kernel packages for your Ubuntu release; I recommend you install that unless you know you do not want it (and why). If you just want the kernel but not the  header files for it then you can install the linux-image-lowlatency metapackage but not linux-lowlatency.

If you're using the LTS Enablement Stack with a low latency kernel then you'll want the metapackage shown in those instructions for your release, just with lowlatency instead of generic.

Finally, note that most users will prefer the generic kernel, so as errikos suggests, you might consider the alternative of switching back to generic unless you have a specific reason you need to sacrifice other performance characteristics for low latency. See Why choose a low latency kernel over a generic or realtime one? If you do switch back, I recommend you ensure the necessary generic packages are installed and reboot to test that at least one generic kernel that you have installed is actually working (it should be! but try just in case) before you uninstall the lowlatency kernels.


What is causing Ubuntu on MacBook Pro to have high CPU usage?

When I have a ridiculous high CPU usage it always seems to be a Python related process. I just kill it inside (Gnome) System Monitor whenever it bugs me.


Sometimes the BIOS does not recognize the USB flash Drive.

For my computer, I have to plug the USB flash Drive, go into the BIOS, save and exit, and then, press F12(depending of your computer) for the boot menu to appear and it's there.

Also, I had trouble with the EFI...
Read this here


mysql-server fails to install after previous failure (and start, and thus configure)

Since you mentioned, it's recommended you have at least 1GB of space free on / in order to have a working system, as for mysql try this:

sudo apt-get purge mysql-server mysql-server-5.5
sudo apt-get update
sudo apt-get install mysql-server

Probably your apt cache is old and it's trying to pull some bad package config. I see that now mysql-server is meta package for mysql-server-5.6


So, you are trying to delete ubuntu and install your windows 8 back, right?

Seems like windows 8 doesn't support dual boot with ubuntu.

Boot from live usb/cd of ubuntu. Then go to gparted (application) and delete your ubuntu partition(s).

After your SSD/HDD is clean install your windows 8.

If this is not the answer your looking for, please reply.


You will have to manually create the configuration directory as it's moved in this version, though falling back in case the directory does not exist:

mkdir ~/.config/redshift

Use your favorite text editor to create and edit the config file, I will use VS Code here:

code ~/.config/redshift/redshift.conf

Example config file heavily commented.

; Global settings
[redshift]

; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual

; this has changed since this version in favor of randr
; formerly vidmode has been mostly used from what I read
adjustment-method=randr

; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
fade=0

; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6

; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
;dawn-time=6:00-7:45
;dusk-time=18:35-20:15

; The location provider and adjustment method settings
; are in their own sections.
; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=00.8
lon=00.1

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust _all_ screens.
[randr]
screen=0

This will Work for the Location. Update the location manually

[manual]
lat=00.8
lon=00.1


How do I fix "Failed to look for applications online" error when looking for a new default program online?

remove /usr/share/app-install/desktop/workrave:workrave.desktop should solve the problem, for me it solved ;)

sudo rm /usr/share/app-install/desktop/workrave:workrave.desktop

Source from here: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1190097


Ubuntu drive partition after installing Ubuntu 14.04

@devansh. Brother you didn't make any mistake if you think why there is only one partition. In Ubuntu there is only one partition called the Home or the root unlike that of Windows in which you can partition your hard drive upto a maximum of 4 drives. I don't think if you can partition after installation but there is a step to logically partition your volume size before installation. I think it will be clear now


How do I fix .bashrc not having colors on one machine with identical config as another?

I used one of my image scripts to add my custom environment variables to .bash_profile (as I'm used to doing on Red Hat distros), not knowing that Ubuntu uses .profile instead, and that by defining .bash_profile I was overriding .profile.

I moved my variables into .profile and deleted .bash_profile, and this was fixed.


16.04 server: Byobu doesn't respect TERM setting

Maybe you should explicitly export TERM as ``xterm-256color'' in the profile of your login shell. This workaround works in my ubuntu 20.10 server.


Why am I experiencing visual corruption with Intel X4500 graphics card on 14.04?

I'm out on a limb here, but do you perchance have an X3500 or X4500 Intel card and an odd amount of RAM installed / unequal RAM sticks?

Because this is a known issue with those configurations: https://bugs.freedesktop.org/show_bug.cgi?id=28813

It affects Windows systems too, albeit less severely:

http://support.lenovo.com/en/documents/ht001223

Linux 3.19 does not exhibit this problem, so the solution is simply to apt-get install linux-generic-lts-vivid which will install 3.19 on your 14.04 LTS box.


Ubuntu Phone is only available on the Galaxy Nexus and the Nexus 4, Nexus 7 and Nexus 10 officially, after you could use this tutorial to install it, I have an Nexus 5, I didn't try it so I won't be responsible on what could happen with your device. Good luck


@Bhargav was close to what you need to maximise the window - you just need to use big numbers.

Open a Terminal
Select Profile Preferences from the Edit Menu.
Tick Use custom default terminal size and enter a default size that is too large for the screen e.g. 240 columns and 100 rows.
Click close then open a new Terminal by clicking the icon OR pressing Ctrl + Alt + T

The new terminal window should be maximised.

Can I add that your question is a bit vague, the title asks for full screen (I take that as fills the entire screen, with no panels or unity bar visible) but the actual question asks how it can be automatically maximised (fill the desktop space leaving panels and unity bar visible) which are two different request in my book.

Based upon advice I was given here:
How to make terminal start maximized?


how do i get remote desktop or other services running on ubuntu 12.04

You can use xrdp .

xrdp: An open source remote desktop protocol(rdp) server.

Open your terminal :

apt-get install xrdp

After you download , you can connect from any computer to your server , by remmina if you are using ubuntu or remote desktop for windows by typing the ip and the password of your account.

Official site Here


Can't login due to kwallet error with nvidia drivers

I found the solution. On a Dell Precision 3620, you have to go into the BIOS and disable Secure Boot. After that, you are able to use the nVidia drivers.


FileZilla is uploading files with the wrong owner?

Found a solution, though not precisely what I'm looking for:

I added my own user to www-data, using sudo usermod -a -G username www-data, then set permissions to 755 for /var/www/*.

Not perfect, but at least it allows things to run smoothly.


I cannot see my pen drive when I am in my boot options after pressing F12

Set #1 partition ISO9660 in PEN Bootable
Using "Disks", choose the PEN (left), click the first partition, press Shift+F10, choose "Edit Partition", turn Bootable on, and Change...
Reboot and should start OK!


Messed up by installing GUI on WSL (xfce)

After you uninstall test with sudo apt autoremove. But the best way is to wipe the distribution going to Settings->Apps->Ubuntu and click the Reset button or uninstall and install.

This is a good guide to configure Xfce with WSL. https://x410.dev/cookbook/wsl/customizing-xfce-desktop-for-ubuntu-wsl/ Adapt it to your own XServer.

Regards


Chromium snap conversion: Command line options

In the snap version you can set CHROMIUM_FLAGS inside ~/.chromium-browser.init with the same content as /etc/chromium-browser/default

For example

CHROMIUM_FLAGS="--incognito"

Source: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1837746

Edit

In addition to the flags, snap application doesn't have access to /dev/shm. Please use one of the following solutions:

Install chromium in dev mode snap install chromium --devmode to disable confinement
Use /dev/shm/snap.chromium instead of /dev/shm in your flag


I can't access the internet when Ubuntu updating

You can limit the bandwidth used by apt-get.

Open a terminal and run this command:

gksudo gedit /etc/apt/apt.conf.d/76download

Then paste and save the following (this will limit downloads to 30 KB/s; adjust if needed):

Acquire
{
  Queue-mode "access";
  http
  {
    Dl-Limit "30";
  };
};

Source: http://chrisjrob.com/2011/03/31/limiting-the-bandwidth-usage-of-apt-get-and-wget/


PyCharm & Vim in the same time and in the same place

There's plugin called IdeaVim which will provide Vim experience on several IDE, include PyCharm.

IdeaVim is a Vim emulation plugin for IDEs based on the IntelliJ platform. IdeaVim can be used with IntelliJ IDEA, RubyMine, PyCharm, PhpStorm, WebStorm, AppCode, CLion, DataGrip and Android Studio.

Before download this plugin, make sure you had following items:

PyCharm version 4.0.0 or higher.
Have at least one Python interpreter properly installed on your computer. You can download an interpreter from this page.

Download IdeaVim
On the toolbar of the PyCharm main window, press Ctrl + Alt + S to open the Settings/Preferences dialog, and then click Plugins.
Once you see the list of plugins currently installed on you computer, click the button Browse JetBrains plugins. PyCharm will shows the contents of the huge JetBrains repository, type the word "vim" in the search field to narrow down the list:

After installing the plugin, PyCharm restart may necessary to apply a change.
For more information, please consider read following article:

GitHub page
Official instruction


How to Write a Shell Script to Move Files from FTP Server to Network Share Drive

Why not just make the FTP folder the actual mount point for the network drive? I run into a similar issue where I'm constantly backing up VirtualMachines on a Linux machine to a Windows network share (since the majority of the company infrastructure is Windows). This is my structure:

/media/windows-share is my mount point

For continuity I've created a symlink in my backup application:

/opt/backup/mnt so if the mount point changes in the future my program doesn't need an update.

Lastly I employ a cool little tool called autofs (sudo apt-get install autofs) That guide is decent (and up to date) - though I've employed this with a slightly different approach on my blog.

In your case I would create a symlink where my FTP dropbox is (/home/ftp/<data_dir>/) to the appropriate network folder in /media/<network_share>/<ftp_user_data> that way there's no wasted time in transferring across disks and the files are available immediately.


Finding out what AMD Radeon Chip and installing drivers

You can use lspci | grep VGA to find out the chipset of your graphics card.
AMD drivers can be installes with sudo apt-get update then sudo apt-get install fgrlx.


Why do I need to specify ":80" when using "apt-key adv"?

The OpenPGP HTTP Key Protocol operates, by default, on port 11371.

The Ubuntu Keyserver is run on port 80 (by default, used by www-http) to reduce problems that can be caused by firewalls.  So you need the port and protocol to make sure that GPG (which is running the request behind-the-scenes) knows exactly where to go to get the key.

Your first example is equivalent to:

apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:11371 0xcbcb082a1bb943db

Since you need to specify :80 when using apt-key adv, your network administrator or ISP has blocked port 11371.


How do I calculate md5sum for a variable?

md5sum takes filenames as parameters.

Iif you have a string you want to calculate the hash of, you need to pass it to md5sum's standard input via a pipe:

echo -n $variable | md5sum

(-n to suppress adding a newline)


Extract one element from lines of a text file

Like this for word, using perl regex (-P) :

grep -oP '^\s*\*\*\K[^*]+(?=\*\*)' file

Output :

word

Like this for words :

grep -oP '^\s*\d+\.\s*\K\w+' file

Output :

Definition
Usage
Others


I would install the system on the SSD. Rule of thumb for placing data on the SSD:

Often accessed data, lots of small files (as the search speed on SSDs is great)
OS (if you want fast boots and a responsive system)
The cache of your favorite browser

Data i would NOT store on a SSD:

Large chunks of files (SSD space is expensive, and if the data is aligned in a block, new normal HDDs are very fast)
Memory that is not accessed often.

I also suggest you not fill up your SSD to the upper limit.

That being said, i would also store the /home partition on the SSD. I would install the games on the other drive, as nowadays they use loooots of space.

Good luck!


UEFI bootable USB with Ubuntu 12.04.5 LTS (amd64). (this is not duplicated question:)

The error message reads to me like a certain file or package is missing or cannot be installed. The assumption of the installer that the medium is a CD is a bit confusing in this context of course.

In the syslog you sent to me the error message is:

cdrom-retriever: error: Unable to find 'pool/main/l/linux-lts-trusty/block-modules-3.13.0-32-generic-di_3.13.0-32.57~precise1_amd64.udeb'.

I just downloaded ubuntu-12.04.5-desktop-amd64.iso from http://releases.ubuntu.com/12.04.5/ but couldn't find this file after extraction with 7z. I don't think that there is data corruption on your USB drive, but please check with md5sum.txt.

I don't know why the installer tries to fetch this file from the local pool, when this file is not in md5sum.txt, where I guess it should be and it's unlikely that it's in casper. This confuses me, too. You can try downloading the package and copy it to the USB drive manually. May be that is the only issue and everything will be fine after that.

Alternatively you could use the loopback method I just added to my answer (it was long overdue). You would need to modify the ISO or find other ways to include your preseed file, but wouldn't run into filesystem issues or other things that I currently don't know about.


After a few more in-depth investigations, I have found that the first version of my answer was wrong.

None of the “TortoiseHg PPA Packagers” team PPAs work with the Mercurial PPAs of the same team, at least not for Precise.

The TortoiseHg PPA Packagers: Snapshots PPA needs mercurial (>= 2.7~) and mercurial (<< 2.9~) and the TortoiseHg PPA Packagers: Stable Snapshots PPA needs mercurial (>= 3.0~) and mercurial (<< 3.2~).


Ubuntu 14.04 couldn't detect nvidia graphic card (not even detect the model of card)

You need to install  a new driver for this brand new model. Run in terminal

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo add-apt-repository -r ppa:xorg-edgers/ppa

and reboot.


Is it possible to set custom shortcuts show up in the cheat sheet shown by holding  in unity?

If you edit key-bindings using CCSM -> General Options, the updated settings will show up straight away in the Cheat Sheet.

If you want to add new key-bindings you can do this in CCSM with the Commands plug-in, these won't show up in the Cheat Sheet.

It seems that the Cheat Sheet only reports specific key-bindings from the list, you could change that list if you want to go into the source and rebuild it, then integrate it back into your system. You could suggest it as a feature on the unity page in launchpad


How to shutdown/restart/suspend ... without authentication or confirmation?

You will need to add command alias for all related command as follows:

Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot

and after that you need to add a user specification as follows at the end of /etc/sudoers file

<your username> ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

You will need root permissions to write to sudoers file.

This is from ubuntu community documentation at https://help.ubuntu.com/community/Sudoers#Shutting_Down_From_The_Console_Without_A_Password


Try adding acpi_backlight=vendor as a boot option. To do that, open a terminal window, and run

gksu gedit /etc/default/grub

Locate this line: GRUB_CMDLINE_LINUX="".

Edit it to look like this: GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

Save the file, then, in a terminal, run sudo update-grub.

Reboot, and check if the brightness keys work.


Ubuntu one: How to delete photos from cloud?

You can use the Ubuntu One Files application on Android to delete your files from the server, as well. Simply do a long press on the file in the list, and choose Delete.

However, the Android application doesn't do synchronization yet. You can manually upload or download files (or use the auto-upload feature for photos), but it will not keep them in sync, if they have changed. However, deleting files from the cloud will result in them being deleted on other devices with clients which do synchronization, such as on Ubuntu, Windows, or OS X.


.desktop and /bin files are included in /opt/extras.ubuntu.com/ with Quickly

You don't need to rename the .desktop file, Quickly will take care of it for you.

The point of using Quickly is that you don't have to worry about the requirements and don't have to change files manually, as Quickly will automate it transparently for you.

So I would recommend undoing the changes in setup.py and renaming the .desktop file back to the original pyenglish.desktop.in, and then run quickly package --extras again.

After that, the .desktop and binary file locations should be:

/usr/share/applications/extras-pyenglish.desktop
/opt/extras.ubuntu.com/pyenglish/bin/pyenglish

That will allow you starting PyEnglish from the Unity Dash as usual. Note that if you want to start it from the terminal, you'll either need to call it explicitly as /opt/extras.ubuntu.com/pyenglish/bin/pyenglish or add /opt/extras.ubuntu.com/pyenglish/bin/ to your $PATH


Ubuntu repositories for Ubuntu Bash in Windows 10

It has apt-get and it uses the same commands we know in Ubuntu. So yes, but with limited functionality: the default setup does not have a desktop (unofficially you can though; the link has examples on installing gvim using apt-get but that also has its limits). So any application that is not a command line tool is pretty useless in the default setup.

Example installing ruby on bash on windows:

$ apt-add-repository ppa:brightbox/ruby-ng
$ apt update
$ apt install ruby2.3 ruby2.3-dev ruby-switch


No problem! No worries! Try again later :)

You are running an upgrade at the same time. It is not possible to install new software until this upgrade is finished.


Problem with remapped key when changing between languages

Open a terminal (Ctrl+Alt+T), or press Alt+F2 for a run-command textbox. Type:

gksu gedit /usr/share/X11/xkb/symbols/gr

Find the line starting with:

key <AD02>

and replace it with:

key <AD02> { [ Greek_finalsmallsigma,    Greek_SIGMA ] }; // ς Σ

Then save the file and restart your computer.


How do I make Ubuntu sound like HAL, from the movie 2001: A Space Odyssey?

Getting Ready

Download the HAL sounds and store them in a folder, let's say ~/audio/hal/
EDIT : as pointed by @M. Becerra in comments, stoutman.com is now broken. More HAL sounds are available in The 2001 Archive.
We are going to use function.wav, cantalow.wav, 1moment.wav, better.wav goodbye.wav, and message4u.wav (old sounds from stoutman.com, find your own custom sounds from the link above).
Of course, you can use many other sounds and customize your own HAL!
We will use paplay from the PulseAudio server, so there is nothing else to install.

1. Startup: "All systems are functional"

This section explains how to play a sound on session opening (source).

Create a .conf file in ~/.config/upstart/:

gedit ~/.config/upstart/halsayshello.conf

Copy and paste this content:

start on startup
task
exec paplay ~/audio/hal/function.wav

Save file, exit gedit, and HAL should now speak on next session opening.

2. Shutdown: " That's something I can not allow to happen..."

This section explains how to play a sound when a non-sudo user tries to use shutdown. The sudo -v command before paplay is here to ask the password prompt before playing a sound. If you don't care playing the sound before prompting for the password, you can delete it:

Add this line at the end of ~/.bashrc file:

alias shutdown='paplay ~/audio/hal/cantalow.wav'

Yet, if you want the user to be able to shutdown, replace it by:

alias shutdown='sudo -v && paplay ~/audio/hal/goodbye.wav && sudo shutdown'

Enable changes:

source .bashrc

3. Upgrade: "I feel much better now. I really do."

This section explains how to play a sound after upgrading packages with apt:

Add this line at the end of ~/.bashrc file :

alias upgrade='sudo apt update && sudo apt upgrade && paplay ~/audio/hal/better.wav'

Enable changes

source .bashrc

You can now execute the upgrade command in your terminal

4. Reboot: "One moment please..."

This section explains how to play a sound before reboot.

Add this line at the end of ~/.bashrc file:

alias reboot='sudo -v && paplay ~/audio/hal/1moment.wav && sudo reboot'

Enable changes:

source .bashrc

You can now reboot using reboot instead of sudo reboot.

5. Email notification: "There is a message for you"

Move to default system sound folder:

cd /usr/share/sounds/freedesktop/stereo

Backup default message notification sound:

sudo mv message.oga message.oga.bak

Copy ~/hal/mesage4u.wav to replace it:

sudo cp ~/audio/hal/mesage4u.wav message.oga

That's it

Well, of course these are just examples of what can be done. I wanted to share that funny configuration I set up, not on my computer, but on a home server (with speakers). Much more can be done or must be done if you want to play this sounds as root, or add others for more commands.

I'm exited about your ideas to improve it.

Enjoy your HAL and ... stay safe.


Ubuntu 14.04 Alt+Tab live preview selection issue

The ; has nothing to do with the issue. Holding down the Alt key has this effect on my 14.04 as well. It cycles through what looks like 4 different border types with shadowing appearing ranging from none to fairly deep shadow surrounding the window in question. So to answer your question I believe this is the default behaviour.

I can confirm that showing seconds on the clock changes the behavior to cycling through 2 border types rather than 4.

Source: Testing


Why the difference between the results with "file --mime-type" and "xdg-mime query filetype"?

The xdg-mime utility from xdg-utils is a more comprehensive program that takes into account your desktop environment (GNOME and relatives, or KDE). In some cases it makes a call to the file utility, but in other cases it looks up the mimetype database for your particular system.

The file utility, as far as I can tell, only looks inside your file, it doesn't look at the filename. Hence the .kmz file, is recognised as a zip file. file makes use of 'magic numbers' which are associated with particular file types, eg the magic string P5 at the start of a file is associated with PGM images from the Netpbm library.

The mimetype database knows about higher-level filetypes, as identified using filename extensions, and can be user-customised. When new programs are installed, the mimetype database is extended and will give answers that might not have been given before certain software was installed. To my knowledge, that behaviour doesn't happen with the file command.

If you want to read more, the xdg-mime details are here -- source  code. You can see that it calls file in some cases.


How do I launch the "SMB Browser" and point it to a Windows Print share?

I'm sorry to say that I don't think that is possible.. Imho the best solution is to install all the printers on the image and then show your users how to change the default printer.

go to Preferences>Administration>Printing and right-click on the wanted printer and select "Set as default"


It looks like pwm3 is being skipped during the test.  Try enabling it by editing the file /sys/devices/platform/it87.656/hwmon/hwmon1/pwm3_enable as root and set it's value to 1.  Then run pwmconfig again.  You can also manually set the fan speed by editing /sys/devices/platform/it87.656/hwmon/hwmon1/pwm3 and setting it to a value between 0-255.


How to use Ubuntu 18.04 on VNC without display attached?

https://launchpad.net/ubuntu/bionic/+source/xserver-xorg-video-dummy

sudo apt-get install xserver-xorg-video-dummy

How to use: Add Fake Display when No Monitor is Plugged In


Touchpad stops working after restart on a Compaq Presario CQ-40 324la

I sometimes face similar problem. Generally running the Synaptiks application once or twice fixes my problem. You can open the dashboard by pressing the Super key and then search for application and select it using arrow keys and run it by hitting enter.


Identify the public key that you copied when you ran ssh-copy-id:

cat ~/.ssh/id_rsa.pub

SSH to the server you copied the key to:

ssh hadoop@192.168.1.1

Edit the file ~hadoop/.ssh/authorized_keys on 192.168.1.1 using your preferred editor, and delete the line containing your key.


Basically, I would use something in .bashrc to trigger the mail sending command. With includes and permissions tricks, you could make it impossible to edit for the user (give .bashrc to root, make it include .bashrc_priv, which you give to the user for his own configuration).

.bashrc, belongs to root

# trigger mail here
[ -f "~/.bashrc_priv" ] && . ~/.bashrc_priv

.bashrc_priv, belongs to $USER

# Whatever you want in your users' bashrc ; they can edit this file.

As I recall, SFTP triggers the bash login process.

If you're using something in particular to trigger the alert (some package/application), let me know.


Ubuntu 20.04 4k resolution issue (Black Screen)

This is not an answer that can be accepted, but rather a quickfix, and also a hint for the folks with similar issues, that would like to automate monitors management.
You can set monitor resolution with xrandr. First use it to read what kind of resolution on what type of connection you have. Simply type xrandr into console.
This is output for one of my monitors:
Screen 0: minimum 320 x 200, current 4803 x 3240, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+963+2160 (normal left inverted right x axis y axis) 309mm x 173mm

so to set this monitor as is now, I can use command:
xrandr --output eDP-1 --mode 1920x1080 --pos 963x2160 --rotate normal
I hope you can see corelation between output of the xrandr command and the next command, where you have to pass it.
eDP-1 is a name of connection/port (it can be DP or HDMI) and converts into --output eDP-1
primary states that this monitor will be primary one and the sidebar with applications will be displayed on it.
1920x1080+963+2160 converts into --mode 1920x1080 --pos 963x2160
And how this could help for the author of this issue?
Into ~/.bashrc file (or other rc file) you can set an alias that will trigger this command and will set up entire monitor setup with singe click of an enter
alias monitorsetup1='xrandr --output eDP-1 --mode 1920x1080 --pos 964x2160 --rotate normal --output DP-2-1 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-2-2 --mode 1920x1080 --pos 2883x2160 --rotate normal'

After reloading source or opening your next terminal session, you will be able to run monitorsetup1 command.


Missing modules (cat /proc/modules; ls /dev) with 5.4.0-47-generic new kernel

Apparently, as signaled by Rufus in the comments, there have been other reports of this problem, and a new kernel has been recently pushed for the users. Updating the computer should now install the new 5.4.0-48-generic kernel which work now like a charm.
Problem solved!


How do you test the network speed between two boxes?

I use iperf. It's a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.

One both machines run:

sudo apt-get install iperf

We'll start an iperf server on one of the machines:

iperf -s

And then on the other computer, tell iperf to connect as a client:

iperf -c <address of other computer>

On the client machine, you'll see something like this:

oli@bert:~$ iperf -c tim
------------------------------------------------------------
Client connecting to tim, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.04 GBytes    893 Mbits/sec

Of course, if you're running a firewall on the server machine, you'll need to allow connections on port 5001 or change the port with the -p flag.

You can do pretty much the same thing with plain old nc (netcat) if you're that way inclined. On the server machine:

nc -vvlnp 12345 >/dev/null

And the client can pipe a gigabyte of zeros through dd over the nc tunnel.

dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345

As demod:

$ dd if=/dev/zero bs=1M count=1K | nc -vvn 10.10.0.2 12345
Connection to 10.10.0.2 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 9.11995 s, 118 MB/s

The timing there is given by dd but it should be accurate enough as it can only output as fast the pipe will take it. If you're unhappy with that you could wrap the whole thing up in a time call.

Remember that the result is in megabytes so multiply it by 8 to get a megabits-per-second speed. The demo above is running at 944mbps.


Ubuntu 12.04 live CD not booting on iMac G5 (Intel)

choose boot option
press e
find string contains quiet spalsh
replace quiet spalsh with modprobe.blacklist=bluez,bluetooth,btusb quiet spalsh
press F10 to boot configuration


debian manual says

    iproute2 method

Also, ifupdown supports specifying multiple interfaces by repeating iface sections with the same interface name. The key difference from the method described above is that all such sections are treated by ifupdown as just one interface, so user can't add or remove them individually. However, up/down commands, as well as scripts, are called for every section as it used to be.

Note however that this method is dangerous! Certain driver/hardware combinations may sometimes fail to bring the link up if no labels are assigned to the alias interfaces. (Seen this on Debian Wheezy and Jessie with RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 01) auto-negotiating to 10/full. A similar warning from another person exists in the history of this page.)

This /etc/network/interfaces text assigns three IP addresses to eth0.

auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.42/24
    gateway 192.168.1.1

iface eth0 inet static
    address 192.168.1.43/24

iface eth0 inet static
    address 192.168.1.44/24

# adding IP addresses from different subnets is also possible
iface eth0 inet static
    address 10.10.10.14/24

But even using labels (or at least I think I am using them):

    auto enz3
allow-hotplug enz3
iface enz3 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1

iface enz3:1 inet static
    address 192.168.0.7
    netmask 255.255.255.0

iface enz3:2 inet static
    address 192.168.0.8
    netmask 255.255.255.0

I still get the error:

giu 05 17:38:43 dv-VBox systemd[1]: Stopped Raise network interfaces.
giu 05 17:38:43 xx-VBox systemd[1]: Starting Raise network interfaces...
giu 05 17:38:43 xx-VBox ifup[5004]: RTNETLINK answers: File exists
giu 05 17:38:43 xx-VBox ifup[5004]: Failed to bring up enz3.
giu 05 17:38:43 xx-VBox systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
giu 05 17:38:43 xx-VBox systemd[1]: Failed to start Raise network interfaces.
giu 05 17:38:43 xx-VBox systemd[1]: networking.service: Unit entered failed state.
giu 05 17:38:43 xx-VBox systemd[1]: networking.service: Failed with result 'exit-code'.

What Should I try next ?


How do I find and install the right driver for a GeForce GT 440?

I would suggest upgrading kernel to 3.19 and installing 331 driver.
Run

sudo apt-get install linux-generic-lts-vivid

reboot

sudo apt-get install --reinstall nvidia-331

reboot.


How do I write a CD/DVD from the shell to save emails etc?

Depending on what email software you are using, for example on my Thunderbird setup I copy the profile and rsync it from time to time to separate folder (with thunderbird is turned off) and then that folder I backup to external media when needed.


Sounds like it may be a bad live version of Ubuntu. I'd suggest doing a checksum of the ISO and then recreating the live USB. Here's a
guide on how to verify your ISO


The wine repository uses https. You must install apt-transport-https package to access metadata and packages accessible over https


Install PHP 5.4 on Ubuntu 14.04 LTS without Compiling

Install requirements for phpbrew

apt-get update
apt-get upgrade
apt-get build-dep php5
apt-get install -y php5 php5-dev php-pear autoconf automake curl build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev
apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8  libgd-dev libgd3 libxpm4 libltdl7 libltdl-dev
apt-get install -y libssl-dev openssl
apt-get install -y gettext libgettextpo-dev libgettextpo0
apt-get install -y php5-cli
apt-get install -y libmcrypt-dev
apt-get install libicu-dev

Install phpbrew

curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/bin/phpbrew

Initialise phpbrew, update and install PHP 5.4

phpbrew init
phpbrew known --update
phpbrew update

Here we choose PHP 5.4.34, but you can change this to any version that is available as listed by the above commands - like 5.5.22.

phpbrew install 5.4.34 +default

Update your shell config file by adding the following to the end of your ~/.bashrc or ~/.zshrc (basically the shell you're using, default to .bashrc)

source ~/.phpbrew/bashrc

Close your terminal to take effect, and restart it.

Switch the default PHP version to 5.4

phpbrew switch php-5.4.34

If it shows Invalid Argument, try phpbrew switch 5.4.34 instead.

Check your PHP version

php -v


Why does trying to build a kernel module give me a "-1 Unknown symbol" error?

Is there a standard way to go about this without first building the kernel? Will building the kernel ensure that I can build the module?

If you get that error, no. You can force-load the module, and it will most probably work, but you won't be able to debug it and this method is not recommended.
The error occurs because you're missing the module.symvers module symbol database.
The only proper way to generate that file is to execute a full build of the kernel -- this will let you build the module.
Be very careful to configure the kernel exactly to stock specifications unless you intend to install and run on the built kernel.


How to run two monitors on two diffrent nVidia cards?

I managed to get two monitors across two cards after some seriously frustrating brute force troubleshooting.   I Learned the following...
1. Lightdm seems (Seems = not an official statement) to hate mixed cards (gnome, doubly so)
2. Gnome (Classic) would do weird things on me.
3. Unity worked across two monitors when i ran [xinit] from CLI as root. and then started unity from terminal with [unity-panel &]
At least I think thats the command I used... I started unity with &


Dell U2711 monitor USB hub does not recognize/auto-mount USB disks

Does the usb drive activity light startup?

Potentially the hub is defective or it is unable to provide power to devices that are not self-powered.


How to make the Fujitsu lifebook T5010 screen rotate?

In Linux, all drivers are inside the kernel, so to get new drivers you just download the latest Linux kernel. You can find Ubuntu kernels here: http://kernel.ubuntu.com/~kernel-ppa/mainline/

I highly recommend the latest kernel 3.12-rc7. To install the kernel, you simply download the three debs for your system. If you have a 64-bit system then that would mean downloading *_all.deb and *_amd64.deb and installing them.

For 64-bit 3.12-rc7

cd ~/tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-headers-3.12.0-031200rc7-generic_3.12.0-031200rc7.201310271935_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-headers-3.12.0-031200rc7_3.12.0-031200rc7.201310271935_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-image-3.12.0-031200rc7-generic_3.12.0-031200rc7.201310271935_amd64.deb
sudo dpkg -i *.deb

For 32-bit 3.12-rc7

cd ~/tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-headers-3.12.0-031200rc7-generic_3.12.0-031200rc7.201310271935_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-headers-3.12.0-031200rc7_3.12.0-031200rc7.201310271935_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-rc7-saucy/linux-image-3.12.0-031200rc7-generic_3.12.0-031200rc7.201310271935_i386.deb
sudo dpkg -i *.deb


Issue on installing wine on Ubuntu 11.10

You must be trying installation either by synaptic or Software center or any other installation is going on. First stop/kill that process and try again.

There is no support available for Ubuntu 11.10 now. You can use 12.04 LTS.


How to turn on and start openstack and openvswitch on a single machine?

Just for playing with openstack, take a look at DevStack.  It's a nice way to start up everything and play around. Not sure if you need to be running 64 bit mode though. Need to have machine that supports virtualization.

There are several automated provisioning packages out there for OpenStack, Ubuntu has one with Juju, Vagrant (has a devstack box), and many more, but for just starting it on one machine to learn more about it devstack is nice, IMHO.

Ref: http://devstack.org/


After a long struggle, I realized I did not select the "default configuration" when you log in the first time.

I ran this command rm -r ~/.config/xfce4 and rebooted the box and it worked. More reference material is here


Why doesn't adding the Kubuntu backports ppa allow me to get the latest KDE version?

This is because KDE 5.7 hasn't been backported to Kubuntu and added to the backports ppa yet.

I've been waiting too, so I hope someone involved in the project will comment on when they expect that to be done.

Edit: I notice that you actually on KDE 5.5.5. You should at least get upgraded to 5.6.5, which is available for Kubuntu 16.04. Try running kinfocenter to double check your version information.

Update: It doesn't like like KDE Plasma 5.7 will be available for 16.04 at all, I think you will have to upgrade to 16.10 next month or switch to the Neon distribution.


Unity menu bar into title bar integration stopped working for gnome-terminal

I have no idea why and appreciate any other answer that might shed some more light on this, but I could solve this problem simply...

... by rebooting!

Maybe logging out and back in or restarting the Unity desktop environment would have solved it as well, I can't tell you because I did not try.


Problem with apt-get update on ubuntu server

Try using another mirror. I assume you have Internet connectivity. Open Ubuntu Software Center | Edit | Software Sources and change "Download from" to something else. Then in a terminal run "sudo apt-get update".


The minimum required Nvidia driver for nvenc is 435.21 or newer?

Open the terminal and type:
sudo apt update
sudo apt remove '^nvidia'
sudo apt autoremove
sudo apt install nvidia-driver-435 # or alternatively nvidia-driver-440
sudo reboot

If after these coimmands you still get a Failed to open NVENC codec: Function not implemented error message see
How to install / compile NVENC in Ubuntu?.


Pkg-Config Error (No such file or directory)

I got this problem too, but after carefully see the the code, it just a typo.
Please see again your command,

gcc simple.c -o simple 'pkg-config --libs --cflags gtk+-3.0'

It should be,

gcc simple.c -o simple `pkg-config --libs --cflags gtk+-3.0`

Can you see the different? The '  should be `. It works for me!


Installing Canon LBP6000 in Ubuntu 12.04

This may sound odd but has worked for me - "generically" ie not that specific printer.

Your steps seem sound.. Go through them again ie.. purge the driver(s).

Re-install this time WITHOUT the printer plugged in.
reboot or log in/out
Connect printer and try to print.

Good Luck - Mal


Unity lanucher bug - problem with stacked aps

I resolve this problem , here is solution for all people who struggle with unity bugs.

sudo su
apt-get update
apt-get autoclean
apt-get install --reinstall ubuntu-dekstop
apt-get install --reinstall unity

If you still have problem you can try reinstall video drivers.
If there will be still problem - well i think only reinstall left.


what is the default password when you create new user in ubuntu?

You need to set a password for the user. Use the passwd command:

Usage: passwd [options] [LOGIN]

So if you want to set a password for the new user, you type in:

sudo passwd acreddy

and you're good.


Removing duplicate entries in boot menu (WUBI)

In your Windows install, edit C:\boot.ini.  Remove the old entry/line, and you're done!


Configuration and compilation settings used for Ubuntu packages

Ubuntu binaries may contain patches as well.

Best thing to do is to download the source with apt-source

You may need to Enable the source repositories

apt-source will download and unpackage the source code.

apt-source foo

You can then examine the source code, any patches, and the configuration options.

The compile options are in debian/rules

Note: there is sometimes some variation in some of the packages.

See also

http://www.cyberciti.biz/faq/rebuilding-ubuntu-debian-linux-binary-package/

The packaging guide is invaluable when learning how the source code is packaged

https://wiki.ubuntu.com/PackagingGuide/Complete


ping 8.8.8.8 works but ping www.google.com doesn't

You need a Name Server in your /etc/resolv.conf file.  Edit your /etc/resolv.conf and add a working Name Server.  Google provides  a free one, 8.8.8.8.

Do this:

$ nano /etc/resolv.conf

Place this as the first non-commented line:

nameserver 8.8.8.8

You can verify this functionality with:

$ ping -c10 www.google.com

You can make this change permanent by adding the line to this file your /etc/resolvconf/resolv.conf.d/head file.


Dual boot Windows 10 and Ubuntu 18.04. Ubuntu hangs during install

I've got it to work.

BIOS settings:
Changed SATA mode from IDE to AHCI. Didn't seem to do anything but I did not change it back. Enabled EHCI mode (XHCI mode was already enabled, I read something about USB3 and XCHI on a different forum, and the USB front port I was using was USB3 so I figured it was worth a shot.)

Then I remembered that sometimes with "Windows boot from USB" it matters if I plug the USB directly into the motherboard or the front panel. So I stuck the USB in the back of the PC instead of the front.

And one of those things worked, because setup continued (after a few minute pause in the same place) and finished.

PC boots straight into Windows 10 unless I hit F12 (for my BIOS - choose boot device), probably because I chose "Something else" and not "Boot alongside Windows" - because I've installed Ubuntu on a separate harddisk.


Can I upgrade ubuntu-desktop from 11.04 to 11.10 using NX?

This person figured it out:

  This "Run the following command" Works!!!

gnome-session --session=ubuntu-2d

  And if gnome-session-fallback has been installed, then this "Run the
  following command" will also Work...

gnome-session --session=gnome-classic

  One "Caveat" being the NoMachine NX Client has to be Manually
  "Terminated" since it will NOT exit on its own???

https://lists.ubuntu.com/archives/ubuntu-users/2011-October/252648.html


what are the "Online accounts" used for under System Settings?

It is to give a system-wide access to your gmail (and possibly others) account so that softwares and extensions can access it without requiring you to give permission to each and every of them.

The fact that Gnome provides this functionality doesn't mean that developers actually use it, it's a pretty new feature and softwares will eventually catch up.

As far as I know one of the few extensions using "online accounts" is Gmail Notify


What differences do I need to know choosing between ext4 and NTFS (Performance etc)

Here is a very comprehensive Comparison of file systems.

NTFS has both read and write access now in Linux through NTFS-3G, and you can use third-party programs to gain access to an EXT2/3/4 filesystem from within a Windows operating system.


Ubuntu 16.04 HDMI Audio Not working, speaker-test works

Here is how I got things working in case anyone else want to know. It may save you some time.

The problem seemed to be that pulse audio was send sound to card 1 device 3 which produced no sound with sound-test command. I needed to switch it to card 1 device 7, which did produce sound with sound-test.

I added two lines to the file /etc/pulse/default.pa

load-module module-alsa-sink device=hw:1,7
set-default-sink output 2

The hw:1,7 corresponds to the "card 1" and "device 7" shown for the device in the output of the "aplay -l". This was the card and device that played sound from sound-test. Number for the default sink is the index of the device shown by "pacmd list-sinks"

I also had to turn off the device corresponding the hw:1,3 using pavucontrol.

Also helpful was the site PulseAudio/Examples, in particular the section on HDMI output configuration.


Dual boot with windows 10 fails to boot usb

Thanks to Vitor Abella, I managed to fix it using a different format for the usb, as mentioned here.
The solution was to make the partition GPT, as described in the blog answer.


Xorg process - what is it, how to disable it

the Xorg binary runs the X desktop. You don't say which version of Ubuntu you're using. You should specify these things in your questions to get better answers. Please edit the question to clarify.
Anyway, if this is not a desktop system and you aren't using any form of graphical desktop environment on it then you could remove the relevant package, which is:
$ dpkg -S Xorg
xserver-xorg-core: /usr/bin/Xorg
xserver-xorg-legacy: /usr/lib/xorg/Xorg.wrap
xserver-xorg-core: /usr/lib/xorg/Xorg
xserver-xorg-legacy: /usr/share/man/man1/Xorg.wrap.1.gz
xserver-xorg-core: /usr/share/man/man1/Xorg.1.gz

Due to dependencies, removing any of those will want to remove a great deal of other packages too.
However, the fact that it's running and using 40% CPU suggests you actually are using it. If you are using any kind of graphical desktop environment here then it won't be a good idea to try to remove the package for this binary.
If you do need it then it's difficult to work out why it's using so much CPU unfortunately.
If it's always done this, you may need to install drivers for any graphics hardware you have. This answer covers installing additional graphics drivers.
If it's a new symptom, well, it could just be a one-off problem that may be resolved by rebooting. Normally you would only expect high CPU usage on the Xorg process when there is heavy use of video or similar in some window.


I found a solution that worked beautifully after many days of messing around, this was also on an iMac 8.1 with 1gb RAM and found that to be safe I would install Leopard first before upgrading to Snow Leopard. If you have a later model that came with Snow Leopard installed originally I suggest you do the same to be safe.

I posted this on ubuntuforums:
"I know this thread is a bit old but after days of struggling to clean install OSX on a Mac after a disk erase I have a solution!!!

If you do it this way you can directly install from a partition on the same drive or even just boot the installer from that partition to use disk utils and create a USB installer\DVD installer or external HD installer.

Firstly install ubuntu on the mac (or an external HD) and find a dmg install OS X DVD image that matches the original OS installed on that hardware when purchased.

Make sure when you install Ubuntu that you leave free unpartitioned space to create a couple of partitions later.

The big issue with these images is that they actually contain multiple partitions of different filesystems so if you just convert to img and then try to mount it or convert to ISO and mount it will only mount the bootcamp installer partition but I found a link which I'll post that has the work around.

You'll need to install packages dmg2img, gparted, hfsplus, hfsprogs & hfsutils.

Create an 8GB HFS+ and another bigger HFS+ partition that you plan to install OS X on (so 30gb+), as mentioned in the link below and follow those instructions carefully.

Use Linux to install OSX from a DMG extracted to a partition - without a Mac DVD

After so much struggling, this was the only way that worked, and it's pretty straight forward. Was able to do it and install OS X within half an hour or so and the install was very fast because it was on the same HD.

Best of luck to anybody who's had this hassle, it works great as long as you get a proper dmg of an install DVD.


How do I disconnect a Wi-Fi network in Ubuntu 17.10?

You may try one GNOME shell extension called Disconnect Wifi to achieve your goal. It

  Adds a Disconnect option for Wifi in status menu, when a network is connected. Shows a Reconnect option, after network is disconnected.

(screenshot source: extension's homepage at extensions.gnome.org)


Which of these Paths should I use as the value of JAVA_HOME?

As you can see two alternatives are identical, so you can use both of them. Simply you can use following command to set JAVA_HOME:

JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

The command update-alternatives --config java is used when you have different JAVA installed on your machine. For example Mine is as follow:

There are 2 choices for the alternative java (providing /usr/bin/java).

* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  2            /usr/lib/jvm/java-8-oracle/jre/bin/java          1081      manual mode


How do I install drivers and configure my screen to actualy work? (15.04, nvidia 760 gtx, QNIX QX2710)

nVidia 349 is in beta stage for Linux (according to geforce.com ). There might be a bug which is occurring your problem. nVidia 319 doesn't support GTX 760, the support for Linux came from nvidia-337. I'd recommend you to install it from Ubuntu's additional drivers. Perform the following steps:

Open dash and search for Additional Drivers
Open Additional Drivers and select Using NVIDIA binary driver - version 346.59 from nvidia-346-updates (prpprietary)
Click Apply Changes.
After the installation, reboot your system and everything should work fine.


Opendr installation error (python2.7 & Ubuntu 16.04): failed with error code 1 in /tmp/pip-install-e1zPWl/opendr/

Try this command to specify the version number:
pip install opendr==0.77


Convert Hybrid GPT/MBR to pure GPT partition scheme

From the gdisk(8) manual:

  n – Create a new protective MBR. Use this option if the current protective MBR is damaged in a way that gdisk doesn't automatically detect and correct, or if you want to convert a hybrid MBR into a "pure" GPT with a conventional protective MBR.

You need to enter the experts’ menu to access this option.

Open the drive in gdisk:

sudo gdisk /dev/sdX

Enter the experts’ menu (x).
Create a new protective MBR (n) and answer any dialogue questions as suitable.
Return to the main menu (m).
Write the changes to the drive and exit gdisk (w).

You may need to reinstall Grub in EFI mode if it was installed in MBR mode before.


Nvidia proprietary driver hangs/freezes/blank screen at login in 13.10

Have you tried downloading other drivers from the NVIDIA website? I never use driver packages they provide with ubuntu os because they suck big time for most nvidia cards except a few. Instead I go to NVIDIA and choose one or more linux drivers for my nvidia video card and install the one which works best as shown in many tutorials present on askubuntu.com.

By the way, you can find a wider selection of drivers for your card if you use the "Beta and Older Drivers" link which is located at the middle of the NVIDIA Driver Downloads page . Choose your video card ( GeForce - GeForce 400 series - GeForce GTS 450 ) from the list and also choose the "certified/recommended drivers", and not the "all" drivers section. I personally recommend the  "331.38" version for your GTS 450 video card, and you can find it here.

Have your already tried the Linux 331.49 version, this one should work like a charm but you're saying that it does not. Maybe you should install LXDE environment, all packages, and also LXDM as default display manager because from my own experience NVIDIA cards work best in a lxde environment.

There are specific Linux video drivers for your Nvidia GTS 450, for Linux 32bits and for Linux 64bits, depending on your computer architecture, I am not certain about that, I mean I have no idea about your PC configuration.

You can install your driver after removing all nvidia drivers from your ubuntu system. Code:

sudo apt-get remove nvidia*

After that, without rebooting, you have to also completely remove NOUVEAU driver using Synaptic, and then blacklist the NOUVEAU driver, and the proprietary driver(s) that you used by editing this file:

gksu leafpad etc/modprobe.d/nvidia-graphics-drivers.conf

Make sure first that you have installed GKSU and LEAFPAD.

sudo apt-get install gksu leafpad

You should add in your 'nvidia-graphics-drivers.conf' file these lines:

blacklist vga16fb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-319

After editing and saving  'nvidia-graphics-drivers.conf' file you can reboot and after reboot exit to console at login prompt ( CTRL+ALT+F1 )  and login as 'user'  which is your username for ubuntu/linux.

N.B. It is my experience that most of the times, especially after a fresh install of Ubuntu, there is no 'nvidia-graphics-drivers.conf' file to be found in etc/modprobe.d , and if that is the case then you need to create a new file in a text editor, add the lines to blacklist nouveau driver and the other drivers, and save this new file as 'nvidia-graphics-drivers.conf' without the quotes in etc/modprobe.d . You can use PCMANFM file manager to open etc/modprobe.d as 'root' so you can easily create and save this new 'nvidia-graphics-drivers.conf'.

Next type this code in the console to stop the display manager (DM) interfering with video driver update:

sudo stop kdm

or

sudo stop lightdm

or

sudo stop lxdm

Choose your default display manager for this one. Gnome uses lightdm, KDE uses kdm and LXDE used lxdm.

After getting the message "display manager stopped/waiting" you are sure that you actually stopped the display manager to interfere with your video driver update. By the way, you should first check which display manager you're using right from the start, before removing nvidia drivers. Just press CTRL+ALT+F1  and login as 'user' and type in the console the code shown above:

sudo stop lightdm

( kdm, lxdm whatever is present on your system ).

To install your new video driver that you got from the NVIDIA website you first have to cd (point) to the directory where you saved it. Once you're there, you can install it by typing in the console this command:

sudo sh NVIDIA-Linux......run

Use the exact name for your video driver, capital letters included. The command 'dir' can help you see the driver and type its name correctly to be able to install it. Then you'll be guided step by step how to install your video driver, and at the end you'll be asked whether you want nvidia manager to save your new configuration for you ... press YES. Reboot and after login save your new X server configuration using this command:

 sudo nvidia-xconfig

If, by any chance, new driver doesn't work as expected after reboot, you'll have to try installing another one from the NVIDIA list provided in the "Beta and Older Drivers" section specifically for your GeForce GTS 450. Make sure you first download 3 or even more of those drivers in the list, and test them one by one. The worst scenario is when you need to reinstall the nouveau driver if nothing else works, but first you'll have to edit the 'nvidia-graphics-drivers.conf' and remove the 2 lines which blacklisted the nouveau driver before.

Hope this helps. If it doesn't you should ask the ubuntu team to provide you with a list of graphic cards that work best in UBUNTU 13.10, and also in Ubuntu LTS 12.04 (ask them for a complete list including both NVIDIA and ATI video cards tested in their ubuntu labs with proprietary drivers), and replace your card with another one that won't give you so many headaches.

I am sure you've kept some older video cards in your drawer just in case you'll be needing them in the future. Use your GeForce GTS 450, which by the way is an awesome video card, in a windows environment only. Speaking of Windows, do you experience the same issues with screen hangs/freezes in there too?


Go to Software & Updates. Go to Additional Drivers, change the driver used.


Add loopdevice
losetup /dev/loop6p1 ~/iso/name_my_image.iso

Delete loopdevice
losetup -d /dev/loop6p1

Show all mounted devices
df -h

And check badblocks (1Tb Disk), maybe it affects the copying speed
sudo badblocks -v /dev/sdc -o ~/bads.txt


Lost vlc after a partial upgrade - cannot reinstall due to unmet dependencies

I searched for "ubuntu partial upgrade via Update Manager" and I found this, it sounds relevant though it's "mainly for those of us that run a development version of Ubuntu" and it's probably not an answer you're looking for : https://help.ubuntu.com/community/partialupgrade

Here's the headlines:

Contents

What to do when offered a partial upgrade

I'm offered a partial upgrade, what should I do?

Summary or "I don't really care if I keep messing things up and wasting my and others' time with preventable problems, and you have 30 seconds to convince me to care!"

Short Version or "Hmm, so I shouldn't blindly do "Partial Upgrade"s and dist-upgrade? I didn't know that..."

Long Version or "I want to be a better tester! I care! Tell me more!"


How to enable OpenVPN access to ONLY the internal LAN

It is possible to just access the internal resources without internet connection, i think this is actually the usual scenario for using OpenVPN.
So if you followed some guide to setup OpenVPN server, there were also some steps that allowed forwarding clients traffic to the internet, you'll need to undo those steps.
I think you should start with commenting this line in server.conf

push "redirect-gateway def1 bypass-dhcp"

Then pushing a DNS server for clients should be disabled by commenting out lines that look like

    push "dhcp-option DNS xxx.xxx.xxx.xxx

Ofcourse you'll need to reload OpenVpn conf after making the changes.

    sudo service openvpn reload

And then disabling packet forwarding out to the internet

    echo 0 > /proc/sys/net/ipv4/ip_forward

And to make disabling forwarding permanent you'll also have to edit

    /etc/sysctl.conf

commenting line

    net.ipv4.ip_forward=1

By now i think clients shouldn't anymore be able to access the internet through VPN.


Install the pavucontrol program like this:

sudo apt-get install pavucontrol

or reinstall pavucontrol. Worked for me.


You may create Ubuntu LiveUSB with https://www.balena.io/etcher/
All you need to do is download latest Ubuntu ISO into your notebook and run https://www.balena.io/etcher/ in order to create Ubuntu LiveUSB.


Nvidia GeForce Experience possible on Ubuntu? (13.10)

All the features offered by Geforce Experience are designed exclusively for Windows.

Since it deals with hardware drivers and settings for Windows-only games, there also is no need for it on Ubuntu.


Where are the syslinux x86-64 files located on a booted up live medium?

You have to install the package syslinux-efi first it is not preinstalled.

Than you can find the files below /usr/lib/SYSLINUX.EFI/

This package contains only the binary and not the divers *.c32 files for creating a bootmenu for example.


"open in terminal" command in ubuntu 16.04, doesn't open terminal in changed directory

Okay, I guess I've found a fix for this. So, launch terminal go to Edit -> Profile Preferences -> Command and uncheck the option saying Run a custom command instead of my shell.


How to move, resize or remove KDE widgets since Plasma 5.5.5 (xenial)

With Plasma 5.5.5 the menu appears after a long left-click (instead of hovering with the mouse in Plasma 5.4.2). This can be changed back in Desktop Settings (right click on desktop) -> Tweaks -> Widget Handling. This solution was first posted on bugs.kde.org.


Terminal way:

lame is in Universe repository. So you have to first enable universe repository.

See this question → How do I enable the "Universe" repository?
Then install lame by the below using commands in a terminal. To open a terminal press Ctrl + Alt + T.

sudo apt-get update
sudo apt-get install lame

Then navigate to the directory by using cd command to the folder you have the file to convert it. I assume your file is in Desktop directory and it's name is 001.mp3. We also assume your input file is of 128kbps and you want an output file of 32kbps. So, use these commands to compress it

cd ~/Desktop
lame -b 32  001.mp3 001-32.mp3

You can use any name for the output file other than the same name as input file which is in this case 001.mp3.

Note that, the conversion will use fixed bitrate as opposed to variable or average bitrate.

See the lame manual page for more help.

Graphical way:

If you prefer graphical tools to do this, I suggest you a small and simple tool to do so. It is soundconverter.

Install it with this link → soundconverter  or using this command in terminal

sudo apt-get install soundconverter

Open it by searching in Dash with term "soundconverter". To bring Dash, Press Super key which is also known as Windows key.
When it opened, Press the **Add File* button in it's toolbar, and select the file you want to convert.
Then go to Edit → Preference from menu. In Type of result select mp3 and select a quality.

Very low = 64 kbps
Low = 96 kbps
Normal = 128 kbps
High = 192 kbps
Very high = 256 kbps.

I think, you should select "Very low" or "Low" depending on your needs. Then click close.
Click Convert button in toolbar to convert it.

That's it. Your file will be converted and stored in the same directory as the input file. You can also change the directory for output folder in Preference Window.


check your grub config and make sure it properly references the location of the init image.

this:error: hd0,msdos1 write error.  makes me think partitions either aren't set up right or that a flag is set that declares an ext partition as msdos.  dos partitions don't play nicely with ext permissions...

a backup in the fashion you describe should have worked imho.

i have successfully done it without the convo= args and pv, but you don't get any idea of the progress.  i typically do it right before bed and get up with an image copied.


You can adjust your fan settings with the package  fancontrol

To setup use pwmconfig.


What happened to pyqt5 when upgrading to 20.04.1

driverless provides a URI. It is given above. Substitute for it in
lpadmin -p PRINT_QUEUE_NAME -v URI -E -m everywhere

PRINT_QUEUE_NAME can be anything you choose. Test printing with
  lp -d PRINT_QUEUE_NAME /etc/nsswitch.conf

This avoids all the nonsense with HPLIP and pyqt5,


Volume and brightness keys not working in Xfce

Xfce4 has a package xfce4-mixer for mixer setting. You need to install it. (for example, using sudo apt install xfce4-mixer) Then install xfce4-volumed that actually gives you control to change volume using multimedia keys.

To configure xfce4-mixer, open it (use command xfce4-mixer) and choose your sound card. Then choose tracks (eg. Master or Headphone). Now try to change volume.


You might want to consider removing the encrypted private directory if so follow the steps below.

To remove this setup:

Ensure that you have moved all relevant data out of your ~/Private directory
Unmount your encrypted private directory

$ ecryptfs-umount-private

Make ~/Private writable again

$ chmod 700 ~/Private

Remove ~/Private, ~/.Private, ~/.ecryptfs (Note: THIS IS VERY PERMANENT AND WILL DELETE ALL YOUR FILES, NOT JUST THE ENCRYPTED COPIES!)

 $ rm -rf ~/Private ~/.Private ~/.ecryptfs

Uninstall the utilities

 $ sudo apt-get remove ecryptfs-utils libecryptfs0

Resources:

Encrypted Private Directory


Well, maybe it was a combination of the edits I already made (also in my post). But the final solution to get it all working was this:
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

python3 /home/get_weather_data_crn.py &&
python3 /home/pv.py

Yes, not making a NEWLINE! after && prevented Crontab to run the python scripts.


How to connect Ubuntu to University LAN (Windows, Static IPs) to use Internet?

You need to assign your static IP to your Ubuntu machine. My University is the same way. Here is how I did it:

http://www.howtogeek.com/howto/19541/how-to-assign-a-static-ip-to-an-ubuntu-10.04-desktop-computer/

Basically all you have to do is open your internet connection manager and then edit your wired connection. You will need the following information which your IT department should be able to supply:

Your static ip like: 192.168.X.X
You netmask probably: 255.255.255.0
Your gateway which is like: 192.168.X.1

Then you might have to configure DNS depending on how your network is setup.


Disks application not reading SMART data correctly?

S.M.A.R.T. data is not known for being user-friendly. When evaluating the information from the output of smartctl, the key to remember is that:

  Each metric is considered to have failed when WORST is below THRESH.

In your example, each row's WORST is greater than THRESH and therefore none of the metrics are indicating failure. Notice also that the WHEN_FAILED column is empty, confirming that none of the metrics have reached the critical point.

Also note that raw read errors are common during normal operation and not an exceptional situation.


how to install gfortran package on ubuntu 12.04 offline pc

You can install a downloaded deb package using dpkg:

sudo dpkg -i gfortran_x.y.z_arch.deb

However, it will probably tell you that one or more dependencies are unavailable, which you will then need to also download before you can install it (note that gfortran is a dummy package that just provides dependency on the actual compiler package, currently gfortran-4.6, in order to make installing multiple different versions possible).

You can see the dependencies of any single package with:

dpkg -I gfortran_x.y.z_arch.deb | grep Depends

gfortran has a lot of dependencies (gcc and lots of associated libraries). If you don't want to use specialised tools, you'll either spend a long time getting extra files, or try installing gfortran on a similarly configured, internet connected machine and see what has to be downloaded. The tool apt-rdepends might be helpful for listing all the recursive dependencies of a package.


How to check/enable the full speed of SATA drive/port?

First of all look for software on the manufacturer's website.
In my case I have the drive intel s3700
I install software called:

  Intel® SSD Data Center Tool (Intel® SSD DCT)

At the moment I'm doing this from under Windows 8.1 but similarly it should be on linux

run command line / terminal from admin rights and browsing where my drive is:

isdct show -intelssd 0

    C:\Windows\system32>isdct show -intelssd 0

- Intel SSD DC S3700 Series BTTVxxxxxxxxxxxxx -

DevicePath : \\\\.\\PHYSICALDRIVE0
DeviceStatus : Healthy
Firmware : 5DV12270
FirmwareUpdateAvailable : The selected Intel SSD contains current firmware as of
 this tool release.
Index : 0
ModelNumber : INTEL SSDSC2BA400G3
ProductFamily : Intel SSD DC S3700 Series
SerialNumber : BTTVxxxxxxxxxxxxx

Fix the speed of the disk

isdct set -intelssd 0 physpeed=6

C:\Windows\system32>isdct set -intelssd 0 physpeed=6
Set PhySpeed successful. Please power cycle the device.

restart the system and everything works!


Ok I will answer to my question, thanks for the help, so what I have done after many try/error:

First, ensure you can run these commands without any error: (don't hesitate to reboot to avoid locks in apt)

sudo apt-get remove --purge mysql*
sudo apt update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
sudo dpkg --configure -a

Delete: (do backup before if you want but do no leave the files in these directories, even with .bak or .old extensions)

/etc/mysql
/var/lib/mysql

If you have an error mentioning alternatives, run: (replace my.cnf) by the file indicated in the error message)

sudo update-alternatives --remove my.cnf

Then reinstall:

sudo apt install mysql-server

Check now, if at least the mysql service is running:

sudo service mysql status

If still not OK, try to force reinstall:

sudo apt install mysql-server --reinstall

And reconfigure:

sudo dpkg-reconfigure mysql-server


Permission Denied - when removing Snap Gimp Package

Ended up solving with:
snap remove --purge gimp


How should I troubleshoot skipping audio?

Since Totem works, it is almost certainly due to the different codec engines in use.  Totem and GNOME in general use gstreamer.  Amarok and KDE in general use phonon, which in turn uses the xine codec engine by default in Ubuntu, though it can also use gstreamer.

See Amarok's wiki page about phonon.

It sounds like things may work for you if you install phonon-backend-gstreamer and switch to it by default (configure via Settings --> Configure Amarok --> Playback --> Sound System Configuration --> Backend).  I'm not sure that won't regress audio playback in new ways though.


I'm not an expert on networking, but I can think of a couple of things:

Your traffic is still being routed directly through your ISP.

There are two default gateways listed at the moment (192.168.1.254/wlan0 directly through your ISP and 10.12.0.117/tun0). I would think that a request to access a site (e.g., Piratebay) would go through the VPN connection (tun0), but that might not be the case.

When connecting to a VPN, I use ipleak.net for testing. Go to the page and check if your visible IP address belongs to your ISP or your VPN. If it's an ISP address, then it makes sense that you cannot access ISP-blocked sites.

Try manually removing wlan0 as a default gateway (you must do this after you've established a connection to the VPN so that the "default via tun0" entry is already there):

sudo ip route del default via 192.168.0.254

(to add it again after you've dropped the VPN connection, run the same command but use add instead of del)

If this changes your visible IP address to your VPN, it means this was the problem.
The VPN connection is not working.

If you drop the "default via wlan0" rule (as above) and you lose all connectivity, it probably means you didn't connect to the VPN properly or the VPN has some problems (beyond your control), which would explain being unable to establish connections to websites via the VPN.
Your VPN also blocks certain sites.

If your visible IP address belongs to your VPN, and you see no signs of your ISP address on ipleak.net, it might be the case that the VPN is also blocking access to certain sites, such as Piratebay. In this case, I guess you'd need a different VPN.


This is kind of obvious, but seeing as you haven't mentioned it in your post could you make sure your boot priority is correct in the BIOS?


12.04 won't boot after trying to install 313 nvidia driver

You must boot the corrupted Ubuntu system and login to a VT (CTRL+ALT+F2 ... F5) .
Then remove the PPA you have added. Before that you should remove the nvidia driver first.

sudo apt-get purge nvidia-*
sudo rm /etc/X11/xorg.conf

Now install ppa-purge and remove the ppa

sudo apt-get install ppa-purge
sudo ppa-purge ppa:<name of ppa here>
sudo apt-get update

I don't know this X.Org Stable ppa you said. If you meant X-Ubuntu Team then the above command should be

sudo ppa-purge ppa:ubuntu-x-swat/x-updates

Reboot your system.

sudo reboot

I suggest from now on to use only the Official Ubuntu packages (drivers especially)


Is there any way to see recently unplugged devices?

Look at the logs with something like
sudo journalctl  --since="-5 minutes"

for various values of "5".
Read man journalctl.


The real problem here, from my perspective, is the fact that Empathy doesn't reject requests properly. I keep having the same requests pop up every time even after I reject them until I use pidgin or some other messenger to reject the request. The Empathy team needs to fix the reject request function properly.


Set Macbook Air to boot to rfind instead of Grub?

I just installed 13.10 on my MBA 6,2 and I nuked my OS X partition in the process. This is what I did to install rEFInd without another operating system to fall back on, as long as one has the bootable live media still.

Install Ubuntu using the built in installer normally.
After you are done boot back into the live distro.
Connect to the internet and Download rEFInd and extract it.
Open a terminal (ctrl+option+T), change to the directory where you extracted the file. In my case I used 'cd Downloads/refind-the-version-I-downloaded'.
Type 'sudo ./install.sh --usedefault /dev/sdxy --alldrivers' where x is the hard drive and y is the partition you installed grub on. Since you are in the live distro, you can open Gparted and see which drive you're supposed to be booting from. In my case it was /dev/sda1, which should be pretty typical since the MBA only has the one hard drive, the partition will have boot in the flags area.
Type sudo Reboot, you are finished.
REFInd will show up and you will be able to boot normally.
...profit?

Other people's mileage will vary I assume, but I am typing this right now on the machine I did this to: 13" Macbook Air mid 2013, 4th generation core i7 (yes, you can get an i7), 8 GB (7.7GiB) ram. Hope this helps you or any of the 50 some odd people that viewed the post at the time of this writting. Take care!


The default file permissions for /etc/hosts is 644. (readable and writable for the owner, root, and readable for others.)


Aidl Not found error but its installed already?

if the aidl is already installed and you see the error "Aidl not found please install it", you need to check the buildozer.spec file, because this file is telling to buildozer to use aidl in a way Buildozer cannot execute, no matter if the aidl is installed or not, just make sure the following, make sure aidl files are saved into ".buildozer" directory/directories:

/home/yourusername/.buildozer/android/platform/android-ndk-r19b/build-tools/29.0.2/lib64/

The files in that folder must be:

**libbcc.so
libaapt2_jni.so
libbcinfo.so
libclang_android.so
libLLVM_android.so
libc++.so**

or in the directory:
/home/yourusername/.buildozer/android/platform/android-ndk-r19b/build-tools/29.0.2/

**dir: lib64
file: mipsel-linux-android-ld
file: mainDexClasses
file: mainDexClassesNoAapt.rules
file: x86_64-linux-android-ld
dir: renderscript
file: bcc_compat
file: zipalign
file: core-lambda-stubs.jar
file: runtime.properties
file: apksigner
file: aidl
file: source.properties
file: dx
file: split-select
file: llvm-rs-cc
file: d8
file: mainDexClasses.rules
file: NOTICE.txt
file: aapt2
file: i686-linux-android-ld
dir: lib
file: aarch64-linux-android-ld
file: dexdump
file: arm-linux-androideabi-ld
file: aapt**

If you have it like that, then, I am using Xubuntu 18.06, now be sure or make sure the spec file indicates exactly the following (remember to edit the buildozer.spec file to make sure you include the relevant info, for example if your project includes md,mp3,atlas,png etc extension make sure you include that in the spec file), anything that is not matching or set up correctly in the buildozer.spec file, will create many different issues when you run
buildozer -v android debug,
My buildozer.spec file has this inside:

[app]

# (str) Title of your application
title = KivyMD Kitchen Sink

# (str) Package name
package.name = myapp

# (str) Package domain (needed for android/ios packaging)
package.domain = org.test

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,pyc,ttf,md

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = bin

# (list) List of exclusions using pattern matching
#source.exclude_patterns = buildozer.spec

# (str) Application versioning (method 1)
# version = 0.1
version = 0.1

# (str) Application versioning (method 2)
#version.regex = __version__ = ['\"]([^'\"]*)['\"]
#version.filename = %(source.dir)s/../../kivymd/__init__.py

# (list) Application requirements
# comma seperated e.g. requirements = sqlite3,kivy
#requirements = kivy==master, kivymd, hostpython2
requirements = python3,kivy,kivymd

# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes = %(source.dir)s/../../gitlab-ci/p4a-recipes/

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
#requirements.source.kivymd = ../../

# (list) Garden requirements
# garden_requirements =

# (str) Presplash of the application
#presplash.filename = %(source.dir)s/../../kivymd/images/kivymd_logo.png
presplash.filename = /home/jbsidis/Escritorio/aa/kivymd/images/kivymd_logo.png

# (str) Icon of the application
icon.filename = /home/jbsidis/Escritorio/aa/kivymd/images/kivymd_logo.png

# (str) Supported orientation (one of landscape, portrait or all)
orientation = all

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 1

# (list) Permissions
#android.permissions = INTERNET

# (int) Android API to use
#android.api = 21

# (int) Minimum API required
#android.minapi = 9

# (int) Android SDK version to use
#android.sdk = 20

# (str) Android NDK version to use
#android.ndk = 17c

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#android.p4a_dir =
#android.p4a_dir = /media/zingballyhoo/Media/Code/Repos/python-for-android

# (str) Filename to the hook for p4a
#p4a.hook =

#p4a.force-build = True

# (list) python-for-android whitelist
#android.p4a_whitelist =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
#android.skip_update = True

# (str) Bootstrap to use for android builds (android_new only)
# android.bootstrap = sdl2

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (str) python-for-android branch to use, if not master, useful to try
# not yet merged features.
#android.branch = master

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (list) Android additionnal libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =

# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86
#android.arch = armeabi
android.arch = armeabi-v7a

#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s

[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#

#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

the aidl package I downloaded from https://dl.google.com/android/repository/build-tools_r29.0.2-linux.zip
My buildozer.spec files contains directories indicating my username jbsidis, remember to change/replace that with your own username.


how to change winetricks default wineprefix directory

You could stick

export WINEPREFIX=/home/$USER/.playonlinux/path/to/prefix/

in ~/.bashrc (and then run source ~/.bashrc to load it the first time if you're already in a terminal)

Or just prefix your winetricks  commands like:

WINEPREFIX=/home/$USER/.playonlinux/path/to/prefix/ winetricks blah blah blah

I don't use POL but I have in the past and I rather thought there was a button or menu item that let you run various winetricks things without having to run it manually. I'm probably wrong but give it a look.


MongoDB after-installation error, couldn't connect to server

It seems that the package is broken or package installation was interrupted.
Run:

sudo dpkg --configure -a

It will repair the package.

Also you first have to start the mongod server to use its cli.

So first run:

sudo service mongod start

and then run

mongo

This will open the mongodb cli.


How to run two parts of codes of Bashscript simultaneously while one of them is infinite while loop

This is how I do that:

#!/bin/bash

a=0

function ACTION ()
{
if [[ "$bb" == "Q" || "$bb" == "q" ]]; then
    echo "Good bye!"
    exit 0
else
    echo -e "\n\nYou pressed $bb.\n\n"
fi
}

while true; do
    read -t 1 -n 1 bb && ACTION
    echo -ne "Hello $a times. Hit \"q\" to quit."'\r'
    a=`echo "$a + 1" | bc`
done
exit 0

And this is what was answered at Stackoverflow by Andy and works great here.

The script is his (I just added the trap part as he says that terminal would be in a weird state if the script gets killed):

#!/bin/bash

trap 'echo -e "\n\n############\n#          #\n# Bye bye  #\n#          #\n############\n" && exit 1' INT
trap 'notify-send "Bye bye" "The terminal has been closed" && exit 1' HUP

if [ ! -t 0 ]; then
  echo "This script must be run from a terminal"
  exit 1
fi

stty -echo -icanon time 0 min 0

count=0
keypress=''
while true; do
  let count+=1
  echo -ne $count'\r'

  # This stuff goes in _handle_keys
  read keypress
  case $keypress in
  # This case is for no keypress
  "")
    ;;
  $'\e[C')
    echo "derecha"
    ;;
  $'\e[D')
    echo "izquierda"
    ;;
  # If you want to do something for unknown keys, otherwise leave this out
  *)
    echo "unknown input $keypress"
    ;;
  esac
  # End _handle_keys
done

stty sane


I'm not quite sure what you are trying to do, but Thunar uses Gio for remote shares and devices.
If you have a bookmark referencing a Samba or NFS share and that is not present, or you are trying to access a remote drive, Thunar might get an timeout from gio.
You could work around it by changing the group's read/write permissions of the "external" disk or share. (use chmod g+rwfor this)
A (temporary) alternative would be to change the AutoMount entry in /usr/share/gvfs/mounts/network.mountinto false. But that would only make sense if the problem is a network problem - that should be fixed in etc/fstab or the systemd mount points.


After rebooting I need to log in each time in Chrome

Had the same issue. My system is Ubuntu 16.04 and Google Chrome 53.0.2785.101 (64-bit).

Here is my workaround:

Go to Ubuntu System Settings -> Online Accounts
add your Google account there
turned on the switcher (not sure if it is necessary though)
go to Chrome browser and login there again
close the browser window

Note: you must prevent chrome processes from running after closing the window. To do this go to Chrome settings > Advanced settings (at the bottom) > Uncheck 'Continue running background apps when Google Chrome is closed'

Once I did it Chrome stopped dropping authentication after logging out in Ubuntu and also after rebooting


What do I do when dist upgrade to 12.04 was interrupted in install-stage by  the system being  powered off?

Have you tried to run a apt-get install -f?


How do I run an application once installed?

If you are using Unity, the default desktop environment that comes with Ubuntu, then running a program can be done as follows.

1. Open the launcher: On the left task bar you'll see the icons for apps. The top icon is to bring up the launcher. If you want to use the keyboard instead of the mouse, use the "Super" button, which is also known as the "Windows key" between "Control" on the left and "Alt" on the left.

2. Start your apps: Use the search feature of the launcher to search for your apps. To run LibreOffice Writer, type "LibreOffice" and then select the Writer option. You can also drag the icon from the launcher to the left menu bar (if it's a commonly used app).

You can also use the launcher to find files. On the bottom of the launcher there are a few tabs to seach "Files," "Folders," etc.

See the image below for a reference of what the launcher should look like when open.


Rails server error: "Could not find a JavaScript runtime."

Either Install Node Js or install therubyracer gem

gem install therubyracer


How to install Virtualbox kernel module in 16.04 LTSP chroot?

sorry if this not answer your questions, but may I know if you are already open your virtualbox & have issues when starting the vm. if yes, kindly include all the bugs & messages that appeared here. Kindly acknowledge us on this. Thanks.


Installed Ubuntu (dual boot) and now Windows 8 doesn't boot

What you need to do here is to run "boot repair" and you should see a new boot option
for Windows to boot in "UEFI mode".

Alternatively, if this fails, try either the "re-partiton command" on your drive, or uninstall Ubuntu and re-install it.