Ubuntu 18.04 No audio from speakers. Headphones working

welp.... I have no idea what just happened.... but renaming /etc/modprobe.d/alsa-base.conf to /etc/modprobe.d/alsa-base.bk , then rebooting the computer fixed the my speaker sound issue.

I then restored line by line to /etc/modprobe.d/alsa-base.conf, rebooting between restored lines, until all lines were back.... and ... it still worked!
so I restored the original /etc/modprobe.d/alsa-base.conf and rebooted the computer and everything was still working....
so I am not sure what the problem was but is now fixed.


Sed to change a birth date using a regular expression

[1-12]\/[0-31] and [0-99] do not mean 1 to 12, 0 to 31 and 0 to 99.

[1-12] means a range of characters starting from 1 till 1, and a 2. In essence: [12]. (Compare with [0-1a].)
[0-31]  means a range of characters starting from 0 till 3, and a 1: [0123].

Similarly for [0-99]. Expressing a range of numbers with regular expressions isn't easy.

If the numbers don't use double digits (01/06/33), you'll have to do something like:
[0-9]{1,2} for day and month, and [0-9]{2} for the year, or the regex will quickly grow unwieldy. This, of course, risks the selection of something like 99/99/99.

For an example:

$ sed "s/^\(muru\/\)[0-9]\{1,2\}\/[0-9]\{1,2\}\/[0-9]\{2\}/\111\/14\/46/g" <<<'muru/1/4/85'
muru/11/14/46
$ sed "s/^\(muru\/\)[0-9]\{1,2\}\/[0-9]\{1,2\}\/[0-9]\{2\}/\111\/14\/46/g" <<<'muru/10/4/85'
muru/11/14/46
$ sed "s/^\(muru\/\)[0-9]\{1,2\}\/[0-9]\{1,2\}\/[0-9]\{2\}/\111\/14\/46/g" <<<'muru/10/28/85'
muru/11/14/46

I assume you want to retain the name, so I used backreferences to refer to it in the substitution (the \1).


X-Plane 10 doesn't run due to "annot find autorun program"

Are you trying to install a Windows version on wine?
X-plane 10 GLOBAL includes Windows, Mac and Linux versions.

If you have global scenery on your DVDs, but you don't have linux installer,  you may download installer for linux here:

  http://www.x-plane.com/downloads/x-plane_10_installer-updater/

Before istallation starts, make sure you have:

  libopenal1 (Which basically is an OpenAL library)

Installation will require internet connection. After installing X-plane, start x-plane installer/updater and choose option Add/Remove Scenery, follow guides and insert the discs.

After installing scenery you may update your X-plane using X-plane installer if you want.

To unlock X-plane demo you need to  insert the first disc in your DVD drive. If you have any joysticks/yokes/etc. plug them before loading X-plane. Then load x-plane and have fun.

This link may help you:

  http://wiki.x-plane.com/Category:Linux


Run vagrant up with highest VirtualBox version

To solve this same problem, I purged the Ubuntu virtualbox packages, and added lines to /etc/apt/sources.list

#Virtualbox
deb http://download.virtualbox.org/virtualbox/debian quantal contrib

Update the apt listings:

sudo apt-get update

Install the headers for your kernel if they're not installed (because virtualbox install needs them):

sudo apt-get install linux-headers-$(uname -r)

Install virtualbox:

sudo apt-get install virtualbox-4.2

Download and install the latest .deb for vagrant, and all works.


Unreal Torunament (UT99) no sound in 12.04?

Ok, after trying and failing a lot I finally have sound in Unreal Tournament. It also runs at the right speed, so no more problems! Here are the important things I did:

In ~/.loki/ut/System/UnrealTournament.ini :

;AudioDevice=ALAudio.ALAudioSubsystem
AudioDevice=Audio.GenericAudioSubsystem

In UnrealTournament/bin/x86/ut (note this file should be where you installed UT),
line 84 should read:

exec padsp "./ut-bin" -log $*

Thus running the executable with padsp, I have tried aoss here also, didn't work.

I think though, after several upgrades of my ubuntu install. That my sound setup have completely borked itself.

I followed this Ubuntu Forums post to delete all my pulseaduio configuration (or misconfiguration):

$ rm -r ~/.pulse ~/.asound* ~/.pulse-cookie
sudo rm /etc/asound.conf

You should probably make a backup of these files before attacking them. In addition, I reinstalled the pulseaudio packages and removed the alsa-oss package. Note however that this was probably not required.

Hope this can help someone else!


right now 14.04 is not yet complete. There's only a "beta" version. so if you try 14.04 now I think you'd find it even more buggy.

...personally I think that 13.04 had less bugs than 13.10 but the thing is that its not supported anymore. ... and it's not as fast as 13.10 but I think it's less buggy

You can try installing and updating it. If it's convenient for you then use it. why not.

I really want to know what bugs are you having on 13.10; I'm using it now


Actally offtopic, but here you go: dafont.com - Dingbats > Runes, Elvish


How to change VirtualBox default VM location in command line

This is a global VirtualBox property, and can be set with the following command:

vboxmanage setproperty machinefolder /path/to/directory/

Be aware that this will not move already created VMs, it will affect only VMs which are created after the machinefolder property has been set.


Ubuntu 10.04 eats more than 500MB of memory

Enter top at the command line.

Then look at these two lines:

Mem:   8092444k total,  7647620k used,   444824k free,   550248k buffers
Swap:  8388604k total,   107804k used,  8280800k free,  3228520k cached

Buffers is the amount of memory used for file system meta information like directories
Cached is the amount of memory used as disk cache, for files

These two pools grow/shrink automatically, depending on the amount of memory actual processes require. When you have a lot of memory and only small process memory footprint, it is good that your RAM is used as disk cache as it improves system responsiveness. Your machine doesn't have to read the disk every time over and over again. On most machines (depending on RAM size) after a while nearly the whole memory will be in use, either for processes or as disk cache.

Used (first line) is process memory + buffers + cached
Free (first line) is readily available RAM
Swap is the size of your swap space
Used (second line) is amount of swap space in use
Free (second line) is free swap space

Swap space is virtual memory, memory on disk rather than RAM. Having it is extremely valuable, but it is slow. The kernel provides a lot of intelligence to decide whether to swap out (unused) process memory or to give up some disk cache.


How to make Unity Dash Background darker?

You should try the static blur option, it's set the first time you use the dash in a session for the life of the session, may be less of a performance issue.

