How To Open Visual Studio Code Using Terminal

It should be called code and for me, I just have to run it.

$ code
$ code my-file

and that works.  If installed the .deb (only available in older Ubuntu versions) the path should be

`/usr/bin/code`

If you installed it as a snap, e.g.

$ sudo snap install code --classic

Then it's path should be

`/snap/bin/code`

If you installed it another way, then try to find the binary, e.g.

command -v code

will print the path. command is a bit more reliable than which.    VS Code is an Electron application (i.e. Chrome/node) and the launcher is a little wonky.   For example, xdg-open does not work well for me.

NOTE ABOUT INSIDERS VERSION:
As Nicholas Humphrey points out in the comments, it could also be called code-insiders if you installed the insiders version.  This allows you to have side-by-side installations of regular and insider versions.


That is not possible - suspend mode means the cpu is halted and the system uses only power to maintain the RAM's content.


X is an application that manages one or more graphics displays and one or more input devices (keyboard, mouse, etc.) connected to the computer.

It works as a server and can run on the local computer or on another computer on the network. Services can communicate with the X server to display graphical interfaces and receive input from the user.

It's worth noting, a common component used with an X server is the Window Manager, an application that manages the resizing and moving of windows and decorative elements of windows such as title bars, minimize, and close buttons.

The X server can be started with the 'startx' command, or more commonly, from a display manager such as gdm.

~/.xinitrc is a shell script used by xinit, that starts the X server when not using a display manager, to define some application to start automatically in the X server.

/etc/X11/xorg.conf is a configuration file used to give the X server information about the hardware components used, but now the X server can avoid using it, because it is capable of autoconfiguring itself.


Startup error Uncleared pch fifo underrun on pch transcoder

You need to run a manual fsck (file system check). Something in your file system isn't right.

boot the computer
choose Advanced Options from the GRUB boot menu
choose recovery mode
choose root access
enter your password
type sudo fsck -f /dev/sda1
run #6 more than once if there are errors
type reboot

If the corrupted system won't even let you do that, then:

boot the Ubuntu Live DVD in "Try Ubuntu" mode
open terminal from the Unity dash
in terminal, type sudo fsck -f /dev/sda1
run #3 more than once if there are errors


I answered similar question on unix.stackexchange.com:

  Bash has readline commands that aren't bound by default. You can find
  them at reference:
  http://www.gnu.org/software/bash/manual/html_node/Bindable-Readline-Commands.html#Bindable-Readline-Commands

  Command you are looking for is called "shell-backward-kill-word". You
  have to select shortcut first. Let's use Crtl+p, since it's "previous
  command" - same as up arrow.

bind '"\C-p": shell-backward-kill-word'

The only difference is you have to use "shell-kill-word" command instead, since you want to delete forward.

There is also a "kill-word" command with Meta+d shortcut (try Esc+d if you don't have Meta key). It will delete only one part of path at once.


you probably used special characters within your password and use the openVPN connection. OpenVPN cannot handle special characters well.

Try to use only alphanumeric chars in your (long and secure) password and see if it works then.


Python Interpreter only using 12% CPU Power

I assume you have a CPU with 8 virtual cores (quad-core with hyper-threading probably)? That means one fully loaded CPU thread/virtual core equals 12.5% total load.

The Python interpreter is an application which only runs as one single process by default and is therefore not able to take advantage of more than one virtual core. Even if the code you run with it uses multithreading, it will still only use one CPU thread/virtual core, because of the GIL (global interpreter lock).

Only if your Python program uses multiprocessing, which in fact starts up multiple instances of the Python interpreter and lets them perform your tasks truly parallel, you can take advantage of multiple virtual cores/CPU threads. (As @SargeBorsch pointed out in his comment, there are also some advanced ways to achieve this without multiprocessing, but that's normally not something you quickly write yourself.)


Bitlocker on a device with three disks - what do I need to do before I can safely install Ubuntu?

Do I need to decrypt BitLocker on my Windows SSD drive before installing Ubuntu?

You don't need to decrypt BitLocker on your Windows SSD drive before installing Ubuntu.

  Is there any risk for installation?

Select the Something else option in the Installation type screen of the Ubuntu installer, and then install Ubuntu in the empty space of the 120 GB mSATA SSD. There is no risk for installation when you select the Something else option, as long as you are careful to select the 120 GB empty SSD and not the 240 GB which has Windows 10 installed on it.


If it's connected only with clock then this should solve problem

Time fix on dual boot

EDIT:

e.g. Leave windows unchanged and on Linux run follwing command:

timedatectl set-local-rtc 1

Then you can check the status with

timedatectl

Where should be displayed something like this

RTC in local TZ: yes


"connection not visible or not available" after switch DSL to LAN

Same problem with you.

Those guys' tries may help you solve this problem:
http://ubuntuforums.org/showthread.php?p=12111017


Can't boot my MacBook Air 2017 after sudo pm-hibernate

As Steve said in the comment, there has been a problem with hibernation in some of the kernels shipped with ubuntu, which is described here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1743094

From my limited reading, it seems to have started at 4.13.0-25, and still be a problem in 4.13.0-32

After I encountered this, I could still get into GRUB. I used Advanced options for Ubuntu > Ubuntu, with Linux 4.8.0-53 (recovery mode), and ran swapoff --all in a root-shell, ran fsck, and updated grub. After doing this, I was able to boot into my system again :) -- all steps might not have been necessary though.


Broken laptop monitor and external monitor have the same resolution and can't get the external to change

If you are using 12.04, first is try to set the resolution of your monitor on the proper tool inside of the "system configuration" with the purpose of to make sure that the resolution can be changed without complications.

If so, then your laptop graphics (GPU) card is in good condition and you will only need to replace the crystal liquid display (LCD) and you also have the option of working with your external monitor only.

This and other characteristics can be configured in the same tool.

It would be very useful if you indicate us the make and model of your laptop with the purpose of knowing what graphics card it has and thus be able to give you an answer more personalized.

Best regards.

P.S. My system is in Spanish, the illustrations are in this language.


Did you try to install bumblebee?  I think first you need to type in your terminal  " lspci " and see what kind of VGA are connected in your laptop, after you should see if the bumblebee can help you.


Ubuntu equivalent of system restore? Does it exist?

Ubuntu offers the same services to take snapshots of your computer when changes are made and the Back in Time application for Linux is a great tool to achieve the same easy-to-use GUI. The program utilizes existing services including rsync for creating and applying restore snapshots and diff for monitoring system changes.
Back in Time allows you to backup all folders and restore any folders with write access in the event of a problem following a system change.

To install it from terminal use next command:

sudo apt-get install backintime-common backintime-gnome


Help required to install an Nvidia GT520 card into 11.10

Unfortunately, you won't be able to set dual monitors with the default monitors tools.

Open up the dash and start typing Nvidia.  You should see an application called Nvidia-Settings.  Use this to set your monitor configuration.

Good luck!


How do I install linux headers when I am getting a "has no installation candidate" error

13.13 seems to be an old kernel from trusty? Whereas 3.16 is the kernel shipped with utopic.

If you ran do-release-upgrade lately, and you still use the old kernel be advised that all your old repositories ( where the old kernel headers reside) are disabled/cleaned from /etc/apt.

Usually doing a release upgrade bumps the kernel minor by at least 2 versions ( from 3.13 to 3.16, and with vivi to 3.18).

You have 2 options at this point. Either go with the new kernel, and install the headers for that, and then rebuild missing drivers, or readd the repository list to apt from the old ubuntu distro, and install the missing headers.


You can get this better output by asking for more verbose version output (-V, --verbose-versions, see man apt-get):

# apt upgrade -V
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
   apt (1.6.2 => 1.6.8)
   base-files (10.1ubuntu2 => 10.1ubuntu2.3)
   bsdutils (1:2.31.1-0.4ubuntu3.1 => 1:2.31.1-0.4ubuntu3.3)
   [...]
   util-linux (2.31.1-0.4ubuntu3.1 => 2.31.1-0.4ubuntu3.3)
26 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 8002 kB of archives.
After this operation, 46.1 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Also see apt list --upgradable (has highlighted output!):

$ apt list --upgradable
Listing... Done
apt/bionic-updates 1.6.8 amd64 [upgradable from: 1.6.2]
base-files/bionic-updates 10.1ubuntu2.3 amd64 [upgradable from: 10.1ubuntu2]
[...]
util-linux/bionic-updates 2.31.1-0.4ubuntu3.3 amd64 [upgradable from: 2.31.1-0.4ubuntu3.1]


OK, so I Installed package ubuntu-restricted-extras:sudo apt-get install ubuntu-restricted-extras

Then ran: sudo /usr/share/doc/libdvdread4/install-css.sh

All seems to be working now.

Thanks for looking anyhow


Can't get ATI HD 6310 driver working for 11.10

There is a post already explaining how to add/remove/revert ATI drivers in your system

How to install, remove, revert ATI drivers on my
system

Your card is supported by both the open-source or the fglrx driver so you are able to choose.

Since you already installed several versions of the driver in your system I recommend you follow the section to remove the driver completely and revert to the open-source one before trying to install the fglrx driver again.

The recommended version is Catalyst 11.12, they are very stable and fast compared with previous version when using Unity or Gnome-Shell.


Restrict access to my home folder from another standard user account

One way would be logging in as your user, open up a terminal (hit Ctrl+Alt+T), type

chmod go-rwx ~

and hit enter.

Like that you deny the permission to read, write and cd to your home directory to anybody apart from you.


Will an Ubuntu Live USB be Able to Access a Windows RAID 10?

Try GParted partition editor

I know that there are some live CD options, the new Ubuntu comes with GParted Partition editor, but if you don’t want to download the whole thing, you can just download the GParted partition editor live CD from http://gparted.org/livecd.php


Lightdm does not start at boot, it will start after stop/starting the service

The same occurred on my Ubuntu 16.04 machine, but looking at my start log I saw an error with sddm. Maybe I installed it with kde-plasma, but I don't remember turning it on.

Just run sudo apt remove sddm and lightdm start at boot again.


How Can I Install Office 365 and AVG Without Using Virtual Machine on Linux/Ubuntu?

Installing Windows application on Ubuntu is surely not the best way to work. You can try wine and playonlinux as Office 2013 seems officially supported. Wine website indicate that it's possible to install Office 2016, but it's a little bit tricky.

Some very nice alternative are existing of you don't want to use Microsoft Office. You can try WPS Office that give a similar look and good compatibility with Office documents.

Regarding AVG, it's definitely not a good idea. Antivirus have a deep implication with the operating system, and will be probably not possible to be installed with wine anyway. You should choose a native antivirus like ClamAV, but it will be more useful to avoid passing virus to other Windows computers than protecting Ubuntu.


Ubuntu Server 20.04 - Netplan configuration for dynamic IPv4 and static IPv6

I finally found my answer on the OVH Community post VPS en IPv6? Gateway?
The correct configuration (for this particular situation) is:
network:
    version: 2
    ethernets:
        ens3:
            dhcp4: true
            dhcp6: false
            match:
                macaddress: fa:16:3e:33:8d:59
            set-name: ens3
            addresses:
              - 2402:1f00:8100:400:0:0:0:c1/128
            gateway6: 2402:1f00:8100:0400:0000:0000:0000:0001
            routes:
              - to: 2402:1f00:8100:0400:0000:0000:0000:0001
                scope: link

I don't understand why, but the routes section is needed for netplan to apply a new IPv6 route. gateway6 is not enough.


I am trying to harden our Ubuntu 14.04 server. Can I delete some builtin system users

Pasting from https://www.debian.org/doc/manuals/securing-debian-howto/ch12.en.html

  12.1.12.1 Are all system users necessary?

  Yes and no. Debian comes with some predefined users (user id (UID) <
  99 as described in Debian Policy or /usr/share/doc/base-passwd/README)
  to ease the installation of some services that require that they run
  under an appropriate user/UID. If you do not intend to install new
  services, you can safely remove those users who do not own any files
  in your system and do not run any services. In any case, the default
  behavior is that UID's from 0 to 99 are reserved in Debian, and UID's
  from 100 to 999 are created by packages on install (and deleted when
  the package is purged).

Please take a look at the above link for details on this.


How to disable Fn key on Acer Aspire (Ubuntu 18)

Acer handles the way Fn key function in the Bios, what is your bios version, if you never updated your bios than most likely you running version 1.0 or 1.01 if you are update your bios and check again to see if the options are there.


I've found the answer, while moving things around the difference i noticed that only a few Windows actually let you set the, always on top , it has to be s non full screen window.  So the problem is given by making the window small again, then slowly move each side to the edges and top and bottom as far as it will go without actually maximising that window, then you can force an always on top, when u leave that page to go to another session window, the go back and it has remained open and in the screen fixing my original problem.

Even though no one did, thanks for the help and other suggestions. I enjoyed trying them all until i accidentally found this sort method which kinda bypassed one of the true trucking it to be fun screen when it isn't.


How to change Ubuntu 17.04 to Linux Mint?

Mint and Ubuntu are 2 completely different distributions (although Mint is based off Ubuntu) and there is no real way of installing Linux within Linux like you can Windows within Windows. It would be a nice feature though.

As it was mentioned already, you have to install Mint from scratch. I dont believe changing repos will help at all because i believe when updating or installing software, it checks your distribution and if you try to install it on an unsupported distribution, it wont work anyway. You might even break you OS and need to start from scratch anyway.

Best to just do it from scratch :)


