First we repair the disk with fsck. Then we fix the NCQ errors. Then we bad block the disk.
fsck
At the initramfs prompt, type:
fsck /dev/sda5

NCQ
You have NCQ disk errors.
Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.
Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs, and watch /var/log/syslog or dmesg for continued error messages.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

badblock

Note: do NOT abort a bad block scan!
Note: do NOT bad block a SSD
Note: backup your important files FIRST!
Note: this will take many hours
Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.
In terminal...
sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test
or
sudo e2fsck -fccky /dev/sda5 # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.
The -fccky means:
   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.

Update #1:
When you were in the BIOS, you accidentally changed the boot order, and now you're getting the PXE boot error. Go back to the BIOS and change the boot order back to something like: DVD/USB/Disk/PXE


It might have something to do with the (nearly) fixed power regressions in the linux kernel. I'd suggest (for laptops that is) to go back to 10.04 or go to 11.10 --> http://cdimage.ubuntu.com/daily-live/current/  if you are spunky enough to try an alpha. If you want to get both though, you can double/triple boot (triple if you left Wins on your dell). Hope that helps!


It seems you have some Oracle software installed. Or something around. If your fresh install was merged to old home it might be some old Oracle configuration file with large data filesystems support. Ubuntu did not shipping natively these filesystems and that suggested to the user installs foremost with reliably ext3/ext4.


I just came across this as well and have found the following:

https://github.com/felipejfc/xserver-xorg-input-synaptics/issues/1

which then led to me finding this:

https://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=96e60a4ea242d2decf109835981ae186cc36f642

Although it is from a few years ago, it appears to be the same issue.

To summarise the two above links, to get the driver to work with the newer versions of glibc you must modify 3 files in the git repo that you cloned with the below command:

$ git clone https://github.com/Chosko/xserver-xorg-input-synaptics.git

These files are all located in the src directory and are named as follows:

eventcomm.h
ps2comm.h
synproto.h

You need to add #include <xorg-server.h> to the above files (I've put it above the others includes in each) and then re-run the following:

$ ./autogen.sh
$ ./configure --exec_prefix=/usr
$ make
$ sudo make install

I don't know if this is the right way to go about it but it has worked for me!

Don't blame me if your touchpad doesn't work anymore though!


Ubuntu 13.04. Just did software update... Not logging in

I used CTRL + ALT + F1 to login at the virtual terminal.

Then I ran:

sudo mv .Xauthority .XauthorityBak
sudo reboot


you could use the capslock key as compose key to my knowledge that ones function should be consistent across layouts

tho then you'll have use your shift key to input capital letter which i hope isn't too much of an hassle


Probably not safe to delete. It's part of the app-install-data package, which is needed by several other important packages.

walt@bat:~(0)$ ll /usr/share/app-install/icons/hb-icon.svg
-rw-r--r-- 1 root root 3416277 Sep  9  2015 /usr/share/app-install/icons/hb-icon.svg
walt@bat:~(0)$ file /usr/share/app-install/icons/hb-icon.svg
/usr/share/app-install/icons/hb-icon.svg: SVG Scalable Vector Graphics image
walt@bat:~(0)$ display /usr/share/app-install/icons/hb-icon.svg
walt@bat:~(0)$ dpkg -S /usr/share/app-install/icons/hb-icon.svg
app-install-data: /usr/share/app-install/icons/hb-icon.svg
walt@bat:~(0)$ apt rdepends app-install-data
app-install-data
Reverse Depends:
  Depends: software-center (>= 0.4.0)
  Suggests: apt-xapian-index
  Depends: jasper
  Depends: lubuntu-software-center
  Suggests: apt-xapian-index
  Depends: sessioninstaller
walt@bat:~(0)$

If you're at the point where deleting a 3.3M file is starting to look like a Good Idea, you're not solving the right problem - why don't you have enough disk space, and where don't you have it?


Ubuntu 12.04 - Workspace switcher is shown after switching to another workspace

I was able to solve this as follows..

1) Install ccsm

sudo apt-get install compizconfig-settings-manager

invoke on cmd line ccsm

2) disable unity keyboard shortcut, this is mapped to 'super' which seems to collide with the super- shortcut you are trying to create

In ccsm, under 'Ubuntu Unity Plugin', disable 'Key to show the launcher' and I also disabled 'Key to start the launcher application switcher' and 'Key to start the launcher application switcher in reverse'

cheers,
S


"How can I solve it?" If I take your meaning sir, you are displeased by two default Window Manager settings. One can be found in Settings Manager -> Window Manager Tweaks -> Accessibility -> Automatically tile windows when moving toward the screen edge. For the other, perhaps you are thinking of Settings Manager -> Window Manager -> Advanced -> Wrap workspaces when dragging a window off the screen.


Problem with Ubuntu Installation, Removed Windows by accident and can't boot into anything

Paul, I believe your best way out here is to install Windows first after formatting the complete disk. While installing Windows make sure that you create atleast two partitions, one on which your Windows OS will run and the other on which you will install Ubuntu.

Once this is done, use the Ubuntu cd to install your Ubuntu OS on the partition that is not holding your Windows installation. Make sure you choose the custom option when the partitioning schemes are displayed. Hope this helps your cause.


Why is my fresh install of 12.04 running slow?

Your slowness may be due to the fact that you are using Intel HD Graphics.
 Linux does not have very good 3D graphics support for Intel Chips. Also, in 12.04, Compiz eats a lot of memory. Use a 64 bit Ubuntu with either Gnome 3 or Cinnamon desktop for graphics effects. They use less amount of memory than compiz. Or if you want, you can use Unity-2D, faster with no 3D effects. 32bit Ubuntu cannot use more than 2 GB of RAM. If you use 64 bit, Ubuntu will use 3.7GB of RAM


Script not running in crontab, file not found

Try

sudo ln -s /usr/local/hdf5/lib/libhdf5.so.8 /usr/local/lib/
sudo ln -s /usr/local/hdf5/lib/libhdf5.so.8 /usr/lib/

That's the general way for adding something inside PATH.

Also, for check, use

ldd /usr/local/rams60/build/fdgrib2/fdgrib2

This command will show what's missing in your libraries.


Isn't

sudo apt-get install odbc-postgresql

enough if you want the psqlODBC ?


On the server (sharing) side : right click on folder you want to share (e.g Documents) then click properties :

Enable sharing option (nautilus will download and install samba for you). You may also need to check access for guests.

On the client side :

sudo apt-get install cifs-utils

and mount it (as guest) :

sudo mount -t cifs -o guest //sharing_machine_ip/Documents /mountpoint

you can also add some other options like user and password:

sudo mount -t cifs -o username=your_username,password=your_password //sharing_machine_ip/Documents /mountpoint