If you wish it to look a bit like the no blur used to be, (for all of a couple of wk's) then open the dash over a full screen dark solid color like dark blue or black

Edit: A small workaround till no blur becomes useful & if your current background  isn't what you'd like

create a solid color .html - this is for black, a very dark blue works well

<html>
<head>

<title>Dash Background</title>
</head>

<body style="background-color:#000000;">
</body>
</html>.

Then at session start open the .html in firefox & go

F11

tap the Super button to open dash, tap again to close

F11


Lubuntu no sound at all; no mute, alsa, pulse

sudo apt-get install pavucontrol

In terminal run pavucontrol

In Configuration tab for Built-In Audio

Profile : Analog

Make sure HDMI is not selected.
Make sure volume is set in all other tabs of pavucontrol


Do all packages get upgraded with sudo apt update and sudo apt upgrade?

No. apt upgrade only installs updates to packages that are already installed; it will not add new dependencies.
The command you want is apt full-upgrade which will also install updates that have dependences that are not already present.


NetworkManager - if-down.d script does not execute

Try to move your "disconnect" script to /etc/network/if-post-down.d, that's the directory that should actually get run when NetworkManager disconnects, rather than if-down.d (which would mean triggering something as the device goes down, not when it just disconnected). For what you're trying to achieve, it shouldn't be an issue, and in fact avoid trying to send the SMS via network while the default gateway might not yet have been updated.

This obviously assumes you then still have another connection (wired) to send the SMS over. Anything else is too uncertain and unreliable to be worth using (you can't expect the wireless connection to be working enough by the time the scripts are run to send an SMS over it).

If you want to investigate further into this, you can look at /etc/NetworkManager/dispatcher.d/01ifupdown.


how to change browser search text font color?

You can create ~/.mozilla/firefox/PROFILE/chrome/userContent.css with the following in it :

input {
-moz-appearance: none !important;
background-color: white;
color: black;
}
textarea {
-moz-appearance: none !important;
background-color: white;
color: black;
}


How do I access files and directories in a zip file using bash script?

You can use the unzip command with its -l option.
man unzip says about the -l option:

  list  archive files (short format).  The names, uncompressed file
  sizes and modification dates and times of the specified  files  are
  printed along  with totals for all files specified.

For example you are in ~/sed directory,in which there is a zip file named my.zip, you should do:

me@me-K52JT:~/sed$ unzip -l my.zip

The output will be:

  Length      Date    Time    Name
---------  ---------- -----   ----
      752  2019-07-10 20:24   a.txt
      101  2019-07-10 18:33   b.txt
---------                     -------
      853                     2 files

So you can see the list of files in your zip without extracting it. The default behavior of unzip (with no options) is to extract into the current directory.


Celeron N3050 Braswell CPU usage too high on Ubuntu 14.04

IN case anyone else has problems, I had similar: poor performance Ubuntu 14.04.3 with 3.19 Kernel, with high CPU activity -- upgraded the kernel to 4.4.1 and it is now significantly faster, and the CPU is not nearly as busy.

System seems stable (only upgraded a few hours ago).

I will just add the code to do this here for anyone looking (using the tmp dir):

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-headers-4.4.1-040401-generic_4.4.1-040401.201601311534_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-headers-4.4.1-040401_4.4.1-040401.201601311534_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/linux-image-4.4.1-040401-generic_4.4.1-040401.201601311534_amd64.deb

sudo dpkg -i linux-headers-4.4.1*.deb linux-image-4.4.1*.deb

After install, reboot.

If you want to check your current kernel version (before or after upgrade), use:

uname -r

If anything goes wrong and you want to uninstall the new kernel, restart your computer and select boot with the previous Kernel (under Advanced Options) when you’re at Grub boot menu, after logged in run below command in a terminal:

sudo apt-get remove linux-headers-4.4.1-* linux-image-4.4.1-*; sudo update-grub

Info taken from:
http://www.yourownlinux.com/2016/02/how-to-install-linux-kernel-4-4-1-in-linux.html
http://ubuntuhandbook.org/index.php/2016/01/how-to-install-linux-kernel-4-4-in-ubuntu/


I saw this and I really think it solved my problem on a fresh install of 16.04 LTS:

"https://superuser.com/questions/528727/how-do-i-solve-periodic-mouse-lag-on-linux-mint-mate"

I found this solution! Credit goes to the original poster.

https://superuser.com/questions/528727/how-do-i-solve-periodic-mouse-lag-on-linux-mint-mate

To save some peeps the trouble of going to the link here are the specific instructions I followed (copy and paste each line on a terminal):

sudo su -
modprobe drm_kms_helper
echo N> /sys/module/drm_kms_helper/parameters/poll
echo "drm_kms_helper" >> /etc/modprobe.d/local.conf
echo 'drm_kms_helper' >> /etc/modules-load.d/local.conf
echo "options drm_kms_helper poll=N" >> /etc/modprobe.d/local.conf

Credit goes to the original poster, Mr. Indrek.


Insert Unicode character in Microsoft Office as Wine Application on PlayOnLinux

You can insert any symbol using the Symbol window. The button Symbol (to show the window) is in the Insert tab. This way works for Microsoft Word. If it's needed to add any symbol to another application - you can copy and paste symbols.

There is the Character code field where you can enter the symbol code what you want to insert.


Any Ubuntu or 3rd party extensions for touchscreen?

Touchscreen is already supported by Ubuntu. The Multitouch Wiki page lists the supported gestures in Unity.

The problem you are describing is that the applications you are using don't support touch screens.

For example, other than the available Unity gestures, Google Chrome has support for touch screens. For instance, you can pinch to zoom and scroll through the page with your fingers (you can find the touch settings if you go to chrome://flags/#touch-events in Chrome), while Firefox doesn't support touch screens on Linux yet.

Another example is the image viewer which also has touch support. You can pinch to zoom, swipe left or right to go the next or previous image (or scroll through the image when it is not set).


Look for a .crash file in /var/crash/

The filename itself will tell you the program/library where the problem was detected, plus date/time stamp will tell you when.

You can view the file (it's text) with the file starting pretty easy to understand before it moves to hex-dump & not really human-readable...

It's these .crash files that you submit using ubuntu-bug or when you click "yes" to report it.

fyi: .crash files that have been submitted should have been renamed to .crash.upload, but yes there are times where submissions fail & the message can repeat. If .crash files are old (ie. dated a few sessions ago), you can rm (remove) them safely which will stop the 'problem detected, submit report' question repeating.

Also please note you won't always hear from a Ubuntu team member on filing a bug report.  Also please note  crash reports aren't uploaded if it's a common bug (enough info has been grabbed from prior reporters), but it's still useful information, as a bug that impacts 100 people will get more attention than a bug impacting only a single user (in bug terms more reports adds heat).

Lastly, Thank you for taking the time to report these bug(s), and helping to make Ubuntu better.


Error "problem unlinking" in apt-get clean

A potential solution is to remove the directory /var/cache/apt/archives/apt-fast every time you want to run apt-get clean.

$ rm -r /var/cache/apt/archives/apt-fast

This also means you are clearing the cache for apt-fast.


Individual applications (e.g. text editors) might enable mouse support. In that case they'll be notified about mouse events, and act however they wish to. For example, the application might decide to move the cursor to the click's location, or open a menu, execute some action (e.g. think of the top and bottom bars of mc), or do whatever else. You might notice that clicking in mc's file listing area moves the currently selected file to the click location, but the terminal's cursor stays down there in the command line. Only in a fraction of cases is the desired user-facing behavior to move the terminal's cursor to the click's location.

There is no generic concept of enabling mouse support, since the cursor is expected to be entirely in the application's control. If it was moved by external means (e.g. the terminal emulator moving it on its own in response to a mouse click, without the application's request) then the application's subsequent behavior is likely to be incorrect: painting things at the wrong place. There is no way to notify an application that the cursor was moved by external means.

Some terminals try to figure out the intent of the click, and send keystrokes. E.g. if they recognize that you're in your shell editing a command line, and click within that command line's area, they synthesize the corresponding number of Left or Right keypresses that will cause the shell to move the cursor there. This approach sounds pretty fragile to me, probably breaks in a lot of cases. GNOME Terminal and MATE Terminal don't have such hack.


Install new version of Ubuntu on a dual boot XP /Ubuntu 11.04 system

Have you tried Plop boot manager? I do believe you can burn an ISO image to a disk. Then, when you boot, make sure your USB boot drive is inserted, and boot from the Plop cd you burned. From there, tell PLOP to boot from USB. Even if you BIOS doesn't support USB, Plop will!


You can open software center from a terminal by first opening a terminal and then typing the following command:

sudo software-center

The password prompt will be prompted from within the terminal instead of the desktop. You must use the password of the user that is logged into the desktop. This user must have sudo or admin privileges.

Also, I've never used "Landscape Service" but it sounds like that may be along the lines of something you are looking for as a management tool. - landscape.canonical.com

Wine allows Ubuntu and linux users to run microsoft programs.

To install MS adobe reader XI using wine and winetricks, follow these instructions.

Open a terminal and type the following commands:

sudo apt-get update
sudo apt-get install wine winetricks wine1.6* wine-gecko2.21* wine-mono0.0.8 ubuntu-restricted-extras ttf-mscorefonts-installer

You might not need all of those but installing all of those will give you what you need.

After installing wine, run this command:

winetricks -q mspatcha

Then, download Adobe Reader XI from here extract the .exe and right-click on the "setup.exe" file in the extracted folder. Choose to open the file using "wine windows program loader". Follow the instructions and agree to accept the user agreement to install Adobe Reader.

Next, download the FileOpen plugin installer from here. All you have to do is right click on the installer and choose to open the file using "wine windows program loader". Follow the prompts to install.

One last note. Adobe reader opens without protection mode or something like that so take note if you feel there is some sort of a security risk running certain pdf files.

Also, There's a 30 day free trial available for Adobe Acrobat but you must install AIR first as it is required. AIR is available here (click "download for another computer" and select windows operating system) download the .exe and run it with wine to install. Adobe Acrobat is available here(you will have to login or register to download). Open a terminal to first install some dependencies with the following two commands:

sudo apt-get install winbind
winetricks atmlib

Again, download the .exe, open it with wine, and follow the prompts to install. If you encounter problems, open a terminal and install the file by typing wine followed by space followed by the path to the .exe file (it is usually possible to drag and drop the file into the terminal to automatically fill in the path for you). Any errors will appear in the terminal during the installation along with suggestions and information on how to fix the issue.

More info: winehq.org

and

fileopen.com


Ubuntu 19.10 Dual Monitor Intel Graphics Display Issues

That's 'snow', AKA static. Please try these mechanical solutions:

Re-route the cable to get it away from power cables and transformers.
Put the monitor in a different position with respect to the laptop.
Try another cable to the external monitor.
Try a different monitor.
Boot with a Ubuntu LiveUSB on the Windows laptop.


Yes..In details view, right click the top bar of the display pane and choose from the drop-down list of attributes.


I get a warning from Gparted Partition Editor

Check this article: gparted block size warning

WARNING: the command shown at the link above will destroy all data on the given device - the same goes for the command below.

It does mention to the same warning message. When a USB stick was used to install Ubuntu, the creation of the booteable media could change the block size of the USB device.

The solution, according to the article author is to run the following command, replacing <device_path>, with your device path, for example /dev/sdb:

sudo dd if=/dev/zero of=<device_path> bs=2048 count=1 # this will destroy all data on the given device


Annoying switching from a keyboard layout to another

To avoid switching the keyboard layout you could also search for one that can do all the characters you need and get used to that. I changed to Spanish (Latin America) layout and it can do éàè and öäü, even the ß used in Germany.


I had a similar problem in Ubuntu Oneric Ocelot 11.10 32bit. I was able to hear sound from flash movies, but it would work in all other applications and even Pandora radio.

I was able to fix it by doing

$ mv ~/.pulse ~/.pulse.bak

then logging out and logging back in.

I think some settings file was botched by an upgrade to pulse, which the flash player depends on.

For more information, check out:
http://kubuntuforums.net/forums/index.php?topic=3118895.msg277490#msg277490

Update:

I've noticed that after updating my flash player today that I am no longer having this issue.

If you have performed the fix mentioned above and were having issues with your sound icon remaining a flat line and needing to control your volume using alsamixer, this update appeared to fix that issue for me as well.


You are asking for opinions. One will say yes, the other will say no. In the end YOU will need to decide yourself.

Advice: prepare for failure . Investigate how you can revert changes you made that made the system fail.

Anything can be reverted from a live session or from grub rescue prompt. Just make sure you know what to do (as you likely will not have an internet connection from that system when it crashes ;-) ).  When you are confident whatever option you pick you will be able to restore to a working situation.

Also another piece of adbvice: make backups. If you consider your personal data important you need to treat it as such, and the way to do that is to make backups at a regular interval. Incremental backups take little time to make.

Now back to your questions:

  Should I just install official driver from their website.

If it aint broken don't try to fix it. But if you need it for a specific software that is a valid reason to try it.

  But I want to try cemu and rpsc3 just to test it.

AMD Radeon HD6790 is an older card and had excellent support up to at least 16.04. So I would assume it is going to work.  So if you want to test those and need to 3rd party driver: go for it. It is likely to work. And if not it is always possible to revert back to the old driver. Find out how to do that before attempting to install the new one and you can play with it until you are satisfied.

As an alternative: you could create a dual boot with 2 Ubuntu systems and tinker in the 2nd one keeping you current one as is.


How to log off all user from ssh client in ssh server?

Check this example: Log Everyone Out Of The System

who or w command – Show who is logged on and what they are doing.

pkill command – Kill user session and forcefully logout of the system.

shutdown command – Arranges for the system to be brought down in a safe way.


On Bash you can use

command -v <your_file>

to find the location of an executable as long as it either a builtin or in $PATH. More precisely, command -v prints the command that is executed by Bash. If it's a builtin, it will simply print the command since there is no location of a binary. If it's an alias, it will print the alias definition.
You may use whereis. It prints the location of the binary, source and man pages. From the manpage

  [...]whereis then attempts to locate the desired program in a list of standard Linux places.

If you need the location of the binary only use

whereis -b <your_file>

locate is another option. It searches an index database of files on your system and is therefor much faster than find which truly searches the file system. The database is normally updated regularly via cronjob(daily?), but an update can be triggered with updatedb to keep up with recent changes.
Well, find of course.

find / -name <your_file>

though that may take quite some time. If you know the file has to be somewhere in /usr or /opt, replace the first argument with that or any list of paths to be searched.


Juju how to resolve this error "ERROR cannot assign unit "xxxx" to machine 1: series does not match"

It's possible that it was finding the precise versions of juju-gui and puppermaster.

You could try the following commands to force getting the precise charms:

juju deploy cs:precise/mysql
juju deploy cs:precise/rabbitmq-server


A new Linux user, trouble settting up Nvidia and Bumblebee

Bumblebee installation instructions can also be found in Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

It includes bbswitch by default, so you do not have to get the code from the Git repository nor edit /etc/modules (it's a file, not a command/program!) because the card is disabled when Bumblebee starts. Keep in mind that the power usage depends on the machine your have. For example, I have a GT425M GPU with an i5-460M CPU. That'll use way less power than an i7 processor. To improve battery life:

Lower the brightness level of the screen
Disable wireless if you are only taking notes or reading PDFs in class and do not need to use Internet
Disable the webcam (Fn + ??) and other unnecessary peripherals like Bluetooth
Apply the Intel module options as mentioned in Battery life decreased after upgrade to 11.04


Ubuntu installed on USB, boot loader installed on hard drive

I'm not sure what went wrong for grub to get installed in the wrong place, but you shouldn't need to redo the whole install. grub2-install DEVICE can be used to install grub to any disk.

1) Boot into the system on the 32G ssd

2) Make sure you have the right device for the usb drive by looking at partition tables or something. (I'll call this /dev/sdc, if yours is different adjust commands below accordingly)

3) Run grub2-install /dev/sdc as root to install grub on sdc.


It appears that the window manager already captures the key combination Ctrl+Alt+S.

To unbind it or rebind it to a different key combination

open the Control Center,
navigate to Keyboard → Shortcuts,
select the Windows shortcuts,
look for the Toggle shaded state shortcut entry and
edit it to a different or no key combination.

This applies to at least Unity and GNOME since they both use the same settings entries to determine keyboard shortcut combinations.

It's possible that the key combination is not bound to the same shortcut as in OP's case, in which case you need to look through all shortcut entries for one that has the key combination in question.


How do I force configuration of partially installed packages?

Run these codes

sudo apt-get update

sudo apt-get clean

sudo apt-get autoremove

sudo apt-get update && sudo apt-get upgrade

sudo dpkg --configure -a

sudo apt-get install -f

This will clean and configure your packages


Skype not get dependency libQtNetwork.so.4

Try to add the following packages:

sudo apt-get install libqt4-network:i386


Simple and easy way to permanently mount remote folder

I would say SSHFS was intended more for ad-hoc usage rather than permanent connections.

The right tool is probably NFS (Network File System). Information about setting this up in Ubuntu can be found here.


No lock button in Status Bar of Ubuntu 18.04

Resetting the desktop theme restored the lock button.

dconf reset -f /

OMG Ubuntu: The Secret Command to Reset Ubuntu Desktop to Default Settings


Going from a single 3TB disk to a 4-disk 6TB RAID10

I'm hoping to do this nondestructively, as it would take considerable time to migrate the data off and then migrate it back once the array has been built.

I'm not sure what you mean. You have to migrate the data from your plain disk to your new array in any case. As one of the answers already suggested, you can create a RAID10 array with two missing drives and add them later after you finished migrating your data. This is easier than migrating from RAID1 or RAID0 to RAID10.

Remember that redundancy of RAID doesn't count as a backup. If you somehow mess up your array or corrupt data, then your data is lost or corrupted permanently. At least have another 6 TB volume as a backup if something goes wrong. (I was in a similar situation a few years ago, using Debian (stable), MDADM and EXT4, which I thought was fine, until I ran an MD5 check on some of the files and found several corruptions. After mounting the same array on the latest Ubuntu and checking again most files that had corruptions before were fine. You never know which bugs you might run into, therefore have an offline backup!)

You might want to look into the RAID capabilities of ZFS on Linux or btrfs, which solve issues and provide advanced features like partitioning/LVM, silent data corruption, snapshots, compressing content on the fly and so forth.


How to open .jar file from shell script without losing focus?

You can do this using xdotool, but it's not particularly elegant.  As a one-off task, make sure that xdotool is installed:

sudo apt-get install xdotool

Then you can launch your jar as follows:

TERM_HANDLE=`xdotool getwindowfocus`; java -jar maps.jar & sleep 5; xdotool windowactivate $TERM_HANDLE

The xwindow getwindowfocus gets the current window handle and stores it in the TERM_HANDLE variable.  Then your java -jar maps.jar & is launched.  You'll then need a sleep until this command has started (pick an appropriate value that works for you), before using the xdotool windowactivate to bring the terminal back to the front.


How to create a new file with content using Ubuntu One API and PHP

The problem you're having is that to put a file with content, you need to get the "content_path" of the directory you want to save the file in, and then PUT the new file under that content_path. See the example code below, which creates a folder ~/Ubuntu One/phptestfolder, gets its content_path, and then PUTs a file foo.txt inside that newly created folder.

<?php
# Set up OAuth with the token details you've previously saved
$conskey = 'CCCCCC';
$conssec = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS';
$token = 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT';
$secret = 'ssssssssssssssssssssssssssssssssssssssssssssssssss';

$oauth = new OAuth($conskey,$conssec,OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_URI);
$oauth->enableDebug();
$oauth->enableSSLChecks();
$oauth->setToken($token,$secret);

# Create a folder in Ubuntu One.
# Folders are created by PUTting to the folder path with a PUT body of
# {"kind": "directory"} as explained at
# https://one.ubuntu.com/developer/files/store_files/cloud/#put_apifile_storagev1pathtovolumepathtonode

$api_url = 'https://one.ubuntu.com/api/file_storage/v1/';
$oauth->fetch($api_url.'~/Ubuntu%20One/php-test-folder', '{"kind": "directory"}', OAUTH_HTTP_METHOD_PUT);
$response = json_decode($oauth->getLastResponse());
print_r($response);

# So now, we want to upload a file to that new folder. To do that, you need
# to get the directory content path. As explained at
# https://one.ubuntu.com/developer/files/store_files/cloud/#get_apifile_storagev1pathtovolumepathtonode
# "Note that a directory has a content_path. This means that you can PUT a new
# file with content into that directory (see below) by PUTting to
# CONTENT_ROOT + <directory.content-path> + '/' + filename.ext.
# CONTENT_ROOT is the root of the files API itself, /api/file_storage/v1/, but
# temporarily it should be set to https://files.one.ubuntu.com.
# (This note will be removed when this is fixed.)"
# So, we need the directory content path. This is returned in the output from
# the above statement ($oauth->getLastResponse). So, to put a file foo.txt
# with content "this is foo", the URL we need is:
# CONTENT_ROOT: https://files.one.ubuntu.com               +
# directory_content_path: $response['content_path']        +
# /: /                                                     +
# filename: foo.txt

# We want to urlencode the path (so that the space in "Ubuntu One", for example,
# becomes %20), but not any slashes therein (so the slashes don't become %2F).
# urlencode() encodes spaces as + so we need rawurlencode
$encpath = rawurlencode($response->content_path);
$encpath = str_replace("%2F", "/", $encpath);

$put_file_url = "https://files.one.ubuntu.com" . $encpath . "/" . "foo.txt";
$oauth->fetch($put_file_url, "this is foo", OAUTH_HTTP_METHOD_PUT, array('Content-Type'=>'application/json'));
$response = json_decode($oauth->getLastResponse());
print_r($response);

?>


(this is not a response, just a long comment)

Okay, the good news is that you see that the USB device is already recognized: 0bda:0139 Realtek Semiconductor Corp., but the bad news is that now you need to look at the kernel logs to see what happens when you put a card in the reader.

Here are the steps:

Open a terminal and run sudo -i to get login as root;
Run tail -n0 -f /var/log/dmesg (as root);
Put a card in the reader, and wait a few seconds. You should get a few lines of log printed on the screen.
Copy those lines here (again in the question body) to see if we can get anything from it.


You can use Samba.

Samba is a system for sharing files and folders through your network. To get it, simply run:

sudo apt-get install samba

Then, you will have to set up shares for your network. You will want to edit the file located at:

/etc/samba/smb.conf

And add in a share entry. For example, if you wanted to share the folder /home/your_user/share, the bottom of your smb.conf should look like this:

[Share]
comment = Shared
path = "/home/your_user/share"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = your_user

To share that folder in a way that Windows can easily create and manage files within it.  Now, on Windows, if you browse your Network, you should see an entry with your Ubuntu server's hostname. You can open that, and all of your Samba shares will show up.

To make it easier to access, you can Map Network Drive on your Windows machines. The address for the network drive will look like this:

//UBUNTU.SERVER.IP/Share

and you can choose any of the available drive letters.


Are there localized versions of help.ubuntu.com?

The translation into Brazilian Portuguese is pretty well covered, while the translation into Portuguese as spoken in Portugal is less so. You may want to ask the question to respective team of translators:

https://launchpad.net/~ubuntu-l10n-pt

https://launchpad.net/~ubuntu-l10n-pt-br


Ubuntu 12.04: HP Photosmart 6515 Only Wired?

You can try to install the hplip package from the Ubuntu software center.

Once installed, run it and follow the configuration wizard. Select network printer and choose either autodetect or add printer by IP address (provided you know your printer IP).

The rest should be straightforward and it will install the driver you need to use it.

Finally add printer

After that you should be able to print using wireless.


actually the problem which is bothering you is a Ubuntu BUG. Look at the BUG link . In the bug link Comment #4 and comment #11 have some good information for you.

comment #11 have patch too & apply that patch and its approved.


What happens when we move files/folders to trash as root user?

The files are moved to the folder /root/.local/share/Trash/files you can remove it from there. But don't forget to remove the trashinfo too. These are stored in /root/.local/share/Trash/info.


To me it seems that you just want to execute two commands after startup but before you login. I am not sure if this will work with Virtual Box but usually you just add a line to /etc/rc.local. But make sure you add your line before exit 0 :)