You can delete the /var/lib/dhcp/dhcp.leases file. A good time to do it would be just after a re-boot, before any clients obtain a lease.

The dhcpd server will try to re-use old leases as much as possible, and will use unused IP addresses from the pool before using even expired leases. The advantage is users will tend to get the same IP address, even if their computer is not on the network very often. The disadvantage is that the leases file can get a bit messy over time.


VirtualBox: how to capture screen shots of Ubuntu 11.10 guest on Windows hosts using Ubuntu Shutter utility?

In past versions I have known that the problem is actually with Compiz and doing the screenshot from within virtualbox. So Virtualbox + Compiz inside Guest = Black/White Screen.

You need to either use Ubuntu 2D or disable 3D effects in Virtualbox for that Guest.

Now it would be nice to see if you can test the following:

Windows Host with Ubuntu Guest - Try Screenshot of Ubuntu
Ubuntu Host with Windows Guest - Try Screenshot of Ubuntu
Ubuntu Host with Ubuntu Guest - Try Screenshot of Ubuntu

In all 3 cases activate/deactivate 3D effects (Compiz)


Try wrapping the listener in anonymous function like this:

canvas.addEventListener("touchstart", function() {touchStart;}, false);


Does the lense for videos search youtube correctly

Video lens [..] only supports YouTube Shows, Movies and Educations,
  so most YouTube results won't show up in the default Ubuntu video
  lens.

http://www.webupd8.org/2012/10/alternative-youtube-video-lens-updated.html


So eventually I answered my question. The command which I needed to execute was :

make -C /lib/modules/`uname -r`/build M=/home/foo/projects/kernel/linux-hwe-4.10.0/drivers/net/wireless/realtek/rtl8xxxu/

After that doing modinfo shows the correct thing and the module can be inserted:

modinfo /home/foor/projects/kernel/linux-hwe-4.10.0/drivers/net/wireless/realtek/rtl8xxxu//rtl8xxxu.ko | grep vermagic
vermagic:       4.10.0-38-generic SMP mod_unload


Counting distinct values

AFAIK there's still no built-in formula to count distinct values in a range. But there are different formulas around that do the same. I've tested two formulas working fine with your example data in LibreOffice 3.5:

The first is (courtesy Bigyan Bhar):

=SUMPRODUCT((Data<>"")/(COUNTIF(Data;Data)+(Data="")))
The second, more complex one, is an array formula, so you need to hit CTRL+SHIFT+ENTER after you entered it (courtesy David Chapman):

=SUM(IF(FREQUENCY(IF(LEN(Data)>0;MATCH(Data;Data;0);"");IF(LEN(Data)>0;MATCH(Data;Data;0);""))>0;1))

each with "Data" replaced by the range to evaluate.

Listing distinct values

To list distinct values, just define a filter on the input range, excluding duplicates:

