"which alias" and "whereis alias" doesn't return anything

alias is a shell builtin, so which and whereis don't find it. To find out what type of command something is, as well as where its executable is located if it has one (i.e., if it is an external command), you can use type:

$ type alias
alias is a shell builtin

type is also a shell builtin:

$ type type
type is a shell builtin

When you run type on an external command--one that exists as a separate executable file from your shell--type will give you the details about that. For example, which is itself an external command:

$ type which
which is /usr/bin/which

Because which is an external command, it doesn't know about commands that are provided by your shell, which in Bourne-style shells are the shell builtins and shell keywords.

It also doesn't know about commands that you make yourself as shell functions or aliases. For example:

$ f() { printf 'Hello, world.\n'; }
$ which f
$ type f
f is a function
f ()
{
    printf 'Hello, world.\n'
}

$ alias g="printf 'Hello, world.\n'"
$ which g
$ type g
g is aliased to `printf 'Hello, world.\n''

Furthermore, it is possible to have an external command that is also provided as some other kind of command, such as a shell builtin. The external command is then said to be "shadowed" by that other command. Running which will show you the external command, even though that's not what will actually run from your shell. For example, Bash provides printf as a builtin:

$ which printf
/usr/bin/printf
$ type printf
printf is a shell builtin

Likewise, an external command can be shadowed by a function or alias. You most likely have an ls alias that expands to an invocation of the external command ls:

$ which ls
/usr/bin/ls
$ type ls
ls is aliased to `ls --color=auto'

All Bourne-style shells have a type command, which can be used as shown in any of the above examples. Some Bourne-style shells, including Bash, also allow you to pass the -a option to type so that it shows you all the commands of the name you've given. For example:

$ type -a ls
ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls

The meaning of that output is that when you run ls from your shell, it is running an alias which expands to ls --color=auto, but if you didn't have that alias (or if you were to remove it), then ls would run the executable file /usr/bin/ls, and if that didn't exist, then it would run the executable file /bin/ls. (On my system, those two executables are actually the same file, accessible through different paths, but the shell doesn't know or care about that.) Your output may vary.

When using Bash or another Bourne-style shell, you should generally use type  instead of which, as it gives you more reliable information. If, in cases when something is an external command, you prefer to see only the path (i.e., to see output in the style which provides), you may want to use commmand -v instead of either type or which. In cases where which is correct, command -v gives the same output:

$ type file
file is /usr/bin/file
$ which file
/usr/bin/file
$ command -v file
/usr/bin/file

In cases where which is wrong (relative to the actual behavior of the shell you are using), command -v still does not mislead you:

$ type ls
ls is aliased to `ls --color=auto'
$ which ls
/usr/bin/ls
$ command -v ls
alias ls='ls --color=auto'

In contrast, even though the whereis command doesn't know about anything in your shell, there's no single command that should generally be preferred to whereis. The reason is that whereis shows you more than just where an external command is located. It tries to also show you where some other important files related to the command are. If this is what you're looking for, you can run both type and whereis to avoid being mislead. In most cases, running just type will tell you what you need to know.

Finally, and regarding the alias command you asked about: since alias is a shell builtin, it does not have its own manual page. On most Ubuntu systems, running man alias has the same effect as running man bash_builtins, showing a list of Bash builtins but not giving specific information on any of them.

To get help on shell builtins and shell keywords in Bash, you can use the help command, which is itself a shell builtin. help alias will show you the help on alias; help help will show you the help on help itself. (See also help type.)

You may also find the Bash reference manual -- as well as the Bash manpage, which you can view by running man bash -- to be useful. They have sections documenting the various shell builtins and shell keywords.


What is causing my /etc .conf file to suddenly fail on boot

It could be that your start command makes your script happen too early. I don't know exactly what the fireimager does, but maybe you want to start it after networking is up?

start on net-device-up

I do not know whether the INTERFACE could be specified or not. But the net-device-added means that the interface is present, but not necessarily started which may be a problem.

You could also try your script at a command line once the system is up to make sure it works then. If so, then the start is certainly the only thing you need to tweak.

Also in the following:

exec /home/programmer/bin/init/inittest

we see that the script is placed under /home/programmer/... which is not considered secure. I don't think the boot scripts will detect that, but I would move that script somewhere else where the system could expect such a script (maybe under /usr/local/bin).


I'v read that the official driver and ppd file is broken, but I found a working PPD at this page.

I added the printer and set the driver through ppt file from the source above and it worked.


How to troubleshoot Wayland problems in Ubuntu?

There appear to be several issues here. But none of them seem to be the same as the post you linked to. Starting at the beginning:

The step in the tutorial asks you to run:
miral-app -kiosk -launcher 'glmark2-wayland' not "sudo miral-app".

If that also fails, then post the log from that.

In the above log Mir is not given control of the graphics hardware. Please indicate what that hardware is, and if you have installed any vendor drivers.


scaling governor throws permission error for su

I don't know what the heat problem is, but I can tell you why your command failed: the redirect is set up before sudo is run, so you try to redirect it to /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor as a normal user while the permissions don't allow that.

You can make a shell executes the whole command, including redirect, as root like this:

sudo sh -c "echo -n powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"


You shouldn't need to compile file-roller from source. It's already installed, anyway. You can mount it and then copy the files somewhere:

sudo mount -o loop <image>.iso /<mountpoint>

For example, if you want mount it (so you can see all the files) in /home/Downloads/mountpoint, which is just a folder named "mountpoint" you created in your Downloads folder, you would paste the following, with a space at the end, into the terminal:

sudo mount -o loop

Then you would literall click and drag the .iso file from your file manager into the terminal window so the file's path appears. Then, after that and a space, you would type ~/Downloads/mountpoint so it looks rather like:

sudo mount -o loop <the name of your image>.iso ~/Downloads/mountpoint

Then you would go into that folder with the file manager and do what you need to do. Depending on what that is, you may want to copy the files over to another directory.

When you have a filesystem such as a partition on a USB thumb drive or an .iso file (which can be used as a volume), you must mount it in order to get the OS to see the files.


Email: Enigmail offers GNU PGP for Thunderbird.

Chat: Cryptocat and Pidgin-Encryption provide encrypted chat.

VOIP: F-Talk gives encrypted VOIP.

Facebook and Gmail are a lost cause for privacy since if it's stored online in the US, the NSA can require the provider to cough up your data.


Fellow Linux lovers, remember, that Linux viruses deal way less damage to ordinary users than regular updates. This is not a bug, but a feature. Community is small, so there is not as many attackers and/or testers  Go for Windows, if you want it the other way around.

So, don't try to install updates right away. Backup the system first using Clonezilla or a similar tool. Keep old backups just in case.


a disk read error occurred press ctrl+alt+del to restart windows 7 laptop after installing ubuntu 13.04

I had the same problem and fixed it by reinstalling the Windows bootloader as my main/default bootloader and then adding the Linux bootloader (probably GRUB 2 for Ubuntu users) to the Windows bootloader.

To fix Windows bootloader and make it the default:

For Vista and 7:

Boot with the Windows Vista or Windows 7 installation disc.
Click Repair your computer.
Click the operating system that you want to repair, and then click Next.
In the System Recovery Options window, click Command Prompt.
Type Bootrec /fixmbr to repair the Master Boot Record .
Type Bootrec /fixboot to repair the Boot sector.
Type Exit and then click restart.

Source / read more: http://www.raymond.cc/blog/help-a-disk-read-error-occurred-press-ctrlaltdelete-to-restart/#ixzz2gFAT6bWf

To add Linux to Windows's bootloader

Boot into now-bootable Windows and install EasyBCD (free for personal use).  Click "Add New Entry", click the Linux tab, choose "GRUB 2" for the type, select the option to automatically find the drive and click "Add Entry".

Source / read more: https://superuser.com/questions/499617/how-can-i-add-linux-to-the-new-windows-8-boot-manager


Accidentally moved directories under root

Your applications can not run because they want to find libraries and those are misplaced too. Try using busybox directly.

bin/busybox ls

should work as ls and so on.


Terminal command ping makes sound on fail

The question is actually a bit broad, AskUbuntu is for specific questions and this is more like can someone make me a script.
But hey, it's just a couple of lines, let's get you started:

#!/bin/bash
while "true"
do
    ping -w 10 -c 5 www.google.com
    if test $? -ne '0'
    then
            spd-say "connection lost"
            sleep 3s
    fi
done

Basically we repeat a endless loop with ping and check if it exits with an error. ($? gives the exit-code of the previously executed program).

For timing you can just alter the ping command. Now turn on your speakers and enjoy. :)


xubuntu light-locker: where is the configuration stored?

sudo find / -name *light-locker* on my xubuntu 14.04 install finds these entries: http://pastebin.com/JgTW10RV

The most promising option is the light-locker-settings.py which ends up pointing to the following files:

/etc/xdg/autostart/light-locker.desktop
~/.config/autostart/light-locker.desktop
~/.config/autostart/screensaver-settings.desktop

The first one seems to be system wide settings, the second seems to be user settings, and the third seems to be for screensaver settings.


Audio problem after downgrading xenial-proposed

I just shut down a couple of times the system and now audio is working again, even though I do not get any ubuntu starting drum sound


I like FreeMind  very much, which is a Java mindmapping tool. Colleagues of me like XMind most.


I figured out that the issue was related to this launchpad bug:

https://bugs.launchpad.net/kubuntu-ppa/+bug/1451728

Which was caused by a previous installation of kubuntu-desktop

The solution was to run the following as root:

dpkg --force-all --purge account-plugin-google
dpkg --force-all --purge unity-scope-gdrive
sudo apt -f install
sudo apt update
sudo apt full-upgrade


Is the webcam switched on? On my net book (MSI Wind clone) I have to put the camera on using the keyboard shortcut and then open Cheese or Skype and then it is recognised.


VirtualBox machine window is suddenly very small

You need to install Virtual box guest additions in the guest. This is necessary requirement. After that, your VM window will automatically fit the display to your house resolution after booting.

See this answer for complete guidance
https://askubuntu.com/a/22745


http://aiotestking.wordpress.com/category/linux/lpic-1/page/7/

This appears to be the exact question, without the extra slash in the answer.

However, when tested, it works either way... so, I looked around some more, and found yet another version picks the answer as double-backslashes:

http://studyhat.blogspot.com/2012/08/linux-question-answer.html

I would say the question may have slipped past the editors or reposters on various sites or books, but I'm interested to see if anyone else has an opinion as to what the extra backslashes after the home directory specification signify or are capable of.

There appears to be multiple ways to do this, but I'm not sure why... and one doesn't work at all (but seems indicated in many places as the 'correct' method - rmdir ~user/\\userdir).


I was having the same problem, so I followed the instructions from
http://www.webupd8.org/2012/02/movgrab-command-line-video-downloader.html

For any Linux distribution, download the source from

https://sites.google.com/site/columscode/home/movgrab

Then extract it and compile it in the terminal:

./configure
make
sudo make install


Portable installed ubuntu on a Pendrive that boots on UEFI and BIOS

I am assuming you are booting a PC in BIOS mode.

When running the Live CD/USB, choose "Try ubuntu"

Then run gparted and:

create a GPT partition table (Device > Create partition table) on your pendrive
create an ESP, fat32, 512MB, with esp flag.
create also a BIOS boot partition, unformatted, 32Mb, with bios_grub flag

Then click on install Ubuntu to install ubuntu on your pendrive, choosing "Something else" to select the correct drive.

Check that the bios boot partition is selected as Reserved BIOS boot area in the partitionning tool.

Be carefull to install grub on your pendrive by choosing the pendrive for bootloader isntallation.

Once the installation is completed, reboot into your new Ubuntu install, and open a terminal, and type:

sudo -i
mkdir /boot/efi
mount /dev/sdx1 /boot/efi     # where sdx1 is your efi partition

If your mac use 32 bit EFI then

apt-get install grub-efi-ia32
grub-install --target=i386-pc /dev/sdx

else

apt-get install grub-efi-amd64
grub-install --target=x86_64-efi /dev/sdx

then

cd /boot/efi/EFI/
mkdir boot

If your mac use 32 bit EFI then

cp ubuntu/grubia32.efi boot/bootia32.efi
cp boot/bootia32.efi boot/boot.efi

else

cp ubuntu/grubx64.efi boot/bootx64.efi
cp boot/bootx64.efi boot/boot.efi

umount /boot/efi

And try to boot on your mac. this might not work (I have not tested it). If not you will need to follow the instruction from there: http://glandium.org/blog/?p=2830  to change your ESP.


You don't need popen - popen is what you use to start a process. We don't need to start another process.

And you don't need to be piping things to/from STDIN/STDOUT ;

/proc/meminfo follows the same rules as everything else in *nix.

Everything is a file

You can just open /proc/meminfo and process it like you would any other file.

f = open('/proc/meminfo')
for l in f:
    # do stuff with the line from the file

Create a dictionary of the line items you want
Find those items (write a function is_interesting(line) or something)
Do the string processing you need


How to provoke apport dialog for testing?

apport seems to detect failure of interpreters (e.g. python3) due to syntax errors if the script doesn't match the interpreters language (e.g mysql-workbench), i.e. python3 `which mysql-workbench` triggers apport to suggest reporting a bug.


First, rEFIt is abandonware; it hasn't been updated in six years. Because of this, I created a rEFIt fork called rEFInd, which is under active development and that works better with both Linux (including Ubuntu) and recent versions of OS X than does rEFIt. Thus, if you can't get it working the way you want, please look into rEFInd instead of rEFIt.

That said, there are two ways to install Ubuntu under OS X, each of which has several variants. The answer to your question depends on which method, and variant, you choose:

BIOS/CSM/legacy mode -- Much older documentation describes installing Ubuntu on a Mac using the Compatibility Support Module (CSM), aka BIOS-mode or legacy-mode support. In its simplest-to-install configuration, this involves booting the Ubuntu installer in BIOS mode and letting it install GRUB 2. You should then get an option on the Mac's boot menu for booting a BIOS-mode OS. IIRC, it doesn't know the difference between different boot loaders, so it will call GRUB 2 "Windows," but it should work. You could install LILO, GRUB Legacy, or a more exotic boot loader instead of GRUB 2, if you preferred, but this would involve jumping through extra hoops. The big problem with this approach is that it requires the use of a hybrid MBR, which is an ugly and dangerous hack. If you don't understand GPT, MBR, and hybrid MBR, I STRONGLY advise against this approach, because it will become far too easy for you to end up trashing your hard disk. If you do understand these topics, you can probably do it this way without causing too many problems, but it's still not my personal first choice.
EFI mode -- An EFI-mode installation of Ubuntu obviates the need for a hybrid MBR, which makes it much safer. There are a number of ways to do this, but broadly speaking, they fall into two categories:

A standard EFI installation -- On a UEFI-based PC, Ubuntu installs the EFI-mode GRUB 2 to the EFI System Partition (ESP) and adds an entry that points to GRUB to the NVRAM boot manager list. Unfortunately, Apple's EFI doesn't use this boot menu list in quite the normal way, so although this approach can make GRUB the default boot manager, it's not likely to show up on the Mac's GUI boot menu. GRUB might or might not be able to boot OS X (I've seen reports of both successes and failures). Thus, a regular EFI-mode install of Ubuntu to a Mac can be problematic. With enough persistence and knowledge of GRUB, you may be able to get it to work, but not in quite the way you say you want.
Pretending to be Mac OS X -- OS X installs its boot loader as /System/Library/CoreServices/boot.efi on an HFS+ volume. If you create an HFS+ volume and copy GRUB 2 (grubx64.efi) to that name, along with a few support files, OS X's system chooser will notice it and enable you to pick it. See this blog post for more on this approach. Ubuntu doesn't support this type of install, though (unless it's new for 16.04 and I haven't yet learned of it). Thus, if you want to use this method, you'll need to set it up manually. Also, there were some changes recently (to El Capitan, IIRC -- or maybe to Yosemite) that seem to require some extra support files for the selection to show up in OS X's own boot picker. I haven't yet researched those changes, so I don't yet know precisely what might be needed. If you want to try this method of installation, it's probably best to do a regular EFI-mode install and then copy the main GRUB 2 file and its support files to a small HFS+ volume, then add the Mac-specific support files. Note that you must either create a dedicated GRUB 2 HFS+ volume or use a previously-unbootable HFS+ volume. You must not try to use your regular OS X volume for this purpose, since that would wipe out the OS X boot loader, rendering OS X unbootable.

Note also that the initial boot mode of the Ubuntu installer (that is, BIOS vs. EFI) determines whether it will install a BIOS-mode or EFI-mode GRUB. Thus, you must control this boot mode. Apple's boot manager may be unclear on this, or may not even give you the option you want. (Details vary depending on Mac model, firmware version, and how the boot medium was prepared.) Once you've booted Ubuntu, you can check your boot mode by looking for a directory called /sys/firmware/efi. If that directory is present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode.

All together, none of these options is both easy and good -- a BIOS-mode install is easy but ugly and potentially dangerous; and EFI-mode booting is harder to set up but safer and cleaner. This is one of the reasons so many Mac users use rEFInd (or rEFIt before it).

Note that rEFInd need not add anything to the Ubuntu boot complexity, since it can replace GRUB 2. Depending on how you configure it, a boot through rEFInd involves the rEFInd menu appearing. This menu can direct the boot process to OS X's boot loader, boot GRUB 2 (BIOS-mode or EFI-mode, assuming it's installed), or boot a Linux kernel directly. Because of this last possibility, GRUB 2 need not even be installed. If you want to do this, the easiest approach is:

Boot the Ubuntu installer in either BIOS mode or EFI mode (which is mostly irrelevant).
When prompted, select the option to try Ubuntu without installing it.
Open a Terminal window in the Ubuntu live session.
Type ubiquity -b. This launches the Ubuntu installer, but tells it to not install GRUB 2.
Install Ubuntu. Ideally, do not create a separate /boot partition; but if you do (to support LVM, RAID, or disk encryption), take note of the identity of your Ubuntu root (/) partition (/dev/sda5, /dev/mapper/ubuntu-root, or whatever). Also, use ext4fs for the partition that holds the Linux kernel (the root [/] partition or, if you use one, your separate /boot partition).
Reboot. OS X should come up.
Install rEFInd.
Reboot. rEFInd should come up and give you options for both OS X and Ubuntu. Test them both. If you created a separate /boot partition, you must perform some extra steps:

When you highlight the Ubuntu option, do not hit Enter; instead, hit F2 or Insert twice.
Add ro root={whatever} to the options, where {whatever} is your root (/) filesystem identifier.
In Ubuntu, locate the mkrlconf script that came with rEFInd and run it. (You should be able to run it from your OS X volume; or you can re-download the rEFInd .zip file, unpack it, and run it from there.)
When you reboot, you should be able to boot Ubuntu by hitting Enter after selecting it in the rEFInd menu.

If you want to avoid rEFIt because you usually want to boot OS X (or Ubuntu) and don't want to deal with the menu, be aware that you can adjust rEFInd so that its menu appears only if you hold down a key while booting: Edit the refind.conf file so that the following options are set:

timeout = -1
default_selection = "OS X"

You can adjust default_selection as desired, of course.


Adding custom changes to the OpenBlas for Python

if you want to build a custom Debian package, I recommend, that you start with the existing openblas package and How to download, modify, build and install a Debian source package?.

You can modify the package name and library file names, if you feel, that your package doesn't fully replace the provided one.


Now I have a kind of picture of the situation.

Video disturbances to the sound. Most likely h/w issue, external camera ok
Other voice problems: USB-keyboard was able to generate some kind of disturbances. Keyboard changed

One lesson learned, USB can cause funny things


How do I enable apt-get tab suggestions on my server?

Install bash-completion and put this line in your ~/.bashrc (but check first if there is a similar line first):

. /etc/bash_completion

Note that it will only take effect in new terminals you open from now on. To take effect in the current terminal source your ~/.bashrc

source ~/.bashrc

or

. ~/.bashrc


Where can I find the original Ubuntu logo files of various versions?

It would have been nice, if you had actually shown the image you are looking for, because I do not have that file on my computer!

But assuming that the title of your question is correct, then the Ubuntu logos are here. If you need a large version, just download the svg and create your own png with the size you need.

There is also an explanation about how to use the logos.


Lenovo Ideapad 320 - Touchpad doesn't work

The fix was uploaded yesterday look at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1708852

so just do update via apt and your touchpad will working like a charm :D

tested in Ubuntu 16.04.3 LTS my leptop Lenovo Ideapad 320-15IKB


Do you have the installer CD loaded? It appears your /etc/apt/sources.list might think you do, and hence the angry errors.

What does the command cat /etc/apt/sources.list show you? In particular, is the line that starts with deb cdrom commented out (has a # prepended to it)? If not, it should be (assuming you don't have the CD loaded).

And remember that any changes to /etc/apt/sources.list requires a refresh (sudo apt-get update).

More details about managing Ubuntu repositories here: https://help.ubuntu.com/community/Repositories/CommandLine


I'll suppose that you install Apache on the virtual machine. So if you want to see the webpage of that Apache, you should do the following (easy way without having to configure routing stuff):

1.- With the VM halted, go to Settings (of the VM) > Network and in the adapter 1 choose

Attached to "Bridged Adapter"
Name: Let the default"
Clic on "advanced"
Promiscuous mode to: Allow All

2.- Turn on the VM

3.- When you log in the Ubuntu Server write:

ifconfig

Search something like:

192.168.x.x #Where "x" are numbers between 1 and 254

4.- Go to the browser on your host and type the address that you see on the step 3.


Will this backup the partition contents of both linux and windows?

I would recommend to do an image of your disk. If you are able to access your partitions with Nautilus better do that. Again, you may want to repair Windows boot instead of messing with your partitions.


Difference between "halt" and "shutdown now"?

The -S and -p switches for sudo have no importance in this case. Here is what they do, respectively.

The -S switch causes sudo to read the password from STDIN. This allows, for example, a password to be piped to sudo through echo or cat.
The -p switch allows you to override the default password prompt and use a custom one, or none at all.

The important difference is in the two commands being issued by sudo.

The halt command, if invoked without the -p switch, simply halts the OS and stops all CPUs. Once the system is cleanly halted, the user may safely hit the Power button on his computer manually.
The poweroff, shutdown -h now, and halt -p commands all do the same thing as halt alone, while additionally sending an ACPI command to signal the power supply unit to disconnect the main power. This prevents you from having to physically push the Power button on your computer.


I had the same issue with NTFS format on drives.

The solution is:
FAT for windows compatibility, i don't have this issue of filesystem errors with FAT.

So backup you drive(if you can) and format you drive to FAT .


How do I boot from USB on Ubuntu 16.10 with grub2?

The easiest way I can think of is to start your computer with live USB (16.04 or any other version).  When booting, ensure you say you select to try Ubuntu (not install it).  Once it boots, load gparted.  From there,

Shrink the size of your Windows partition as desired.
Once the operation above is done increase the size of the Ubuntu partition.
Once the second operation is done, reboot from hard drive (remove USB).

This should do the trick.


The manual:

https://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/

Setup FTP server on Ubuntu 14.04

Step 1 » Update repositories.

$ sudo apt-get update

Step 2 » Install VsFTPD package using the below command.

$ sudo apt-get install vsftpd

Step 3 » After installation open /etc/vsftpd.conf file and make changes as follows.

»Uncomment the below lines (line no:29 and 33).

write_enable=YES
local_umask=022

» Uncomment the below line (line no: 120 ) to prevent access to the other
folders outside the Home directory.

chroot_local_user=YES

and add the following line at the end.

allow_writeable_chroot=YES

» Add the following lines to enable passive mode.

pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100

Step 4 » Restart vsftpd service using the below command.

$ sudo service vsftpd restart

Step 5 » Now ftp server will listen on port 21.
Create user with the below command.

Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users .

$ sudo useradd -m john -s /usr/sbin/nologin
$ sudo passwd john

Step 6 » Allow login access for nologin shell . Open /etc/shells and add the following line at the end.

/usr/sbin/nologin


connect to host xx.xx.xx.xx port 22: Connection timed out

It may be the case that you do not have the "PermitRootLogin" setting in your SSH config file set to accept connections using the root account. In the config file (mine is /etc/ssh/sshd_config), this setting is "no" by default (for security reasons). Try connecting using another user account with SSH access, or try changing PermitRootLogin to "yes" and see what happens.


Iterate over files in directory, create folders based on file names and move files into respective folders

As I understand it, you intend to supply a directory name as the first argument of the shell script.  Files in that directory are to be moved into subdirectories of that directory whose names are the same as the files but with extensions omitted.  In that case:

#!/bin/bash
for f in "$1"/*
do
    [ -d "$f" ] && continue
    base=${f%.*}
    mkdir -p "$base"
    mv "$f" "$base/"
done

How it works:

[ -d "$f" ] && continue

To avoid recursion, this skips subdirectories of $1.
base=${f%.*}

This assigns to shell variable base the name of $f with its extension removed.  This is an example of suffix removal.
mkdir -p "$base"

This makes sure that the directory $base exists.
mv "$f" "$base/"

This moves the file to the directory.


How do I set up the sources.list to select kernel packages from a local repository?

Created 2 separate debs for 1.1 and 2.1 and kept in same repo server i.e. In my repo server dists/xenial/release/test-package is created and inside this folder in folder 't' I created 2 debs i.e. test-package-1.1 and test-package-2.1.

Added

http://[server]/ubuntu/dists xenial/release test-package

in sources.list.

Now when I run apt-get install test-package-1.1, it installs 1.1 package and similarly for 2.1.

Not sure if this is correct approach but it is working for me as desired.


Encountering some problems with gnome-terminal startup and maximize button!

The terminal thing was because I had accidently pasted import sys in .bashrc while editing prompt. It was figured glad that I was able to figure that out.

And that maximize still exists, it existed right from the start. I still don't know why that is.


laptop drivers installation problem with Ubuntu

Windows drivers will not work on Ubuntu. Ubuntu uses the drivers provided in the Linux kernel. Everything should just work out of the box. With each new release of the Linux kernel more hardware is supported. It's generally a good idea to wait for a new release of Ubuntu to install on a new computer so that there is better support for the hardware.

There are a few special cases where a additional Linux driver may be needed:

Discrete graphics (Nvidia, and ATI graphics)
Wifi
other hardware

Discrete graphics drivers are provided by Ubuntu through the additional drivers software (12.04). Wifi drivers are provided by the hardware manufacturer for Linux, or Ndiswrapper can be used with a Windows driver. Other hardware may have Linux drivers that are provided from the manufacturer for Linux.


Why does System Settings in 18.10 using Unity show 18.04?

I'm using the Unity Desktop, if this changes anything.

The unity-control-center package hasn't been updated for 18.10. It's version is still 15.04.0+18.04.20180216-0ubuntu1 ... and /usr/share/unity-control-center/ui/UbuntuLogo.png is still showing 18.04. That's the image you see there.


`grep`ing all files for a string takes a long time

Exclude virtual file systems

Looking at the sample output log we see virtual file systems are included in the search which is an unnecessary waste of time. Drop these and other directories from the search with the --exclude-dir option. For example:

sudo time grep -rnw --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var} '/' -e 'Sony 50"'

When grep parses the /proc directory chain it is uselessly looking at all the process ID's which takes more than a day in my case.

Also when processing /mnt it will be looking at mounted Windows NTFS drives and USBs unnecessarily.

/media is holds the CD/DVD drive and external usb drives.

Output:

$ sudo time grep -rnw --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var} '/' -e 'Sony 50"'
Binary file /home/Me/.config/google-chrome/Default/Sync Data/SyncData.sqlite3 matches
11.35user 13.83system 0:56.35elapsed 44%CPU (0avgtext+0avgdata 8480maxresident)k
17369032inputs+0outputs (0major+1620minor)pagefaults 0swaps

There you go 56 Seconds instead of 50 Hours!

Note if you exclude usr (containing 6.5 GB of files in in my case) from the search it is only 8 seconds:

4.48user 1.80system 0:08.75elapsed 71%CPU (0avgtext+0avgdata 6012maxresident)k
13008964inputs+0outputs (0major+1180minor)pagefaults 0swaps

Interesting Notes

Keeping out the system directories seems to keep grep on better track and it never hits 100% CPU on a single core. Plus the hard disk light flashes constantly so you know grep is really working and not "thinking in circles".

If you don't prefix tmp with / then it will ignore any sub-directory containing tmp for example /home/Me/tmp. If you use --exclude-dir /tmp then your directory /home/Me/tmp will be searched.

If on the other hand you prefix sys with / then then /sys directory is searched and errors are reported. The same is true for /proc. So you have to use sys,proc and not prefix them with /. The same is true for other system directories I tested.

Create alias grepall

Consider setting up an alias in ~/.bashrc so you don't have to type the --exclude-dir parameter list every time:

alias grepall="grep --exclude-dir={boot,dev,lib,media,mnt,proc,root,run,sys,/tmp,tmpfs,var}"

Detailed time breakdown

This section breaks down how much time is saved by incrementally adding directories to the --exclude-dir parameter list:

/proc and /sys saving 52 hours
/media saving 3 minutes
/mnt saving 21 minutes
/usr/src (by specifying src) saving 53 seconds
/lib/modules (by specifying modules) saving 39 seconds

Exclude /proc and /sys directories

The /proc and /sys directories are the most time consuming, the most useless to search and generate the most errors. It's "useless" because these two directories are dynamically created at run-time and don't contain permanent files you would want to grep.

A great time savings is realize by excluding them:

$ sudo time grep -rnw --exclude-dir={proc,sys} '/' -e 'Garbage 098jfsd'
/var/log/auth.log:4653:Feb 16 17:46:20 alien sudo:     rick : TTY=pts/18 ; PWD=/home/rick/Downloads ; USER=root ; COMMAND=/usr/bin/time grep -rnw --exclude-dir=proc --exclude-dir=sys / -e Garbage 098jfsd
Binary file /var/log/journal/d7b25a27fe064cadb75a2f2f6ca7764e/system.journal matches
grep: /media/rick/S3A6550D005/hiberfil.sys: Input/output error
      (... SNIP ...)
grep: /media/rick/S3A6550D005/winproductkey: Input/output error
grep: /run/user/1000/gvfs: Permission denied
Command exited with non-zero status 2
422.43user 112.91system 26:59.03elapsed 33%CPU (0avgtext+0avgdata 31152maxresident)k
379671064inputs+0outputs (1major+10738minor)pagefaults 0swaps

Only 27 Minutes this time saving over 52 Hours!

There are still errors though. In /var directory which is also a "virtual directory" created at run time. The /run directory which contains an Android Cell Phone and the /media directory which contains an old broken laptop hard drive now connected to an USB external HDD enclosure.

Add /media to exclude list

The /media directory contains an old laptop drive connected via USB 3.0 port. Smartctl daily reports errors on the drive and doesn't have files we are looking for. We'll exclude it to save time and reduce error messages:

$ sudo time grep -rnw --exclude-dir={proc,sys,media} '/' -e 'Garbage 654asdf'
/var/log/auth.log:4664:Feb 16 18:26:27 alien sudo:     rick : TTY=pts/18 ; PWD=/home/rick/Downloads ; USER=root ; COMMAND=/usr/bin/time grep -rnw --exclude-dir=proc --exclude-dir=sys --exclude-dir=media / -e Garbage 654asdf
Binary file /var/log/journal/d7b25a27fe064cadb75a2f2f6ca7764e/system.journal matches
grep: /run/user/1000/gvfs: Permission denied
Command exited with non-zero status 2
405.51user 105.38system 23:26.89elapsed 36%CPU (0avgtext+0avgdata 30908maxresident)k
365800875inputs+0outputs (0major+10961minor)pagefaults 0swaps

Excluding the faulty hard drive connected via USB 3.0 enclosure only saved 3 minutes but reduced error messages.

Add /mnt (Windows NTFS partitions) to exclude list

The /mnt directory contains:

Two NTFS Windows 10 partitions (C: and E:) on an SSD with 105 GiB of data
One NTFS Windows 10 partition (D:) on an HDD with 42 GiB of data

There is nothing of interest in Windows so we'll exclude /mnt to save time:

$ ll /mnt
total 44
drwxr-xr-x  5 root root  4096 Nov 12 07:19 ./
drwxr-xr-x 27 root root  4096 Feb 15 20:43 ../
drwxrwxrwx  1 root root  8192 Dec 30 14:00 c/
drwxrwxrwx  1 root root  8192 Dec 30 14:31 d/
drwxrwxrwx  1 root root 20480 Jan  1 13:22 e/

$ sudo time grep -rnw --exclude-dir={proc,sys,media,mnt} '/' -e 'Garbage zx5cv7er'
/var/log/auth.log:5093:Feb 17 10:31:44 alien sudo:     rick : TTY=pts/18 ; PWD=/home/rick/Downloads ; USER=root ; COMMAND=/usr/bin/time grep -rnw --exclude-dir=proc --exclude-dir=sys --exclude-dir=media --exclude-dir=mnt / -e Garbage zx5cv7er
Binary file /var/log/journal/d7b25a27fe064cadb75a2f2f6ca7764e/system.journal matches
grep: /run/user/1000/gvfs: Permission denied
Command exited with non-zero status 2
51.50user 23.28system 2:08.85elapsed 58%CPU (0avgtext+0avgdata 15800maxresident)k
39866258inputs+0outputs (0major+6059minor)pagefaults 0swaps

Now grep only takes 2 minutes and 8 seconds. By excluding Windows 10 partitions with 147 Gib of Programs and Data saves 21.5 minutes!

Add /usr/src Linux Headers to exclude list

The /usr/src directory contains Linux Headers source code. In my case there are 20+ kernels manually installed which takes considerable space. To specify the directory though the argument used is src:

$ du -h -s /usr/src
3.2G    /usr/src

$ sudo time grep -rnw --exclude-dir={proc,sys,media,mnt,src} '/' -e 'Garbage z5cv7er'
/var/log/auth.log:5096:Feb 17 10:34:28 alien sudo:     rick : TTY=pts/18 ; PWD=/home/rick/Downloads ; USER=root ; COMMAND=/usr/bin/time grep -rnw --exclude-dir=proc --exclude-dir=sys --exclude-dir=media --exclude-dir=mnt --exclude-dir=src / -e Garbage z5cv7er
Binary file /var/log/journal/d7b25a27fe064cadb75a2f2f6ca7764e/system.journal matches
grep: /run/user/1000/gvfs: Permission denied
Command exited with non-zero status 2
44.21user 8.54system 1:15.51elapsed 69%CPU (0avgtext+0avgdata 15864maxresident)k
33754180inputs+0outputs (0major+6062minor)pagefaults 0swaps

Now grep is only taking 1 minutes and 15 seconds. Excluding /usr/src by specifying src on the --exclude-dir list saves 53 seconds.

Add /lib/modules Kernel modules to exclude list

The /lib/modules directory contains compiled Kernel Modules. To specify the directory though the argument used is modules:

$ du -h -d1 /lib/modules
285M    /lib/modules/4.14.18-041418-generic
282M    /lib/modules/4.14.14-041414-generic
     (... SNIP ...)
228M    /lib/modules/4.9.76-040976-generic
6.0G    /lib/modules

$ sudo time grep -rnw --exclude-dir={proc,sys,media,mnt,src,modules} '/' -e 'Garbage 1cv7fer'
/var/log/auth.log:5117:Feb 17 11:07:41 alien sudo:     rick : TTY=pts/18 ; PWD=/home/rick/Downloads ; USER=root ; COMMAND=/usr/bin/time grep -rnw --exclude-dir=proc --exclude-dir=sys --exclude-dir=media --exclude-dir=mnt --exclude-dir=src --exclude-dir=modules / -e Garbage 1cv7fer
Binary file /var/log/journal/d7b25a27fe064cadb75a2f2f6ca7764e/system.journal matches
grep: /run/user/1000/gvfs: Permission denied
Command exited with non-zero status 2
19.22user 5.84system 0:35.61elapsed 70%CPU (0avgtext+0avgdata 15600maxresident)k
22111388inputs+0outputs (0major+6059minor)pagefaults 0swaps

By skipping 6 GB of kernel modules, our grep time is 36 seconds. Adding /lib/modules by specifying modules in the --exclude-dir parameter saves 39 seconds.

Miscellaneous directories

Summary list of other directories:

/boot saves 3 seconds (but mine is exceptionally large)
/dev saves 3 seconds
/run saves 4 seconds
/var saves 8 seconds


How to vertical scale a juju service unit?

You aren't able to change the instance type of already running units. You can however create new units with different constraints and then destroy your smaller ones. For more information check out juju help constraints and juju help deploy.

This is very easy to do using the Juju GUI: https://jujucharms.com/juju-gui/

Juju 2.x:

The GUI is included by default in Juju 2, you can access it by running juju gui --show-credentials which will open up the GUI in a new browser window with your credentials outputted in the console.

Juju 1.x:

You can deploy the Juju GUI to your bootstrap node using juju deploy juju-gui --to 0 assuming that your bootstrap node is machine 0

See also:

https://jujucharms.com/docs/stable/charms-deploying
https://jujucharms.com/docs/stable/reference-constraints
https://jujucharms.com/docs/stable/charms-constraints


You can simply mount your ssd as /tmp partition. To mount on loading you can write this to /etc/fstab/.

For example:

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation

...

/dev/sdb1 /tmp           ext4    discard,defaults        0       2
/dev/sdb2 /var/tmp       ext4    discard,defaults        0       2

See https://en.wikipedia.org/wiki/Fstab for more information.


How to install ubuntu in my laptop? Where from I can get it? Is it free? What apps or software are required?

So in order:

Get it from here: http://www.ubuntu.com/download/desktop
What apps are required? None, you can either install Ubuntu (it will replace Windows 8.1 if you don't have a dual boot though) or launch it as a live cd to test before installing. Either way, you need to "boot" with the CD.

Basically, juste download the file from the official website, burn it on a CD (using Nero or whatever software), put it in your optical drive, reboot the machine and chose to boot from the CD.

More informations here:
Live CD: https://en.wikipedia.org/wiki/Live_CD

There you go, hope it helps ;)


You cannot run it while your current OS is running. install it on a dvd or usb stick en reboot your computer with it.


how to install canon pixma mg 7150 printer

I can print wirelessly to my Canon MG7150 printer from ubuntu 12.04, but only after installing the driver from Canon at http://www.canon.co.uk/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MG_series/PIXMA_MG7150.aspx?type=download&page=1
Get the Debian package archive, run the install.sh script inside it from a terminal. Then use the normal Printing app in ubuntu to find the printer on the network. It should pick up the driver you've now installed.
The one problem I haven't solved is how to scan with this printer wirelessly... I'll raise a separate post for that...


command cryptsetup luksFormat /dev/sdc1 must be used with sudo


Unable to detect Wifi Adapter. Ubuntu 20.04 . Razer Blade 2019: Intel AX-200

After further investigation, the problem I faced was probably due to windows.
No wifi adapter found! Dual boot windows 10 and Ubuntu 17.10
following the steps from the link above made my wifi work again on Ubuntu.


First thing you may need to do is

sudo apt-get install linux-firmware

I have one of these BT devices on my Lenovo and they can be difficult with firmware uploading to early during boot so please try the following

echo "blacklist ath3k" | sudo tee /etc/modprobe.d/ath3k.conf

Then edit /etc/rc.local

sudo gedit /etc/rc.local

And add the following above exit 0, as exit 0 must be the last line in the file

sleep 20
modprobe ath3k

save, exit program, and reboot

EDIT:A new kernel was released today that fixed the issue without the blacklist or the edits in rc.local.  http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/
check arch to see if you have 32 or 64 bit system
You can delete the blacklist with sudo rm /etc/modprobe.d/ath3k.conf and use gksudo gedit /etc/rc.local and delete the sleep line and

modprobe ath3k

Save, exit program

For 32 bit, download and install

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-headers-3.19.1-031901_3.19.1-031901.201503080052_all.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-headers-3.19.1-031901-generic_3.19.1-031901.201503080052_i386.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-image-3.19.1-031901-generic_3.19.1-031901.201503080052_i386.deb

For 64 bit

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-headers-3.19.1-031901_3.19.1-031901.201503080052_all.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-headers-3.19.1-031901-generic_3.19.1-031901.201503080052_amd64.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.1-vivid/linux-image-3.19.1-031901-generic_3.19.1-031901.201503080052_amd64.deb

I don't have hybrid graphics so I don't know if this kernel will cause problems


Problems with dependencies while trying to install libmupen64plus

Im afraid you have to install the depends package, press Ctrl+Alt+T to go to a terminal and type:

sudo apt-get install ttf-dejavu-core

Followed by installation of libmupen64plus2:i386 that you mentioned.


ubuntu install failed detect the available gpus and deal with any system changes. dell 5820 i9

The ISO was corrupted. I downloaded another ISO and install works now. Thanks very much  guiverc !!


There is a proxy store available. This runs on your own infrastructure and does the caching you require, although 100% offline is, according to the docs, currently in closed beta.


Problems installing and booting 16.04 on new laptop

Lee, I feel your pain. I wanted to upgrade too 16.04LTS, but have since resigned myself to just upgrading the kernel too 4.4.x, which with the 14.04LTS already installed worked excellently. One thing you will need is synaptic (I would recommend synaptic to every install) to easily get and install the newer kernel. I am sure there are many other ways but I personally love EASY  ;?)


HP deskjet 2540 printer not working on ubuntu 12.04

The version of hplip in 12.04 is not recent enough for that printer so you will need to go to hplip website to get the new one which should work fine.

Discover the minimum version required for your printer on HPLIP install wizard http://hplipopensource.com/hplip-web/install_wizard/index.html
Google the minimum hplip version and download it (in my case hplip-3.13.8.run)
sh hplip-3.13.8.run
Follow installation instructions but DESACTIVATE UPDATES
Printers>add printer>select yours>Connection HPLIP>Apply


Does Ubuntu Installer automatically install in "/"?

It should do yes - I think it also overwrites any /boot, /var, etc partitions as well, as long as they are not /home. To quote this:

  Setting up /home on a separate partition is beneficial because your
  settings, files, and desktop will be maintained if you upgrade,
  (re)install Ubuntu or another distro. This works because /home has a
  subdirectory for each user's settings and files which contain all the
  data & settings of that user. Telling Ubuntu to use an existing home
  partition can be done by selecting "Manual Partitioning" during the
  installation of Ubuntu and specifying that you want your home
  partitions mount point to be /home, ensure you mark your /home
  partition not be formatted in the process.

So you should to be able to reinstall from other install disk types, e.g.

Normal/Vanilla Desktop Ubuntu install - Unity Desktop Environment
KUbuntu - KDE Desktop Environment
XUbuntu - XFCE Desktop Environment

and other Ubuntu Derivatives. Whether they can automatically resinstall, or you have to do it manually, I don't know.

May I also mention that even though it is called Ubuntu Gnome, you can find a massive list of other Desktop Environments to Gnome here. Unity is the default one for Ubuntu.


Having trouble installing... or even entering the OS

It's your gfx card. Mine did the same thing for the longest time. Go to http://support.amd.com/us/Pages/AMDSupportHub.aspx get your driver, put it on a usb, reboot in recovery mode and try installing it from cli. If you need any help just ask (I'm a little busy at work right now or I would post more) Just make sure when you're done you run update-initramfs -u -k all

Good Luck!


Download file extract to specific directory with cURL

If you're saving the file to some location in curl, then piping to tar is pointless: there's no data being transferred over the pipe. And the f option in tar is for reading from a file (the filename must be the next argument), so that isn't useful in a pipe either. To save to a file and send to a pipe, use tee:

curl -L https://github.com/janeczku/haproxy-acme-validation-plugin/archive/0.1.1.tar.gz |
  tee ~/downloads/0.1.1.tar.gz |
  tar zx -C ~/downloads/ok


libinput bug prevents initialization of XP Pen Artist 22HD after updating to Ubuntu 18.04

Per the OP's edit/answer:

Okay, problem finally resolved (ironically enough) through me throwing up my hands and deciding enough was enough. Determining that I should do my due diligence before reverting back to 16.04 I stumbled across this bug which, while not identical was close enough to check out.
And then I found out that there's a bunch of community made drivers for a number of off-brand graphics tablets, including mine, and felt dumb. After getting them installed my tablet functions normally. So, you know, don't be like me and make a simple issue super complicated if you don't have to is the moral to this story I guess.


Ubuntu Software Center's history is showing software which i have not installed

I think you must install ubuntu using LiveCD.

Installing Linux with LiveCD is something like installing Windows using Ghost_CD/DVD.

So the softwares you saw in Software Center's history were installed by the Canonical before the company packed the whole ubuntu system up and made it into LiveCD.


Bug 45419 asks for a way for users to report posts/comments/content as spam or abuse.  At the moment there is no formal mechanism but you can as in #launchpad or file a support question against Launchpad itself.


Ubuntu reinstall on PC with Ubuntu + Windows; no option to replace Ubuntu

I had exactly the same problem a few weeks ago with 12.04 (and also a not working 13.04 install). I understood I installed Ubuntu on a Windows partition, which was the reason why Ubuntu didn´ t recognize it.

I manually installed on the partition, and installed GRUB on an external HDD. GRUB was indeed deleted on my HDD. I then rebooted from the HDD and could boot into my fresh install, where I could set up GRUB properly. This is a bit messed up and I cant guarantee it will work but it did for me.

There are other ways to install GRUB a posteriori, for example using a liveCD and Boot-repair


How can I automatically start vmware tools?

This worked for me on Lubuntu 17.04 (Zesty):

Open the menu, and under Preferences click Default applications for LXSession.
Select Autostart from the pane on the left.
Enter /usr/bin/vmware-user in the Manual autostarted applications box, then click + Add.
Reboot, and you should see the window at the correct size.


Fullscreen is the default. Go into the System → Video settings and make sure you're not using a windowed mode.


How to programatically manipulate application windows?

The easiest way to do this would be using wmctrl. You can read man wmctrl to see how to use it.

sudo apt-get install wmctrl

You could basically bind the command line to a 'Window' class and add methods to it that use wmctrl commands in the background.

class Window
    @@windows = []
    def self.windows
        @@windows
    end
    def self.get_windows
        @@windows.clear
        `wmctrl -l`.split("\n").map do |str|
            @@windows << self.class.new(str.split(' ')*)
        end
    end
    def initialize window_id, desktop_id, client_machine, window_title
        #set up object here
    end
    #add other methods here
end

That should be a good starting point. It's not tested or anything but you should be able to work it out from here. You could now add instance methods, eg. change_geometry, which could utilise the -r <WIN> -e <MVARG> option.

You should familiarise your self with pipes and IO in general before doing this.

Perhaps when you have accomplished what you need to, you can distribute this as a ruby library and package it for Debian/Ubuntu.


Try to reconfigure phpmyadmin by doing the following

sudo dpkg-reconfigure phpmyadmin

If that does not resolve the issue, purge phpmyadmin and reinstall phpmyadmin.

sudo apt-get --purge remove phpmyadmin

If still having issues. I recommend removing LAMP stack, and install using the following command.

sudo apt-get install lamp-server^


Sporadic network on Ubuntu 14.04 new installation

Since the original poster didn’t provide any network topology and addressing data, we can’t make even an educated guess whether is it

a firewall problem or
a network connectivity/routing problem (including erroneous routing table in the box in question).

In the former case the default Ubuntu firewall is UFW. Check its status with

  sudo ufw status

and if it’s enabled, then turning logging on (see the wiki link above) might be helpful to continue with diagnostics. Even if UFW is inactive, some other firewall software may be present, so examining iptables would be a good idea.

In the latter case traceroute in both directions can find where the routing is broken.


How to install drivers for switchable graphics for HP dv6 7040tx

Take an example for 12.04 amd64 arch. I recommend 12.04 LTS instead of 13.04. 12.04 are more stable than 13.04 and will get supports until 2017. Some PPA like ppa:ubuntu-x-swat/x-updates and ppa:ubuntu-x-swat/intel-graphics-updates do not offer to 13.04 now.

Do NOT take care of "additional drivers" for graphics card from ubuntu software center.

You first need to set graphics cards to 'switchable' in bios, if there has the setting item . If there no, do not care.

For your notebook , you should use bumblebee:

sudo add-apt-repository ppa:bumblebee/stable
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia primus-libs-ia32
Ref: https://wiki.ubuntu.com/Bumblebee#Installation

Then If you want to run application with Nvidia Graphics Card, you only need to run 'optirun xxx' in gnome-terminal.

You can also make use of HD4000 for mplayer:

sudo apt-get install i965-va-driver
sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi
Last, change video output driver to `vaapi` in `Gnome Mplayer` or `VLC` config.
Ref: http://www.webupd8.org/2012/11/install-mplayer-with-va-api-hardware.html

In order for ubuntu to know your intel graphic card in 'System Settings'-> 'Details', you need to run:

sudo apt-get install mesa-utils

You can also try intel SNA (the new 2D acceleration technology for the Intel graphics driver):

sudo add-apt-repository ppa:ubuntu-x-swat/intel-graphics-updates
sudo apt-get update
sudo apt-get dist-upgrade
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"\n Identifier "Card0"\n Driver "Intel"\n Option "AccelMethod" "sna"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
Then restart machine.
Ref: http://askubuntu.com/questions/298145/xserver-xorg-video-intel-in-ppaubuntu-x-swat-x-updates
Ref: http://askubuntu.com/questions/225356/how-can-i-enable-the-sna-acceleration-method-for-intel-cards-under-ubuntu-12-04
Ref: http://www.phoronix.com/scan.php?page=news_item&px=MTExNjA
Ref: http://www.phoronix.com/scan.php?page=article&item=intel_ivy_glamor&num=1


How can I make a HTML5 app for Ubuntu Mobile?

You can start by looking here http://developer.ubuntu.com/apps/html-5/tutorials/


You added the partner repository for Ubuntu 13.10. That was wrong.
It can be fixed this way:

Run in terminal

sudo sed -i 's/saucy/trusty/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install skype

This will install the correct version.

Or you can got to System Settings -> Software & Updates and fix it there.


the auth ussername is "vpnbook" and you can find the password on https://www.vpnbook.com/


Can I add audio recorder to the sound menu?

You can create your own plugin for the sound indicator. Development will probably include going through some of the existing examples for Banshee, Rhythmbox and Exaile.

Your biggest problem is going to be the record button. You can't add new buttons via the plugin. Instead you will have to add that to the sound indicator itself and push the change upstream.


You might want to look into DVDStyler. But I don't know if the file when converted to DVD will fit on a cd.

Choose the option to output to .iso first to see


Rename and convert dates in filename without file extension

All you need is to strip .gif from $f and put it back on:

for f in *; do mv -v -- "$f" "$(date -d "${f%%.gif}" '+%Y%m%d%H%M')".gif; done

${f%%.gif} takes variable f and removes the last (hence # two times) occurence of .gif in it, so even a strange filename like 1.gif2.gif would only get his last .gif removed. This amazing feature is called Bash Parameter Expansion and when you search it by this name you can read all about its dazzling power, e. g. on this Bash FAQ – it's capable of so much more!


Romanian special characters: the default (comma, standard) version looks bad in LibreOffice, the cedilla versions are reported as incorrect

Unlike similar issues with Unicode fonts, this is not really a matter of fonts and glyphs (although particular fonts may not provide both variants). The problem stems from the specific history of Romanian orthography, with the end result that the comma and cedilla variants have different code points. A dictionary written for one style of spelling will always see the other style as incorrect.

Interestingly, the Hunspell ro_RO.aff file for Romanian appears to have the needed rules to work with a dictionary that provides both spellings, but the current Hunspell ro_RO.dic file provides only the comma variants.

You can, however, install a cedilla-based dictionary as an extension in LibreOffice.

The extension is available from the Apache OpenOffice site. The most recent version that I found is dict-ro.1.3-cedilla.oxt (or here - also here).

Doubleclick the downloaded file (or right-click and choose Open with LibreOffice) to install. After installing, close any open LibreOffice elements and restart Writer.

The comma-based word was pasted from Omniglot Romanian and the cedilla-based word was typed with the Romanian-WinKeys keyboard. I had LibreOffice 3.5 handy, but I don't see anything in the extension that should be a problem in 4.x.


Disk operations consuming all memory - Ubuntu 12.10 i386

You can try to run these commands from Terminal:

sudo -s
echo 3 > /proc/sys/vm/drop_caches

I have used it as well, and my "used mem" in top is ~ 1G again!


How to install 3 different versions fo mysql in a single instance(Ubuntu)

I can't see how to do so using the traditional apt setup so I found this solution which uses docker to install as many versions of mysql on your ubuntu instance:

Steps:

Install default mysql using apt:

sudo apt install sudo apt-get install mysql-server-5.7 mysql-server-core-5.7 mysql-client-5.7 mysql-client-core-5.7

The install docker:

curl -sSL https://get.docker.com/ | sh

Install the version of mysql you want and assign it to a different port:

sudo docker run --name mysql-56-container -p 127.0.0.1:3310:3306 -e MYSQL_ROOT_PASSWORD=rootpassword -d mysql:5.6

127.0.0.1:3310:3306 forwards port 3306 on docker to port 3310 on host

Now you have both mysql 5.7, and 5.6 connection can be made like thus:

To docker image:

mysql -u root -p --host=127.0.0.1 --port=3310

To host mysql:

mysql -u root -p

Please note I used fictitious mysql instances your will vary.

Further information:

https://hub.docker.com/_/mysql/


What is the right way to gain sudo privileges

It's generally a bad idea to edit the sudoers file.
Creating a new admin group is redundant.
Adding the user to the sudo group is the best idea. See here:
How do I grant sudo privileges to an existing user?


The Subtitle Editor (note that I typed "Editor" and not "Edit" package that is in the Ubuntu repos is not the same program as the Subtitle Edit program that is referred to in threads concerning OCR subtitle conversion.  The program in the Ubuntu repos is not designed to be OCR capable in any respect.  The subtitleedit program that can do OCR requires .NET and Windows, or MONO and the Windows executable.  Hope this helps!


Ubuntu dual boot with legacy windows 10: can boot either but not both after installation

Maybe it's something with GRUB. Try to hold "shift" key while starting computer. Eventually hold space or esc key. In those trheads there are other ways to enable GRUB menu at start Link1, Link2

Have you tried saving secure boot keys to usb stick and deleting platform keys in your UEFI? Tutorial for ASUS motherboards

UEFI based stuff have a lot of default options that causes errors while installing other OS.
Have you tried to install bootloader on other partition? In my case - 1 SSD with windows bootloader and another drive with Ubuntu bootloader didnt work. only windows showed, and was no GRUB. But when I installed bootloader on the same drive as windows, it worked.


Why does my wireless connection on a Thinkpad T400 drop approximately every two minutes?

This appears to solve a similar issue I had:

Go to System Settings>Network>Wireless and did the following:

1) Set the Network Name to the network you want to connect to.

2) Click the Options... button, and ensure that the Connection name: is correct, the Connect automatically checkbox is checked and is Available to all users.

3) Click on the IPv6 Settings tab and set the Method: to Ignore.

4) Click on the Wireless Security tab, and type in your security key/passcode in the Key: field.

5) Save all changes by clicking the Save... button when done.

I found that after making the above changes my Intel 5100 agn wifi connection remained stable after initial connection.


How to automatically show sudo prompt when command doesn't have enough permissions

While this might be possible, it is a really, really bad idea. This would encourage you to just blindly run things with sudo instead of investigating why you don't have permissions and what you're actually trying to do. In some cases, this could lead you to use sudo where not necessary and could, for example, cause you to change the ownership of config files etc.

Instead of just blindly asking for the sudo password, you can use bash's history shortcuts and run:

sudo !!

The !! is expanded to the previous command you ran. For example:

$ whoami
terdon
$ sudo !!
sudo whoami
root

At least, this way, you can see what's going on. It is only a tiny bit more complex than what you asked for and it is a tiny bit safer.


Common protected (Encrypted) partition for both Windows and Ubuntu

This might work with LUKS encrypted containers. You have to create one with

cryptsetup -s 512 --hash sha256 luksFormat /dev/partitionNode

(Soon to be released KDE Partition Manager 2.2 can also create luks partitions but at the moment you would have to compile it yourself)

Then open your encrypted device with

cryptsetup open /dev/partitionNode cryptName
and then format device /dev/mapper/cryptName with some filesystem.

Then there are a few options for inner FileSystem. Something like FAT32/NTFS will automatically work in both OSes. You can also try more advanced file systems like Btrfs with btrfs driver for windows

You can try opening LUKS partitions in Windows using
LibreCrypt.


There is a known libcrypto issue with 0.15 libtorrent on 12.04 so you can use 0.16 libtorrent from the Deluge PPA


Not sure if this is applicable to you as this is the first time I've tried the site in linux. I got videos to play by disabling hardware acceleration in Firefox (Lubuntu), hope this helps you!

Update:
It only works during the commercial breaks!


I guess what you are trying to achieve can be done by just changing your web browser's User-Agent. That is how Facebook and other sites know about your OS and it's version.

Addon for Firefox: https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

Extension for Chrome/Chromium: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg/related

Example

Change the following User-Agent

Mozilla/5.0 (X11; Linux x86_64 3.13.0-53-generic; rv:43.0) Gecko/20100101 Firefox/43.0

to

Mozilla/5.0 (X11; ABC x86_64 3.13.0-53-generic; rv:43.0) Gecko/20100101 Firefox/43.0


Go to

/etc/Network-Manager/system-connections

Remove the connections with this command

sudo rm 3monkey*

This will remove all connections starting with name 3monkey
Restart the network manager service

 sudo service NetworkManager restart


Ubuntu 10.04 Lucid: Is there a way to disable the "Leave Message" button in the lock screen page?

You could update to Oneiric (Gnome 3) where that feature has been removed, or just set auth-note-button's visible property to False in /usr/share/gnome-screensaver/lock-dialog-default.ui according to this: http://ubuntuforums.org/showthread.php?t=1798885

There are a couple of special cases in which you'll change the same setting but in a different file: if you have a theme installed or if you want to control the setting for individual users.


SD card operations from multiple user accounts?

To mount  SD card at startup for all users, we need an entry in the fstab file. What is happening presently is, the SD card is getting mounted for the user who logs in which gives access permissions to only that user. By adding an entry in the fstab, the SD card will be mounted by root with access to all users. this r/w access can be controlled later on.

sudo blkid lists down all partitions(including of your SD card) available on your system. Note down the UUID of the partition that you want to mount at boot.

now create a folder, for example sudo mkdir /media/ExtSD01. This is the folder where your SD card partition will be mounted at. This folder will be owned by root. To give other users permission to r/w into this folder we need to give the proper permissions. so chmod -R 777 /media/ExtSD01 would be good enough. Now you need to edit your fstab file. to do so, type the following command.

  sudo nano /etc/fstab

go to the bottom of the file and add the following line there.

UUID='enter your UUID here' /media/ExtSD01/     auto,user,rw 0 0

Reboot system and you should be good to go.


Has anyone lost his/her data or OS while installing Ubuntu and is it safe to not back up my data?

It is not the installation of Ubuntu that puts your data at risk but the changes on your hard disk partition that may lead to corrupted data if something fails.

The major bug when performing hard disk actions still is the human being pressing the wrong button or typing the wrong commands at the wrong time. It is very rare that you loose your data when installing Ubuntu - but it does occur (e.g. in case of a power failure).

You may find it time consuming or too expensive or whatever to backup your data but this may only be because you value your data less.

The only secure way to make sure your private data persist is performing regular backups - this not only before installing an OS but at least then


Check the status of server 1, if it is not available then run the scripts?

Don't do crontab manipulation.

Run scripts at both the master and the slave. On the slave, start each script with:

check=$(curl -s -w "%{http_code}\n" -L "master" -o /dev/null)
if [[ $check == 200 || $check == 403 ]]
then
#   master not available; do stuff
else
#   master is available, do nothing
    exit 0
fi

If the master is available, the scripts on the slave will exit after the test.


Php 7.3 extension imagick and gmagick on Ubuntu 18.04

I use php7.2 but from the same repo as your version of php. Check if these packages are present with the commands

apt search php-imagick | grep php-imagick
apt search php-gmagick | grep php-gmagick

If the search turns up positive, install both with the command

sudo apt install php-gmagick php-imagick

Restart apache afterward with

sudo systemctl restart apache2


Can't find latest NVIDIA Propietary Drivers

Open Source doesn't mean generic.

Every driver from that PPA is open source, but each one will work just as well as the proprietary driver.

Nouveau is the only generic driver there.

Open Source means you or anyone else can easily review the code that went into making the driver, and even use it to build your own version of the driver.

Proprietary means the code is not available to review or edit.

Generic drivers are made to work with a certain brand or category of device, but aren't optimized or anything to provide any sort of performance.


this is one of the new features of ubuntu 12.04 install it and you will be good to go!

https://wiki.ubuntu.com/PrecisePangolin/TechnicalOverview/Beta2#ClickPad_support


Tied of constantly and silently freezing Skype I've created simple wrapper for this - it's a python daemon which constantly checks it via DBUS skype API, and restart process when notifies it's frozen. Hope someone finds it useful.

https://github.com/kapliars/doctor-skype


gnome-terminal fails to start (timed out)

Identical issue, found the solution.

Running 'tail -f /var/log/syslog' in a 2nd terminal when testing in the first terminal gives the following when I launch gnome-terminal after 'sudo bash':

Mar 23 10:11:59 X399-DESIGNARE-EX dbus-daemon[2584]: [session uid=0 pid=2582] Activating service name='org.gnome.Terminal' requested by ':1.6' (uid=0 pid=2929 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Mar 23 10:11:59 X399-DESIGNARE-EX gnome-terminal-[2934]: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-GAXcx1c8OL: Connection refused
Mar 23 10:11:59 X399-DESIGNARE-EX dbus-daemon[2584]: [session uid=0 pid=2582] Successfully activated service 'org.gnome.Terminal'
Mar 23 10:11:59 X399-DESIGNARE-EX gnome-terminal-[2934]: The owner of /home/<user>/.config/ibus/bus is not root!

I get the following when running gnome-terminal as myself:

Mar 23 10:16:30 X399-DESIGNARE-EX dbus-daemon[2564]: [session uid=1000 pid=2564] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.4' (uid=1000 pid=2959 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Mar 23 10:16:30 X399-DESIGNARE-EX systemd[2435]: Starting GNOME Terminal Server...
Mar 23 10:16:30 X399-DESIGNARE-EX systemd[2435]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Mar 23 10:16:30 X399-DESIGNARE-EX gnome-terminal-server[2962]: Unable to init server: Could not connect: Connection refused
Mar 23 10:16:30 X399-DESIGNARE-EX gnome-terminal-server[2962]: Failed to parse arguments: Cannot open display:
Mar 23 10:16:30 X399-DESIGNARE-EX systemd[2435]: gnome-terminal-server.service: Failed with result 'exit-code'.
Mar 23 10:16:30 X399-DESIGNARE-EX systemd[2435]: Failed to start GNOME Terminal Server.

...after a lot of digging I finally found gnome-terminal not starting, which indicated there is an issue with dbus not refreshing its environment when services get requested from non-root. The following steps work around the problem:

Create a script in your home folder, e.g.:

vim ~/term

Add the following to the script and save it:

#!/usr/bin/env bash
dbus-update-activation-environment --systemd --all
gnome-terminal &

Make script executable

chmod 755 ~/term

Run '~/term' to start up gnome-terminal as user (not root) and it should start correctly.

NOTE TO MODERATOR:

Please do NOT delete an answer that provides additional detail for the problem.  What you deleted was not any violation of the posting guidelines, and provided substantial additional information for anyone trying to track down the solution.  This answer does not provide that additional information and I am disinclined to go through the effort of recovering it.

This answer solves the problem.

PLEASE DO NOT DELETE IT!


How can I use dial-up internet in ubuntu 12.04

Its actually not at all hard once you're pointed in the right direction.

Here is an article which should get you all the way  there. <- Click Here!!

Hope this helps!


Disable automatic disconnect from the Internet when inactive

I've gotten no responses here, but somebody elsewhere made a good suggestion: to simply go to System Settings, then Power, then in the "When the lid is closed" select the "Do nothing" option. This way my laptop won't disconnect when closing the lid.

Simple and silly answer for a simple and silly question, I s'ppose.


Go to System Settings>Keyboard
Choose shortcuts and custom shortcut and press the + button
The command to run is gnome-system-monitor

After creating the shortcut, click disabled then pressctnl+shift+esc to set the new accelerator.


How can I make Ubuntu Dock show labels, not icons (like Windows does)?

You can achieve something like that using some GNOME Shell extension(s).

If you just want a separate panel at the bottom which shows the names of open windows, you may use one of the following:

Window List
It displays a list of open windows at the bottom of the screen. You'll be able to minimise and restore windows by clicking on the window names.

Window List Mod
It's a modification of the Window List extension. It displays a list of open windows at the top of the screen and offers a few more customisations.

But an arguably better alternative is to use the feature-rich Dash to Panel extension. It's

  An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.

Dash to Panel provides an option to ungroup applications:

After enabling the option, you should get something like this:

(screenshot source: this Ubuntu Buzz article)


Windows only refresh if click on title bar (12.04-VirtualBox)

Seems like known issue of the VirtualBox running on hosts with NVidia adapters (https://www.virtualbox.org/ticket/2985)

There are 2 ways to resolve:

1) update host's video drivers

2) if it doesn't help, turn off "3D acceleration" in your virtual machine settings

Hope, it helps.


If you need to build WebKit from source using the SVN repo, all you have to do is to use the provided build scripts:

./Tools/gtk/install-dependencies
./Tools/Scripts/build-webkit --gtk

By default, build-webkit places build products in WebKitBuild. The WEBKIT_OUTPUTDIR environment variable can be used to set a different build products location. If you have set up a custom build location, then build-webkit will place the build products there.

Note: I assume that you're building for a GTK target (you can choose Efl, WinCE or GTK)

Source: https://www.webkit.org/building/build.html


No audio: upgrade from Ubuntu 18.04 to 20.04

What is your active profile for your sound device? You may check that with the following command:
pacmd list-cards

The active profile is what will show for both inputs and outputs within Ubuntu Settings/Sound. If you have active profile: <off>, this would explain why you are not seeing it.
Use the index number shown in that output to set your active profile by modifying:
/etc/pulse/default.pa

Here is an example:
### Make some devices default
set-default-sink 2  output:hdmi-stereo
set-default-source 2

where the 2 above is the index number shown for the device, and output:hdmi-stereo is the profile name.


I have installed Ubuntu 12.04 TLS onto this server without too many hickups, things to watch out for are gfx drivers and of course setting the raid drivers prior to install, If you know what these drivers are it is fairly straight forward.


no windows boot option after installing ubuntu 12.04

Problems:

You originally couldn't see Ubuntu because one Windows program was using FlexNet DRM, Boot-Repair fixed this problem.
Your problem now is that your /boot is too far from the start of the disk.
You have separated many folders. If this is not a server, do not separate /tmp nor /usr, nor /var.

Solution:

Via Gparted, delete all Linux partitions: sda2, sda5,6,7,8,9,10,11,12,13. Do NOT format sda1.
Via the Ubuntu installer, create a 30GB (NOT more) root partition (EXT4, mount point: / )at the start of the disk, just after the sda1 partition.
Create a SWAP partition (size of your RAM), just after your root partition.
Create a data partition in the remaining space at the end of the disk.
Finish the installation.


You can Download the Daily Build which is updated everyday and contains all the updates to the os till date.

Lucid Daily Build

Natty Daily Build


Why and how to install Chrome user agent

Installing any extension can lessen your overall Browser security - so make sure you download from a known and trusted source.  Best to use the browser recommended addons and then look at the comments to see the stability and any potential issues.

In terms of the User Agent - this is an old technique used by some websites to change the website page content depending upon the browser being used.

Some websites that have been implemented with specific browsers in mind block access to browsers  it doesnt support.  Usually the less used browsers are affected and changing the User Agent is a way to fool the website (if its been poorly programmed)  to believing it is a supported browser that it is serving its content to.

It will not affect your overall browser security - google chrome is well sandboxed anyway.

You can use an extension to change the User Agent on a per-tab basis.  However, since v17, Chrome has this capability built it.

Let me show you...

press CTRL+SHIFT+I to go into developer mode.

Click the Settings symbol as shown.

Expand the pane as shown and click the Override User Agent tick box

Choose the user agent you want to emulate.

Close Developer Mode via CTRL+SHIFT+I


how to uninstall Linux dual boot with Windows?

Go to Windows partition manager and delete the partition where you installed Linux and then format it. Start fresh installation.


The package "software-properties-gtk" needs to be reinstalled, but I can't find an archive for it

What you can do is sudo dpkg --remove --force-all software-properties-gtk
That's happened cause the software-properties-gtk was not installed correctly and you probably deleted it's archive.


Is there any way to roll back the most recent upgrade?

In synaptics, you can at least control, what have been the recent updates: File-menu, history.

(if synaptic is startable, with the broken system). So with an apt-...-command, to revert their update, it shouldn't be too hard.

I guess there is a history-command for the command line too.

Maybe you have to delete the whole package, and install a specific version. Afaik, it is possible to install a specific version, but I never had the need to do so.

update: Looked up how to do with apt:

Find packages installed in the last 3x24h:

find /var/lib/dpkg/info/ -name \*.list -mtime -3 | sed 's#.list$##;s#.*/##'

With apt-cache policy, you see available versions of a program:

sudo apt-cache policy PROGRAM:
 *** 3.6.7+build3+nobinonly-0ubuntu0.10.04.1 0
        500 http://de.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
        100 /var/lib/dpkg/status
     3.6.3+nobinonly-0ubuntu4 0

here 3.6.7 and 3.6.3 . Now you know what earlier version might be installed (often not the immediate predecessor):

sudo apt-get install PROGRAM=3.6.3

Then you need to do an apt-pinning, to prevent future updates:

Create a new file in /etc/apt/preferences.d/ (if >= 10.4) named after your program,

Package: program
Pin: version 3.6.3*
Pin-Priority: 1000


When you say "router", I'm going to assume that you are using a common consumer grade residential gateway/wireless access point "router". Commercial grade routers would require additional configuration to get routing itself to work, such as setting up routing protocols or static routes. I suspect this isn't the problem you have.

If the Ubuntu device is behind a router, the router is probably acting as a firewall for the devices behind it, such as the Ubuntu device. You may need to configure the firewall to allow traffic destined for the Ubuntu system to pass.

The router is probably also operating as a NAT device, and may need to be configured to translate connections to the router's IP address to the IP addresses of devices behind the router/NAT. In this scenario, the Ubuntu device is actually on a separate LAN than the rest of the campus since it's behind it's own router, so the Windows computer wouldn't be able to connect to the Ubuntu device's IP address at all, but could ping the router's IP address.

Consumer grade routers commonly use Port Address Translation, which is where you can configure the router to forward connections to port 22 (for SSH) on the router's IP address to a particular port (such as 22) on a particular device's IP (such as the Ubuntu system) behind the NAT device. The way this works is the Windows computer would actually try to connect to the IP address of the NAT device (router), but the NAT device would forward those connections to the Ubuntu device using the IP address and port specified in the configuration.

It's also possible that your campus is preventing the connections directly, which you can't do much about.

You might have an easier time if you connect the Ubuntu device to a simple switch or a wireless access point instead of a wireless router so that it would still be on the same LAN as the rest of the campus.


Can't change folders ownership from root to a user

Solved. I just wrote the full path instead of $LFS. Still don't know why I keep loosing the export value, but that is another queation.


Is it possible to modify the prompt according to the existence of a VPN connection?

Add the result of a test to your prompt

If the command ps ax -o comm| grep [v]pnc gives no output whatsoever when there is no active vpn connection, but it does when there is, you could edit your .bashrc file by:

adding the following small section to it:

if [ -z "$(ps ax -o comm| grep [v]pnc)" ]; then
    test="no vpn active"
else
    test="vpn active"
fi

Then find the lines, starting with:

PS1='${debian_chroot....

Add ($test) in fromt of ${debian_chroot:

PS1='($test) ${debian_chroot...

Then the result is:

when there is an active connection, and:

when there isn't.

Note

Always first backup your ~/.bashrc before editing.


What is the difference between find with -exec and xargs?

Summary:
Unless you are much more familiar with xargs than -exec, you will probably want to use -exec when you use find.
Since xargs is a separate program, calling it is likely to be marginally less efficient than using -exec, which is a feature of the find program. We don't usually want to call an extra program if it doesn't provide any additional benefit in terms of reliability, performance or readability. Since find ... -exec ... provides the ability to run commands with an argument list (as xargs does) if possible, there is not really any advantage of using xargs with find over -exec. In the case of ffmpeg, we have to specify input and output files, so we can't make performance gains using either method to construct an argument list, and with xargs removing the illogical original filename extension is more difficult.
What xargs does
Note: The verbose flag (which prints the constructed command with its arguments) in xargs is -t, and the interactive flag (which causes the user to be prompted for confirmation to operate on each argument) is -p. You may find both of these useful for understanding and testing its behaviour.
xargs attempts to turn its STDIN (typically the STDOUT of the previous command that has been piped to it) into a list of arguments to some command.
command1 | xargs command2 [output of command1 will be appended here]
Since STDOUT or STDIN is just a stream of text (this is also why you shouldn't parse the output of ls), xargs is easily tripped up. It reads arguments as being delimited by spaces or newlines. Filenames are allowed to contain spaces and may even contain newlines, and such filenames will cause unexpected behaviour. Let's say you have a file called foo bar. When a list containing this filename is piped to xargs, it attempts to run the given command on foo and on bar.
The same problem occurs when you type command foo bar, and you know you can avoid it by quoting the space or the whole name, eg command foo\ bar or command "foo bar", but even if we are able to quote the list passed to xargs we don't usually want to, because we don't want the whole list to be treated as a single argument. The standard solution to this is to use the null character as delimiter, since filenames cannot contain it:
find path test(s) -print0 | xargs -0 command
This causes find to append the null character to each filename instead of a space, and xargs to treat only the null character as delimiter.
Problems may still occur if the command doesn't accept multiple arguments or if the argument list is extremely long.
In this case you are using ffmpeg, which expects input files to be specified first, and output files to be specified last. We can tell ffmpeg which files(s) to use as input explicitly with the -i flag, but we need to give the output filename (from which the format is usually guessed, though we can also specify it) too. So, to construct suitable commands, you need to use the replace string option (-I or -i) of xargs to specify both the input and output files:
... | xargs -I{} command {} {}.out
(the documentation says that -i is deprecated for this purpose and we should use -I instead, but I am not sure why. When using -I, you must specify the replacement ({} is normally used) immediately after the option. With -i you can omit to specify the replacement, but {} is understood by default.)
The -I option causes the command list to be split only on newlines, not spaces, so if you are sure your filenames will not contain newlines, you do not have to use -print0 | xargs -0 when you use -I. If you are uncertain, you can still use the safer syntax:
find -name "*.flac" -print0 | xargs -0I{} ffmpeg -i {} {}.mp3

However, the performance benefit of xargs (which enables us to run a command once with a list of arguments) is lost here, since ffmpeg must be run once for each pair of input and output files (you can see this easily by prepending echo to ffmpeg to test the above command). This also produces an illogical filename and doesn't allow you to run multiple commands. To do the latter, you can call bash, as in dessert's answer:
... | xargs -I{} bash -c 'ffmpeg -i {} {}.mp3 && rm {}'

but renaming is tricky.
How -exec is different
When you use the -exec option to find, the found files are passed as arguments to the command after -exec. They aren't turned into text. With the syntax:
find ... -exec command {} \;
command is run once for each file found. With the syntax
find ... -exec command {} +
an argument list is constructed from the found files so that we can run the command only once (or only as many times as required) on multiple files, giving the performance benefit provided by xargs. However, since the filename arguments aren't constructed from a stream of text, using -exec doesn't have the problem xargs has of breaking on spaces and other special characters.
With ffmpeg, we can't use + for the same reason as xargs didn't give any performance benefit; since we need to specify both input and output, the command must be run on each file individually. We have to use some form of
find -name "*.flac" -exec ffmpeg -i {} {}.out \;

This, again, will give you a rather illogically named file, as dessert's answer explains, so you may want to strip it, as dessert's answer explains how to do with string manipulation (not easily done in xargs; another reason to use -exec). It also explains how to run multiple commands on the file so that you can safely remove the original file after a successful conversion.
Instead of repeating dessert's recommendation, which I agree with, I will suggest an alternative to find, which allows similar flexibility to running bash -c after -exec; a bash for loop:
shopt -s globstar           # allow recursive globbing with **
for f in ./**/*.flac; do    # for all files ending with .flac
   # convert them, stripping the original extension from the new filename
   echo ffmpeg -i "$f" "${f%.flac}.mp3" &&
   echo rm -v "$f"          # if that succeeded, delete the original
done
shopt -u globstar           # turn recursive globbing off

Remove the echoes after testing to actually operate on the files.
ffmpeg doesn't recognise -- to mark the end of options, so to avoid filenames beginning with - being interpreted as options, we use ./ to indicate the current directory instead of starting with **, so that all paths begin with ./ instead of arbitrary filenames. This means we don't need to use -- with rm (which does recognise it) either.

Note: you should quote your -name test expression if it contains any wildcard characters, otherwise the shell will expand them if possible (ie if they match any files in the current directory) before they are passed to find, so in the first place, use
find -name "*.flac"

to prevent unexpected behaviour.


How do I download a deb file for arm64 from Ubuntu Packages website?

For ARM packages, take the path given there (pool/main/p/python2.7/ in this case), and append it to http://ports.ubuntu.com, and pick the version you want from the directory listing on that page:

Also, Launchpad isn't Debian's site. It's Ubuntu's. That package is Ubuntu's.


Setting up GDB pretty printing in Ubuntu 13.10

The easiest fix seems to be to set up the pretty printers as normal but then convert printers.py to python3 using 2to3:

2to3 printers.py -w

I've only tested it briefly, but it seems to work fine.


How to activate WiFi when it says "disabled by hardware switch"?

Open the terminal. the shortcut is:

Ctrl + Alt + T

Then type this command:

sudo rfkill unblock all

If it did not work from the beginning.Try typing it again like 2 or 3 times and then see

Sometimes the hard switch won't work. So this command works like a hard switch and helps enabling the Wifi.


WARNING: amdgpu dkms failed for running kernel

The new driver, Radeon™ Software for Linux® 20.10, just came out and it worked for me. I use ubuntu 18.04.4 with Kernel 5.3.0-46-generic and this new driver solved my problem. Hope this works for you.


Help, what does Ignoring file name 'Untitled Document 1' in a directory when installing Java mean?

delete the file Untitled Document 1 in the directory /etc/apt/sources.list.d by running the below command in terminal.

sudo rm /etc/apt/sources.list.d/"Untitled Document 1"


Try glue in sublime text editor

Kindly find the below article for procedure in details:

http://sweetme.at/2014/04/07/glue-a-terminal-for-sublime-text/

Install with Git

Open your Packages directory with the Sublime Text menu items Preferences > Browse Packages.
Then git clone the Glue repository as a new directory named ‘Glue’ in your Packages directory with the following command:

git clone https://github.com/chrissimpkins/glue.git "Glue"

Install with Package Control

In menus Tools > Command Palette
2.type install in the text entry field.
Select the option Package Control - Install Package.
type ‘glue’ in the text input box and select the ‘Glue’ plugin option that is displayed in the Command Palette.

The install automatically takes place.

You will see a confirmation in the status bar at the bottom of the editor window.


I haven't done this yet but i found this, don't know if this can help you. let me know it goes.


Get multiple screens working in 11.10 : The selected configuration for displays could not be applied

You will be pleased to hear that 12.04 will have much better support for multiscreens. Using it right now. Piece of cake.

Anyway, the error you get is probably an xrandr error complaining that your virtual display is too small.

If xrandr complains about the desktop not being large enough, put a Virtual info in your xorg.conf file, such as:

Section "Screen"
Identifier "amdcccle-Screen[1]-0"
Device     "amdcccle-Device[1]-0"
DefaultDepth     24
SubSection "Display"
    Viewport   0 0
    Virtual   3360 1920
Depth     24
EndSubSection
EndSection

Only the SubSection "Display" with the Virtual line should be added, the rest is specific for my setup.
3360 is the height, 1920 is width. Just make sure that your virtual width and height is not less than your two resolutions added together. So, simply add both widths of both screens and use that number as virtual width. Virtual height is simply the largest height of one of your two monitors. In your case, it seems to be 3280 and 1050.
amdcccle sometimes adjusts this automatically, but not always it seems.
Restart your computer for the new xorg.conf to take effect.
Good luck!


Please use this link to verify your download:

http://releases.ubuntu.com/17.04/

Steps to check the md5sum of iso file:

Copy the md5sums for your particular download and place into a file say check.md5:

echo "18cc54af55d7ca931bbb8588e8d9c1bd *ubuntu-17.04-desktop-amd64.iso" > check.md5

Put that file (check.md5) in the same folder as the downloaded iso file.
Check it with:

md5sum -c check.md5


How to copy files from multiple directories?

If none of the answers in the related threads is what you're looking for, you could consider using the find command, which will search directories recursively downwards from a given parent. You can specify an exec action to perform on each of the matching files that it finds - in this case, you'd want it to perform a cp to a new target directory

find /path/to/parent -name '*.txt' -exec cp -t /path/to/newdir {} +

The {} is replaced by the files that it locates, and the + at the end causes it to batch them so as not to overflow the maximum number of arguments that cp can handle in one command. The newdir must already exist.

Since you are moving files from many places to one place, there is a possibility that some names will be non-unique, and so you may want to take care to prevent an earlier copy from being overwritten by a later copy - you can do that by adding a backup option

find /path/to/parent -name '*.txt' -exec cp --backup=numbered -t /path/to/newdir {} +

which will add a simple numbered suffix to each duplicate file. You can add a -v or --verbose flag to the cp if you want to see a running report of the files as it copies them.


Where can I find gnome-alsamixer on ubuntu 20.04?

You can install qasmixer and run it with c option to select soundcard , f.i.:
qasmixer -c 0
You can also select correct audio device in the view => "show device" box, then save configuration by selecting "from last session" in settings => startup
Additionnal capture settings by clicking the mic button in the bottom right


I had this issue once, and if memory serves it was an NVidia graphics glitch, not a login glitch. In my case I switched to another console (CTRL+SHIFT+F1), logged in there and upgraded to a newer NVidia graphics package - I think I was running 304 and upgraded to 331, rebooted and the login screen rendered correctly this time.

If you're running an Intel GPU, however, I suspect that won't be your problem.

If your machine has hybrid graphics like NVidia Optimus (combined NVidia and Intel GPU such as included in the Lenovo T410s), remember to install the Bumblebee package so it can manage it properly.


root takes up entire internal hard drive

This is how it's supposed to be. As a normal user you are only interested and have access to your home folder, which is under /home

Open a terminal and type ls -l /home (that's a lowercase L, not a numerical one) and you'll see that there is a directory named after your username and its ownership is set to you. This is where you put your work.


Make sure that the file "/usr/share/applications/gimp.desktop" has proper permissions:

Right click in Nautilus > Properties > Permissions: RW-R-R


(I don't have the priveledge of commenting yet, pardon me for breaking protocol):

What is the format & location of your backup?

Editing the grub menu is done by editing the /etc/grub.d/40_custom script. This lets grub know about your boot options when generating the file grub.cfg. That file is automatically generated whenever the command update-grub is issued. All of these require administrator permissions granted by prefacing a command with the sudo command, then providing your password again (this is done to protect the OS stack from maliscious software).


How to install boost 1.53 or 1.54 from terminal?

If you need boost (or libboost) 1.53, you must use Saucy. Boost before raring only goes until 1.49 while in Saucy you get 1.53. Trusty is in Pre-Pre-Alpha (can brick at any moment) and apparently will have 1.54.


Install old versions of Mysql, Apache2, PHP

First you should notice that apache2.2.12 has many security vulnerabilities

Now in general you can downgrade a package version in Ubuntu, but you should notice that the version must be available in the software channels(your repositories). To show the available versions for some package run the command:

apt-cache showpkg <package-name>

Now to downgrade a package select the version you want then:

sudo apt-get install <package-name>=<package-version-number>

Now back to your case, I don't think those versions is available for Ubuntu 12.04.


Is there a concept of GUI based file copy like Windows?

If you type ALT+F2 and enter gksudo nautilus in the box that appears, you get a GUI file manager running as root.
The ALT+F2 brings up a box allowing you to ask for any command directly, without a terminal - very useful at times. I mostly use it when I want kill

This nautilus will allow you do the job - but be careful not do do anything else in it as all the normal checks are off! Close it when done. You can open a second window to simplify your copy job.