Shared clipboard won't work on virtualbox with ubuntu 17.10.1

did you try this answer? Specifically, after guest additions installed, open a terminal and type this:

sudo VBoxClient --clipboard

after that it should work even after reboot.


How to know the manufacturer of a graphic card?

You can run lspci -knn | grep VGA -A1 and see the manufacturer.

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] [10de:1244] (rev a1)
    Subsystem: Gigabyte Technology Co., Ltd Device [1458:351a]

or without PID & VID lspci -k | grep VGA -A1:

01:00.0 VGA compatible controller: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] (rev a1)
    Subsystem: Gigabyte Technology Co., Ltd Device 351a

You can do it in one command:

lspci -k | awk '/VGA/{getline; print $2}'

This will give the full vendor string:

lspci -k | awk '/VGA/{getline;sub("^[^ ]* ","");sub("Device.*","");print}'


How to load a different version of linux kernel?

After having configured the kernel, you can use make-kpkg to compile it and make a .deb package for easy installation and de-installation. If you install such a package, the new kernel is automatically added to your grub config.


How to know when commercial app will be published

We don't have a queue listing and the time is based on a number of factors. If you've submitted as per the instructions (packaging source, installed in /opt or a tarball) then the packaging will move faster.

The US Holidays have created a fairly large backlog which we are working on as quickly as possible.