(There's currently a bug in libreoffice preventing the user from disabling the "Range contains column labels" checkbox, but it will be fixed in 3.5.2.)


Download the .deb from here (choose ubuntu 12.04)
Then install it : sudo dpkg -i "path to deb file"


The answer is no, or I have understood you completely wrong.

xdg-open
xdg-open is in the package xdg-utils and neither firefox or chrome or transmission depends on the package

gnome-open
gnome-open is in the package gnome-open and also here, neither firefox or chrome or transmission depends on the package


It's most likely that root has claimed ownership of the drive.
Run this:
Code:

sudo chown -R $USER:$USER <Mount Point>

Where mountpoint is the directory where the drive is mounted. That'll make you the owner of the drive.

If you just want to add write permissions you could run:
Code:

sudo chmod -R +w <mount point>

  One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. -Elbert Hubbard


No, Unity mail doesn't support POP3 only IMAP4 and Hotmail doesn't support IMAP4.

  The application works with any IMAP4-compatible server, but the quicklists currently work with Gmail only (so you'll have to edit the launcher if you want quicklists for a different mail service).

Source.

And from the Launchpad project page:

Mail count and notifications for Ubuntu desktop

Features:

Works with any IMAP4-compatible server
Multiple accounts support
Unread messages count on the Launcher
Unity Quicklist support (GMail URLs by default)
Messaging Menu integration
NotifyOSD notifications


How can I set permissions so that a user cannot delete their home directory?

Like what @steeldriver said, users should not be able to delete their home directory, as /home is owned by root. I have tested this on my Ubuntu machine to confirm the logic holds up :D

EDIT:
Ok, so here's an example:

# As root
mkdir outerDir # The wrapper dir
mkdir outerDir/innerDir # The directory you want the user to have access to, but not delete
chown youruser:youruser outerDir/innerDir # Change ownership to your user

Since /home is already owned by root, youruser should be able to create & edit files & such within /home/youruser, but not delete /home/youruser itself

You also need to watch for permissions. Your outer directory, or /home, should be readable by all users, but only writable by root, and the inner directory, or /home/youruser, should be readable & writable by your user, but not by any others. An example of this with chmod:

# As root
chmod 755 outerDir # Make the outer directory readable by all
chmod 700 outerDir/innerDir # Make the inner directory only accesible to the user who owns it

The numbers I gave are in the order of user, group, and other. 7 means it's readable, writable, and executable. 5 means it's readable and writable, and 0 means no access, so 755 means it's readable, writable, and executable by the user who owns the file, and readable and executable by the group that owns it & everyone else; 700 means it's readable, writable, and executable by the user that owns it, and by nobody else. If you want to read more about chmod, try this, it's just the first result Googling "chmod"


Errors were encountered processing libreoffice-common

I found out that this is A Confirmed Bug

If you are running antivirus... like sophos, you need to disable on demand scanner and then update your system and then re enable your on demand scanner.

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1454668


If you look at the link you posted (https://packages.ubuntu.com/disco/sni-qt), it relied on Qt4 which is EOL & no longer supported.

The software either needed to be ported to Qt5 or removed as it cannot run in later releases.

libqt4-dbus (>= 4:4.6.1)
       Qt 4 D-Bus module
libqtcore4 (>= 4:4.7.3-1ubuntu3~)
       Qt 4 core module
libqtgui4 (>= 4:4.8.7)
       Qt 4 GUI module

fyi: Qt 5.0 came out back in 2012


Can you run "sudo passwd root" in the terminal? This should allow you to create/reset a root password using your own. Worst case, you can always use "passwd root" from recovery mode. (Your fs will have to be mounted in read/write mode.)


I got mine working as follows in (13.10):

echo 'options uvcvideo quirks=0x100' | sudo tee -a /etc/modprobe.d/uvcvideo.conf

www.linux-hardware-guide.com


For Installing Horizon dashboard and configure please try this link below
Surely this will works..
[1] http://ubuntu-cloud-installer.readthedocs.org/en/latest/single-installer.guide.html
[2] http://www.server-world.info/en/note?os=Ubuntu_14.04&p=openstack_icehouse&f=10
[3] https://answers.launchpad.net/horizon/+question/210533


Ubuntu Server KVM, Passthrough PCI Device

You need to enable IOMMU in your BIOS.
Here's an eHow guide: http://www.ehow.com/how_7705109_enable-iommu-bios.html
Quoted from above page:

IOMMU (I/O Memory Management Unit) is a feature supported by motherboard chipsets that provides enhanced virtual-to-physical memory mapping capabilities, including the ability to map large portions of non-contiguous memory. IOMMU can be enabled in the motherboard's BIOS, in order to resolve issues with virtual machine device drivers.
Reboot the computer and note the key specified to access or enter "Setup" in the initial boot message displayed when the computer first boots.
Reboot the computer and immediately press and hold down the keyboard key or keys specified in the initial boot message. Note the navigation keys specified in the BIOS setup screen that appears. Usually the keys specified are the "Up," "Down," "Left," and "Right" arrow keys to move the cursor, "Page Up" and "Page Down" to highlight a selection in a list, the "Tab" key to move horizontally through settings, and the "Enter" key to select a highlighted setting.
Navigate through each BIOS screen using the "arrow" keys and find the "IOMMU," "I/O Memory Management Unit," or "Intel ® VT-d"setting (usually located under the "Advanced" or "Chipset/Northbridge/Tylersburg IOH/Intel VT for Directed I/O Configuration"settings menu). Move the cursor over the setting selection box using the "arrow" keys and press the "Page Up" or "Page Down" or specified key to select "Enabled."
Press the "F10" key or navigate to the "Exit" menu using the "arrow" keys and move the cursor to the "Save and Exit" item and press the "Enter" key. Move the cursor to the "Yes" selection when confirmation to save settings is presented and press the "Enter" key to save the setting.


sudo fsck -f /dev/sda1 returns not found on 18.04

So the problem is sudo? Maybe it is not installed?

  apt-get install sudo

Then try to update.


Ubuntu 19.10 has no working Keyboard or Mouse for Raspberry Pi 4 Model B, only works for Raspberry Pi 3 Model B+

If you don't want to wrangle patches or wait for them to be released, a workaround may be found in this thread, in one of leggazoid's posts of 10/20:

https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=254649&sid=a82437abaa7e64ee930c7b4040eba764&start=25

Here's the good part, which worked on my 4GB Rpi 4 [edited for clarity]:

Set total_mem=3072 in /boot/firmware/usercfg.txt
(If you mount the sd card in another computer, the usercfg.txt is on the small vfat partition.)


How to show the login screen instead of the lock screen?

To create the shortcut

Go to the Settings Manager from the menu.
Go to Keyboard.
In the Application Shortcuts tab press on Add.
Enter dm-tool switch-to-greeter then press OK.
Press the desired hotkey.

To run a command after 2 idle minutes

Create a bash script, containing:

#!/bin/bash

# The target may depend on your system. i8042 is mouse and keyboard on mine.
log=/proc/interrupts
target=i8042

measure_activity()
{
    count=$1
    interrupts_start=`grep $target $log | awk '{ print $2 }'`
    interrupts_stop=`sleep 1 && grep $target $log | awk '{ print $2 }'`

    if [ "$interrupts_start" == "$interrupts_stop" ] ; then
        ((count++))
        if [ $count -eq 120 ] ; then
            dm-tool switch-to-greeter
            measure_activity 0
        else
            measure_activity $count
        fi
    else
        measure_activity
    fi
}

measure_activity 0 &

Make it executable.
Add it to Application Autostart tab of Session and Startup.

P.S.: I've got the script from here and I edited it for you.


Run a program remotely using SSH, but show output on connected monitor

The easiest way to accomplish this is using Byobu. It is an optimal combination of screen and tmux, with the added advantage of being actually usable without learning esoteric keyboard combinations.

On the server, do the following:

log in with the same user you will use via SSH
run byobu

Via SSH, do the following:

log in
run byobu

You are now in the same Byobu session because there is only one per user. Everything you do will get shown also on the monitor connected to the server.
launch htop
detach the Byobu session by pressing F6
log out from the SSH connection with Ctrl+D


There's not too much information in your question. Try updating to a more recent version, the Github is at 2.2.11 and Ubuntu disco repos are at 2.2.10. If that doesn't work perhaps make an issue at https://github.com/apple/cups/issues.


Opening a terminal and running the following commands will restart the panel:

gconftool --recursive-unset /apps/panel
rm -rf ~/.gconf/apps/panel
pkill gnome-panel

Source: http://ubuntuforums.org/showthread.php?t=766281


Open pulse audio gui with pulseaudio in your terminal (or search for  pulseaudio)

As you can see in the following screenshot, you need to select Input Devices or Dispositivos de Entrada, choose the correct microphone (the one plugged in) and unmute it with the highlighted button.

Then you will see that the microphone picking up the sound as in the below picture

Then select recording and configure your mic for the desired application. Every application (for ex. skype, spotify etc..) can have a different configuration and have different audio settings. You could mute skype, but unmute a different application.


configuring internet in ubuntu12.10 Lenovo G580

I suggest wire connection for your first time. Generally it works if you just connect cable. Otherwise you have to configure your wire connection from the connection icon on the top. Then you have to go connection manager and modify IPv4 settings with your router's configuration.


Subprocess post-installation script for install-info returned an error after installing Teamviewer

Turns out that the process had removed Bash from the system.
If you have the same problem, follow the instructions here.

The basic procedure is as follows:

Go to the directory:

cd /var/cache/apt/archives

Find the corresponding deb for bash. On 12.04, it may look like

bash_4.2-2ubuntu2_amd64.deb


Why can I not keep instances of Firefox from two different machines separate anymore?

Found this on ubuntu forums. Seems to be a firefox specific thing... BTW, proposed solution is executing firefox with the -no-remote option to force it not looking for an already running instance. Can't test it now but seems reasonable.


A screen is asking which kernel to run for your system.Try the first one (3.13.0 -43), as it is the latest one with the newest improvements. If you have problems with it try 3.13.0-23 or 3.13.0.-40.

Recovery mode should be chosen when you have encountered any problems while working in the system.I think  is not necessary for you now.

For the flash problem, firstly I recommend you to check whether you have enabled Canonical partners repository.Also make sure you have installed ubuntu-restricted-extras.


How to change FAT32 sort order on drive?

You might want to use fatsort which is available in Ubuntu and was designed to solve your exact problem.
Cheers,


If you happen to install Foxit via their official download site, then the uninstall process is piece of cake.

Once you extract the setup file provided by official website, there will be an uninstaller located in the installation directory. You can simply run the file to bring up uninstall wizard.

By default, the main installation folder is $HOME/opt/foxitsoftware/foxitreader, where $HOME was your /home directory.


sudo apt-get install python3.5-gdbm

helped me


What's the difference between ` cp ` and ` rsync `?

Being brief (a small book could be written on the topic), maybe it is useful to think like this:

cp is for duplicating stuff and by default only ensures files have unique full path names
rsync is for synchronising stuff and uses the size and timestamp of files to decide if they should be replaced. It has many more options and capabilities than cp

Using their various options, you can use either of them for many tasks, for example cp -u can replace only files that are newer, as rsync is used to do.

But there are some tasks where one has advantages over the other

You might as well use cp when you want to make a local duplicate file or directory. For example, you want to edit an important file, so you make a backup first:

cp .bashrc bashrc-bak

Making rsync do this would require three more keystrokes, so why bother? If you want to duplicate a directory

cp -r ~/Desktop/cakes ~/Recipes/cakes

serves you well. Why bother typing rsync -a? Well you might, since its -v verbose option gives more interesting and useful output.

However, let's say you're updating a backup of some directory on your system on a flash drive. The directory already exists on the flash drive, and you just want to sync the files so it has the latest version of your stuff. rsync is much faster than cp for this, because it will check file sizes and timestamps to see which ones need to be updated, and you can add more refinements. You can even make it do a checksum instead of the default 'quick check', although this will take longer.

You can also use rsync to copy or sync files to a remote machine, or make is run as a daemon. Humble cp can't do such fancy things.

To learn the options and syntax ("structure"?) (which is very similar) read man and info pages and practise!


Is there a command line for Google Hangouts?

Yes, there is a github repo for this by tdryer written in python called Hangups.

Installation is via pip3:

Update first:

sudo apt update

Install pip3 if absent:

sudo apt install python-pip

Install hangups:

pip3 install hangups

Information:

Usage

Github Repo


Ask only for hostname in an Automated Server Install

A few options for possibly setting the hostname below. The first is the one I can propose which asks for the hostname. The others are ways you might provide it.
1. Interactive Sections
From AutomatedServerInstalls, you can mark a section as interactive. It also says that any values provided under interactive sections will be used as default values. Interactive sections may also prevent automatic reboot, but also make the locale section interactive if any sections are interactive.
It appears that you can set the identity section interactive. This may force you to agree to the username and password values, but they should be defaults.
The start of your autoinstall file might look like:
#cloud-init
version: 1
interactive-sections:
 - identity
identity:
    hostname: hostname
    username: username
    password: $crypted_pass

If using an interactive section, I believe you are prompted to reboot. Pressing Alt-F2 to get to another prompt may allow you to run a script or commands to set hostname.
2. Late Commands
There is also a late-commands section. An example from Ubuntu Server 20.04 autoinstall shows where you can issue commands towards the end of the install. Perhaps you can figure out how to modify the hostname automatically at the end.
  late-commands:
    - echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
    - sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="net.ifnames=0 ipv6.disable=1 biosdevname=0"/' /target/etc/default/grub
    - curtin in-target --target /target update-grub2

3. user-data Section
Also in both of the links I referenced there is a user-data section. The documentation in AutomatedServerInstalls say that if you include this portion you do not need to include an identity section. Perhaps you can configure hostname in here, but you may have to setup users fully here as well. There is discussion of using this feature in this launchpad bug. The poster shares their auto-install config in this post, but I've got a part of it here for posterity.
  user-data:
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
    username: ubuntu
    hostname: ubuntu-server
    users:
      - gecos: ubuntu
        groups: [adm, cdrom, dip, plugdev, lxd, sudo]
        lock-passwd: false
        name: ubuntu
        passwd: <SOME_PASSWORD_STRING>
        shell: /bin/bash
        sudo: ALL=(ALL) NOPASSWD:ALL
        ssh_authorized_keys:
          - ssh-rsa <SOME_RSA_KEY>


Copy utuntu.iso to pc then intall it by a usb

You can

download USB installer from
pendrivelinux.com.
Select the
Ubuntu ISO that you have on your Windows partition and create a
LiveUSB of Ubuntu.

Please refer to detailed instructions here.


Can I upgrade release without installing all package updates?

Unfortunately, you can't safely upgrade if you're holding back packages for any reason.
You will need to install the updated xserver-xorg-core in order to upgrade to a newer version of the package.  You may be able to 'downgrade' that package later, but it is unlikely.  Unfortunately, there's no way around this - the upgrade script assumes that you're on the latest version, and needs that 'latest version for your release' in order to reliably upgrade you to the next release.


Dual monitor resolution is ok, but display is stretched in ubuntu 15.10

Install the latest official NVIDIA drivers version (as of writing this today ... it is version 355.11).

Open a terminal and execute the following commands :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355
sudo reboot

In case you use a computer with a switchable graphics solution install Optimus support as well :

sudo apt-get install nvidia-prime

Note : If you had proprietary NVIDIA driver already installed you should remove them before ...

sudo apt-get purge nvidia*
sudo reboot


Open for edit the /etc/grub/default file with:

gksudo gedit /etc/default/grub

Locate the value:

GRUB_CMDLINE_LINUX=""

and change to:

GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"

Save the file, then run: sudo update-grub

Reboot, and see if worked.


Error Installling an OS in Virtual Box in Ubuntu

As per the comment, you should first try to toggle the setting within BIOS.

The BIOS is a special program hardwired into your computer which you can access by pressing the appropriate keys (usually F2 or delete) during the first few seconds of startup--and before the OS itself starts.

Once you get into the BIOS, you need to try and look the setting within the BIOS menus. If you haven't done this sort of thing before, you may find it a bit daunting at first.

Anyway, give it a good attempt. See, how you go.


How can I get my script to change my background?

As this answer suggests, gsettings needs the DBUS_SESSION_BUS_ADDRESS to be set correctly. The following python function is based on that answer and the comments:

def setDbusSessionBusAddress():
    pid = subprocess.check_output(["/usr/bin/pgrep", "-u", os.environ["LOGNAME"] , "gnome-session"]).decode("utf-8").strip()
    environment = open("/proc/" + pid + "/environ")
    dbusSessionBusAddress = re.findall("DBUS_SESSION_BUS_ADDRESS=([^\x00]*)", environment.read())[0]
    os.environ["DBUS_SESSION_BUS_ADDRESS"] = dbusSessionBusAddress

Note that you need to additionally import re. Call this function before the gsettings call.


How can I proxy game traffic (UDP and TCP) through a remote Ubuntu server?

I wouldn't do it at the host level with vpn clients, I would do it at the network level with an in-line fix...that way your proxying can't be detected by the client software.

So the reference to openvpn is partially correct.  I would, however, use openswan if you are going to support more than two users in the future.

Look into site to site vpns with openswan and you should be able to work out exactly what you want.


Right Click
Properties
Open With
Found the app you want

BTW I found a site for you which is pretty helpful for newbies to ubuntu, check it out


Installing Ubuntu Server 12.04.3 using Raid 1, Need a step by step guide

You can use Live-CD open ubuntu terminal and follow following steps.

  sudo su

Then install mdadm

  apt-get install mdadm

Using mdadm command to create raid1

  mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2
  /dev/sdb1 /dev/sdc1

Don't forget change /dev/sdb1 and /dev/sdc1 to match with your drive. And using the same command match all your partitions.

Then save raid configuration by using.

  mdadm --detail --scan >> /etc/mdadm/mdadm.conf

That's it.

PS. Sometime I have to download installation from USA source because it won't allow me config raid


having different operating systems on ubuntu

You can do it, but usually it is best to install first windows 7, and then ubuntu.

It is possible to install windows 7 after installing ubuntu, but I had all sort of problems, and needed to reinstall windows each month.
Anyhow you can try, you will need at least 20 GB of free space, preferably on a new partition. After installing it, here you can find how to restore grub:
Recovering GRUB after installing Windows 7?


How to access hard drive using terminal?

Yes you can.
Anything that you can do in a windows shell/command line, you can also do in Ubuntu, although sometimes the commands are different, say, for example, to list directories, in Windows, you use dir, whereas in Unix based systems like Ubuntu, you use ls.

Here's a snippet from this page of how the basic file and directory navigation commands:

  The tilde (~) symbol stands for your home directory. If you are user, then the tilde (~) stands for /home/user
  pwd: The pwd command will allow you to know in which directory you're located (pwd stands for "print working directory"). Example:
  "pwd" in the Desktop directory will show "~/Desktop". Note that the
  GNOME Terminal also displays this information in the title bar of its
  window. A useful gnemonic is "present working directory."
  ls: The ls command will show you ('list') the files in your current directory. Used with certain options, you can see sizes of files, when
  files were made, and permissions of files. Example: "ls ~" will show
  you the files that are in your home directory.
  cd: The cd command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the
  file system you will use cd. Examples:

  To navigate into the root directory, use "cd /"
  To navigate to your home directory, use "cd" or "cd ~"
  To navigate up one directory level, use "cd .."
  To navigate to the previous directory (or back), use "cd -"
  To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, "cd
  /var/www" to go directly to the /www subdirectory of /var/. As another
  example, "cd ~/Desktop" will move you to the Desktop subdirectory
  inside your home directory.

  cp: The cp command will make a copy of a file for you. Example: "cp file foo" will make an exact copy of "file" and name it "foo", but the
  file "file" will still be there. If you are copying a directory, you
  must use "cp -r directory foo" (copy recursively). (To understand what
  "recursively" means, think of it this way: to copy the directory and
  all its files and subdirectories and all their files and
  subdirectories of the subdirectories and all their files, and on and
  on, "recursively")
  mv: The mv command will move a file to a different location or will rename a file. Examples are as follows: "mv file foo" will rename the
  file "file" to "foo". "mv foo ~/Desktop" will move the file "foo" to
  your Desktop directory, but it will not rename it. You must specify a
  new file name to rename a file.

  To save on typing, you can substitute '~' in place of the home directory.
  Note that if you are using mv with sudo you can use the ~ shortcut, because the terminal expands the ~ to your home directory. However,
  when you open a root shell with sudo -i or sudo -s, ~ will refer to
  the root account's home directory, not your own.

  rm: Use this command to remove or delete a file in your directory.
  rmdir: The rmdir command will delete an empty directory. To delete a directory and all of its contents recursively, use rm -r instead.
  mkdir: The mkdir command will allow you to create directories. Example: "mkdir music" will create a directory called "music".

  Here is an example of when it would be necessary to execute a command
  with administrative privileges. Let's suppose that another user has
  accidentally moved one of your documents from your Documents directory
  to the root directory. Normally, to move the document back, you would
  type mv /mydoc.odt ~/Documents/mydoc.odt, but by default you are not
  allowed to modify files outside your home directory. To get around
  this, you would type sudo mv /mydoc.odt ~/Documents/mydoc.odt. This
  will successfully move the document back to its correct location,
  provided that you have administrative privileges.


Ubuntu 18.04 Black Screen after Blanking Screen

Andrew. I experienced something similar to what you're getting. I have 18.04 with  Linux 4.15.0-29-generic. This started to happen to me after I did install Nvidia Proprietary Drivers. If you updated from 16.04 where you were using proprietary drivers it can be the problem.

I would suggest to remove all the "Nvidia" drivers.

sudo apt-get --purge remove nvidia*

And maybe reconfigure X server.

sudo service gdm3 stop
sudo dpkg-reconfigure xserver-xorg

Helped me. Had it working with Nouveau.


Setting a virtualbox with a functional shared folder

I ran into the same system error but my guest OS is Windows 10.
My issue was the wrong version of the VBox Extension Pack on the Ubuntu host.

Check your VBox version via 'Help' - 'About' and the version of your extension pack in 'Files' - 'Preferences'.

After I did a downgrade on my host and reinstalled the Guest Additions in my Win 10 guest my shared folder showed up even without running the 'net use' command.

Hope it helps you if your still facing the issue!

Cheers


How do I install NVIDIA and CUDA drivers into Ubuntu?

Ubuntu 18.04, CUDA 10.1, libcudnn 7.5.1 and NVIDIA 418.67 drivers

Notes

2021-01-07: Please use the 20.04 installation below moving forward as the steps are the same for both 18.04 and 20.04.

2019-06-23: Recent updates with either the CUDA 10.0 or 10.1 versions the NVIDIA 418.67 driver, that installs with it, no longer has the 32bit libraries included and this will cause Steam and most games to no longer work. The version of libnvidia-gl-418:i386 only installs the 418.56 version which will not work with the 418.67 driver.  Hopefully NVIDIA will release an update for that soon. I have added the info at the bottom of this answer in the .run file install part of how to download just the run file for the CUDA installer then you can use whatever driver you want.  The run file is 2.3GB in size, so it might take a bit to download.

CUDA 9.x is not available through NVIDIA's ubuntu1804 repo.  I did however write an answer for CUDA 9.2 at https://askubuntu.com/a/1086993/231142

Installing CUDA through the repository (instead of the .deb installation)
The following lines you can copy and paste to a terminal window.  Press Ctrl+Alt+T to open a terminal window.
Remove and update
Remove any CUDA PPAs that may be setup and also remove the nvidia-cuda-toolkit if installed:
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt remove --autoremove nvidia-cuda-toolkit

Recommended to also remove all NVIDIA drivers before installing new drivers:
sudo apt remove --autoremove nvidia-*

Then update the system:
sudo apt update

Add and install
Recently, I just found out that the CUDA installation works with the graphics-drivers ppa so if you don't have it added, add it now:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

The install the NVIDIA driver.  For this we are going to use the 440 driver
sudo apt install nvidia-driver-440

Now, install the key:
sudo apt-key adv --fetch-keys  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub

Add the repos:
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'

sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'

Update the system again:
sudo apt update

Install CUDA 10.1:
sudo apt install cuda-10-1

It should be installing the NVIDIA 418.40 drivers with it as those are what are listed in the repo.  See:  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
Install libcudnn7 7.5.1:
sudo apt install libcudnn7

Tune environment and reboot
Add the following lines to your ~/.profile file for CUDA 10.1
# set PATH for cuda 10.1 installation
if [ -d "/usr/local/cuda-10.1/bin/" ]; then
    export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

Reboot your computer.
Check your settings
Check NVIDIA Cuda Compiler with nvcc --version:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168

Check libcudnn version /sbin/ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep libcudnn:
terrance@terrance-ubuntu:~$ /sbin/ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep libcudnn
    libcudnn.so.7 -> libcudnn.so.7.5.1

Check NVIDIA driver with nvidia-smi:
terrance@terrance-ubuntu:~$ nvidia-smi
Wed Jan 29 12:41:02 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.48.02    Driver Version: 440.48.02    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 750 Ti  Off  | 00000000:02:00.0  On |                  N/A |
| 40%   34C    P0     1W /  38W |    163MiB /  2000MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1993      G   /usr/lib/xorg/Xorg                           158MiB |
|    0      2502      G   compton                                        1MiB |
+-----------------------------------------------------------------------------+

.run file install
Install driver
By using the sudo add-apt-repository ppa:graphics-drivers/ppa you can install the 430.26 newest driver or any that suit your fancy.
Install libcudnn7
Add the Repo:
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda_learn.list'

Install the key:
sudo apt-key adv --fetch-keys  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub

Update the system:
sudo apt update

Install libcudnn7.5.1:
sudo apt install libcudnn7

Download the .run file
Now download the cuda_10.1.105_418.39_linux.run from https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=runfilelocal
If you want CUDA 10.2 the download instructions are here:  https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=runfilelocal  Then follow through with the same steps as below but make sure to update to 10.2 instead of 10.1.
Then run the installer:
sudo sh cuda_10.1.105_418.39_linux.run

Type in accept and press enter on this screen:
┌──────────────────────────────────────────────────────────────────────────────┐
│  End User License Agreement                                                  │
│  --------------------------                                                  │
│                                                                              │
│                                                                              │
│  Preface                                                                     │
│  -------                                                                     │
│                                                                              │
│  The Software License Agreement in Chapter 1 and the Supplement              │
│  in Chapter 2 contain license terms and conditions that govern               │
│  the use of NVIDIA software. By accepting this agreement, you                │
│  agree to comply with all the terms and conditions applicable                │
│  to the product(s) included herein.                                          │
│                                                                              │
│                                                                              │
│  NVIDIA Driver                                                               │
│                                                                              │
│                                                                              │
│  Description                                                                 │
│                                                                              │
│  This package contains the operating system driver and                       │
│──────────────────────────────────────────────────────────────────────────────│
│ Do you accept the above EULA? (accept/decline/quit):                         │
│ accept

Unselect the driver and then choose Install by using the arrow keys and space bar to move and select or unselect:
┌──────────────────────────────────────────────────────────────────────────────┐
│ CUDA Installer                                                               │
│ - [ ] Driver                                                                 │
│      [ ] 418.39                                                              │
│ + [X] CUDA Toolkit 10.1                                                      │
│   [X] CUDA Samples 10.1                                                      │
│   [X] CUDA Demo Suite 10.1                                                   │
│   [X] CUDA Documentation 10.1                                                │
│   Install                                                                    │
│   Options                                                                    │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │

Wait for the install to finish, it might say errors during, but not to worry.
Tune environment and reboot
Add the following lines to your ~/.profile file for CUDA 10.1
# set PATH for cuda 10.1 installation
if [ -d "/usr/local/cuda-10.1/bin/" ]; then
    export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

Reboot the system for the changes to take effect.


i8kutils i8kmon uses wrong thresholds after resuming from suspend

Figured out what was wrong. Apparently when going to sleep and resuming the i8kfan settings are not retained and control is given back to BIOS or whatever controls the fans by default. Having i8kfan 0 0 automatically run on resume fixes the issue.


16.04 - Gnome Software will not open. Flashes icon in launcher and then closes

I have the same problem using Ubuntu 16.04, So i install Centro de software de Ubuntu v 15.12 and it work.

sudo apt install software-center

and then

software-center

finally I get the icon at side. That solves the problem for now.


HP laptop battery malfunctioning after insatlling ubuntu

The reason why is your battery has lost half its capacity and is going bad. Your battery is at this capacity you should replace it     capacity:            56.5% use these things for more battery powertop tlp and pop os graphics switcher https://support.system76.com/articles/graphics-switch-ubuntu/ you also need to install nvidia drivers


Unable to record sound with RecordMyDdesktop

I'd suggest using Kazam, it worked on first try, and you can also easily select 2 sound sources for recording. I had also huge problems with recordmydesktop, to also record my sound.


May I know which version skype you are using.
And let me tell you one thing from past few months, Skype keeps upgrading its version (almost every week) it releases a new version. I would suggest you to upgrade the Linux Skype version.
TRY THE BELOW COMMAND.
sudo apt-get install skypeforlinux .
Hope this will fix your issue.


There are a number of ways to find the location of executables - for example:

dad@dad-VirtualBox:~$ which xcompmgr
/usr/bin/xcompmgr
dad@dad-VirtualBox:~$ ls -l /usr/bin/xcompmgr
-rwxr-xr-x 1 root root 30356 2010-05-13 07:06 /usr/bin/xcompmgr

If you want xcompmgr to start-up automatically you will not need to worry about including the exact & full path to the executable since it /usr/bin is a standard path location.  See my linked answer on how to add xcompmgr to the startup script for lubuntu

Linked Question:

How to start applications such as xcompmgr at start up?


Boot into emergency mode because of nouveau: Error parsing PCC subspaces from PCCT

Solved by disabling fast startup on Windows 10 (dual installation).

To achieve that in Windows open the Control Panel, go to All Control Panel Items > Power Options > System Settings > Change settings that are currently unavailable (UAC) and uncheck Fast Startup (recommended).


Change the cURL response encoding for some characters

I have figured it out. The below solution works fine for me. Thanks.

Adding \ before " in json response , it is required to proceed with python command

output_with_slashes=$(echo "'$output'" | sed 's/"/\\"/g')

Converting \u appended-characters (UTF) to Japanese/special symbol

echo '["'$output_with_slashes'"]' | python -c 'import json, sys; sys.stdout.write(json.load(sys.stdin)[0].encode("utf-8"))'


Could not ping Solaris KVM Guest from another computer

I faced similar issue.
Few findings from my side:

Booted Plain Opensolaris VM, found same issue!
Checked with qemu's site on supported OSes, Solaris 11 Express 2010.11 is supported but with few issues.
Then found this bug: https://bugs.launchpad.net/qemu/+bug/1395217

Solution: https://bugzilla.redhat.com/show_bug.cgi?id=1040500


When I compile a software project from scratch - I normally start with installing the build dependencies for the version there is included in Ubuntu by doing:

sudo apt-get build-dep qemu

That ensures you have all libraries and the headers files your package is depended on. If your own fresh downloaded source don't use any new libraries you should have the needed libraries to build it.

From your errors, it look like you at least need libglib2.0-dev


When you click Open (or press Ctrl+O) in LibreOffice, you should see a window similar to this:

Click the up arrow shown here:

until you reach the root folder /, then double click to open the media folder:

There should be a folder labelled with your user name. If you open it, you'll see a list of external drives (SD cards, USBs, etc):

Most likely, you were smart enough to give your device a label when you first got it (or it came with one) so it should be easy to identify.


I found the problem.

It was that I had

complete -cf sudo

in my ~/.bashrc.

I don't really know what does that mean, but I'm pretty sure I added it a long time ago to make autocompletion work with sudo.

What I think is that the newer versions don't need it anymore, which is a great news! :D

So, this is solved.


You can enable recursion for some clients and disable recursion for others using views, but it is not recommended because you will lose some of the advantages of turning off recursion in the first place. You should use different nameservers for recursive resolution and authoritative service. (The two servers could run on the same machine if necessary.) Still, here's how to do it:

// global options apply to external clients
options {
    recursion no;
    additional-from-auth no;
    additional-from-cache no;
};

view "local" in {
    // view options enable recursion only for local clients
    match-clients { 172.16.45.80/23; 192.168.12.0/24; 127.0.0.1/8; ::1; };
    recursion yes;
    additional-from-auth yes;
    additional-from-cache yes;

    zone "." in {
            type hint;
            file "/etc/bind/db.root";
    };

    // put definitions for zones like "localhost" and "127.in-addr.arpa" here
}

// put definitions for real authoritative zones here.

As for the question in your last sentence, "what process will be performed by the BIND resolve the name request? Iterative or Inverse?", I do not understand the question. A nameserver configured not to offer recursive service will simply refuse to answer recursive queries.


Did you check the ISO/IMG file's MD5SUM? I had experienced a "successful" installation of Ubuntu, but every program randomly crashed. I re-installed Ubuntu again and the same thing happened.

It turned out that the ISO file downloaded was missing a few bits, so the MD5SUM did not match.

I downloaded the image again, checked the MD5SUM, and Ubuntu worked without any problems.

I hope this helps.


Merge root partition with unallocated space

I'm an amateur, but after having used gparted about 200times in the past 20 years i noticed that you don't have a swap partition instead. I always made a swap partition in between before i started to install anything. I wonder where these 9.82 GiBs unallocated came from, i always had about a few MiBs only in between. Also i noticed that you seem to have a 64-Bit-PC with an EFI partition. In 3rd i noticed that the other mentioned one by link had an extended Partition with the flag lba. - PS: I never found out if that flag is necessary or not. Wkr, P.


The official Ubuntu way to install Android studio is this:

$ sudo apt install ubuntu-make
$ sudo umake android


How to install AMD's graphics card RADEON HD 7470M Driver on Ubuntu 13.10

You could try to use the default drivers that come with the distro. Go to "Software & Updates" and under the tab "Additional Drivers" you'll find them.

Depending on you level of expertise, and for better results, I strongly recommend going to http://wiki.cchtml.com/index.php/Ubuntu_Saucy_Installation_Guide


Keyboard not working in Among us (wine) on ubuntu 18.04

I finally found the answer.
Applications --> Language Support

I changed "Keyboard input method system" from ibus to none
Works like a charm!


Failed to fetch index files when tried apt-get update

This is usually not fatal .. as the error message says 'Some' Index files failed to download. Follows the same with 404 package error. you can either ignore this or update repositories and PPAs.

Hit http://in.archive.ubuntu.com vivid-updates/main Translation-en
Hit http://in.archive.ubuntu.com vivid-updates/multiverse Translation-en
Hit http://in.archive.ubuntu.com vivid-updates/restricted Translation-en
Hit http://in.archive.ubuntu.com vivid-updates/universe Translation-en
Hit http://in.archive.ubuntu.com vivid-backports/main Sources
Hit http://in.archive.ubuntu.com vivid-backports/universe Sources
Hit http://in.archive.ubuntu.com vivid-backports/main i386 Packages
Hit http://in.archive.ubuntu.com vivid-backports/universe i386 Packages
Hit http://in.archive.ubuntu.com vivid-backports/main Translation-en
Hit http://in.archive.ubuntu.com vivid-backports/universe Translation-en
Hit http://ppa.launchpad.net vivid/main i386 Packages
Hit http://ppa.launchpad.net vivid/main Translation-en [154 B]
Err http://ppa.launchpad.net vivid/main i386 Packages
404  Not Found
Ign http://ppa.launchpad.net vivid/main Translation-en_IN
Ign http://ppa.launchpad.net vivid/main Translation-en
Err http://ppa.launchpad.net vivid/main i386 Packages
404  Not Found
Ign http://ppa.launchpad.net vivid/main Translation-en_IN
Ign http://ppa.launchpad.net vivid/main Translation-en
Err http://ppa.launchpad.net vivid/main i386 Packages
404  Not Found
Ign http://ppa.launchpad.net vivid/main Translation-en_IN
Ign http://ppa.launchpad.net vivid/main Translation-en
Err http://ppa.launchpad.net vivid/main i386 Packages
404  Not Found
Ign http://ppa.launchpad.net vivid/main Translation-en_IN
Ign http://ppa.launchpad.net vivid/main Translation-en
Fetched 59.6 kB in 29s (1,987 B/s)
W: Failed to fetch http://ppa.launchpad.net/ackondro/tibesti/ubuntu/dists/vivid/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/vivid/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/office/ubuntu/dists/vivid/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/vokoscreen-dev/vokoscreen/ubuntu/dists/vivid/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

The above are the last few lines ,when i run apt-get update in my system.
You need not worry unless it is causing troubles in particular issues (ex:installing some new applications , some file operations etc)

But if you want to be safe then you can try updating your repository source links. This is usually caused if you have outdated sources as your ubuntu repository links. So, updating repositories will solve this error.

Go through This for additional information about Ubuntu repositories.

Follow This link if you want to update repositories and PPAs for your version of ubuntu.

You can even update them by your Ubuntu update manager. How do I restore the default repositories? --follow this link to know how.


Will installing VirtualBox from software center wipe out my VMs?

Re-installing VirtualBox from the software repository should not harm the VM's that you have, although the version of VirtualBox available at Oracle (5.0.10) is substantially newer than the one in the software repository (5.0.4).  I believe the program also checks on occasion for updates, although I have not run VB in quite a while.

Backups: Always a good thing.  Do that more often.  You will find a directory in your home area, probably with a name line virtualbox.   Inside this directory, you will find all sorts of subdirectories names like your virtual machines.  These are in fact, your VMs and an adequate backup, is to backup these directories.  Exporting the appliance is nice, but in my experience does not work too well.


Install GRUB on a different partition on triple boot system

Don't get confused by the fact that GRUB has two parts, one in the master boot record (MBR) for the entire disk, and the other part(s) in the partition of the system that has the menu for GRUB.  The MBR code connects to the partition with the menu. So, you don't just do grub-install to a partition, but also to a disk.

Now, I'm not up on the EFI part, as I don't run Windows at all, and it has not been an issue for me.  Plus, I'm relying on how I did things a while back, but I hope I'm remembering correctly.  Hopefully, this will help explain things enough to at least let you ask more specific questions.

I think what you may need to do is to install the GRUB bootloader into the MBR of both drives, and choose which drive to boot from your BIOS.  One will bring up the menu to choose between Ubuntu and Windows, and the other will boot into Kali.  If you remove one drive, the other will still boot.

The way I used to set it up is to boot from a liveCD, like the install CD for Ubuntu.  The disks you want to modify will need to be mounted, either automatically or by you.  If you use the automatic mounting, it will probably mount in /media/UUID of disk.  Then, you issue a command such as this (assumes the target disk is sda, but you'll have to determine which it is.

sudo grub-install --root-directory=/media/(UUID or directory name) /dev/sda

You are specifying the root directory where the grub menu is, (/boot/grub).  It should have the menu already from previous installation.  Once you can boot, you could run update-grub to regenerate the menu and allow all available operating systems to be accessed, if both disks are present.

I didn't go into a lot of detail for two reasons:  1, I don't know if you need it, and 2, I'm not positive my memory is 100% correct, so if this is what you want to do, either I or someone else can confirm that it will work.


How can I delete time-stamped folders if one has already been created that day?

One backup per day: Don't create more backups if one exists for today

Add a condition that checks if a backup folder for today does not exist. If there is no folder for today then only the cp and mv will be executed.

Note the * at the end of the second folder check. This allows for the time stamp at the end of the folder name, as you have done.

Here is the code fragment:

##!/bin/bash
if [ -d /home/david/nas-backups/mozilla/ ]
  then
  if [ ! -d /home/david/nas-backups/mozilla/backups/.mozilla_"$(date +%Y_%m_%d)"* ]
    then
      echo "No backups found for today: Making one"
      cp -a /home/david/.mozilla ~/nas-backups/mozilla/
      mv /home/david/nas-backups/mozilla/.mozilla ~/nas-backups/mozilla/backups/.mozilla_$(date +%Y_%m_%d_%H:%M)
    else
      echo "Backup folder for today exists. No backups will be made today"
  fi
fi

Hope this helps


Which program is stealing my keyboard events?

You've discovered Compiz' colour inversion feature.

To get rid of it, install the
Compiz Configuration Settings Manager (ccsm) ,

Go to Negate Window Contents
Click on the buttons that says Super+N and M, for each of them

Remove the check mark by Enabled

You can also disable the feature altogether, by removing the check mark in the side bar on the left.


Can someone tell me how to purge android fastboot and adb, and install the latest version?

To remove completely a package :

sudo apt-get purge [package-name]
sudo apt-get autoremove
sudo apt-get autoclean

After doing this you can again go for a fresh installation of any package.

Link I found to install adb and fastboot on windows/linux/mac


Maybe dconf-editor could help you. I found in it an option that could rule the behavior of auto-brightness:

If you want to try, you can check if this option is enable or not installing dconf-editor.

So run this command:

sudo apt-get install dconf-editor

to install it. Now open dconf-editor and navigate to

com.ubuntu.system

Here you can see the auto-brightness option.

I hope this could help you.


Finally, thanks to DimanBG from forum.ubuntu.ru managed to solve this problem. Practically I misunderstood some articles I read while looking for solution.

What i actually did after all and what helped me:

Disabled Secure Boot in BIOS
In GRUB 2 selected "Try UBUNTU..." and pressed "e".
In config that opened I deleted "quiet splash" and instead of it typed "nouveau.modeset=0" (without quotes).

I have an Nvidia GPU so I used "nouveau.modeset=0".

For people with other GPUs these parameters might help:

for Intel: i915.modeset=0
for ATI: radeon.modeset=0


"Access denied for user: 'root@localhost' (Using password: NO)" while running MySQL

Use sudo and your current user's password (because within Ubuntu 18.04 the default authentication method for the MySQL's root user is socket authentication):

$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql>

If I try to log in into mysql DBS without sudo I get the same results:

$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

In order to use mysql -u root -p you need to create mysql_native_password for the MySQL's root user as it is decried here.


quad boot, Windows 7,8, Ubuntu, Kali Linux, Partitioning scheme questions, which boot manager?,please help, lots of questions! thnx

Ok man, sorry for bad English, but at first quad boot with windows OS is not possible why? because windows 7 and 8 make/build an extra primary partition called RECOVERY. Do not forget that SSD does not support more than 4 lprimary partitions, so with Windows 8 and Windows 7 the four primary partition are already made. Second, windows 8 uses GPT instead of MBR disk format(i do not if this is correctly write/wrote) so you have to delete all GPT partition on your disk. Third, disable UEFI and Secure Boot from your BIOS. So, you can format your disk and delete windows 8 and GPT partitions, install Windows 7 or 8, then make two additional partition, and here be careful because you must install first windows and then kali linux and the last has to be ubuntu or debian.

Si hablas español, espero ayudar, No puedes hacer un booteo con cuatro sistemas operativos si uno de ellos es windows, por que windows 7 y 8 utilizan una particion extra, una particion primaria para recuperar el boot si algo le pasa, y como sabes los discos duros hasta donde se, tambien los ssd, no soportan mas de 4 particiones primarias, esto limita tus opciones a tener tres sistemas operativos, claro si uno es windows y los otros son linux. si te animas igual debes formatear tu disco, borrar las particiones GPT(esto es importante) e instalar primero windows ya sea seven o windows 8 y luego kali linux y de ultimo debian, asi tendras menos errores de booteo.


How to run shell commands in general and on startup

All users on buntu systems have a special startup script file stored in their home directories that is read every time they log in to the system using a so-called nonlogin or interactive shell. All commands listed there are run as if they were literally typed in at the command prompt. This file is called .bashrc (bash stands for bash shell which is the default shell used on all buntu systems and rc stands for resource configuration). Open that file using the nano text editor like this:

$ nano ~/.bashrc

Move the cursor to the very bottom and place your commands there (not exactly sure what you are using them for):

java -jar abc.jar
q/l32/q -p 8712

Then press ctrl + O to save the file and ctrl + X to exit. Now, the next time you boot up your computer, all these commands are going to be run automatically for you.

Your first question:

How do I run these bash files individually?

You need to make them executable:

$ chmod a+x [FILE]

Then, run them from the command like by just specifying their names. For example, I've got the following script (actually, there are a million ways to run executable files at the command line):

echo "Hello World!"

Now, I need to make it executable:

$ chmod a+x script.sh

And now I can run it:

$ bash ./script.sh


How do you get a UUID from a a device on the grub2 prompt?


Ubuntu doesn't boot when Mount bind not available during startup

Finally succeeded, but before some caveats:

do not add the option x-systemd.automount to (partitions on) devices that are needed for any services (like NFS), when possibly the drive is not connected at boot
do avoid using x-systemd.automount together with other automounters (like autofs).

Now for the solution:

I have an external disk with an xfs filesystem on it (labelled data) which should be mounted to /data when connected. The fstab entry reads

LABEL=data /data    xfs nofail,auto,noatime 0   0

nofail leads to not interrupting the boot process when the disk is not connected, and auto says to mount the disk as soon as it is connected (this is different from the old init behavior, which did only mount at boot time).

Now, to bind mount /data to my /home/ridgy/data when I needed that, I added the line

/data           /home/ridgy/data none bind,nofail,noauto,x-systemd.automount,noatime

Then, after connecting the disk the partition was connected automatically and mount showed

/dev/sda1 on /data type xfs (rw,noatime,attr2,inode64,noquota)

But there still was no mount on /home/ridgy/data. But ls data now listed the content of /data, and mount additionally had

/dev/sda1 on /home/ridgy/data type xfs (rw,noatime,attr2,inode64,noquota)

what was the result I wanted.

Hard removing the USB disk unmounted both mounts on that partition; but listing ~/data now let the command hang. I did not experiment with different values for any sort of timeout; maybe this could help in this case.


At ubuntu server boot cli, how can I check if internet is configured?

Maybe try live booting?

Once at the cli, ping googles DNS server with

ping 8.8.8.8 -c 4

That proves you're reaching the outside world


Wireless keeps disconnecting after a while with a WNDA3100v2

I have been a PC tech, a systems admin, and a network admin. I did EVERYTHING to try and resolve this issue on my daughter's desktop. We are using a wireless USB Network adapter and more times than not the internet just crawled or cut out completely.

Things I tried:
- Resetting the adapter
- moving the adapter
- reinstalling the adapter SW
- using a different wireless USB adapter
- AntiMalWare Scan
- disabling the onboard wired adapter through Device Manager
- Flashing Bios
- updating USB drivers in Device Manager
- Reinstalling Win 7 Ultimate from scratch

I was going crazy.....   The signal was FULL at 4 to 5 bars at all times. (Her bedroom is on the 2nd floor... kind of far from the wireless router)

The resolution? Well....  I noticed that when I moved away from the adapter, the web pages loaded instantaneously. The problem was that even though it showed 4 or 5 bars, we were blocking the signal to the adapter when we were sitting in her chair). I moved the adapter using a long usb connector cable and situated it where it would not be blocked at all while sitting in front of the monitor.

The moral of the story?  Before going nuts, move the adapter so that it is free and clear of all obstructions!!!! 4 or 5 bars mean nothing.... The signal bar may still show full even though the adapter is blocked.


Tried to upgrade my 14.04 and it has all gone horribly wrong

First things first: before you proceed with the following procedure you should make sure to backup your data, just in case. You can do this from the TTY.

After thats out of the way lets try to rescue your system (in very worst case you might need to do a clean new install hence the backup). Start with checking your /etc/apt/sources.list if all links are consistent for wily.

If not lets replace that with a new sources.list file. To do that enter sudo su into the TTY console and then do the following lines one by one:

wget -O- http://pastebin.com/raw/T544dTJE > /etc/apt/sources.list

That will replace your sources list without you needing something to copy and paste. The next steps are doing an update to renew the cache.

apt-get update

Then you now can try to repair maybe broken packages before continuing.

apt-get -f install
dpkg --configure -a

Now make an dist-upgrade to get all installed packages as far up to date as possible.

apt-get dist-upgrade

After that you have to maybe reinstall the desktop environment. Do so with:

apt-get install ubuntu-desktop

This will hopefully fix it far enough that you can either stay at 15.10 or proceed upgrading to 16.04, thats up to you. Finally reboot and hope that it worked out. Sadly I can't give you a guarantee that it will work, but at least it is worth a shot.


You are missing the LANGUAGE environment variable, which is set in Ubuntu more often than not, and overrides LC_MESSAGES for GNU compatible programs.

Try:

LANGUAGE=fi cat /etc/shadow


'libapache2-mod-fastcgi' has no installation candidate on Ubuntu 17.04

Download the missing package from http://packages.ubuntu.com/xenial/libapache2-mod-fastcgi and sudo dpkg -i <package name> to install it; it's under LTS so should get updates and fixes, but you'll have to manually check for them and apply them in the same way (or add a "xenial" entry in your apt .list files).

Not sure how wise this is, probably depends on your use-case; maybe not good for a production server!


Any way to restore OS after accidental apt removal all package

If you have a backup from before the error, restoring that backup should at least give you a system that boots.  Of course, you'll need to boot your system from Live media or into another installed OS to restore your backup.

If you don't have a (reasonably recent) backup of your OS partition, the fastest way to fix this is to reinstall Ubuntu.


Cannot login to any TTYs - Wrong password

Perhaps your keymap configuration is wrong fo the tty (which is a different setting than Xorg / Unity) and your password is wrong because of this. Try entering your password when you're prompted for your username and see if the characters turn out right; don't press enter, but delete your input (since login tries get logged and your password would be in that logfile). If something is wrong, you must set the keymap. In unity, open the terminal application and enter

sudo dpkg-reconfigure console-setup

and choose the right layout there. You might have to reboot.


PNG specified by .desktop file doesn't show up (20.04)

This could be a permissions issue if all users don't have read access to the image.
From the folder containing the icon, you can run sudo chmod 744 icon.png to set permissions to rwxr--r--.
If the application was installed using snap, flatpak, or some other sandbox or pseudo-sandbox, then you should research how to create a custom icon for these applications, since they might not have access to /usr/share


I had problems after upgrading my mother board to GA-970A-UD3P with a FX-4300 cpu - no USB, no internet etc.  I changed the bios setting to disable iommu and changed grub to read 'GRUB_CMDLINE_LINUX="iommu=soft"'.  This solved the problems in Ubuntu 14.10 but 15.04 still doesn't see the network although the USB mouse works.  Windows 10 had no problems with the upgrade.

For info: I triple boot Ubuntu 14.10; Ubuntu 15.04 and windows 10.


If I understand you correctly, you can by making your Ubuntu 12.10 machine as a DHCP server.

To install DHCP server, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install isc-dhcp-server

For information, and how to, see here or here


Errors when trying to install the, default-jre-headless package from the synaptic package manager

As suggested in the console messages, please run

sudo apt-get update
sudo apt-get install --fix-missing
sudo apt-get install openjdk-6-jre-headless

That should most definitely fix the problem :)


Ubuntu Terminal: "apt-get" invalid syntax

You are running the command in a Python interpreter. The command is supposed to be run in a shell. If you are still at the Python interpreter, use Ctrl+D or type exit() to quit the interpreter and return to the shell, or Press Ctrl+Alt+T to open a new terminal. Execute the command there.


How do I prevent standard users from creating new user accounts in ubuntu desktop?

As Eric Carvalho says, only administrators can create new users. Standard users cannot do that.

When an administrator creates a new user, it can be an administrator or a standard user. But no standard user can ever create a new user account.

The user created when you install Ubuntu is an administrator, not a standard user. You should always have at least one administrator account--if you were to make all the users standard users, then you would be unable to perform any administrative tasks (though this can be fixed).

Perhaps you have an administrator who you want to be a standard user? If so, you can change that in any of the same places where you'd create new user accounts. If that's not working, make sure the user who you want to be a standard user is not a member of the admin or sudo groups. (The adm group is different; you don't have to remove someone from that to keep them from being an administrator.)

If that doesn't work or you need help doing that, then please edit your question to provide as much additional information as possible, including the output of groups username run in a terminal (Ctrl+Alt+T), where username is the name of the user you're interested in.


How do I remove the "Undo" popup when deleting a file in Nautilus?

I "removed" it doing this way:

Go to ~/.themes/THEME-IN-USE/gtk-3.0
Open gtk.css and add this at the end:

.app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}

and save.
Refresh theme in GNOME Tweaks (change to another one, and again change to your theme in use).

Now you can't see the popup.

Tested on Nautilus 3.26.4, GNOME 3.30.1.


Changing Background Image in Multiple Terminals

What will you need ? xdotool (sudo apt-get install xdotool) and couple different profiles. I have 8 different profiles in my gnome-terminal , all with different colors or background settings. Make sure you have the menu bar (File, Edit, etc.) enabled. Otherwise - won't work

The command

xdotool key alt+f b $( expr $RANDOM % 8 )

Explanation: we get a random number $RANDOM as generated by the shell, get it's modulus (remainder) out of division by maximum number of profiles you have, and let xdotool execute sequence of keyboard shortcuts that correspond to dropping down File (alt+f) menu, selecting open new tab (b), and selecting profile with corresponding number

You can turn this command into an alias (alias newtab='xdotool key alt+f b $( expr $RANDOM % 8 )') or script

I've taken that very same alias and placed it into my .mkshrc file (because I use mksh, not bash, so for you it's .bashrc). Here it is in action