If you want this to automount (as guest - indicates you don't need a password to access the share) at startup you can add to the end of /etc/fstab:

//sharing_machine_ip/Documents  /your_mountpoint  cifs  guest   0 0

or with password protected share:

//sharing_machine_ip/Documents  /your_mountpoint  cifs  username=your_username,password=your_password   0 0


Wireless-LAN TL-WN821N is not starting automatically on startup

Your pastebin implies, because of the timestamp, that the driver doesn't load on boot. It may be blacklisted as a part of the process to install ndiswrapper. Check:

gksudo gedit /etc/modprobe.d/blacklist.conf

Use nano or kate or leafpad if you don't have the text editor gedit. Is the line blacklist ath9k_htc listed? If so, remove it. Proofread carefully, save and close the text editor.

Next, please try, in a terminal:

sudo -i
echo ath9k_htc  >>  /etc/modules
exit

Reboot. Any improvement?

You may be able to improve stability by checking the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

If these changes are ineffective, you might try a driver parameter:

sudo -i
echo "options ath9k_htc nohwcrypt=1"  >  /etc/modprobe.d/ath9k_htc.conf
modprobe -r ath9k_htc
modprobe ath9k_htc
exit


When I switch to iGPU in my BIOS, I get a black screen instead of logon screen

Following the instruction given here, I managed to solve this problem like this:

$ lspci  | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 (rev a1)

Take note of 00:02.0, it will translate to PCI:0:2:0 (don't ask me how. I don't know).

Now, edit this file /etc/X11/xorg.conf to match this:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Device"
    Identifier     "intel"
    Driver         "intel"
    BusId          "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "intel"
    Monitor        "Monitor0"
EndSection

At this point, either reboot the system or run startx.

BTW, I don't know why but everything looks much smoother with my integrated graphics card compared to Nvidia!


Since the xorg.conf was referencing the nVidia driver, I suspect the system was getting confused. Removing that conf file should allow the regular driver (nouveau I guess) to fall back to default settings.

To keep the existing file for later reference, suggested method was to rename:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia

If you want to reinstall the nVidia drivers, this is the install process I use:

sudo apt-get install nvidia-current
sudo nvidia-xconfig

And reboot.


Press on the network icon that's on the top. Select the last option in the menu called "Edit Connections..."(Or search in Unity for "Network" and open "Network Connections" from the results). Now select "Mobile Broadband". Press "Add" and from there I hope you can handle the rest.


Ubuntu Software is not working properly on 16.04

The problems may occur for stale versions of software updater. Also with newer versions of ubuntu releases they release regular patches. current stable LTS version is 16.04.1 so you can try updating your system

apt-get update
apt-get upgrade

Add sudo prefix for super doer mode.

ubuntu community releases change summary for every patch release. You can get latest here


How can I determine the IP address of my router

Install netifaces using pip:

sudo apt-get install python-pip
sudo apt-get build-dep python-netifaces
sudo pip install netifaces

To get the gateway ip you can use the following code:

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import netifaces
>>> gws=netifaces.gateways()
>>> gws['default'].values()[0][0]
'192.168.1.1'
>>>


Birghtness control not working on Ubuntu 14.04 on MacBook Pro

It looks like this is has happened before with Ubuntu.  Try out a software dimmer: https://apps.ubuntu.com/cat/applications/brightness-controller/

Other questions that may help you: https://unix.stackexchange.com/questions/182856/screen-brightness-adjustment-not-working-in-ubuntu-14-04

In /etc/default/grub make sure you have acpi_backlight=vendor in GRUB_CMDLINE_LINUX_DEFAULT.

Here is mine:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
Then run update-grub and reboot.

Another question (with a ton of answers) Make xconf configuration permanent


Installed Kubuntu alongside Windows 10, now can't access internet on Windows 10

check the date and time of your windows OS, linux changes the time if you dual boot. rarely mismatch is time results in internet problems.


For those interested, after hours of trying it came out in my case three libraries are mandatory for TS2 to run in Ubuntu

libice6:i386
libjpeg62:i386
libsm6:i386

the second one was known to me, different story for the other ones.

cheers


Installing Ubuntu on Asus Zenbook Pro 14 (ux480fd)

For linux to see the drive, you have to change the SATA configuration in the bios to AHCI (as opposed to Intel Optane super mega hyper whatever). I'm not sure how this affects windows seeing the partition though.

After installing a boot partition to dual-boot you have to add it in the bios as well. I found it a bit tricky, but managed to get it working in a few tries though I can't recall the details.

I find disabling and enabling the trackpad via the hardware key fn+f6 usually wakes it up. This also resolves any weird behavior that sometimes occur (not being able to move pointer beyond a few pixels etc.).


How to get Wifi working on Ubuntu 14.04 (Macbook Pro Retina 15 inch - 2014) followup

Ok, if I wave the magic wand like this,

sudo dpkg --configure -a --force-depends

everything works, and the wifi finds the all the networks.


Your problem is a bit weird, because the enlistment phase (I assume you powerer up that machine manually and let MAAS enlist the node), is very similar to the commissioning phase, at least with regards to DHCP and PXE.  So I'm surprised that commissioning fails if enlistment works.

I see someone posted a similar question here https://askubuntu.com/questions/280811/maas-pxe-boot-fail-ip-config-no-response.


Close the remote shell by running:

exit

Or press Ctrl+D.


After you have maas installed, you need to enlist and commission machines into maas, then can Juju ask maas for server for bootstrap and deploy.
You need get the credential by access maas's UI. That can be found in the MAAS Web UI under the user preferences.


Unfortunately, your printer is listed as a paperweight by Open Printing. I take that to mean it will take a bit more work to get your printer up and running.

I did find this old Ubuntu Forums thread, which gave us some instructions on how to install the printer from Canon's provided files.

Anyway, you're supposed to:

Download the .tar file from Canon. (Make sure you read and agree to the license agreement at that link.)

wget http://files.canon-europe.com/files/soft31326/Software/MP190_debian_drivers.tar

Extract everything.

tar -xf ./MP190_debian_drivers.tar
tar -xf ./MP190_debian_printer.tar
tar -xf ./MP190_debian_scangear.tar

Unpackage the driver. You need to modify the dependencies after.

dpkg-deb -x cnijfilter-common_3.00-1_i386.deb common
dpkg-deb --control cnijfilter-common_3.00-1_i386.deb

Open the file named control in the new DEBIAN folder with a text editor. Here I use nano, but you can use gedit, kate, leafpad, or what have you.

nano ./DEBIAN/control

One Line 6, which lists Depends:, change libcupsys2 to libcups2. There is no need to change anything else, though it can be mildly amusing to change the Description:. Save and quit.
Copy the DEBIAN folder into the common folder/

cp -R ./DEBIAN ./common

Repackage the driver.

dpkg -b common cnijfilter-common_3.00-1_i386.deb

Clean up.

rm -r ./common ./DEBIAN

Repeat the process of unpackaging, modifying, and repackaging for cnijfilter-mp190series_3.00-1_i386.deb.

In short:

wget http://files.canon-europe.com/files/soft31326/Software/MP190_debian_drivers.tar
tar -xf ./MP190_debian_drivers.tar
tar -xf ./MP190_debian_printer.tar
dpkg-deb -x cnijfilter-common_3.00-1_i386.deb common
dpkg-deb --control cnijfilter-common_3.00-1_i386.deb
sed -i 's/libcupsys2/libcups2/' ./DEBIAN/control
cp -R ./DEBIAN ./common
dpkg -b common cnijfilter-common_3.00-1_i386.deb
rm -r ./common ./DEBIAN
dpkg-deb -x cnijfilter-mp190series_3.00-1_i386.deb common
dpkg-deb --control cnijfilter-mp190series_3.00-1_i386.deb
sed -i 's/libcupsys2/libcups2/' ./DEBIAN/control
cp -R ./DEBIAN ./common
dpkg -b common cnijfilter-mp190series_3.00-1_i386.deb
rm -r ./common ./DEBIAN
sudo dpkg -i ./cnijfilter-*.deb


How does 16.04 mount my newly-mdadm-created RAID? (It's not in /etc/fstab)

You probably need to run this:

mdadm --detail --scan >> /etc/mdadm/mdadm.conf
update-initramfs -u

This makes sure that the RAID device is assembled while booting and is always /dev/md0.


Couldn't execute "fastboot" commands on Ubuntu 18.04

I ran into this too, getting

fastboot: symbol lookup error: fastboot: undefined symbol: _ZN13TemporaryFileD1Ev

The problem in my case was an older adb package, which I installed about a year ago.
Upgrading this and the companion android-libadb

apt-get install adb android-libadb

to the newest version solved the issue for me.

apt-get installed and updated a whole bunch of other packages as well. Investigating further shows, that the relevant symbol is provided by libbase.so.0, which in turn can be updated by

apt-get install android-libbase

I haven't tested, if this alone is sufficient, but you might get away with it.


Want to go back to my original Ubuntu look

Default Unity theme is Ambiance, which can be reset through Settings -> Appearance, or with the command

dconf write /org/gnome/desktop/interface/gtk-theme "'Ambiance'"

Unity Launcher can be unhidden with

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0


Transfer files from multiple directories into a single one

You could use this command which uses brace expansion to move all files from the directories you mention to /Desktop/var:
mv /Desktop/{tat,sac,ras}/* /Desktop/var

Inside the curly brackets you may add all the directories inside /Desktop whose files you want to move to /Desktop/var, separated only by commas (,), no spaces.
The above command supposes that the /Desktop/var directory already exists. If it doesn't, create it before running the command, either with your file manager or by running:
mkdir /Desktop/var

NOTE: The way you have written the directories in your question, indicates that they exist inside your root directory (/). While this isn't something that you couldn't have done, it's highly unlikely. Chances are that your Desktop directory is inside your home directory (~). If that's the case, the above two commands should become:
mv ~/Desktop/{tat,sac,ras}/* ~/Desktop/var

and
mkdir ~/Desktop/var

WARNING: If you have any files with the same filename in the different directories, they will get overwritten. An overwrite by the mv command is not recoverable! (thanks @Dan for mentioning this!)


Turn-off WiFi / WLAN & Bluetooth completely (electrically off), how?

Press F10 right after turning the laptop on to enter BIOS settings.
Go to the "System Configuration" tab.
Disable Action Keys.
Save and Exit.

This should solve the problem. Now, when you press F1-12, It will activate the function (wireless, etc.). To access the F-keys normal functions ans function keys, press and hold Fn and then press the key. Hope that helps!


Ubuntu 16: Menu Bar and Dash do not appear for users

The issue was, at least in part, due to some change to nfsclient.  With help from a colleague, we determined that PAM was not at fault but rather the remote directories.  I added 'nolock' to the /etc/fstab entry for the location of the home directories, and it now works.


CLI: How do I list files addressable with a ID for further use?

I do not see that any new tool is needed. There are enough tools for this.

Use autocomplete in a terminal. Type rm T and press Tab. You wil get the full file name. Maybe you will need 2-3 first letters if there are other files starting with T.
You can install Midnight Commander and interactively select files for deletion in a terminal.

It can be installed by sudo apt install mc. To start it run mc.

Select any number of files to delete by Insert and delete by F8.

There may be lots of other ways of doing this.


Which file system (ext2/3/4 or something else)? (consider SSD life)

ext4 is a good filesystem even for SSD, so that would be my suggestion. (If you want performance so bad you should try XFS )
Should I partition the disk? (as we do in traditional HDD) for now, no plan of dual booting. Only Ubuntu will live on scarce space of 80GB SSD.

This is really not a matter of SSD, but your personal choice. If you were to ask me I'll say no; don't partition the disk you will end in loosing useful space. (If you end with a partition with 2GB free and another with 1GB free, you theoretically have 3Gb free but cannot copy a 3GB file... that space is wasted )

Source: Installing Ubuntu on a SSD
[duplicate]


fstab automatically creates mount points

This used to be true, and still is if you wish to use the classic mount command.
In recent years, the entries in /etc/fstab are mounted at boot time by systemd, which automatically creates missing mountpoints as needed, irrespective of the presence of the X-mount.mkdir option.
It also provides the command systemd-mount as an alternative to mount, should you wish to mount a partition yourself without first manually creating a directory to mount over.


Wired network connection active, but Firefox not detecting connection

I would suspect that your subnet mask is set wrong. The 192.168.x.x range of addresses are normally set up as class C networks with a mask of 255.255.255.0. It won't work correctly if you have it set wrong.


My System:

Travelmate 8572
Easyport
Arch Linux (Kernel 3.14)

I noticed that VGA and Ethernet at the easyport are only working, if the sound is muted. The following command solves the issue temporarily for me and i have not noticed any side effects yet.

hda-verb /dev/snd/hwC0D0 0x1b SET_EAPD 0x00

Please tell us if it solves your problem too

Edit: hda-verb is contained in package "alsa-tools"


Logging inputs and outputs in terminal without weird characters

As pointed out by Steeldriver, those are control sequences. After doing some google with this term I was able to find this post with a solution:
Just run the script command as usual
After saving the file, remove the junk characters with this command:
cat typescript | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' \
             | col -b > typescript-processed

Worked for me


I would try to download a program called "Cheese" from the software center. It's basically the Ubuntu equivalent of Photo Booth on a Mac.


Window background in plasma won't change

This seems to be dependent on the GTK2 theme chosen.

I'm not sure if planned this way or is a bug, but it appears some colours are hard to set using Breeze as the GTK2 theme.

If you go to:

Settings -> Application Style -> GNOME Application Style (GTK)

and change the theme at 'select a GTK2 theme' your colors may work better on a different theme.


How do I increase the compiz shadow radius above 18?

I haven't figured it out myself, for now, but I find if I put the Y offset up, it gives a nicer look at least. Sorry I can't answer the question fully; I would love to know, myself.


How do I mark a file as executable on Xubuntu?

Press Ctrl+Alt+T to open a terminal.
Navigate to the location of your file by inputting cd command into the terminal
Eg. cd /documents/, then enter the following:

chmod +x yourfilename

To view if your changes had been saved enter the following ls -l in the terminal.

Other way to change your file to an executable is to right click the file, select Properties → Permisions and tick Allow execution of the file as a program.

Hope this helps. Also to execute the file you first have to be in the directory where it is located. For instance if your file is located in the Documents folder, you have to cd ("change directory") in to that directory and then do this: ./yourfile.c

This is how it will look:

root@root:~/Documents$ ./file.c


error while compiling speech_tools can not find -lcurses

This probably means you need to install lncurses (package: http://packages.ubuntu.com/nl/quantal/libncurses5-dev)

So ...

sudo apt-get install libncurses5-dev


Ubuntu Broken after Interrupted Software Update

if you are at least medium user, I'll suggest to make sure you have enough space on your root (/) partition

and try to perform these steps

http://www.isysop.com/using-fixit-and-chroot-to-repair-a-non-booting-system/

or

http://ubuntuforums.org/showthread.php?t=157250

if not, then backup your data and reinstall the system, but next time you install new system, please provide dedicated partition for /home directory, in this way your data and personal settings are safe on reinstalation, and for / set a partition with at least 10gb (15 gb is better) and eq. of your RAM for swap

plus, broken instalation operations usually are fixed with

sudo apt-get install -f

if you can boot up your system


the kernel has drivers installed by default for intel gfx

go to system settings>system info
then click on graphics there you'll see ur graphics driver are installed


How to pass a program and its arguments to startx

Use the following command

startx google-chrome-stable -incognito --

From man startx

The special argument '--' marks the end of client arguments and the
beginning of server options.


No.

Unity2D is there to

  [...] provide the Unity desktop shell on hardware platforms that cannot currently support Unity's OpenGL requirement

It will be enabled when insufficient hardware support is detected.

For more, see Unity2D in the Ubuntu Wiki.


How we can monitor the network traffic of logs transferred through the rsyslog

Forwarding only selected messages is easy. Put a file with the extension *.conf in /etc/rsyslog.d.
Name it e.g. /etc/rsyslog.d/40-forwarder.conf to have it read before the defaults (in 50-default.conf)
or /etc/rsyslog.d/60-forwarder.conf to have it read after the defaults:
if ( ($programname == "my-binary") or ($syslogfacility-text == "local1") ) then {
    action(type="omfwd" target="my.syslog.server" port="514")
}

This will forward all mesages with the given properties to
host my.syslog.server, UDP port 514. If you put stop after the
action, then no further processing is done for that message.
This means: if you name the file 40-....conf and add stop:
if ( ($programname == "my-binary") or ($syslogfacility-text == "local1") ) then {
    action(type="omfwd" target="my.syslog.server" port="514")
    stop
}

then the default actions for these messages (like writing them to /var/log/messages)
will not take place.
As for you other question about network traffic: That is actually another question and
should be posted separately.

Update
The condition
if ( ($programname == "my-binary") or
     ($syslogfacility-text == "local1") ) then {…}

is just an example for a filter. Probably you have some other criteria
to select the messages that should be forwarded to the centralized logging
host.
In this case only those logmessages that were written to the
logfacility local1 or were issued by some program called my-binary
would be forwarded. All others whould not.
You can test the filter with logger (the -t switch mimicks the
program name):
logger -t my-binary    -plocal4.info "This is forwarded ($RANDOM)"
logger -t other-binary -plocal1.info "This is forwarded ($RANDOM)"
logger -t other-binary -plocal4.info "This is NOT forwarded ($RANDOM)"

On the remote host, the first two messages should appear, but not the last.
You didn't say what kind of filter should be applied, so I chose an arbitrary
criteria.
See Filter Conditions and RainerScript for further information
on what is possible with rsyslog.


With the stick connected to the PC try to give the following command (and if the rest of my answer is not helpful) add the output to your question:

sudo fdisk -l

Search for the device name of this 8 Gb stick. Let's assume it is sdc1 do a:

cd /
sudo umount -l /dev/sdc1
sudo swapoff /dev/sdc1
sudo sfdisk -R /dev/sdc

1st command is to make sure you are not cd'd into the USB stick. Could be cd /tmp/ if you want.
2nd command is an unharmful un-mounting.
Execution of the 2nd and 3rd command might get you error messages.

Regarding the last command:

sfdisk is a partition table manipulator.
The last command will make the kernel re-read the partition table and should not end up in an error. It is important that does not give any error and if it does add it to your question.  A typical error that it could show is: device busy for revalidation (usage = 2).

If need be:

cat /proc/partitions
sudo sfdisk -uM -s /dev/sdc
sudo sfdisk -uM -s /dev/sdc1

should each report the filesize if you are in doubt of the actual device name. The 1st one will also show other partitions so you can also use this as an alternative to the 2nd command (sudo fdisk -l). Or as confirmation you are doing it correctly :)

Up to here it is all undoable.

If you do not get any errors type in:

sudo sfdisk /dev/sdc <<EOF
,, c
EOF

This will totally kill the partition table so be careful to type it correctly. If you decide to copy/paste this do not copy/paste this as one block but do each line seperately.

Next is a reread of the partition table:

sudo sfdisk -R /dev/sdc1

And this command should start formatting it:

sudo mkfs.vfat sudo -c -F 32 -n LABEL -v /dev/sdc1

I have ofcourse not tested this but I am fairly sure I made no typos :)
And again: this -will- delete any contents on the USB flash drive.


There are three decent options when installing applications under Ubuntu, in order of safety:

In an ideal world you would be safest by only installing applications that have come through the Ubuntu Repositories. These have usually been tested comprehensively and have usually been well packaged.
However not all applications are packaged and available in this way. The next safest method is to find the source code of a proven application and compile and package it yourself. However this requires some expertise and a degree of fiddling around that many users are not prepared to undertake.
The final safe option is to install a package from outside the Ubuntu system which may come from:

A PPA (Personal Package Archive). There are some risks inherent in using just any PPA and you should do some homework first.
A deb package from the developer's website. Now gdebi rightly warns of the risks inherent in the installation of deb packages from such websites and you should do some homework first.

The 'homework' in point 3 varies from application to application. In the case of OcenAudio a Google search will show that it is a well established application that has received positive reviews and certainly no reports of captured key strokes or lost passwords.

My own personal review may also help out here as I have installed OcenAudio on a 64bit Xenial system as follows:

wget http://www.ocenaudio.com/downloads/index.php/ocenaudio_debian64.deb
sudo dpkg -i ocenaudio_debian64.deb
sudo apt-get -f install

I have tested it comprehensively and it runs well with no security risks that I could see. Nice application too:

So my personal recommendation: do some further research on Ocenaudio, add my own thoughts to your research and then install and enjoy this great application :)

References:

Lifehacker: Ocenaudio Is a Free, Fast, Streamlined Audio Editor
Betanews: ocenaudio is an outstanding audio editor


Seems problem in samba configuration. Try to create share like this:

[global]
   workgroup = WORKGROUP
   guest account = nobody
   security = user
   map to guest = bad user
[Test]
    path = /pathtoshare
    writable = yes
    printable = no
    only guest = yes
    public = yes
    guest ok = yes
    guest only = yes
    guest account = nobody
    browsable = yes


What's the difference between X, Xorg, Xserver, etc. and their respective versions?

This isn't layering or anything more complex - you're just running an old version.  The X.Org X server (aka Xorg) from the upstream project is up to 1.13.1 now, with 1.7.7 being a several year old release.  Perhaps 1.7.7 was the last packaged for whatever distro/package branch you're on?


You Have to run a command in terminal "iw list" ( If Not Installed - Run sudo aptitude install iw)

  After Running "iw list" command you will listing like

Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * mesh point

If cant see AP then,you can't use the AP mode


Just add a flag and compile it using

g++ -std=c++11 1.cpp

Explanation:

  -std=
      Determine the language standard.   This option is currently only
             supported when compiling C or C++.

  c++11
   c++0x
      The 2011 ISO C++ standard plus amendments.  The name c++0x is
                 deprecated.


If you install a Live-Disk to a USB-Drive with the startup disk creator you can create a space on the drive to store the information which was created during Ubuntu was running from USB Drive.

Take a look at the linked page. In picture 6 you can see the option, called "Stored in reserved extra space".


Some other application maybe using webcam that only i happens. At the moment only one application can use webcam. check it out.


Genymotion not detecting Virtualization engine on Ubuntu 16.04 LTS

After trying a lot of different things, I finally resolved the issue by installing VirtualBox directly from the command line(see this answer) rather than downloading it from the official website. Then restarted Genymotion and it worked like a charm.


The domains if set up correctly will return your external ip address. If you are inside the server network, the namecheap will resolve to your external ip address, which is pretty hard to resolve if you reside inside your network where you will need resolve all your domains to 10.0.0.111 ip address.
You have two options:

Contact your server from external network to check the domain name resolution and of course your apache setup for three different domain names.
Setup a local name service resolution within your network, which will resolve all your domains to the local lan address 10.0.0.111. This needs to be done on your router. If you use Openwrt, the configuration is pretty straightforward (use dnsmasq service together with dnsmasq.conf configuration file) - more on this can be found in Openwrt wiki. For other router firmwares  look into your router's documentation.

After you can resolve DNS correctly, this is to be done next:

If you have configured your Apache correctly, the web server will return pages you have set up for different domains, depending on what you type in the address bar in your browser. It is possible to setup multiple domains on same IP and server. I guess you have already done this.


How do I install ubuntu 20.04 LTS on a laptop without accessing the BIOS?

Depending on the model of laptop it is possible it has an option to display a boot options menu instead of accessing the bios.

HP machines for example use F10 for the bios but pressing F9 will show a list of available bootable drives to choose from.

Below is from here which has other options if these don't work.

ASRock: F2 or DEL
ASUS: F2 for all PCs, F2 or DEL for Motherboards
Acer: F2 or DEL
Dell: F2 or F12
ECS: DEL
Gigabyte / Aorus: F2 or DEL
HP: F10
Lenovo (Consumer Laptops): F2 or Fn + F2
Lenovo (Desktops): F1
Lenovo (ThinkPads): Enter then F1.
MSI: DEL for motherboards and PCs
Microsoft Surface Tablets: Press and hold volume up button.
Origin PC: F2
Samsung: F2
Toshiba: F2
Zotac: DEL


I can continue playing a video after I Shift-Delete it. Is the disk-space freed when I close player?

Although you've deleted it, the file is still in use because you have it open in your player. Once you close the media player, it will release its handle on the file data and will therefore be deleted.

You can verify this with the lsof command, which lists open files. If you run lsof, your movie file should be listed as being open by the player, but it will have "DEL" next to it which means it has been deleted even though it is still open.

This is actually all a useful thing and would mean you could actually recover open files that you've deleted, although that would probably be best left to another question :)

It comes about because (as I understand) files consist of the data itself, and handles (location in the filesystem) to the file. Normally you only have a single handle for a file, but you can create others using the ln command to create a hard link. This creates what appears to be an identical copy of your file but is actually just adding another handle - so you haven't used twice the disk space. You can check this by looking at the inode of the two files - this tells you where the data actually is.

So e.g. in a terminal window:

ln existing_movie.avi movie_hardlink.avi

ls -i

The -i argument to ls shows the inode information for files - they should be identical.

When you delete one of those files, the data will remain because the other one still retains a handle to the inode. Once you delete the second file, the inode has no remaining handles/references and so is deleted/marked as unused space. This is directly analogous to the case when your player has the movie open, except that the second handle here is within the running program rather than a second file in the filesystem.


Upgrade Ubuntu Server from 11.04 to 11.10 without internet connection

Try installing 11.10 with a disc or making a ISO image with Brasero then installing that. with that you can select what you want on the ISO.

Hope this helps,
bob


A key file in the /boot directory can be read by any other operation system booted on your machine that is able to mount the filesystem on that /boot is located. Thus, encryption is not really effective. This argument applies to all key file locations on unencrypted file systems.

To avoid key files on unencrypted file systems a password can be used for decryption. Create a strong password for the device. Then, change the line in /etc/crypttab to

hddencrypted UUID=b3024cc1-93d1-439f-80ce-1b1ceeafda1e none luks

and keep the entry in /etc/fstab unmodified. Ubuntu 14.04/16.04/18.04 asks you for the password on startup.


libjpeg.so.62 Not Found by Starcraft 2 WINE causing a failure to load! (Patcher after install)

You have to:

sudo apt-get install libjpeg62

I found the solution here http://ubuntuforums.org/showthread.php?t=1846079


Why does Ubuntu's default ~/.profile source ~/.bashrc?

This is an upstream decision coming from Debian. The rationale for it is explained in this very nice wiki post, of which the following is an excerpt. The executive summary is "to ensure that GUI and non GUI logins work in the same way":

  Let's take xdm as an example. pierre comes back from vacation one day and discovers that his system administrator has installed xdm on the Debian system. He logs in just fine, and xdm reads his .xsession file and runs fluxbox. Everything seems to be OK until he gets an error message in the wrong locale! Since he overrides the LANG variable in his .bash_profile, and since xdm never reads .bash_profile, his LANG variable is now set to en_US instead of fr_CA.

  Now, the naive solution to this problem is that instead of launching "xterm", he could configure his window manager to launch "xterm -ls". This flag tells xterm that instead of launching a normal shell, it should launch a login shell. Under this setup, xterm spawns /bin/bash but it puts "-/bin/bash" (or maybe "-bash") in the argument vector, so bash acts like a login shell. This means that every time he opens up a new xterm, it will read /etc/profile and .bash_profile (built-in bash behavior), and then .bashrc (because .bash_profile says to do that). This may seem to work fine at first -- his dot files aren't heavy, so he doesn't even notice the delay -- but there's a more subtle problem. He also launches a web browser directly from his fluxbox menu, and the web browser inherits the LANG variable from fluxbox, which is now set to the wrong locale. So while his xterms may be fine, and anything launched from his xterms may be fine, his web browser is still giving him pages in the wrong locale.

  So, what's the best solution to this problem? There really isn't a universal one. A better approach is to modify the .xsession file to look something like this:

[ -r /etc/profile ] && source /etc/profile
[ -r ~/.bash_profile ] && source ~/.bash_profile
xmodmap -e 'keysym Super_R = Multi_key'
xterm &
exec fluxbox

  This causes the shell that's interpreting the .xsession script to read in /etc/profile and .bash_profile if they exist and are readable, before running xmodmap or xterm or "execing" the window manager. However, there's one potential drawback to this approach: under xdm, the shell that reads .xsession runs without a controlling terminal. If either /etc/profile or .bash_profile uses any commands that assume the presence of a terminal (such as "fortune" or "stty"), those commands may fail. This is the primary reason why xdm doesn't read those files by default. If you're going to use this approach, you must make sure that all of the commands in your "dot files" are safe to run when there's no terminal.


First things first, try the command it's telling you to try:

apt-get -f install

To fix any broken packages. If your disk is full, this may or may not work depending on whether the broken package has been completely downloaded.

If the above doesn't work for lack of space, try

aptitude clean

to free up some space. Note, however, that this will clean your apt package cache (these are .deb files for the packages you installed; stored in /var/cache/apt/archives); the actual packages will remain installed, but you will no longer have the .deb files on disk and would need to re-download them if you purge/re-install an existing package.

Update

In response to your edited question, I think you need:

apt-get purge vim vim-runtime
apt-get install vim vim-runtime


How to create a new Quickly application template?

Getting started quickly, so to say

The easiest thing to do is to base your first template on an existing one, and modify it to your needs. After running the following command, you'll have an ubuntu-application-qt template based on the ubuntu-application original template. You'll find it on /home/$USER/quickly-templates, ready to modify to your heart's content:

quickly quickly ubuntu-application ubuntu-application-qt

Background

Here are some resources that will help you:

Didier Roché's post on how to create a quickly template
Use the IMPORT statement from the Quickly template language to import a subset of commands from an existing template. Here's an example taken from the ubuntu-cli template

Quickly templates can be written in whatever language you want. They are just a set of commands in a directory, containing commands to copy images, documents and interacting with the user.

Adding a command is quite easy: just drop it into the root template directory (data/templates in the Quickly source tree, or in /usr/share/quickly/templates/) and make it executable. Quickly will know by this way that the current file is a command that Quickly Core can launch.

Consequently, if you need additional internal commands that can be launched only by your own commands, just create a subdirectory in your template and add it there.

There are also some helpers if you need those names when creating a new command:

from quickly import templatetools

python_name = templatetools.python_name(project_name)
sentence_name, camel_case_name = templatetools.conventional_names(project_name)

And to load the project_name (see the blog post above on part 6):

if not configurationhandler.project_config:
    configurationhandler.loadConfig()


gnupg permissions problems on dual OS machine

Maybe sharing the entire config file / directory is causing problems, another method may work better.

Maybe a "shared keyring scheme" would be better, see man gpg for some of these possibly useful options:

--keyring file
      Add  file to the current list of keyrings. If file begins with
      a tilde and a slash, these are replaced by  the  $HOME  direc‐
      tory.  If the filename does not contain a slash, it is assumed
      to be in the GnuPG home directory ("~/.gnupg" if --homedir  or
      $GNUPGHOME is not used).

      Note  that  this  adds  a  keyring to the current list. If the
      intent is to use the specified keyring  alone,  use  --keyring
      along with --no-default-keyring.

--secret-keyring file
      Same as --keyring but for the secret keyrings.

--primary-keyring file
      Designate  file as the primary public keyring. This means that
      newly imported keys (via --import  or  keyserver  --recv-from)
      will go to this keyring.

--no-default-keyring
      Do  not add the default keyrings to the list of keyrings. Note
      that GnuPG will not operate without any keyrings,  so  if  you
      use  this  option  and  do  not provide alternate keyrings via
      --keyring or --secret-keyring, then GnuPG will still  use  the
      default public or secret keyrings.

A possible option using different subkeys

How to manage GPG keys across multiple systems?
Using OpenPGP subkeys in Debian development


Adding another Wine or "Virtual Drive" to removable USB and playing games from it

I hope you're using separate Wine prefixes for each application managed by Wine/POL, because that would make the following much easier.
PlayOnLinux stores its Wine prefixes underneath ~/.PlayOnLinux/wineprefixes/. As with all files and directories, you can move any or all prefixes anywhere else and then place a symbolic link to the new location at their old place.
Let's assume, that you have a secondary storage drive mounted at /media/mystorage. There are now two alternatives:

To move all existing and future Wine prefixes managed by POL:

 mv -T ~/.PlayOnLinux/wineprefixes /media/mystorage/wineprefixes
 ln -sT /media/mystorage/wineprefixes ~/.PlayOnLinux/wineprefixes

To move only some Wine prefixes managed by POL (in this example called warcraft, steam, LoL)

create a directory /media/mystorage/wineprefixes

and run
 for f in warcraft steam LoL; do
     mv -T ~/.PlayOnLinux/wineprefixes/"$f" /media/mystorage/wineprefixes/"$f"
     ln -sT /media/mystorage/wineprefixes/"$f" ~/.PlayOnLinux/wineprefixes/"$f"
 done

You need to repeat this step for every new Wine prefix, that you want to move somewhere else.

With some trickery you can

create a new Wine prefix through POL by starting a new installation process,
abort the installation process after creating the Wine prefix,
move the prefix as described earlier, and
only then install the Windows application by choosing to alter an existing prefix.

There's also an entry in the official PlayOnLinux wiki: How to move PlayOnLinux virtual drives to another disk


Is 26GB root (excluding /home) unusally large?

When I only exclude /home I get:

$ sudo du -sh --exclude=home
du: cannot access './run/user/1000/gvfs': Permission denied
du: cannot access './proc/14676/task/14676/fd/4': No such file or directory
du: cannot access './proc/14676/task/14676/fdinfo/4': No such file or directory
du: cannot access './proc/14676/fd/3': No such file or directory
du: cannot access './proc/14676/fdinfo/3': No such file or directory
241G    .

A more accurate picture can be seen using:

$ sudo du -sh --exclude={home,media,mnt,proc,run,sys,tmp,tmpfs,var}
13G .

There you go 13 GB for "normal" versus 241 GB for "unusually large". Of course you need to use cd / before executing above commands.

In my case most of the excess baggage is in /mnt which contains two Windows installations and two Ubuntu installations (in addition the one mounted at /).

In /run or /media you can have your phone or USB sticks mounted. In /sys and /proc there are temporary virtual file systems created. In /var there are log files which can grow quite large but are empty on new installations. In /proc lies running processes which in the first instance generate error messages but are excluded in the second instance.

Even more space can be taken off the total because I have 15 kernels installed:

$ ll /boot/vmlinuz* | wc -l
15

The kernel files can be found here:

$ sudo du -sh usr/src lib/modules boot
2.0G    usr/src
4.1G    lib/modules
1.1G    boot

The directories total 7.3 GB but there are other non-kernel files there. In reality the total is 6.5 GB:

Using this script: How to selectively purge old kernels all at once

Summary

  This struck me as odd because I remember reading that 12GB is "comfy"

Taking everything above into account 12 GB is "comfy":

$ sudo du -sh --exclude={home,media,mnt,proc,run,sys,tmp,tmpfs,var,boot,usr/src,lib/modules}
5.6G    .

That said when today 1 TB drives are the normal HDD size and 256 GB or 512 GB is the normal SSD size, comparing 13 GB or 26 GB for a Ubuntu installation seems insignificant.

Personally on a typical 500 GB system I would allocate 400 GB to Windows (includes gaming) and 100 GB to Ubuntu (includes two or three installations).


Please try this:

In terminal, run

dpkg --list
2. Find the chrome package, with search:
/chrome
3. Copy the name of the package, some like:
google-chrome-stable
4. And finally remove:
run apt --purge remove pkg-name
5. May be something:
run apt --purge remove google-chrome-stable


Android device detected by mtp-detect but not by adb

For adb you have to install android-tools package.

sudo apt-get update
sudo apt-get install android-tools-adb

and if you wants the fastboot:

sudo apt-get install android-tools-fastboot


No video output after resuming from post screensaver

The Nouveau driver is a heroic effort by volunteers reverse engineering the NVidia hardware, but it tends to have its quirks. Even if you don't care much about gaming performance, it can also have problems with resume after suspend-to-RAM. With NVidia graphics cards, IMHO the latest NVidia proprietary driver is the best option.
I have been using the NVidia binary drivers with my GeForce 1050 Ti for several years now, and they always worked great.
From the selection on your screenshot, I recommend to use the topmost; in general, the hightest number. But make sure to not use any of them ending with -server: They reserve a large part of your graphics card for CUDA calculations.


Is there any way to echo an ssh session to a local terminal session

There are certainly a lot of ways to be able to view the output of a session that is being run from a different terminal session.

One simple way is to log the output using a command like tee. This will write the output of a command both to your terminal and to a file at the same time. To capture all output and errors from starting a server, run

server_cmd 2>&1 | tee /path/to/logfile

To read the saved output in another session, simply read the saved log file /path/to/logfile.

Another more flexible way is to use a terminal multiplexer program such as screen , tmux , or byobu . A terminal multiplexer allows you to attach to and detach from running terminal sessions. This gives you the ability to do view the output of running programs from more than one attached session, and much more. See Ubuntu's help page on Byobu.


Well, I'm not used to find answers to my question this quickly, but for this one I did:

I had only to remove the sudo before the conda command.

Explanation:

All conda commands must be run without super user privileges.

Hope it can help someone in the future.


You need to create a persistence file on the USB to do this in startup-disk-creator, set it up as normal and then make sure to check stored in reserved extra space and set the storage amount (1GB min) under when starting up from disk......


What is the correct Fontconfig syntax for substituting a given uninstalled font with an installed font?

This works for me to replace Arial with Ubuntu

<!--?xml version="1.0"?>-->
<!--DOCTYPE fontconfig SYSTEM "fonts.dtd">-->
<!-- ~/.fonts.conf for per-user font configuration -->
<fontconfig>
<match>
    <test name="family"><string>Arial</string></test>
    <edit name="family" mode="prepend" binding="strong">
        <string>Ubuntu</string>
        <string>Arial</string>
    </edit>
</match>
</fontconfig>

I found fc-match to be super helpful.

Also, I am on Precise so I use ~/.fonts.conf. In Quntal I understand you should use
~/.config/fontconfig/fonts.conf


I have managed to overcome all the problems that my Asus F556U offered me to install Ubuntu 18.04 and it was thanks to @oldfred which showed me the idea of updating the BIOS, and it shows in another question I did: How to install Ubuntu on ASUS F556U, JournalError error?
Seeing other examples and modifying GRUP, changing quiet spla\sh by pci=nomsi I managed not to freeze the installation and could complete it.
I hope you can help other users


Connect to internet on Ubuntu Server running on qemu virtaul machine

eth0 is set to got ip setting from dhcp. If you dont have dhcp on
local network server will not got a parameters

To solve this edit /etc/network/interfaces and setup manually ip parameters

 sudo nano /etc/network/interfaces

minimal configuratio is

auto eth0
iface eth0 inet static
       address xxx.xxx.xxx.xxx
       netmask xxx.xxx.xxx.xxx
       gateway xxx.xxx.xxx.xxx
       dns-nameservers xxx.xxx.xxx.xxx

Replase xxx.xxx.xxx.xxx with real parameters from your local lan.
After that do

sudo ifdown eth0

and

sudo ifup eth0


Possible to use Breeze Dark Theme for KDE Applications in Unity?

After doing some research, it looks like Qt allows you to set the theme when running a program (used Kdenlive for example). To do so:

Open a terminal
Run the Qt-based program and add "-style=breeze" at the end. So, for example, "kdenlive -style=breeze"

Seemed to work great for me. Can anyone else confirm this?


Inserting text with a keyboard shortcuts in Ubuntu

You can hit Ctrl+Shift+U, type an Unicode code point and hit Enter to insert the character bound to that Unicode code point;

For example, to insert ⭐:

Hit Ctrl+Shift+U
Type 2b50
Hit Enter

I suggest you to keep using this method, as most Ctrl+[...], Alt+[...] and Shift+[...] sequence will end up conflicting with other functions; however if you really want to use a custom shortcut, you can try your luck and bind a custom shortcut to an xdotoolcommand in System Settings > Keyboard > Shortcuts > Custom Shortcuts; for example, the xdotool command to insert ⭐ would be:

xdotool key --window '$(xdotool getactivewindow)' Ctrl+Shift+U2B50


vim [filename] not opening file in Ubuntu bash

You might have something wrong in your ~/.vimrc, causing vim to quit when it starts. Try moving it to see if that helps.

mv ~/.vimrc ~/.vimrc.bak


I've just uploaded the 32-bit version for you.


I successfully built the rtl8814au driver for use with the Comfast CF-917AC USB WiFi adapter on Debian Stretch (Kernel: 4.9.0-3-amd64) from this source with the following command: make RTL8814=1  Incidentally, that driver is purported to support monitor mode and frame injection as mentioned here.

While I realize this doesn't exactly answer your question, at least it's a relevant response to your inquiry after four months of no other such responses.

Additionally, there is a thread here you may find of interest.

It's time this driver was included in the distro...


Install pip3 latest version for python3.6

I guess this may be because you installed Python 3.6 package does not contain pip,
e.g. the PPA maintainer does not package python3.6-pip.

You can download the tarball at python.org
and compile Python 3.6 yourself
(do not forget to install dependencies like libssl-dev first),
which has pip built-in.

sudo apt-get install libssl-dev
# download tarball from python.org
tar xf python-3.*.tar.xz
cd Python-3.6.*/
configure
make
sudo make install


I want to send audio via bluetooth to an android phone - kubuntu 14.04

I think you misunderstood what SoundAbout is - its not an A2DP profile for your android bluetooth stack - its an audio router that allows you to configure how audio generated in the android device is routed, very similar to what pulseaudio does (possibly it uses pulseaudio?).

What you want is not possible with stock android, because the Bluetooth stack on Android does not support the A2DP sink profile. See this question for further explenation on that and how to create an application that enables bluetooth A2DP sink.

You might get ahead more by replacing the default Android bluetooth stack with the bluez stack used on modern Linux distribution, though it does require replacing the kernel which you can only do if you have a rooted or customized device. see here for details.


What video conferencing software is available?

Skype:

You can use Skype, which fully supports video conferencing and other useful features, such as screen sharing. http://www.skype.com/download

aMSN

Even when aMSN is able to perform video conferencing, recently it is a difficult task as there are several changes in the MSN services and the way that it handles video connections.

In aMSN is it that easy as having installed Farsight, which is automatically installed in the majority of the cases and if not you will have enough information and a guide in order to install it.

Anyway it may fail as I have said in my initial words.

Web Services

You may wish to give a chance to an online free video conference service, such as

Ubiqq http://ubiqq.com

Ubiqq uses a flash player based interface in order to gain access to both your webcam and microphone and allows the same in your contact's side.

A whole thread about how to make these online services to work is fully documented right here. Just in case that you can't make it work out of the box.

Good luck!


Slow boot - "a start job is running for dev-disk-by..."

If you get

A start job is running for dev-disk-by...

followed by a 90 second delay during each boot, complete the following steps:

Install GParted using the Software Center

Open GParted and see what partitions Ubuntu is currently using

Edit the fstab file using the line below.
sudo -H gedit /etc/fstab

Find the device that you are not currently using

Insert a # and a space at the beginning of that line comment it out.

Reset


Can snap access PulseAudio without snap.pulseaudio.pulseaudio.service?

to answer your questions

  To the best of my knowledge, PulseAudio comes preinstalled with Ubuntu 18.04 Desktop. Does it mean that there are two concurrent sound services, one for the system and one for snaps?

Yes, PulseAudio comes preinstalled with Ubuntu 18.04 and running second PulseAudio instance in snap is not recommended (source: https://docs.ubuntu.com/core/en/stacks/audio/pulseaudio/docs/install-pulseaudio)

  Finally, can snap use PulseAudio from the system directly?

Yes, in order to do that you can use the following command

snap connect vokoscreen-ng:pulseaudio

Edit

Regarding the Github issue, the reporter of the issue seems to be using Ubuntu Core, a version of Ubuntu that doesn't come preinstalled with PulseAudio and use snap package as the primary way of app packaging


Two default routes: ethernet + wifi -- error? consequence?

If you put a different number in the metrics entry of the cards, the network connection would default to the connection with the lower number.

As an example, if you put metrics of 100 in the wired network connection, and metrics of 600 in the wireless connection, the system would default to the wired connection.

Here is a sample netplan.yaml setting the metric manually.

network:
  version: 2
  ethernets:
    ethusb1:
      dhcp4: yes
      dhcp4-overrides:
        route-metric: 100
    wlp3s0:
      dhcp4: yes
      dhcp4-overrides:
        route-metric: 600


How can I have one screen session per user and set it as the login shell?

First, for the users you are going to do this for, make sure their ~/.screenrc has the line

shell /bin/bash

(or whatever other shell your user currently uses). If you do not have this setting set and you change their shell like we will, the user will not be able to login. You might also consider making the screen startup message go away with this line

startup_message off

Ok, now lets make a runnable script that attaches to the first already running screen session if it exits, and it none is already running it starts one. Run in a terminal

sudo nano /bin/screenlogin.sh

Put in the two following lines:

#!/bin/bash
screen -x -r || screen

Press Ctrl x and then y to save the file. Run

sudo chmod 755 /bin/screenlogin.sh

Finally, run chsh on the target user and put in /bin/screenlogin.sh for the shell when asked.


Optirun Cannot access secondary GPU - error: [XORG] Invalid argument for -config

I have found a nice workaround. It was ridiculous. The package primus comes with the primusrun command that does the same as optirun, just better and does not cause that error to appear.


Where are Chrome/Chromium preferences stored? (to force chrome uniformity in fonts)

Chrome/chromium keeps it's settings hidden in the .config directory in home. You can unhide it by pressing CTRL+h in nautilus file manager.

The file you're looking for is in:

google chrome:

  ~/.config/google-chrome/Default/Preferences

chromium:

  ~/.config/chromium/Default/Preferences


How can I undo adding a PPA and installing packages from it?

Thanks to Takkat.

sudo apt-get install ppa-purge
sudo ppa-purge ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get purge cinnamon nemo

Then restart.


How to display my name and the icon menu on ubuntu 13.10?

To do that and other tweaks, you can use the Unity Tweak Tool.  To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install unity-tweak-tool


Underclocking (overclocking) Nvidia card

Well I managed to get it working properly this time. Using 313.30 and I made a new xorg.conf file with the following in it:

 Section "Device"

 Identifier    "Default Device"
 Option  "Coolbits" "1"
 Option  "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x222PowerMizerLevel=0x3;PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
  Driver  "nvidia"
  Option  "NoLogo"    "True"
  EndSection


Connect to WiFi with a hidden SSID on Ubuntu 18.04

Yes, it's possible.

Launch Settings and go to Wi-Fi section. Click on the three dots icon at top-right, you'll get a "Connect to Hidden Network..." option.


Type in the terminal

ls /dev/ | grep sd

to list your hard drives. sda should be your primary drive and sdb should be your secondary drive, in your case the HDD. The numbers on the end refers to partitions (for example /dev/sda0 refers to the first partition on the primary hard disk).
If the sdb drive doesn't show up, the OS recognize it. If it shows up, add the drive into the /etc/fstab file. Here you got the link with the instructions.
You should add something like this

/dev/sdb0 /media <file system type (ext4, ntfs....)> defaults 0 0


How can I know whether a sound card is present on my system or not?

To detect your soundcard, use sudo aplay -l from the Terminal.

Courtesy:https://help.ubuntu.com/community/SoundTroubleshooting


Security error while booting Lubuntu from usb

Download  Lubuntu's ISO file, Ubuntu's ISO file, or a different supported 'flavour' of an ISO file with a different Desktop Environment (i.e., Ubuntu MATE, Ubuntu Kylin, Ubuntu Studio, Kubuntu, or Xubuntu).

The ISO file you use to create a LiveUSB should be checked for download errors.

Make a LiveUSB following these instructions on a Windows PC .

The Windows instructions are preferred in your case as the Rufus app provides a clear graphical interface to select persistence and specify how much space on the USB flash drive to use for it.

However, if you don't have access to a Windows PC to generate the LiveUSB with persistence in one pass, you can use these updated instructions on a Linux PC to manually partition a USB Flash Drive and then configure it as a LiveUSB.

Once you make a LiveUSB for Ubuntu or an Ubuntu 'flavour', you may boot with it and use it as is, or use it to install to your PC's internal or external drive following these steps.

However, the latest interim release of Lubuntu (19.10) now uses the Calamares installer; it asks the same questions, and does the same things, but its appearance is different. Therefore, please follow these instructions for installing Lubuntu 19.10.


Since 14 8 2016 Skype can't connect from Ubuntu 16.04. How can I solve it?

Looks like the skype login servers are down.
You might have some luck with the web client.

web.skype.com
http://downdetector.com/status/skype


Uninstall your gnome-screensaver,

sudo apt-get remove gnome-screensaver

Then, reboot. It works for me, now only unity login screen appears.


Login screen loops unless you login as Guest

I am not sure if what I was experiencing is the same but maybe this will work for you.

I have Ubuntu 12.04 Server LTS updated 6-7-2012 and Desktop installed. I am also running this as a VM in vmware player, not sure if that matters or not.

I had done a ctrl+alt+F1 from desktop to get a shell. When I tried to to start the gui again (sudo startx), I got errors, then after a reboot I got the log-in and when I put in my password it would just loop no error for bad PW! But when I switched to the Guest log-in it would boot normally! What a pain, huh!

So what I did was

switch to shell (Ctrl+Alt+F1)
logged in as the user
cd /home/user (I think that cd ~ will get you to the same place)
sudo mv .Xauthority .XauthorityBak
sudo reboot

This worked it booted normal and all is good!

There are specifics of my installation which may not apply to yours but maybe it will work.

Hope this helps,
K

P.S. I got this info from http://ubuntuforums.org/showthread.php?t=1890457
Thanks carranty

EDIT: I started to get a System Problem Detected when I would log in from a locked desktop so I sudo chown 777 .Xauthority and that seemed to have cleared up the problem. I am not sure if this causes a security issue.

EDIT: Not sure if this did clear up the problem, things are getting funky!


How can I allow SSH password authentication from only certain IP addresses?

Use a Match block at the end of /etc/ssh/sshd_config:

# Global settings
…
PasswordAuthentication no
…

# Settings that override the global settings for matching IP addresses only
Match address 192.0.2.0/24
    PasswordAuthentication yes

Then tell the sshd service to reload its configuration:

service ssh reload


How do I change all plain text files to .txt files in a directory? Is there such a command?

Assuming your directory is filled only with simple text files the most direct way to give all files and extension of .txt is to open a Terminal window in the directory and run the following command:

for f in *; do mv "$f" "$f.txt"; done

You have to love the command line :)


Opening 2 top level windows (quickly/pygtk)

You can, but you'll have to create a different Window to do this, the default main window that Quickly creates is meant to run only one at a time.


Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it

When executing docker run, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.
docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.

  Note: Do not use the data directory that your current MySQL 5.5 is
  using (/var/lib/mysql by default)
  Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.

You can also Try the way Rinzwind suggested, that's a good way to run it as well.

Hope this helps.


What tool do I need to install to make my terminal show the autocompletion of the command that I'm writing?

Kali uses zsh instead of bash as the default shell and the feature you are referring to is called autosuggestions.
Before you begin, you will need to set up zsh if you haven't already.
Run the following to install zsh and follow the instructions when prompted (it's best to accept the defaults and auto-generate your zshrc file):
sudo add-apt-repository universe
sudo apt update
sudo apt install zsh zsh-syntax-highlighting
zsh

For 20.04, run the following command to install the zsh-autosuggestions package:
sudo apt update
sudo apt install zsh-autosuggestions

For Ubuntu 18.04, you can run the following commands to install the zsh-autosuggestions repository Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information):
echo 'deb http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-autosuggestions/xUbuntu_18.04/ /' | sudo tee /etc/apt/sources.list.d/shells:zsh-users:zsh-autosuggestions.list
curl -fsSL https://download.opensuse.org/repositories/shells:zsh-users:zsh-autosuggestions/xUbuntu_18.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_zsh-users_zsh-autosuggestions.gpg > /dev/null
sudo apt update
sudo apt install zsh-autosuggestions

Finally, run the following commands to add autosuggestions to your zshrc file:
cp ~/.zshrc ~/.zshrcbackup
echo "source $(dpkg -L zsh-autosuggestions | grep 'zsh$')" | tee -a ~/.zshrc
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | tee -a ~/.zshrc

and don't forget to source your ~/.zshrc file to apply the changes:
source ~/.zshrc

See here if you want to make zsh the default shell.
Run the following command to search for other plugins, plugin managers, related packages (like fuzzyfinder), and other compatible shells:
apt-cache search zsh


How to format USB stick for car audio system?

try to format the pen drive as FAT32 using disk utility in Ubuntu. search for disk in dash.


How to configure Static IP's (internal or lan IP) in my ubuntu (VPS)

I had the same problem, solved with the Bridged Adapter and the following configuration:

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

auto eth0:1
iface eth0:1 inet static
address 192.168.0.250
netmask 255.255.255.0
gateway 192.168.0.1

Remember to launch the networking restart command:

sudo service networking restart

For the sake of completeness find below my ifconfig output:

eth0      Link encap:Ethernet  HWaddr **:**:**:**:**:**
          inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: ****::***:****:****:****/** Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4156 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2755 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5214910 (5.2 MB)  TX bytes:288520 (288.5 KB)

eth0:1    Link encap:Ethernet  HWaddr **:**:**:**:**:**
          inet addr:192.168.0.250  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:49 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4694 (4.6 KB)  TX bytes:4694 (4.6 KB)

Tested with Ubuntu server 13.10 x64 (Guest) and Windows 8.1 (Host)


How to check if alias is not replacing an actual command?

You can use type in terminal for this.

Say you have a command rm as alias rm -i. If you check,

type rm

you will get,

rm is aliased to `rm -i'

If you do not have any alias for rm you will get,

rm is /bin/rm


Confirmation dialog when opening multiple files

At present there is no setting in nautilus to adjust for a fast double click when selecting multiple items.

Nautilus does have a Brainstorm page for ideas so maybe you can add your request there.

To overcome the issue I suggest you adjust your mouse double click timeout response to a longer setting.


Editing /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off"
and executing:
sudo update-grub
is known to eliminate these ACPI warnings in many cases.  See https://unix.stackexchange.com/questions/97974/how-do-i-remove-acpi-warning-on-boot
However the ACPI Warnings are usually considered harmless.  These might not be the cause of your hung shutdown.
BIOS reset:
Warning: resetting your motherboard configuration is an option of last resort - it may solve your problem, it may leave your system un-bootable!  If your motherboard supports making a backup of your configuration, by all means do it before proceeding.
There are two methods of resetting the motherboard config and, in my experience, they can leave the motherboard with two different configurations
Built-in Factory Reset/Default: This will load into non-volatile memory a configuration the manufacturer figures will run, without modification, in the majority of circumstances.  However, it does not necessarily zero out NVM which might leave you with bad data somewhere in CMOS.
CMOS zeroing: This method involves removing power from the motherboards non-volatile memory (historically CMOS) to zero it out.  It will leave a default configuration but not necessarily the same one achieved above.
Procedure:

Remove power from your system.  (pull the plug!)
Ground yourself to chassis to prevent static discharge damage.
Open chassis
Remove battery (CR2032 typically)
Short out the battery contacts with a paper clip for 5 seconds.
Replace battery (with new if there is any doubt...)
Close chassis
Apply power

IMPORTANT: CMOS memory can run on very little current.  You must short out the battery contacts to discharge any residual charge or you will not zero CMOS memory effectively!
Typically, I will (testing between each attempt) Factory Reset, Zero CMOS, Factory Reset one last time.  If the problem still exists, I look elsewhere.


I advice you to just visit ardor website here for detail. It said:

  There may be unintended differences, and even bugs in Ubuntu native
  packages, as a result of a different building method. For this reason,
  Ardour developers highly recommend installing the official
  ready-to-run version of the program that can be downloaded from
  ardour.org, as Ubuntu native packages are not supported in the
  official Ardour forums or other support channels.

  Follow these steps to install the latest version of Ardour:

  Download the latest release from ardour.org.
  Right-click the downloaded file and choose properties.
  Click the Permissions tab and check the option "Allow this file to run as a program".
  Close the dialog and double-click the file.
  Follow the prompts.

So download a ready-to-run program from here and follow recommended steps.


I am experiencing slow performance on my system. How do I diagnose and fix it?

Ubuntu 12.04 uses more 3D features so if your graphic card is not good enough, it might be seeking memory in your RAM which is also rather low for nowadays usage.

You can swith to a 2D Ubuntu. I think this will work better for you and you will see that the speed at this point is very snappy.


Unable to locate package. Have I done something wrong?

Remove the \ from your command:

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

I guess you copied the command from some web page where it was split over several lines. In that case the \ prevents the line ends from marking the end of the command.

If you use just one line for the command the \ tell apt-get that you want to install packages called "" (one space) which causes the errors.


Python playback can't chose Bluetooth device in Volume Control

The only way I have found to switch from speakers to bluetooth headphones is to quit the Radio Tray program then use Sound Settings to set the bluetooth headphones as output device.  Then once I start Radio Tray again it will play through the bluetooth headphones


Take into consideration that the LATEST version of VLC which is the 2.0 right now (Using the PPA for it) has different mplayer, mencoder and other packages than the ones devede, openshot and other programs that use this tools need.

So if you are talking about the latest VLC being VLC 2.0 then you probably just changed several packages (mencoder, mplayer, ffmpeg..) with the ones that come with VLC 2.0. This will create a problem for programs like Pitivi, OpenShot and DeVeDe.

The only fix I know of is to delete VLC 2.0 and the PPA that brought it. After that update the repositories so the reflect the deletion of the VLC 2.0 PPA. Then install VLC again which will in this case reinstall all the packages that were removed or modified by VLC 2.0.

If any of this packages happens to stay just purge it then download it again. In this case you will only have the ones that officially come with Ubuntu so after installing them DeVeDe, OpenShot (in my case when I tested) and Pitivi should all work again.

A normal step to do this would be:

sudo apt-get purge vlc
REMOVE PPA FROM VLC 2.0 via Software Sources
sudo apt-get update
Verify that the VLC that is left is the 1.x version: sudo apt-cache show vlc| grep Version. It should say some version that starts with 1.x.
If the version IS 1.x then: sudo apt-get install vlc if not reboot that PC until she learns how things work around here (Just in case).

This is how I did it to restore all the rest of the programs. If any of them say they are missing X package then just install it. For example if they say they are missing mencoder then sudo apt-get install mencoder. Repeat for any package still missing after installing VLC 1.x


This ended up being a 2 part answer and here it is in case it will help someone else:

To answer the original question, to add a PCI passthrough, it is best to use Virtual Machine Manager. Select your VM and click Open. Got to View-Details and click "Add Hardware" button.
You can also accomplish the same thing via command line:

server$ virsh edit VM_name   and add these lines to the XML file.

<hostdev mode='subsystem' type='pci' managed='yes'>
  <source>
    <address domain='0x0000' bus='0x01' slot='0x01' function='0x2'/>
  </source>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</hostdev>

You can find the domain, bus, slot and function name using

lspci -t

lspci -n

Now, for the above process to work, you first have to unbind the current driver from PCI card and bind it to the virtual machine driver. In my case, this was an excerpt from the lspci --v command

server$ lspci -nnv

01:01.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [14f1:8800] (rev 05)
    Subsystem: DViCO Corporation FusionHDTV 5 Gold [18ac:d500]
    Flags: bus master, medium devsel, latency 64, IRQ 17
    Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
    Capabilities: <access denied>
    Kernel driver in use: cx8800

The instructions for unbinding in the KVM project site don't help because they reference pci-stub which is deprecated (as far as I understand). Instead do the following to unbind the driver and bind it to the VFIO driver:

server$ sudo modprobe kvm_intel
server$ sudo modprobe kvm
server$ kvm-ok
server$ modprobe vfio-pci
server$ sudo chmod 222 /sys/bus/pci/drivers/vfio-pci/new_id
server$ sudo chmod 222 /sys/bus/pci/devices/0000\:01\:01.2/driver/unbind
server$ echo 0000:01:01.2 > /sys/bus/pci/devices/0000\:01\:01.2/driver/unbind
server$ echo "14f1 8802" > /sys/bus/pci/drivers/vfio-pci/new_id

You will notice that I had to use chmod in order to get permission to unbind/bind the driver.
Again, you need to do step 2 before you can do step 1.

If it complains about permissions when adding the PCI passthrough, do the following

server$ modprobe -r vfio_iommu_type1
server$ modprobe vfio_iommu_type1 allow_unsafe_interrupts=1

I found this trick here.


How apt-get install some certain version of CMake?

The latest cmake version for Precice (12.04) is cmake (2.8.7-0ubuntu4).
And no, usually you can't install different cmake versions via the package manager at the same time.


Automatic login on startup - Ubuntu Studio 21.04 hirsute

I've been experimenting with ubuntu MATE 21.04 and so far I'm very impressed with it's good clean clear and uncomplicated lines which are easy on the eye and ideally suited for inexperienced seniors. I think this would be a more reasonable choice for you to consider and perhaps more suited to the hardware you have in mind.
The facility exists to set programs to launch at boot time quite simply which might satisfy your need for this aspect.

The above application maybe launched from MATE Control Center or using mate-session-properties command.
I've not specifically tried this with Anydesk or Zoom clients but I don't see why it wouldn't work.
This reference is the official ubuntu MATE guide


Mount directory at startup --bind option

With your favorite text editor and root privileges, add the following line to /etc/fstab.

/bakup/Music /home/george/Private        none    bind

(replace george with your username)

See this Server Fault post for the full answer.


I just installed Ubuntu on my Yoga 2 pro and I am looking to manually adjust the screen resolution

The package you are looking for is xrandr (should be installed by default).

To see the help :

xrandr --help

To read the manual :

man xrandr

You can change your screen resolution with :

xrandr --fb <width>x<height>


Access Wiki installation on Host from Virtual Server

You'd have to set the virtual machine's IP manually or activate VB's dhcp server. From the documentation:

For host-only networking, like with internal networking, you may find the DHCP
server useful that is built into VirtualBox. This can be enabled to then
manage the IP addresses in the host-only network since otherwise you would
need to configure all IP addresses statically.


Run:

gedit ~/.config/autostart/xbmc.desktop

write in file

[Desktop Entry]
Type=Application
Exec=xbmc -d 5 --standalone -fs
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_En]=xbmc
Name=xbmc
Comment[en_En]=
Comment=

save file and restart system.

XBMC will start with five second delay, in standalone mode and full screen mode.


Can't connect to public (unsecured) wifi networks (Ubuntu 16.04)

Well in this case I suggest to set up your IP manually, following these steps:

sudo iwconfig [INTERFACE] mode managed key open
sudo iwconfig [INTERFACE] essid [ESSID]

Now set your IP address:

sudo ifconfig [INTERFACE] [IP ADDRESS] netmask [SUBNETMASK]

Then add your IP of router as default gateway:

sudo route add default gw [ROUTER GATEWAY]

Finally, configure DNS:

sudo echo nameserver [DNS]  >>  /etc/resolve.conf


This is a known bug: Bug #609020.

Workaround: Install gvfs-backends

sudo apt-get install gvfs-backends


sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs

Note: that this only affects users who installed 64-bit Ubuntu by running wubi.exe standalone. If you installed from the ISO or installed any other flavour e.g. Kubuntu, Edubuntu, Lubuntu, Xubuntu, Mythbuntu it wouldn't apply.


For Ubuntu 18.04

In terminal works:

amixer set Capture toggle && amixer get Capture | grep '\[off\]' && notify-send "MIC switched OFF" || notify-send "MIC switched ON"

But if I just put this command in "Command" field for Custom Shortcut, it doesn't work

I created a Shell Script with path /home/username/ToggleMic.sh:

#!/bin/bash

amixer set Capture toggle && amixer get Capture | grep "\[off\]" && notify-send "MIC switched OFF" || notify-send "MIC switched ON"

And in "Command" field for Custom Shortcut I put:

/home/username/ToggleMic.sh

And now it works! I can toggle my mic using keyboard shortcut and can see notifications on top of the screen


How to automatically reboot after running a command

sudo -s will prompt you for your password once, then leave you sitting in a root shell that remains until you exit.  There you can chain commands like apt-get update && apt-get upgrade -y && reboot.


With respect, if you get what you ask for and somebody can run sudo <anything but su>, they can:

Run sudo bash
Run sudo -i
Create a script that does something similar (including directly running su).
Just edit the configuration with sudo visudo

The point I'm trying to make is that if you allow people to run anything (or even nearly anything), they are as good as root. There are incalculable numbers of ways they could circumvent you.

If you only want them to be able to run a finite number of commands as root, create a new group (eg semisudo) and add each command to sudoers, like so:

%semisudo    localhost=/path/to/command
%semisudo    localhost=/path/to/another/command

And then add the user to that group and kick them out of admin/sudo.


TPM or usb startup error on Acer C720 Chromebook

I have run into the same issue install 14.04 upgrade it to 16.04 then upgrade again to 16.10. Yes I know this takes a lot of time but it works. Alternatively you could use chrome os and install crouton and install xfce4 distro of ubuntu


Find not removing files in folders through bash script

My error was a logic error with -mtime. I thought my script was checking the names but -mtime checks for the date when the file was created.
So my final code:

DAYS_TO_KEEP=2
find $BACKUP_DIR -maxdepth 1 -mtime +"$DAYS_TO_KEEP" -exec rm -rf {} \;

I just had to do a sudo touch -d "3 days ago" /filepath/folderToRemove to make -mname find the folder and make sure the file was old enough to be removed.
So this final code removes all folders that are older than my variable $DAYS_TO_KEEP


Stuck with initramfs at boot. UUID does not exist

I found my solution:

I booted on a live USB Ubuntu.
I could not see my hard drive, but switching on the BIOS the SATA Operations parameter from RAID to AHCI solved the problem. No idea why, maybe during the BIOS reset it switched the parameter, or maybe Ubuntu has trouble reading already-written-by-a-foreign-source RAID drives.
At this point my original error was fixed but I got another one. I ran a manual fsck on my hard drive to address it.
Everything works!


Where is the Subversion executable located

The command which will tell you where a command is found in your current environment - it may be a better choice than whereis, since it searches the path of your current shell, rather than a fixed set of paths.

Usage is:

$ which svn
/usr/bin/svn


If you are in the directory of the scripts you need to use ls *.pm, if you want to search the subdirectories as well you are better of with the find command, you would then use

find . -name '*.pm'

The first argument is the parent directory to use: the dot means from the current directory and down, if you use / this means that the whole filesystem will be searched, depending on your files this might take a while.

I don't recommend using the locate command because it gets the information from a database that might not be up-to-date. So if you add a file it won't show up in your output unless you force the database to update by

sudo updatedb

See also the man pages for more info about these commands (eg. by doing man find)


Wifi adapter Edimax EW-7811Un/Realtek RTL8188CUS on Ubuntu 17.10

From our lengthy discussions in chat, it was found that you had some settings in /etc/resolv.conf, some partial settings in /etc/network/interfaces but still relied on Network Manager to connect with wireless.

Network Manager generally is designed to completely ignore any interfaces that are declared in  /etc/network/interfaces. It is therefore preferable to use one method or the other, but not a combination of both.

I recommended that you reset both files to their defaults and rely on Network Manager entirely. You have some unique DNS nameserver settings that are required for ethernet and we also set those in Network Manager.

After making the suggested changes, detaching the ethernet cable and rebooting, the wireless is now working as expected.


How to get the internal microphone to work Ubuntu 20.04.1 LTS

Static pulsing sound produced from internal microphones
solves the problem for now -- I will update if other issues appear.  I use vlc in the mode that it displays the onboard web cam and the onboard microphone in vlc so that one may observe, with a delay, what should be recorded, shown in zoom, etc.  I made the script in the above URL (that displays as a text link, not the actual URL starting with https) into an executable sh script and put the pulseaudio commands in the URL into my script. Should I post the final working script in this answer?
Take care. Stay safe.


How to change the framerate of a video without reencoding

MP4Box can do it.

The command

MP4Box -add SourceMovie.mp4#video -raw 1 -new test

creates the files test and test_track1.h264. You can now create an mp4 file with whichever supported framerate you would like (30 in this example):

MP4Box -add test_track1.h264:fps=30 -new DestMovie.mp4

MP4Box is part of the gpac package, so make sure it's installed.


ERROR says: "WARNING: Module mbstring ini file doesn't exist under /etc/php/7.3/mods-available"

You need to install the module first:

sudo apt install php-mbstring    # or: sudo apt install php7.3-mbstring


If those don't work for you, loganmc10 has provided a zip file on GitHub with what you need to get started.
Install the dependencies.
sudo apt install qt5-default libqt5websockets5 libsdl2-2.0-0 libsdl2-net-2.0-0 libhidapi-hidraw0 libminizip1 p7zip-full

Go to:
https://github.com/loganmc10/m64p/releases
Download and unzip the Linux version, change into the directory created, and run the gui frontend:
./mupen64plus_gui

It should already be executable, but if it's not run:
chmod u+x mupen64plus_gui

Repo:
https://github.com/loganmc10/m64p


dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': No such file or directory

Run this command to check if a file named format-new exists in /var/lib/dpkg/info/ :

ls -l /var/lib/dpkg/info/format-new

If format-new does not exist, create a new file named format-new in the /var/lib/dpkg/info/ directory.

sudo touch /var/lib/dpkg/info/format-new
sudo apt update
sudo apt upgrade


Apache Httpd backed by both Tomcat and PHP

Answered the same question on StackOverflow and got an answer there:
https://stackoverflow.com/questions/30935328/php-wordpress-blog-and-tomcat-on-same-server-is-it-possible/30938420#30938420


Is it possible to choose keyboard layout via terminal command?

If you want to switch between keyboard mappings, you need to add a setxkbmap command to /etc/xdg/lxsession/Lubuntu/autostart

To switch between two keyboard mappings with the control+shift keys, Open the terminal and

echo '@setxkbmap -option grp:ctrl_shift_toggle "de,us"' | sudo tee -a /etc/xdg/lxsession/Lubuntu/autostart

Keyboard mapping for 13.10 and beyond

Since Lubuntu 13.10, the method to choose and toggle keyboard layout has changed. Indeed, lxkeymap application is no longer installed by default, and we have to use Keyboard Layout Handler instead, a plugin for lxpanel.

On Lubuntu default installation, Keyboard Layout Handler appears on the right of the panel, near volume control. It displays a box which describes the current keyboard layout (for example, “US”). To modify keyboard layout settings, right click on it, and choose « Keyboard Layout Handler Settings ». Here you can make some modifications.

By default, the option « Keep system layouts » is checked. Uncheck it to customize your keyboard layout.

source: Lubuntu community/Keyboard


Internet doesn't work on Xubuntu 12.04 via Wi-Fi connection

The problem was in the settings of the router. I used the following IP address: 10.0.0.0. When I changed the IP address to 192.168.1.1, everything worked.


The XPS15 comes with a Intel Centrino Wireless-n 1030 which requires a minimum of linux kernel 2.6.36 ( http://intellinuxwireless.org/ ). You could simply update your kernel to 2.6.37 and it will get detected. Worked for me :)


Not able to install Pronterface on Ubuntu 1604

You can run it from source since it is just a python script I think. You can releases from the GitHub page (tar.gz source files). (This is link is from their website)

Dependencies may be needed (packages usually install these automatically). My guess from here is:

sudo apt-get install python-serial python-wxgtk3.0 python-pyglet python-tk

You will probably encounter a permissions issue unless you run a command similar to installing the Arduino client - you may need to logout and login after this:

sudo adduser $USER dialout

Other distribution such as Fedora have (possibly now defunct) packages for udev rules as an alternative. You can copy the included file to /lib/udev to try, but an interesting note from these:

  Normally, when you connect a RepRap like 3D printer to a Linux machine
  by an USB cable, you need to be in dialout or similar group to be able
  to control it via OctoPrint, Printrun, Cura or any other control
  software. Not any more.

  Install this rule to grant all users read and write access to
  collected devices based on the VID and PID.

  Disclaimer: Such device might not be a 3D printer, it my be an
  Arduino, it might be a modem and it might even be a blender. But
  normally you would add your user to dialout and get access to all of
  those and more anyway. So I guess be careful when some of the users
  should not get access to your blenders.


Hide current working directory in terminal

export PS1='\u@\h: '

That results in oli@bert: for my prompt.

If you really want something as minimalist as you ask for, try this:

export PS1='> '

You can attach that to the end of your ~/.bashrc file to have it persist between logins.

You can also get creative with some colours. Here's what I use on my servers:

export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '

Giving (it's easier to see on a full black background):

Glossary of acceptable characters in PS1


How to change default scaling governor back to ondemand

You can Manually set the governor by running the cpufreq-set command (as root).   Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo cpufreq-set -c 0 -g ondemand

To install cpufreq-set:

sudo aptitude install cpufrequtils

  cpufrequtils includes a daemon which allows users to set the desired scaling, governor and min/max clock speeds for all processor
  cores at boot-time.  Before starting the daemon, edit
  /etc/default/cpufrequtils as root, selecting the desired governor and
  setting the min/max speed for your CPU(s), for example:

/etc/conf.d/cpufreq

#configuration for cpufreq control
# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace
governor="ondemand"
# valid suffixes: Hz, kHz (default), MHz, GHz
min_freq="1GHz"
max_freq="2GHz"

Source: archlinux.org


Fresh Install of 14.04 Ubuntu Server, failing to achieve Ethernet connection under 2 switches

Open the Terminal with the key combination Ctrl+Alt+T and edit your /etc/default/grub:

sudo nano /etc/default/grub

Add this line at the end:

GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"

Update the grub:

sudo update-grub

and then restart Ubuntu.

Now, open your /etc/network/interfaces and add

auto eth0
iface eth0 inet dhcp

Finally, restart network

sudo /etc/init.d/networking restart


I think xscreensaver is much better. After I switched to xfce DE I uninstalled gnome-screensaver at once or it would prevent xscreensaver from working. Gnome-screensaver now only show you a black screen while xscreensaver can show you many more wonderful animations.


Unable to install Ethernet Driver in 14.04LTS

Sometimes when you add a custom repository you have to use the command apt-key add [whatever-the-key-is]. When you try to install something from the custom repository without the right apt key, you will get a key error like the one you are seeing. Go back and make sure you added the right key, and then apt-get update && apt-get install --reinstall [RTL8101E/RTL8102E driver packagename]


Unable to log into my desktop with correct password

Found the solution.

My motherboard is the Asus X99 Sabertooth. I had secure boot enabled and that was what was screwing with Ubuntu.

For anyone with the same issue here is how you disable secure boot for newer Asus Motherboards.


For backing up stuff remotely without cloud, you can try BitTorrent Sync.

Here is an answer on how to set it up on Ubuntu:
How to run BitTorrent Sync?

I personally have a few different boxes running BTSync, making sure I have multiple physical backups available at all times. It is quite simple to use and is cross-platform.


You need to have the program xfwm4 run on startup.

To do that, add a program to the login items.

To add a program to the login items, open up the session editor (Applications Menu > Settings > Session and Startup), switch to the "Application Autostart" tab, and then add a new item:

Click "OK", and you should be good to go.

Also, if you could file a bug (For more on how to do that take a look here) that'd be great.