You can always use the feedback mechanism in MyApps to "prod" us a bit.


Tor browser setup fails on Lubuntu 17.0.1

Try ./start-tor-browser.desktop in the tor-browser directory.

As the command is not in your path, you need to prefix it with an absolute path. . points to current directory, so ./ effectively means file in current directory.


At first you have to remove Snap version of libreoffice with
snap remove libreoffice

then install LibreOffice from deb-packages with
sudo apt-get install libreoffice

and then installing full set of localization with
sudo apt-get install $(check-language-support -l cs)

should help.


Go "system settings", "Additional drivers", A list of drivers that are available for your Card will be shown, choose Recommended one and then activate it, Ubuntu will download the driver and install it on its own. restart your computer. You are done


Applications running slower with multiple threads

You are probably hitting contention points in the code, such as locking (via futexes or the like) where serialization of the code occurs and hence stops the performance scaling.

Also, an x86 CPU may have N cores, each with say 2 threads each, but that does not give you 2 x N performance, since a hyperthread executes when certain execution blocks are available. I believe for a single socketed x86 processor one may get up to 30% extra performance with a hyperthread.

Also, you may be getting contention on memory, be it on cache (L1, L2 or L3) or even on the memory itself. So you may be hitting limitations on the throughput, cache stalls or on the TLB.

With N  process > N CPUs, you will end up with more processes than can be runnable, so the scheduler has to perform more work in pre-empting runnable processes and this is another penalty that eats into performance.

You can get low-level performance metrics using tools such as perf. Install it with:

sudo apt-get install linux-tools

And run you application with perf to get some performance measurements:

perf stat your-program

You can do deeper analysis using perf record and perf report, e.g.

sudo perf record your-program
sudo perf report

Alternatively, run your program and while it is running use perf top to get an interactive real time view of the system activity:

sudo perf top

Hopefully that will give you some idea of where the bottle neck is occurring.


What would I lose from my system if I do a clean reinstall of Ubuntu and restore my Home partition?

You will lose everything that was not on your home partition :-)

You already mentioned or need to think of:

changes to /etc/rc.local and /etc/ in general
changes to the software sources you used (/etc/apt)
all software you have installed (you can save a list of the installed software via the software-center and reinstall later, but you have to think of it...)
software installed outside the debian system (by typing make; make install, easy_install, cpan, ctan, ...), those often live in /opt/...
probably a lot I can't think of at the moment...

You will not lose most of the configuration, as this is often saved under ~/.conf.

For answers on how to backup all your system components you can have a look at this question: How to backup settings and list of installed packages and Easy backup/restore of installed system?


What is the difference between `extra`, `suggested`, `recommended` and `NEW` packages?

There are three basic ways an Ubuntu package can depend or pull in other packages:

Depends - this is a hard dependency, the program you are installing requires this other package to run. If you try to uninstall one of these packages, your program will be uninstalled with it.
Recommends - this is a package the is needed or recommended for normal use of the program you are installing, but the program will work without it. By default Ubuntu will install these (unless disabled with --no-install-recommends) but it won't complain if you remove them later on.
Suggests - this is a package that can enhance the program you are installing but is not considered a part of normal use. These packages are not installed by default (unless enabled with --install-suggests) and would be considered like a "hey, you might find these interesting" from the package developer.

By default, Ubuntu installs packages marked as depends and recommends, and all these will be listed as extra packages, unless you specified some of them explicitly on the command line.

Packages marked as NEW are all the packages that are about to be installed, i.e. the packages specified on the command line and all extra packages.


How to troubleshoot IPMI in MAAS? What logs to look at?

The place to look for this kind of information is /var/log/maas/celery.log. Whenever a node is powered on by MAAS it should contain an entry such as:

[2014-05-28 10:10:54,226: INFO/MainProcess] Received task: provisioningserver.tasks.power_on[65b69047-46ca-4164-ad32-cb3362e79de9]
[2014-05-28 10:10:54,447: INFO/MainProcess] Task provisioningserver.tasks.power_on[65b69047-46ca-4164-ad32-cb3362e79de9] succeeded in 0.220459055s: None

And if the task fails, then it should show up some traceback along with the failure.


ubuntu 14.04 install with custom swap size using LVM?

Boot Ubuntu ISO, select "Try Ubuntu" to start a desktop
Run gparted and create a partition of type "lvm2 pv" (this is your LVM physical volume)
Start a terminal:

sudo -s to become root
Create a volume group on your LVM PV partition:

vgcreate vg /dev/sdaX

Create your LVM logical volumes (change GB sizes as you wish):

lvcreate -n root -L 6g vg
lvcreate -n swap -L 1g vg

Start the Ubuntu installer ("Install Ubuntu.."):

Select "Something else" at partitioning.
Select your root logical volume, click "Change", set "Use as" = "ext4", "Mount point" = /
Select swap, click "Change", set "Use as" = "swap area"


Fonts in Google Earth look bad even after installing Microsoft Fonts

You might have to change global font settings.

Download and install MyUnity from Ubuntu Software Center.

Launch it and click on the Fonts section. Here you can edit fonts.


"Wifi hardware switched off" on an HPG61 (Atheros 9285)

The message hard blocked: yes, means that there is a hardware switch that is switching off the wireless adapter.

Do you have to use a Fn+key combination to switch on wireless? Are you dual booting with another operating system and have you switched off wireless in that operating system? The windows operating system has the ability to switch off the wireless hardware and Ubuntu/Linux does not have to ability to over-ride that action.

You may also need to see this link

getting atheros ar9285 to work

Regards.


Inconsistency between unattended-upgrade and debsecan

Tl;DR: debsecan needs to be fixed to use Ubuntu's security tracker for it to be of any use on Ubuntu.

The debsecan script only checks the Debian Security Tracker, and only supports Debian releases in the --suite options. Since patched versions of Ubuntu packages don't show up in Debian's tracker, we get results like this:

$  debsecan | grep "remotely exploitable, high urgency" | head
CVE-2017-14632 libvorbisfile3 (remotely exploitable, high urgency)
CVE-2016-2776 bind9-host (remotely exploitable, high urgency)
CVE-2017-14930 binutils-dev (remotely exploitable, high urgency)
CVE-2017-8421 binutils-dev (remotely exploitable, high urgency)
CVE-2018-8784 libwinpr-interlocked0.1 (remotely exploitable, high urgency)
...

I'm on 16.04, and of these CVEs:

CVE-2017-14632 is fix-released in 16.04
CVE-2016-2776 is fix-released in 16.04
CVE-2017-14930 needs triage in 16.04, and newer releases are marked not affected.
CVE-2017-8421 needs triage
and CVE-2018-8784 does not exist in 16.04.

So, of the first five I looked at, three were fixed or didn't affect me, one had some action taken and only one hadn't seen any action. The next five, CVE-2018-8785 through 2018-8789, were all fix-released or not affecting 16.04.


Kernel boot command line altered in uefi mode

It looks that data source parameter can be escaped. Single quotes fix the issue:
ds='nocloud;s=/cdrom/preseed/'

This way path to the autoinstall config files is picked properly even when uefi mode is used. It is a pity that this is not mentioned in any documentation, because part after ";" is a confusing problem.


Basically the answer is that -

You need to bind mount the host devices you want to access eg.

mount --bind /dev/dvb /path_to_your_container/rootfs/dev/dvb

....
    remember to create the target directory first

Ensure you're either using a privileged container or you have granted the host's
owner of an unprivileged container access to the device(s) you mounted above
Add the relevant cgroup entry in your container config file (or
/etc/lxc/lx.conf for all privileged containers) ie.
lxc.cgroup.devices.allow = c xxx:* rwm where xxx = the "major"
part of the major:minor id found using ls -la /dev/dvb say .....
212 for DVB or 189 for USB (on my system), thus for my case, dvb
access is granted via lxc.cgroup.devices.allow = c 212:* rwm

Apparmor changes are unnecessary .. the bind mount and cgroup entry were sufficient to enable container access to DVB devices (which happen to be USB devices BUT it was not necessary to enable access to "USB" devices as well ... just the DVB devices in /dev/dvb)


Yes, there is; first you will need to activate the Universal Access Menu. To do this go to System Settings and select Universal Access:

Once you have done so activate the Universal Access Menu:

After you have done that you can go into the Universal Access Menu and activate the Screen Keyboard:

And voilà, one on screen keyboard available for you to type with (this will appear if you start typing in the system somewhere, but not in a text box in Firefox or anything like that):


How to parse remote html in ubuntu touch app

Ok in retrospect this was an exceedingly easy thing to solve.

In Ubuntu Touch QML/HTML5 Apps you can just do a standard XMLHTTP Request and then parse the returned html.

Here is an easy example:

function get_html($url){
    //This function gets the HTML Page at $url and saves the
    //HTML Data in $html.
    //This function is asynchronous! Actions like "return $html" will probably
    //not work as intended!

    var xhr = new XMLHttpRequest;
    var $html;
    xhr.open("GET", $url);
    xhr.onreadystatechange = function() {
        if (xhr.readyState == XMLHttpRequest.DONE) {
            $html = xhr.responseText
        }
    }
    xhr.send();
}


How to securely erase solid state drive in netbook running ubuntu

From what I've read, either HDDerase or Parted Magic can achieve this. If you create a Live USB with Parted Magic you should be able to do this quite easily.

Perhaps one of the following guides will help:

http://www.cnet.com/how-to/how-to-securely-erase-an-ssd-drive/
https://www.youtube.com/watch?v=udxNL6sCuDQ
http://www.makeuseof.com/tag/securely-erase-ssd-without-destroying/

If anything isn't clear to you, try being more specific in your question or comment on my answer.


Ubuntu Server 12.04 LTS Kickstart ignores all partitioning commands

In my case, there are two HDD inside Physical server and there are raid1 relation between them.raid1 setup is done through BIOS.
I am getting the same error "No root filesystem is defined".

Can someone share the ks.cfg for automated “ubuntu-12.04.1-server-amd64” OS  installation on physical machine.


Install grub using custom boot-loader ID, e.g "MyUbuntu"