Update | April 22, 2015

Here's a script to open a terminal window with your desired profile (and for each profile you can specify your own colors and background picture). Bind it to a keyboard shortcut through System Settings -> Keyboard -> Shortcuts -> Custom.
For the command add full path to script

The script

#!/bin/bash

PROFILE=$(zenity --entry --text="Enter Profile Name")
gnome-terminal --window-with-profile="$PROFILE" &


Try this: go to the terminal (Ctrl + Alt + T) and type sudo alsa force-reload, press ENTER. A password prompt is going to show up. Insert your password, and press ENTER. Wait for the process to end, reset all your programs and sound should be OK.


Error: BrokenCount>0 After I installed ROS(Robot Operating System) indigo

It is reported in https://github.com/ros/rosdistro/issues/19481.

You need to install dpkg 1.17.5ubuntu5.8 by sudo apt-get install dpkg -y.


How to know the release date of my BIOS version?

Easily use the command dmidecode.

First install if you haven't do yet:

sudo apt-get install dmidecode

Now to check the release date of BIOS easily run the command:

sudo dmidecode --string bios-release-date

The output will look like(my output):

07/23/2012


How to reset top panel on Ubuntu 12.04 to Upgrade Standard (Classic View)?

You will have to add any applets you wish to retain, back to the panel. You can do that by using the Alt+Right-click on the panel and adding/placing the missing applets you want, back on the panel. I think the menu you are looking for is called "Applications menu" and you can also add any launchers you wish as well.