After I ran into systemd-boot as boot-loader I've never looked back at GRUB.
systemd-boot, is in my view, way more stable and has a much better way of configuration.
And by "stable" I mean it's not as vulnerable as GRUB. GRUB is so easy to break.
Just adding a new disk to your box can give you big trouble (because of maybe identical boot-loader ID's that you cannot change etc.)

Only downside of systemd-boot is the lack of secure-boot support, but that's not an issue for me, and that your kernel must be located in the EFI partition, instead of root partition, as it is the case with GRUP.

With systemd-boot I got back full control of the boot-process...YES

It should be the default boot-loader instead of GRUB.

UPDATE, How to do (Debian/Ubuntu):
(This is a rather superficially guide, but I hope it will get you started. Other sources: Arhlinux.., freedesktop.. and readme..)

1: First copy the kernel files from you root partition, e.g. /boot/vmlinuz-4.9.0-8-amd64 and /boot/initrd.img-4.9.0-8-amd64, to your EFI partition. You can place them in a subfolder of your choice or even in root-folder if you like.

2: Many guides says you need access to the EFI variables, but I'm not sure if this is needed. But to test if you have, run efivar --list.
To Install if missing: apt install efivar

3: Install systemd-boot loader to the EFI partition: bootctl --path=/mnt/efi install (use you own path to your mounted EFI partition)

4: Edit the file /mnt/efi/loader/loader.conf to something like:

timeout 5
# default 6a9857a393724b7a981ebb5b8495b9e-*

(haven't figured out how to use the auto-added UUID in the file, so I just marked it out)

5: Each file in /mnt/efi/loader/entries/*.conf correspond to at boot-entry in the systemd-boot menu. So to add your current OS make a file looking something like:

title      Debian 9 :-)
linux      /debian9/vmlinuz-4.9.0-6-amd64
initrd     /debian9/initrd.img-4.9.0-6-amd64
options    root=UUID=084917b7-8be2-4e86-838d-f771a9902e08`

(Modify the path to the kernel files you copied in step 1. Modify the UUID to the filesystem-UUID of you root partition (use Linux command lsblk -o name,uuid)

General info:
bootctl will install two bootloader-files in your EFI partition:

../BOOT/BOOTX64.EFI
../systemd/systemd-bootx64.efi

These files are identical. Your EFI bios on your motherboard moust boot/point to one of them. Either do it in the BIOS directly or use the Linux command efibootmgr....

To add a new boot entries just create a new /mnt/efi/loader/entries/*.conf files which point to the right kernel files and root partition.

The kernel files MUST be located on the EFI partition (FAT32).
The EFI partition must be sized accordingly. I think the kernel files for e.g. Debian/Ubuntu is about 50-60MB. So if you have two installations you need 120MB.


Try apt-get remove --purge libvlccore8 vlc-data and all packages related to VLC


Increasing the resolution on 14.04 beyond what is shown

I'm not an expert on this, but I think you need to be sure you graphics card and screen both support the resolution you are trying to set.

Try this to test: xrandr --fb 1680x1080.

If the resolution doesn't change, your system doesn't support a bigger resolution than it is already set.

If it changes, it may change to a different resolution than expected. Check that by running xrandr and looking for the resolution:

LVDS connected primary WxH+0+0.

An apparent workaround would be to scale up your resolution with:

xrandr --output LVDS --scale-from 1680x1080

It is not the same (characters appear blurry) but it works.


Try to install and conect from "wicd" network manager.


How can you permanently enable scroll lock on Ubuntu?

1. To free the scroll lock LED if you have more than one language.
sudo gedit /etc/default/keyboard
Changed XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll" to XKBOPTIONS="grp:alt_shift_toggle"
Changed gsettings org.gnome.desktop.input-sources xkb-options
['grp:alt_shift_toggle', 'grp_led:scroll'] to ['grp:alt_shift_toggle']
gsettings reset org.gnome.desktop.input-sources xkb-options

Then
Found the permanent way
from
https://unix.stackexchange.com/questions/164245/why-is-the-scroll-lock-key-disabled-in-cinnamon-linux-xorg?rq=1
2. backup your symbols file
sudo cp /usr/share/X11/xkb/symbols/us (or other Languages)
3. Add the following line in the xkb_symbols
"basic" { section. do not worry if that second line is not there, it is only there for some languages and was not there for us on my system.
Add this line
modifier_map Mod3   { Scroll_Lock };

before the line
include "level3(ralt_switch)"
};
YOU MAY HAVE TO DO THE SAME IN YOUR OTHER LAYOUTS IF YOU SWITCH BETWEEN LANGUAGES
4. Also, there is a cache where xkb layouts live. You should clear it before restarting your X server.
sudo rm -f /var/lib/xkb/*

Worked for me on Ubuntu 18.04.


Wireless networks like that are called Captive Portals. Wikipedia's Captive Portal article has notes on how the common implementations work.

One reason they might fail is if you have specified a static IP address, or have specified a DNS server, in your interface configuration. A lot of these captive portals rely on you using only the settings (IP/netmask/gateway/DNS) provided by their DHCP server.

I've known folks who prefer to use OpenDNS or Google Public DNS rather than their ISP or LAN's DNS servers, and aren't able to use captive portals which rely on DNS spoofing using their own private DNS servers.


Is it possible to make Ubuntu always responsive?

I have encountered the problems you are describing at some times. Usually when I am compiling large projects using all my cores while also trying to do things like watch high resolution streaming video. Most of the time this problem can be split into two categories:

The CPU is so busy that doing even the most basic video tasks cannot occur or occurs so slowly it's not usable, eg. no frames are updated. This could be improved by setting x11, kwin, and plasmashell (mutter and gnome-shell on Gnome systems respectively) to higher priorities since they do appear to default to 0 niceness - meaning they are competing against everything else for a slice of processor time.
Memory usage has increased to the point that swap is being used. There is much debate about if swap is useful in modern desktop Linux since once used it often degrades performance to the point that the system becomes unusable. Some (including RedHat) argue there is good reason to disable swap entirely and in memory pressured scenarios rely on the Out of Memory (OOM) killer to regain control of a system.

You can experiment with different IO schedulers, but they will likely not make much difference. Since the implementation of the Completely Fair Queuing (CFQ) these issues are less about the scheduling and more about the actual speed of the disk. You can run this command to check what scheduler you are using:

$ cat /sys/block/sda/queue/scheduler
noop deadline [cfq]

It prints all the available schedulers and surrounds the currently active scheduler with brackets.

Disabling swap will likely "solve" your problem, but can ruin your experience in cases where for a very short time swap is needed like for doing a compute task that doesn't last long but requires lots of memory.

It may be useful to find or create a program that checks system responsiveness and disables swap when a system has lost control for too long.


Properly formating and partitioning a USB drive in Lubuntu for Live use

Your procedure was (in part):

format the drive: sudo mkfs.vfat -I /dev/sdb
partitioning the drive: sudo fdisk /dev/sdb

There are two things wrong with this:

Order reversal -- You need to partition the disk before you create a filesystem on ("format") it. This is because partitions hold filesystems, so partitions must exist before filesystems are created. You ended up with a partition that pointed to some semi-random part of the disk rather than to the start of a filesystem.
Whole-disk filesystems -- As just noted, partitions hold filesystems; however, you created a filesystem on the whole-disk device (/dev/sdb), rather than on a partition on the device (such as /dev/sdb1). This said, though, putting a filesystem on a whole-disk device is legal; it's just customary to put filesystems in partitions, and doing so increases flexibility. It's conceivable that it would have worked if you'd omitted step #3; but it's also possible that some of the tools or setup you want to create would assume that the disk is partitioned, in which case omitting step #3 would have led to problems later on.

When you used GParted, as GTRONICK suggested, you bypassed both of these problems, because GParted performs the partitioning and filesystem-creation tasks in the correct order, and puts filesystems on the partitions it creates. (The GParted user interface hides the fact that there are two operations, but they are two distinct operations, behind the scenes.)


Upgrade to Ubuntu 20.04 and LOSE everything

For whoever stumble upon this, I couldn't find a way to do it with upgrade so I did it with a liveUSB. The nice thing is that it automatically detects the Ubuntu partition and gives you the option to install there.


How can I run lightread on Ubuntu 16.04?

Its already mentioned in the error - ImportError: cannot import name WebKit.

To rectify it type the following command in terminal:

sudo apt-get update && sudo apt-get install python-webkit


I made a disc version of ubuntu and booted from the CD drive and it worked.  Maybe the files I got for USB were corrupt or incomplete somehow, I'm not sure.  Anyway, I got it working.


Ubuntu 19.10 - /dev/mapper/vgubuntu-root issues

So after a little looking around for 16.04 issues, I found a post on Superuser relating to lightdm being the issue.
Commands run at the error message ctrl + alt + F1
sudo systemctl disable lightdm.service
sudo systemctl enable lightdm.service

Reboot
If still no screen run:
sudo systemctl start lightdm.service

So I would recommend from there repairing lightdm gui.
sudo apt-get install --reinstall lightdm

Followed by:
sudo /etc/init.d/lightdm start (for Unity)


Neither of the two alternatives in your question is better. Install Django in a Python virtual environment (virtualenv). You can install the latest versions of whatever additional Python packages you want in a Python virtual environment without degrading your operating system.

Install Python 3.x packages in a Python virtual environment

Install Python 3 virtual environment creator.

sudo apt install virtualenv python3-virtualenv

Create a Python virtual environment for python3. You can only install python3 packages inside this Python virtual environment. If you also want to install Python 2.x packages, then you need to make another Python virtual environment.

virtualenv -p python3 env # name the environment env or any other name
source ./env/bin/activate

The new Python virtual environment for python3 will be created in the env directory which is located in the current directory.
Install Python packages.

cd /path/to/env/ # env is the python3 virtual environment's directory
source bin/activate
python3 -m pip install first-package-name next-package-name last-package-name

This is a new python3 virtual environment with the latest version of pip3, so installing Python packages in it will work great.


Installed ubuntu 16.04 on Dell erasing windows 10, no booting device found

I had a similar issue with a Toshiba.
The EFI required a system reserve partition first on the disk, then the EFI partition second on the internal drive.

It also required that the default media path be used on the internal drive.  Copy /efi/ubuntu/shimx64.efi to efi/boot/ and rename it bootx64.efi.
If you are not using secure boot, then efi/ubuntu/grubx64.efi can be copied and renamed.


How can i start ubuntu side by side with windows 7 32bit?

Go for a dual boot. Choose install Ubuntu side by side option when installing if you don't have a separate partition. Use something else option if you have a separate partition to install Ubuntu. Lastly, install grub in MBR. Hope it helps.

Remember to install Windows first to avoid difficulties and if you are newly partitioning a hard drive, create 3 partitions, one NTFS for Windows, one EXT4 for Ubuntu and one NTFS for data, that can be accessed by both the OS. Choose don't use this partition option for the data partition when you install Ubuntu.


How can I check if an Apport report does not contain any sensitive information?

Two already answered questions-answers combined, can solve your query.

First : Should I include logs that contain "sensitive information"?

Second: Why did Apport make my bug report private?

If you want to examine the files by your self (in /var/crash) you can do it as well. You can use less pager for example

less /var/crash/someprog.crash


does every service that is active running have a process that can be seen by ps command on linux

Yes.

  for example if ntp is running, should I see it by the name ntp in ps -aux | grep ntp? thanks

Yes.

$ ps -aux | grep ntp
ntp       1142  0.0  0.0  40264  1456 ?        Ss   Feb25   5:07
/usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 105:112

It will, at least, show the name of the daemon and the user. In the case of "ntp" that would be "ntpd" and "ntp". There are services that (by default) use another user name than the name of the process though: apache user "www-data" as a username and "apache2" is the process.

From comments:

  How can I find the exact process name of a service then?

I tend to know the names of all the processes running on my system. Apache does not work when searching through systemd:

$ ps -ef | grep apache
www-data  9799  1638  0 11:21 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 12293  1638  0 12:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 12727  1638  0 12:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 13122  1638  0 12:08 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 13711  1638  0 12:18 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 14004  1638  0 12:20 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 14013  1638  0 12:20 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 14120  1638  0 12:22 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 15079  1638  0 12:41 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 15557  1638  0 12:51 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 15783  1638  0 12:57 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 15786  1638  0 12:57 ?        00:00:00 /usr/sbin/apache2 -k start
$ sudo systemctl list-unit-files | grep apache
$ sudo systemctl list-unit-files | grep https
$ sudo systemctl list-unit-files | grep http

No everything is a systemd service ;)


Creating Bootable USB with Rufus - Will Data be lost after every reboot?

If you create a USB boot by the following guide:  https://ubuntu.com/tutorials/tutorial-create-a-usb-stick-on-windows#1-overview, you can try a live version of Ubuntu or you can install a full Ubuntu version.

Take a look at this picture: https://i.stack.imgur.com/fBlXV.png

If you choose:

Try Ubuntu: you will be able to try Ubuntu with basic feature before installing it. With this option, you can know how Ubuntu will look like on your PC and you can use some pre-installed app on Ubuntu, but you can not use full feature of Terminal, etc...
Install Ubuntu (recommend for working or full experience on Ubuntu): you will be able to install a full version of Ubuntu. With this option, of course, all data will be fine after reboot.


How can i install Android Studio in Ubuntu 15.04

Try this:

sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio

Souce : https://paolorotolo.github.io/android-studio/


Cannot Update Java plugin for Google Chrome

Chrome will look for the plugin in Firefox's plugin directory, so make a symbolic link from your java installation to there:

ln -s /usr/lib/jvm/jre1.7.0_04/lib/amd64/libnpjp2.so ~/.mozilla/plugins

Then restart Chrome, check chrome://plugins again and disable the old plugin.


Tecknet mouse loses Bluetooth connection after being idle for a short while

I have a similar problem with a Tecknet Mouse.
You can try turning off Sleep mode and see if it stays connected.
I'm using the BlueZ 5.54 stack that is in Chromebook. Ubuntu is likely the same.
MY guess is its the BM30X driver has not been properly tested with BlueZ 5.54 for linux and derivatives.


Why can ubuntu perform a shutdown from the GUI even though it is prive on the command line?

The mechanism seems to be a DBus message, sent to a process with root privileges. Taken from How can I make shutdown not require admin password?:

Shutdown:
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
          /org/freedesktop/Hal/devices/computer \
          org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown


Ubuntu 18 - can not use Right-Shift button to change keyboard layout

You can achieve this with the tool xcape

sudo apt install xcape

  Description: Configure modifier keys to act as other keys when pressed
  and released xcape allows you to use a modifier key as another key
  when pressed and released on its own. Note that it is slightly slower
  than pressing the original key, because the pressed event does not
  occur until the key is released. The default behaviour is to generate
  the Escape key when Left Control is pressed and released on its own.

once xcape is installed run the below command to make Right Shift release act as Super_L+space which is the default keyboard shortcut for keyboard layout change..

xcape -e 'Shift_R=Super_L|Space'

this way while Right Shift is held down you can type capital letters and when the key is pressed on its own and released, It will change the keyboard layout..


Is it possible to use Nautilus Actions with Nemo file manager?

Found this on the Arch wiki -

.nemo_action files can be used to create menu entries in the pop-up dialog that comes up since these files are read by nemo whenever you right click. You can invoke a script from these .nemo_action files that does your job, similar to what nautilus-actions does.

You can have a look at /usr/share/nemo/actions/sample.nemo_action and /usr/share/nemo/actions/myaction.py to get an idea of how it works. These files have detailed information on what each field in the action files indicates.

You can visit this website for an example.

Edit :

Nemo actions are similar to nautilus actions in content but vary with respect to the extension name.

In nautilus, newly created actions and menus will be stored on the disk as .desktop files.

The nautilus-actions tool, a graphical editor for nautilus actions, will therefore not work with nemo because it looks for .desktop files, not .nemo_action files.

Summary -

Nautilus scripts can be used if invoked by .nemo_action files, just like nautilus action .desktop files did, and these in turn can be adapted for that purpose. nautilus-actions tool is NOT usable for Nemo due to the difference in paths and extension names.


Open terminal and type

sudo apt-get install broadcom-sta-dkms

Then your broadcom wireless should work (You will need a cable network connection to install)

Note: If your Ubuntu version is 12.04, type

sudo add-apt-repository ppa:poliva/pof
sudo apt-get update
sudo apt-get install broadcom-sta-dkms


need advice on fixing grub boot error : "symbol 'grub_calloc' not found

boot-repair-disk should be burned to a DVD not a cd.
Also yes, a computer that doesn't have USB support... is it a pentium 4?
You should not be installing Ubuntu to a P4 computer, most next gen the core2 duos are probably too old.
Try lubuntu, otherwise settle for puppy linux, maybe Kaos.
If you do have a core2 duo or higher, I would be that USB booting is off from the bios.


This is actually a feature.
Whenever it seems to Geany that the terminal may contain any input data, automatic command execution, like the Execute command from the build menu, is disabled to prevent executing whatever is left on the terminal command line.
Imagine you accidentally pasted something like "rm -rf ~ &&", don't notice it and then let Geany execute your script. The previously pasted command will be executed as well and you loose all your data.
It is technically not possible to clearly say whether there is no input data left on the command line. To protect the user, Geany marks the VTE as dirty in such cases.
I see it's seems inconvenient in the described scenario but as said, here we better need to be safe.
Another way to mark the VTE as clean is by pressing Ctrl-C a second time.


How can I return to the login screen when xbmc is always booting?

You may try pressing Ctrl-Alt-F1 on your keyboard and should see a terminal login window.

Enter a normal user and password to login

After that try to become user root via sudo bash and entering the password again (the user must be allowed as an administrative user)

If everything is working, you are on shell with just the "#"-sign - that means you are root

Try to stop and restart the lightdm daemon

first

service lightdm stop

after a few seconds

service lightdm start

I am not sure per 100% but I thing that this time there will be no autologin.

Update:

Remove / Rename the lightdm conf and restart

1.

proceed as above

BUT INSTEAD service lightdm start follow up with:

2.

cd /etc/lightdm

3.

mv lightdm.conf lightdm.conf.bak

restart

After that auto-login should be disabled


Wayona mini usb WiFi adapter does not work

sudo apt-get install build-essential git
git clone https://github.com/porjo/mt7601.git
cd mt7601/src
make
sudo make install
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
sudo modprobe mt7601Usta

I also searched many places to find a solution and this really worked for me and it works like a charm for Wayona mini usb WiFi adapter.

References:
http://ubuntuforums.org/showthread.php?t=2270202


Why an I2C device driver doesn't appear in /sys/bus/i2c/drivers?

Had to split ad525x_dpot.o and ad525x_dpot-i2c.o into two DKMS packages to have two separate kernel modules.


I suggest you to use your Live-DVD or Live-USB and click on Try Ubuntu
This will allow you to see if Ubuntu runs well on your PC

Then, from there, install Ubuntu

Well everything is explained here


I managed to resolve this using this

Language packs are missing from your system, Install and apply language packs before continuing with the installation of the AMD Catalyst driver. To install and apply the language packs, go to System Settings -> Language Support, will install default packages, Tick System Wide

Also be sure to check /usr/share/ati/fglrx-install.log for any missing prerequsite packages this is not mentioned in driver version 14.10 but the BETA 14.20 does mention this information.


Vpn connection breaks with hint "short read (-1): Message too long"

Usually this issue happens because of high MTU(Maximum Transmission Unit) value. So the fix is to Change the MTU value in the NetworkManager.

Open System Settings -> Network

Under "Wired" select options and change the MTU to some lower value

Alternate way to change this settings is by editing the /etc/network/interfaces and add the line MTU value.

mtu some_value_here

Now restart the networking /etc/init.d/networking restart

To check the current MTU value use the command /sbin/ifconfig and look MTU in eth0


Touchpad tap working fine, click doesn't work

try going to setting and enabling tap to click

if it is already enabled, disable it and enable it again.


How do the security features in Ubuntu differ from Debian?

I think first off it's good to remember that a system is only as secure as it's user.

Quoting Joel Rees (In reply to that very question) here:

  Security is not a package you can buy or download. Whether you choose
  Ubuntu or Debian, if you are concerned about security, you need to
  spend time learning about it The partly out-of-date pages that Riku
  gave you links to are a good place to start.

  The first question I would ask (but don't answer me, of course) is how
  good your passwords are. This will be an issue with any OS you choose,
  even seriously secure OSses like openBSD.

  Your passwords should be at least ten characters, preferably twelve or
  more, include alphabet and numbers and one or two punctuation marks.
  One I used to use was something like "MI

  The next question is whether you allow root login. (Again, don't
  answer me, on or off list. Just check yourself.) If you allow root
  login at all, use an extra strong password for root. You probably do
  not want to allow root login from the network, but you may want to
  allow root login from the console.

  Changing the port sshd listens to is also a good idea.

  Do not surf the web as root or as any administrator login id, of course.

  Speaking of admin login ids, it's a good idea to have one non-root
  login id that you only use for administrative tasks. And you should
  avoid getting onto the web when logged in with the admin id. Which
  means you need another id for general use, which makes two strong
  passwords, three if you allow root login.

  If you have a habit of downloading random apps from the internet,
  unlearn that habit. Use your package manager instead, and think twice
  or more about the apps that you can't get through your package
  manager.

  Anyway, the basics of security are the same, whether you use Debian,
  Ubuntu, Fedora, openBSD, whatever.

Bottom line: I don't believe a secure user will have much more trouble with one than the other.


How to install all the Compiz plugins (excepting those which are unsupported or experimental) on Ubuntu 14.04?

You can install them as:

sudo apt-get install compiz-plugins compiz-plugins-default compiz-plugins-extra compiz-plugins-main compiz-plugins-main-default


How do I set a network bridge to have an MTU of 9000?

Looks like the mtu option is not available when using the manual method (see interfaces(5)). So, here's what is supposed to work (incorporating the feedback from the comments):

auto lo
iface lo inet loopback

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
   # nothing here

iface eth1 inet manual
   # nothing here

# Bridge setup
auto br0
iface br0 inet static
   bridge_ports eth0 eth1
   address 192.168.88.2
   ...
   post-up ifconfig eth0 mtu 9000 && ifconfig eth1 mtu 9000

Using the up (or in this case post-up) option we can specify our own command to run during (of after) the time the interface is brought up.


Keyboard not working after update to 18.04

Installing xserver-xorg-input solved my problem !

Expanding on the above for the inexperienced, it is possible to turn on the on-screen keyboard (accessibility menu) as it is likely that external USB keyboards will also not work.
After that perhaps the command

sudo apt-get install xserver-xorg-input-all

will do it. You need to shutdown and reboot each time (closing the lid usually just puts it to sleep).


synth generates left and right tones:

play -n synth sine 520 sine 530


You could try from the terminal enter this:

   sudo apt-get update
   sudo apt-get upgrade

and then reinstall ubuntu-desktop from the terminal enter this:

   sudo apt-get install --reinstall xfce

and it might work fine this way.


Routing in OpenVPN server to LAN in private subnet

To access my LAN from my VPN server I added this line to server.conf

route add 192.168.1.0 mask 255.255.255.0 gw 192.168.1.2

192.168.1.2 is my server's static IP address from my router.  You may have to modify the addresses based on your setup.


Remove leading whitespace from files, folders and their subfolders

Renaming needs to be done from bottom to top

The issue is that you need to rename the directories from bottom to top. Else the command will try to rename files & directories which are inside already moved (renamed) folders, and thus cannot find them anymore.

This is where python's os.walk() can be used, in combination with topdown=False

In a small script:

#!/usr/bin/env python3
import os
import shutil
import sys

for root, dirs, files in os.walk(sys.argv[1], topdown=False):
    for f in files:
        if f.startswith(" "):
            shutil.move(root+"/"+f, root+"/"+f.strip())
    for dr in dirs:
        if dr.startswith(" "):
            shutil.move(root+"/"+dr, root+"/"+dr.strip())

To use

Copy the script into an empty file, save it as no_space.py
Run it by the command:

python3 /path/to/no_space.py /path/to/directory/to/rename


Updated WiFi fix for Yoga 13 and Ubuntu 16.04?

I had the same issue and followed the answer given by @bamb00zled.

Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/
Download 3 (maybe 4) debs to a folder somewhere:

linux-headers-VERSION-NUMBER_all.deb

linux-headers-VERSION-NUMBER_amd64.deb

linux-image-VERSION-NUMBER_amd64.deb

linux-image-extra-VERSION-NUMBER_amd64.deb

if available

Install the debs with whatever package manager front-end you use (is gdebi still around?), or use these commands:

cd /path/to/folder/where/you/put/the/debs

sudo dpkg -i *.deb


Is there a console application equivalent to Total Commander's fast file viewer (F3)?

There is a built-in file viewer for the console called "less", which is an enhanced version of the older Unix/Linux viewer "more" (which is also available).  It is the same as the pager used for man, or the option --help.

with less, you can view a file one page at a time.  Pressing space will move to the next page, and b wil back up a page.  using a slash, /, will search (as in Vi), and n finds the next occurence.

There are more commands and options.

Oh, and to exit, you press q, which leaves the screen back to where it was previously, more or less.

Edit:  In case it is not clear, to use less, you simply enter "less filename".  And in case you didn't know, like almost every command, entering "less --help" gives a summary of usage.


Ubuntu 12.04 install screen doesn't appear on fujitsu v6555

Please note that you will need to patch DSDT afterwards ;) (mines patched) ok first! don't disable ACPI! .. it wont boot at all!.. the problem is Nouveau! you need to boot the minimal PC and install without graphical installation.. there is no other install method except 10.04 as this boots to live desktop.. ok so boot minimal pc and once installation is complete boot to single user and grab the latest drivers off nVidia.. install them and you are good to go! boot into the standard kernel.. there is a brightness issue so boot with acpi_backlight=vendor, google acpi_video0 and you will find guides and fixes about that.. I have Debian Wheezy installed.


Trying to determine if I have enough disk space to run Windows 7 in Virtualbox

I thought I would try this out myself. When you setup the VM Virtualbox suggests 32GB for Windows 7 which I used for the dynamically allocated disk. Once installed   The file containing the new install was just over 7.1 GB. It will obviously require more space as you add programs and data.

On reflection you probably can use your old Windows partition to hold the file containing the Windows 7 install. To do this you will need to mount the old Windows partition with read/write access and point the VM to a location on that partition. If you do it this way you might want to use a fixed size virtual disk for speed reasons. You could get a lot of fragmentation on NTFS using a dynamically allocated disk and if there is no working windows left on that disk it might be difficult to defragment.

Virtualbox 5.x will certainly run Windows 7 fine. You haven’t said what you plan to use this VM for so it’s hard to say if Virtualbox 6.x will be any better. If you upgrade to Ubuntu 20.04 Virtualbox 6.1.6 is the version available in the software centre


Wondering ?

Do you have the Kubuntu ?  This is tagged with the Kubuntu tag and the question is:"How to add custom icon to Kubuntu 11.10 launcher?". The Kubuntu /1/ is: "An official derivative of Ubuntu Linux that uses the KDE graphical environment /2/".

If you have a Kubuntu desktop

With the GUI

The KDE is having the Menu editor /3/. K > Applications > Help > Application Manuals > Settings > Menu Editor

Manual/DIY

The KDE is using the freedesktop specifications /4/, /5/.

a) Make a desktop file

b) Drop it to the ~/.local/share/applications/ or /usr/share/applications/

Links

http://www.kubuntu.org/
http://www.kde.org/
http://docs.kde.org/stable/en/kde-workspace/kmenuedit/index.html
http://www.freedesktop.org/wiki/
http://www.freedesktop.org/wiki/Specifications


How do I play an audio file using C++ in Linux?

I've made an MP3 player all in C for my Raspberry Pi. I followed instructions from here:

http://hzqtc.github.io/2012/05/play-mp3-with-libmpg123-and-libao.html

This will only play MP3 files at the moment, but I plan on adding Ogg playback as well.


Did you install and run "pavucontrol" (Pulseaudio volume control) ?
In pavucontrol, go to the "output devices" tab:
 You will  probably see 2 devices (HDMI and  internal soundcard)  .
You can choose which one is active by clicking the green "define as alternative" button that is near each soundcard .
You can also try changing profile in "configuration" tab.


How to start eclipse while in gnome shell?

You can make a script in ~/bin called eclipse, make it executable by running

chmod + x ~/bin/eclipse

Edit the file to look like

#!/bin/sh

export GDK_NATIVE_WINDOWS=true
/usr/lib/eclipse/eclipse

Just make sure that the path in the last line points the eclipse executable in your Eclipse installation. Now every time you run eclipse, this script will be called, which in turn will run Eclipse.

You can also put the script in /usr/bin if you want to make it available to all users.


Unable to de-authenticate the clients using aireplay-ng

the wireless adapter you are using for aircrack is not compatible or it does not support packet injection. if you're sure that your wireless adapter supports packet injection then try to find the right patch for it using aircrack-ng.org  website.


You have to install ubuntu 32bit and install ndiswrapper 1.58rc1 and insert the xp driver.


Battery Shows Always Charging Even it's not plugged in

I suggest, you reinstall or update your unity battery status level or gnome battery status shell extension.

Also check the battery status via command line in your terminal

upower -i /org/freedesktop/UPower/devices/battery_BAT0

If it says the battery is plugged even if it's not, I guess it's a more a BIOS related issue.


Open Nautilus.
Press CTRL-L to enter a location manually.
In the location editbox, enter smb://192.168.2.2/, and press enter.

or

Press ALT-F2
In the 'Run a Command' editbox, enter nautilus smb://192.168.2.2/, and press enter

The smb:// means that you want to connect to the server using the server message block protocol (also sometimes called cifs), which is the default network protocol on windows (hence the easy //), but on ubuntu you need to actually specify the protocol.

http://en.wikipedia.org/wiki/Server_Message_Block


At a minimum, you will need to manually install OpenChrome DDX package.

$ sudo apt-get install xserver-xorg-video-openchrome-hwe-16.04

Please note that the default version you will get with Lubuntu 16.04.2 might be Version 0.3.3.
I recommend installing the latest code from the OpenChrome DDX repository (Version 0.6.xxx).
This post I made while back covered how to install the latest code.

https://lists.freedesktop.org/archives/openchrome-users/2016-February/007237.html

Please make sure to substitute "xserver-xorg-video-openchrome" of the above page with "xserver-xorg-video-openchrome-hwe-16.04' or it will wreck your existing installation.
You can ask questions about installation here.

https://lists.freedesktop.org/mailman/listinfo/openchrome-users

Regards,

Kevin Brace

The OpenChrome Project maintainer / developer


What user settings control audio access?

1) Would you please try this with user1:
sudo gpasswd -a user1 pulse-access
sudo gpasswd -a user1 pulse-rt
sudo gpasswd -a pulse audio

2) Have you tried this?
"
edit /usr/local/etc/pulse/system.pa and add:
load-module module-native-protocol-unix auth-anonymous=1

Reference: https://tango.0pointer.de/pipermail/pulseaudio-discuss/2009-January/002942.html

3) Try running pulseaudio in system mode
Reference: https://bugzilla.redhat.com/attachment.cgi?id=262541

4) Make sure user2 does not run pulseaudio as root

5) Remove applications from user2 that may not release audio (e.g. timidity)

6) Go through ~/.asoundrc and /etc/asound.conf if present

7) Check if "the evil libflashsupport library" is installed. To uninstall:
 sudo aptitude purge libflashsupport flashplugin-nonfree-extrasound

8) Start pulseaudio daemon system wide:
gksu gedit /etc/default/pulseaudio

And change "PULSEAUDIO_SYSTEM_START=0" for "PULSEAUDIO_SYSTEM_START=1"
9) Try unplugging audio hardware like external speakers and reboot.


Boot-repair ubuntu windows8.1 error code Oxc0000225

I would try disconnecting the Ubuntu disk for now, booting from a Win 7/8/8.1 install disk to get to a command prompt, and trying what is described here:

http://support.microsoft.com/kb/927392

That would hopefully repair your Windows boot.

After that, try booting with both discs (maybe set BIOS to specifically boot from the Ubuntu HD) and repair grub (perhaps with this link (http://tipsfromgeek.com/2012/07/how-to-restore-grub-bootloader-after-a-new-windows-installation.html)
If you can't make it boot to Ubuntu with both discs attached, try a boot from a live disc, as described in the link

Sidenote: perhaps Secure Boot is messing with you. If all else fails, try all this again, with Secure Boot disabled

Hope it helps!


Removing new packages packages first

sudo apt remove libopenmpi2 openmpi-common libopenmpi-dev openmpi-bin

Add debian repository

(I found this versions here)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

sudo apt-add-repository 'deb http://ftp.us.debian.org/debian stretch main contrib non-free'

check available versions (optional)

apt list -a openmpi-bin

install old versions

sudo apt install openmpi-bin=2.0.2-2 openmpi-common=2.0.2-2 libopenmpi-dev=2.0.2-2 libopenmpi2=2.0.2-2

Test

mpirun -version


.AVI, .MKV, etc. are just a "container file formats" - the audio and video streams inside them could be encoded in any one of a number of compression formats.

When you play one of these files in VLC and press Ctrl+J a Media Information window will open on the Codec tab. Quite possibly the Video Codec used in these files is one that is not well supported by the "Free" driver pack. i.e.: You may need to install one of the alternative Codecs from one of the "Non-Free" driver packs.


How to install grub on existing Lubuntu installation?

You need to mount the local drive, set up a chroot environment and install grub on it.

Mount the partition you will be using as / (I will call the drive /dev/sdb and the / partition sdb1, the names may be different on your system, you will need to use the correct ones) somewhere :

sudo mount /dev/sdb1 /mnt/foo

Bind the directories that grub needs to have access to

sudo mount --bind /dev /mnt/foo/dev &&
sudo mount --bind /dev/pts /mnt/foo/dev/pts &&
sudo mount --bind /proc /mnt/foo/proc &&
sudo mount --bind /sys /mnt/foo/sys

Set up the chroot environment

sudo chroot /mnt/foo

Create grub's configuration file:

sudo grub-mkconfig -o /boot/grub/grub.cfg

If you have multiple operating systems installed, make sure that the command above lists all of them. For example:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.10-2-amd64
Found initrd image: /boot/initrd.img-3.10-2-amd64
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
Found linux image: /boot/vmlinuz-3.2.0-3-amd64
Found initrd image: /boot/initrd.img-3.2.0-3-amd64
Found linux image: /boot/vmlinuz-3.2.0-2-amd64
Found initrd image: /boot/initrd.img-3.2.0-2-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found Windows 7 (loader) on /dev/sda2
done

Now install grub to the MBR of your drive (remember to change /dev/sdb to whichever drive you actually want to install it on)

grub-install /dev/sdb
grub-install --recheck /dev/sdb

Exit the chroot and unmount everything so your running system is back to normal:

exit
sudo umount /mnt/foo/dev/pts /mnt/foo/dev /mnt/foo/proc /mnt/foo/sys /mnt/foo

Try booting from the drive, you should have a grub menu this time.


If system fails to boot, it will be good to boot in safe/rescue/emergency mode.
once you have access to bash or sh prompt, edit the following file using VIM or any editor of choice.
/etc/selinux/config
look for the line
SELINUX=enforcing
change it to SELINUX=permissive
save the file.
Reboot the system and see if it boots up.
If it boots up then check logfile /var/log/syslog for SELINUX related messages.
This may give some clue.
You can also check /var/log/boot.log file and find out at what stage system booting stopped.


I realize this is a few months old now, but for future reference, Deja-Dup allow you to restore in individual folders. In your file manager (default Nautilus), right-click in the folder you want to restore to and select "Restore missing files", Deja-Dup will restore only to that folder instead of trying to restore the entire backup.

I've noticed Deja-Dup will throw that error incorrectly. Assuming you're using an external drive, unplug your drive, close Deja-Dup and start the process again. For some reason it works on subsequent tries.

Lastly, there is a restore method using terminal with Deja-Dup using the "duplicity" command to list and restore your files that you really need. I'll have to edit this post later so I can share the link.

EDIT: The link is here: deja dup backup restore has failed me


Is there an exact command for restarting GNOME Shell in Ubuntu 20.04 corresponding to Alt + F2 + 'r' + Enter?

The command for doing this is (Tested in Ubuntu 20.04 Only)
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Meta.restart(_("Restarting…"))'


16.04 SSH connection refused: hunting down root-cause

If you want to connect using SSH, you need to have SSH running on the target system. service ssh status shows that it doesn't even know of such a service and apt-cache policy openssh-server shows that it hasn't been installed at all (Installed: (none)). So, yes, you have to install it.


touchpad not working suddenly in Ubuntu 14.04

I solved it. Just nothing special. I rebooted my notebook and touchpad works well.
I think psmodule was not loaded at that time.

Here's another result of typing command xinput list

Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Optical Mouse                id=8    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]

As you see, you can find it,huh?

And here's other result of typing command lsmod | grep psmouse

psmouse               106593  0

And last one about touch pad log from /var/log/Xorg.X.log

[    31.874] (II) LoadModule: "synaptics"
[    31.874] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[    31.874] (II) Module synaptics: vendor="X.Org Foundation"
[    31.874]    compiled for 1.16.0, module version = 1.8.99
[    31.874]    Module class: X.Org XInput Driver
[    31.875]    ABI class: X.Org XInput driver, version 21.0
[    31.875] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad'

Since I have used Ubuntu as OS in my notebook, I haven't had a case like this.
Anyway, problem was solved through rebooting notebook. That's all.


Line 28 of your /etc/profile has that character string in it, and the shell couldn't understand it. Look at the line with
sed -n -e '28p' /etc/profile | \
  od -bc

and delete the funny characters with your favorite editor.


You are missing the php7.0-mysql package.

So you should install the php7.0-mysql package.

PS: Why are you downvoting this? It has solved OP's problem.


The filesystem used, and the maximum number of entities in that directory at any point in time determines the size. Once the default size reserved for the directory is exhausted, more space is allocated for the directory. However, when the number of entities goes down, the space allocated isn't automatically freed. So, if, at one point, a directory has 10 million entities, it would remain the same size if 9,999,999 of them were deleted. This leads to interesting situations like in this Unix & Linux post.

$ mkdir foo; touch foo/{1..100000}; stat -c %s foo
2179072
$ rm foo/*; stat -c %s foo
2179072

This doesn't necessarily hold for other filesystems. The ext{2,3,4} filesystems are affected. NTFS is, to a less extent. tmpfs and btrfs aren't. ZFS is rather conservative, I got an output of 2 for the second stat command.

Related:

How to compact a directory on Unix & Linux


Android Studio is built on Eclipse. Please see these links for creating and understanding an Eclipse theme:

Eclipse 4 CSS
Eclipse theme tutorial
How to create a basic Eclipse 4 theme

What you want to do is basically understand how a theme is created and how to edit the basic Android Studio theme. Keep in mind that AS will probably use different classes. Check the dropins and plugins folders for the AS theme.


When I enter password to login, it returns login desktop inspite of correct password

I don't understand, the password you enters seems to be wrong. Have you forgot it ?
You can reset you password that way

Start you computer.
Choose Other options and then recovery mode.
Choose root terminal and then enter passwd your_username.
Enter reboot.


Which folders are often written to, and how can I mount those folders on a separate drive?

The Filesystem Hierarchy Standard specifies:

  /var contains variable data files

So moving /var should have the biggest impact.

If you have enough RAM, you could also mount /tmp as tmpfs because it usually contains only small files which don't have to be persistent between reboots. In fact the FHS even says:

  Programs must not assume that any files or directories in /tmp are preserved between invocations of the program.


Correct handling of application URIs from Unity Dash

Looking at the documentation, you should be able to use the get_path of the AppInfoManager object

Running the following in the python interpreter:

>>> from gi.repository import Unity
>>> a = Unity.AppInfoManager.get_instance()
>>> a.get_path("gedit.desktop")
'/usr/share/applications/gedit.desktop'

As you can see, just passing the desktop file-name returns the full-path to the desktop filename.

Thus, from your drag-drop app - ensure you add the uri target:

widget.drag_dest_add_uri_targets()

connect to the drag_data_get method

connect("drag-data-get", self.on_drag_data_get)

def on_drag_data_received(self, widget, drag_context, x,y, data,info, time):
    print (data.get_uris())

Split out from application://app.desktop (string.split(str, 1)[1]) and feed that into the appinfomanager.get_path() method


Windows 7 and Ubuntu Boot/Corruption Problems

I have a drive on which Ubuntu cannot see anything but Windows 7 sees the NTFS partitions and two healthy ext4 partitions that Windows cannot access. Curiously, gparted claims that the drive has no valid partition table but Arcronis True Image (non-free) can see all partitions on that drive. I have recovered my data, but I am still struggling to find a way to restore the disk to a correct state without erasing everything and restoring it from the Acronis backup.

If you can see all your partitions in Windows 7 Control Panel ->System and Security -> Administrative Tools -> Computer Management -> Storage -> Disk Management, then Acronis True Image is likely able to extract all the date. Acronis offers a free trial, so you can know if it is useful for you before paying.


How to disable alert sounds on Ubuntu 20.04

Ah, I found it!
Go to Settings → Sound and edit the bar for System Sounds under the header Volume Levels.
For me, it was first set to 0, but somehow didn't register. After setting it louder and then muting it again it worked as required.


Try looking at this: https://help.ubuntu.com/community/Lubuntu/Keyboard#Create_New_Keyboard_shortcuts. If you can add keyboard shortcuts, you should be able to remove them too in a similar way.


SSH myself using public IP address does not always work

It looks like you are failing to set your username ssh USER@<ipaddress> If you don't declare a user name it use the current user. Since you are on a friends laptop you are essentially doing  ssh wrongUSER@<ipaddress> The password or key that you then use doesn't match this nonexistent user. I'm guessing that you are using the same user name on both of YOUR machines.


how can install this file and remove this error

it seems that you might be missing the apt ppa for wherever that package is coming from. Doing a quick google search i couldn't find it.

Download the package from this url:
http://beopen.bplaced.net/2018/01/open-mpi-3-0-1rc2/

unpacking it (it's a gzip) and following the instructions in the included INSTALL file.


Dot matrix printer on USB to parallel converter stopping halfway through the job

Wow. A PN48? I used one of those back in the day, too!
The best way to get these sorts of devices working on modern hardware is with a compatible driver. If the LQ850 driver can only handle plaintext, then you might want to try the generic Epson dot-matrix printer driver from OpenPrinting.org. Unfortunately I do not have my old Citizen printer to test this with.


DELL G7 15 dual boot Ubuntu 18.04 and Window 10

https://www.dell.com/community/Linux-General/Ubuntu-install-on-Dell-G7-15-7588/td-p/7351194

Maybe your notebook hardware no have support Ubuntu OS