I was able to isolate the problem by adding debugging statements to /etc/profile to trace early startup.

Dell has added a file /etc/profile.d/display-toggle-keybinding.sh to fiddle with some keybindings.  That file starts with:

if [ -z "$DISPLAY" ]; then
   exit 0
fi

Since things in /etc/profile.d are sourced, they run in the current shell rather that a subshell, so when they exit it kills off the whole session.

Once I saw the problem it was easily verified by trying

ssh -X 127.0.0.1

which worked fine.  The -X enables X11 forwarding which means that DISPLAY is set.  The problem only occurs when DISPLAY is not set.

You can correct the problem by editing /etc/profile.d/display-toggle-keybinding.sh and changing the "exit 0" to "return 0".  "return" is a slightly less powerful version of "exit" which only exits the file currently being executed.

The comment in the file indicates that it is from package "dell-wmi-aio" so it may be unique to AIO systems.  I'm using an Optiplex 7450 AIO.

I found the answer to this question to be very helpful in describing how the various types of bash shells (interactive, login, graphical etc) differ and what their startup sequences are:
Scripts in /etc/profile.d Being Ignored?


What "file system" is supported by Windows and Linux?

I believe NTFS and exFAT are your only solution.

exFAT wasn't working on my Ubuntu at first, but it only needed to be installed to work.

sudo apt-get install exFAT

The linked Wikipedia article has some good information about it.

In your comment you said:

  NTFS isn't an option when creating the partitions in the XBMCbuntu
  installation wizard.

You can always leave that partition unformated, and then format it after installing Ubuntu.


Kubuntu 17.04 - no Internet connection when using APT, can't ping sites by name

My resolv.conf is configured as follows:

nameserver 127.0.1.1
search 192.168.178.1 <MyRouterName>

The first line is a local address I get if I try the following:

$ nslookup google.de
Server:         127.0.1.1
Address:        127.0.1.1#53

Non-authoritative answer:
Name:   google.de
Address: 172.217.18.163
$

Maybe it's useful for you.


QML: Overriding a signal handler from other element

You can define a property to store the code of the signal handler and reassign it when needed:

Look at the following snippet of code:

import QtQuick 2.0
import Ubuntu.Components 0.1

Rectangle {
    width: 200
    height: 150

    Button {
        id: foo
        text: "Foo"
        onClicked: {
            delaytimer.a = function () { console.log("Foo!") };
            delaytimer.running = true;
        }
    }

    Button {
        id: bar
        text: "Bar"
        anchors.left: foo.right
        onClicked: {
            delaytimer.a = function () { console.log("Bar!") };
            delaytimer.running = true;
        }
    }

    Timer {
        id: delaytimer
        interval: 1000
        running: false
        repeat: false
        property var a: function () { console.log("will be overridden!") };
        onTriggered: a()
    }
}


Updated/Solved - Can't install Lubuntu 20.04 due to desktop size/screen resolution

I have seen in your video that you have a nice desktop with a proper right-click context menu and all.
On this desktop, try a Ctrl + Alt + t to open a terminal.
Then try Ctrl + Alt + right arrow to move this window to the right half of the screen (that will put the part where you type around the middle.)
Alternatively, if you see any part of the terminal window already, then Alt + mousedrag will work on the entire surface of the window, so you already can drag it where you see it better.
Next, issue in the terminal xrandr --listmonitors This will reveal the identifier of that monitor, possibly something like HDMI-1.
Issuing just xrandr will list the available resolutions.
Then, in theory, you should be able to do something like this:
xrandr --output HDMI-1 --mode 1600x900

This will be a temporary fix that does not survive a reboot, but you may get a chance to fix it permanently within some settings UI.


Maybe the issue was related with the high number of files that needed indexing.

Adding folders one by one and waiting for indexing and uploading for each, apparently solved the issue.

Now added folders can be seen right away.


Switching audio output to different motherboard jack

If I were you I would install alsamixer.  It allows you to change the volume on different devices.  I used it when I had two sounds cards/devices.


No longer able to connecto to WPA wireless network.

There are many possible reasons why this could be happening. Have you looked at the Wireless Connection Wiki? https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide/Connections


Dropdown menu not showing/working on rails

I have found the answer to the problem.

Adding the Bootstrap JavaScript library to application.js. app/assets/javascripts/application.js

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .


Is there any open-source way to make a static from a dynamic executable with no source code availability?

You can solve your problem in another and more simple way:

Use ldd on your executable to see the linked libraries, for example:

$ ldd /bin/bash
linux-vdso.so.1 =>  (0x00007fffb2fd4000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fac9ef91000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fac9ed8d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fac9e9c6000)
/lib64/ld-linux-x86-64.so.2 (0x00007fac9f1e1000)

Then collect all the libraries in a folder and set the LD_LIBRARY_PATH environment variable before running your program to point at this folder:

$ LD_LIBRARY_PATH="/opt/my_program/lib" /opt/my_program/start

Alternatively you can add an entry for the lib folder to /etc/ld.so.conf.d/. But that would apply the change systemwide.


They're "elastic", snaps aren't resource-controlled like containerized (docker or lxd) applications are. Snapped applications will use machine resources as any other local program would.


The dreaded Brightness issue (Fn keys + Max brightness)

Just add acpi_osi= not acpi_osi=Linux that's how i got it to work for me.


W520 External monitor setup with Ubuntu 12.10

The bios option Optimus uses the integrated (Intel) driver on battery power and the discrete (Nvidia) driver for additional displays and more video intense applications. Ubuntu can use the Bumblebee package with the Optimus setting to leverage this feature.

12.10 Bumblebee Option

In Ubuntu 12.10 to install Bumblebee on a Thinkpad W520 first set the bios video option to Optimus, and disable optimus detection.

sudo add-apt-repository ppa:bumblebee/stable
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get dist-upgrade
sudo apt-get install bumblebee bumblebee-nvidia
sudo reboot

12.10 NVIDIA Proprietary Option

Note: I found this option has better multiple monitor support and higher graphics performance all the time, but less battery life than the Bumblebee option.

I ended up using the Nvidia proprietary driver (64-bit): NVIDIA-Linux-x86_64-310.19.run so that I can use the 2 displays attached to my laptop docking station. First downloaded it, then added this to my /etc/default/grub file:

GRUB_CMDLINE_LINUX_DEFAULT="nox2apic"

and then ran 'sudo update-grub' so the change would stick.

Then to install the NVIDIA driver I rebooted and switched the BIOS video setting to 'discrete' and disabled the optimus detection. On bootup I had to hold down shift and choose from the grub menu the recovery option, added network support and then chose a root prompt so I could install the NVIDIA drivers with the discrete driver in play, but before the desktop tried to load:

sudo chmod +x NVIDIA-Linux-x86_64-310.19.run
./NVIDIA-Linux-x86_64-310.19.run

I took the defaults, including the suggested nvidia-xconfig option at the end. Then on reboot it worked, and monitor configuration is done with nvidia-settings dialog once in the desktop.


Where to find more information about xxx.d folders?

Where can I find more documentation about this folder structure

This is going to fairly difficult to answer correctly since it is old (and documentation scarce). Unix System V or even earlier than that, so we are talking about 1985 roughly. Plus ... each of the different directories ending with that .d might have a different answer.
In general (I will try to fix on cron.d as an example but it will apply to all the others too, with some expections):

The .d refers to the word directory. In the old days it was used to make a difference between a command and a directory. Inside that directory there will be scripts or text files that this service can handle. In cron.d there is a file anacron that is a text file that is parsed and the results are executed by cron.
Or as explained on the debian mailing list: "Generally when you see that *.d convention, it means "this is a directory holding a bunch of configuration fragments which will be merged together into configuration for some service.".
There is some more information in that link but ... it is simplified for some reason.

How to track down more information:

If you drop the .d from the name there is most likely a man page for it. The same goes for the commands inside the directory itself (there is a man page cron and one for anacron; same goes for apparmor, usb_modeswitch resolve.conf and all of them should have a mentioning of the directory and it usage).

the types of files that can be in them

This will be stated in the man page. Related to cron (a part of it, the link above to the man page has a bit more but this is the most interesting):

Support  for  /etc/cron.d  is included in the cron daemon itself, which handles this location as the system-wide crontab spool.  This directory  can  contain  any  file  defining  tasks  following  the format used in  /etc/crontab, i.e. unlike the user cron spool, these files must provide the username to run the task as in the task definition.
the order of precedence

Unless noted otherwise it will be in alphabetical order.


No EFI partition found... Please go back and add an EFI system partition

I received an answer that worked for me and solved the problem entirely!

"Get boot-repair and use that from usb
help.ubuntu.com/community/Boot-Repair
"


How do i access docker containers from an other computer

By using the -p 8080:80 flag on your docker run command, you've actually already exposed it to your local network.  Docker manipulates iptables to expose the port(s) you specify on all the network interfaces present on your machine.
From a different computer on your LAN, you should be able to just access http://LAN_IP:8080 where LAN_IP is PC1's LAN IP address (e.g. 192.168.0.X).