Error when running sudo, getting a permission denied

When starting in recovery mode your / file system is mounted read-only.
So the first command must be

mount / -o remount,rw

after that the commands you found yourself will solve your problem.


Minimize, maximize and close buttons are gone on Ubuntu 18.04

Since gtk3 is controlling the buttons in the "CSD" header (as opposed to the Window decorations a Window manager used to control) it looks like your theme has changed that behviour. If you select another theme, they might appear again. Basically that's fixable by changing the gtk.css of your theme (look for the headerbar, .maximized selector).
The default theme Ubuntu ships with should show the button decorations. Make sure that no gnome shell plugin like this is installed


Unable to access the Windows drive in Ubuntu 14.04

If you are using Windows 8 then fast-startup (aka fast-boot, and quick-boot) must be turned off. When you click "Shutdown" or "Restart" with fast-startup enabled the computer doesn't actually shutdown it just goes into a minimal deep hibernation state to make it look like Windows boots quickly. This means the Windows kernel is still partially in control of hardware even after you boot into another operating system. Under some circumstances this then causes problems such as mounting issues.

Steps:

In Windows 8 go to the Start Screen. [You can do this by clicking the bottom left corner of your screen.]
Right click on some empty space, and click "All Apps".
Click on "Control Panel". [You may need to search around for it.]
In the control panel choose "System And Security".
Click on "Change what the power buttons do". [It's a submenu.]
Uncheck the checkbox for "fast-startup", and click "save changes".
Shutdown the computer. [Use "Shutdown" not "Restart" just this once.]

Notes:

Obviously disabling fast-startup means Windows 8 will now appear to boot up a bit slower.


Uninstall VLC , installed using Source file

One possible solution:

Download the sources again (preferably with exactly the same version).
Install it from sources again (overwriting the old install)
Then follow the answer to this question mentioned in the comments: If I build a package from source how can I uninstall or remove completely?


Possible to use iPhone(iOS) as a webcam on Ubuntu?

You can use Iriun to do this. You will need to download the app to your iPhone and install the linux client (a .deb file for Ubuntu 18.04 or higher).
If what's above doesn't work you can try to use Droidcam instead. Follow the instructions to set up the client in the previous link and then download the Droidcam app on your iphone from the App Store!


Unable to get audio through HDMI connection to TV with Ubuntu 14.04

Just fixed my audio issues spent days updating drivers and it ended up being the most basic setting. Permissions, add yourself to the "audio" group. So pop out to terminal and execute the following command.

sudo adduser $USER audio

Hope it works for you as well. It's odd that you are not automatically in that group as sound is an essential service.

Oh, and reboot, just to ensure the permission kicks in.


How to cut and merge mp4 video files without re-encoding

You can do it with ffmpeg. You need to order the options properly and add two more:

ffmpeg -i INFILE.mp4 -vcodec copy -acodec copy -ss 00:01:00.000 -t 00:00:10.000 OUTFILE.mp4

From here.


Try using a lighter desktop environment like LXDE.
Open the terminal and type the following

  sudo apt-get install lxde

And then logout and choose LXDE Environment from the loginscreen.


I opened a bug report on lxd's github and Stéphane Graber gave me the answer: this is a feature of Firefox, that can be toggled off with the --no-remote switch. So of course no problem with LXD !

Quoting Stéphane:

  I've not used firefox in a long time, but I believe they have code to
  find and interact with an existing firefox through X properties.

  Since you pass "-X", your container has access to your X server and so
  can query/set X properties, list all running windows, ... which is
  most likely how firefox detects an existing firefox session and has it
  open a new window rather than spawn a new process.

  I'd expect there to be a command line option to firefox to have it not
  do that.

se https://github.com/lxc/lxd/issues/3049

So launching firefox --no-remote from the container prevents firefox from opening a new window in my main session.


Is there a way to recover ubuntu 14.04 to a previous configuration?

There is an extensive log in /var/log/apt/ which keeps track of what exactly you have been installing and/or updating, complete with the actual commands (if commands were used). See what is in there: uninstall packages that seem to cause trouble and reinstall lower-numbered versions.


Don't worry.  These kinds of size and resource hogging issues due to session file traffic is a common affliction facing backup utilities, web servers, and other high uptime services.  See, for instance... Ubuntu 16.04((HyperV)-very large file in /tmp,keeps growing... large CPU and network load while system is idle.

Note, that post is NOT a duplicate... your files are indeed Apache session files (per the /tmp/php*) ... but in that case you see that a backup utility (Duplicati) writing /tmp/dup* backup files wantonly will lead to much the same CPU hogging and gobbling storage seem similar.  Naughty programs... abusing those temporary files.

Check out the [SOLVED] cross-post on ubuntuforums.org -- it happens but there's hope for them, and you as well.

Practically speaking, there's a simple solution, and a more in-depth multi-faceted one.  Which will work for you will boil down to your usage plans.

Easy Fix (Bye, Bye, Bye [Web Server])

First question -- are you INTENDING to run an Apache Web server from your ailing box?

IF NOT, you arguable should disable Apache auto-startup by using update-rc.d to update the bootup services preferences in /etc/init.d/.

By default, many Linux distros will start Apache running -- even if you don't know what it does and never use it.  Best case, maybe you can just flip the switch in the boot configuration and not only solve this issue, but guard yourself against some potential security risks in the process.

Stuck in the Web You're Spinning

But maybe you WANT to run a Web Server.  Okay, okay.

In that case the fix isn't so ubiquitous and certain, but here's some suggestions of how to stabilize things and potentially find a fix...

From a paranoid I would recommend given these circumstances making sure you are up to date w/ the latest security patches.  This is not meant to sound alarming... but of course there are Apache2 known exploits impacting your distro version's bundled copy of Apache... in fact there's even an article discussing exploiting your specific version for "educational purposes" (see CVEs: 1, 2, 3), so if you don't have these yet / recently installed, your behavior may be a sign of exploitation. Better safe than sorry.

A word of encouragement -- Ubuntu 16.04 has also been called "The Perfect Server" by some, so don't let vulnerabilities scare you off, just make sure out of an abundance of caution that your affairs are in order on the security front.

NEXT, confirm your suspicions (which I share) that these are indeed PHP session files from the Web Server, by verifying Apache's session files path... should match /tmp/ unless something very weird is going on.

Assuming a match, it's probably a configuration file issue, so buy yourself some time, as follows.

Destroy all sessions via a little PHP script and do a one-off cleanup to buy some time (see: How to clean /tmp? and How is the /tmp directory cleaned up?).

Now that the bleeding has slowed, reevaluate whether there's something odd that's causing Apache's zombie hunger.  See:

Session.Configuration [Manual]
How To Configure Apache Content Caching on Ubuntu 14.04

From what I gathered, poorly curated configurations governing garbage collection / session lifetime are common causes for session files growing onerously large.

If none of that works, I would try to see whether the growth seems tied to certain circumstances and would definitely post details to the appropriate mailing list / ubuntuforums.org.


After pressing Fn+F2, try and see if Fn+F7 or Alt+F7 bring you back to the GUI. It sounds from your description that Fn may be behaving like Ctrl+Alt. If that's the case, then it's switching virtual consoles. The seventh virtual console is typically your GUI; lower-numbered ones behave as text terminals.

See:

virtual console (wikipedia)
What is a virtual terminal for?
What does "Ctrl + Alt + F12" do?

However, if the screen turns completely black, then that's probably not what's going on. In that case, it probably dims or turns off the screen.

So another combination should brighten or turn on the screen. Assuming you've tried pressing Fn+F2 again to see if it toggles things back to the way they were before, you might try Fn+F1 or Fn+F3 to see if you can reverse the effect of Fn+F2.

If this was a one-time occurrence and the question is whether or not it represents a problem you have to worry about, the answer is probably not. In that case, I'm not sure of the cause, but it could be:

There was a bug, and an update fixed it (perhaps an update installed before the first time you pressed Fn+F2, but which did not take effect until the next boot-up).
Some other key was accidentally pressed at the same time.
Some program interpreted that key as input, and triggered a problem.

All of these explanations suggest a bug, but there are probably other explanations. If the problem happens again, then I recommend editing your question to provide more information (or posting a new one if the situation has changed considerably). In that case, the main question will be whether or not it's a bug and, if so, what package to report the bug as affecting.


Incomplete installation of the 'libnvidia-compute-435' package makes it unusable

Try removing all the nvidia packages (this will also remove the files in the /etc directory):

sudo apt-get --purge remove '*nvidia*'

Then reinstall the driver as usual:

sudo apt install nvidia-driver-435

See if the file is there then.


Root filesystem check fails after power failure during installation

I had the same situation happen -- power failure during upgrade.

Get to the maintenance shell, and try this:

sudo mount -o remount,rw /
sudo  dpkg --configure -a
sudo mount -o remount,ro /
sudo sync
sudo reboot

(the remount/sync at the end is probably just paranoia, but just in case...)


How to make ubuntu fullscreen all the time

It is not quite easy, and options are limited. Unfortunately, Linux desktops provide limited user control on the default size of newly created windows (I do not know whether the situation is any better in other OS´es). Then also, there is a difference between "maximized" and "full screen".
Suggestion 1. devilspie2 is a daemon that monitors the creation of windows, and automatically resizes or repositions them as they are created. You could configure it to full-screen any window, but then you would need to define exceptions such as File or Print dialogs, or any other window you do not want to be maximized.
Suggestion 2. Per application approach:
If you can live with "Maximized" rather than full screen, some applications remember their previous state. Examples include Firefox, Files, Text editor Gedit, Gimp, Inkscape
Other applications provide command line switches, for example Evince document viewer: evince --fullscreen, Gnome terminal: gnome-terminal --full-screen. For these applications, you could change their .desktop file to add the necessary command line arguments. A more robust approach could be to have your own wrapper scripts, which then would call the actual executable with the needed argument. The latter approach would not only work if you launch the application from the menu, but also when it is being launched from within another app, e.g. Evince from within Firefox.
This way, you should be able to set up a working environment where most applications by default open in a mximized state or at least full-screen. Not perfect, however, by all means. An approach with devilspie would be more perfect, but more difficult to setup.


Unable to switch to integrated GPU, using fglrx, Catalyst 12.6, Ubuntu 12.04

This should be kind of fixed in Ubuntu 12.10.

There are a couple of other bugs, though, so you might want to follow the instructions here:
Can't install ATI proprietary drivers in 12.10


To configure your system to use a static IP address assignment, add the static method to the inet address family statement for the appropriate interface in the file /etc/network/interfaces. The example below assumes you are configuring your first Ethernet interface identified as eth0. Change the address, netmask, and gateway values to meet the requirements of your network.

Edit the file so it looks like this (making the appropriate changes to address, netmask, and gateway). Make sure that the static ip address is well outside your router's dhcp range.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.0.0.100
netmask 255.255.255.0
gateway 10.0.0.1

https://help.ubuntu.com/lts/serverguide/network-configuration.html


How to disable/enable automatically connecting to WiFi?

I'm updating this answer to reflect new images, since this was done on a laptop.

Click on the wireless icon on the top bar as shown in the image below, and

Then clock on Edit Connections.

Once the window opens, click on the wireless tab, and then click on the Edit button.

Unckeck the connect automatically radio button, and click Save.  At this point you need to reboot your system

Once rebooted, you can see from the image below, that the wireless network is not connected.  You have to enable it to be able to use it.

Now the wireless network can be enabled/disabled from terminal, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below to list all devices.

rfkill list

To block wireless, you type:

rfkill block <device_number>

To unblock you type:

rfkill unblock <device_number>

as shown in the image below.


Error while installing Oracle JDK 8 in Ubuntu 15.04

Open terminal and run the following commands,

sudo rm -rf /var/lib/dpkg/info/\*.\*`
sudo apt-get clean`
sudo apt-get install -f`
sudo apt-get update`


It's what's known as a "kernel oops," a superset of kernel panics. If this is a new installation of Ubuntu, the problem is most likely due to corruption of the installation media.

If it's not a new installation, try loading an older kernel by holding Shift during boot to access Grub's boot menu. If that starts up alright, you can report a bug by running ubuntu-bug linux-image-2.6.35-24-generic.


Unity "Isn't Supported" after installing nvidia website drivers. Computer has optimus. Trie

I experienced almost the same (very annoying) issue. I installed Bumblebee as suggested by wiki.ubuntu.com/Bumblebee. I have a GT540M card.

The same happens with every kind of installation I tried (Nvidia drivers alone, Bumblebee with Nvidia drivers...) : Unity does not display anything but the mouse cursor, and the screen resolution is low.
When Nvidia drivers were installed alone, uninstalling it via a command line (sudo apt-get remove nvidia*) solved the problem.

But with Bumblebee and linux-headers-generic, I tried reinstalling the kernel, booting on a previous kernel, nothing worked. Maybe I missed something, but I had to reinstall...

Nvidia is known for very good compatibility with Linux and good driver support. It is a real shame having the only system that is not supported by their own drivers.
You know what? Even on Windows, although an old driver installed properly, the newest (310) said that it does not recognize the card. Absurd.

So, numerous posts have been written about these Optimus graphics cards, but they are not reliable as it may depend on the card model and the system. The worst of it is when it does not work, you may have to reinstall.

The freeze and black screen with Nouveau error messages, when using the Unity dash, was the symptom of the recognized Nvidia Optimus card, with disabled Optimus in BIOS, with no Nvidia driver.

My solution : I finally switched back my BIOS setting to ENABLE Optimus (named Lucid Virtu on my machine) and Ubuntu does not see the Nvidia card. This is back to basics, and it seems to work fine with the Nouveau driver, until then. I will post again if I I see the Unity freeze again.
Edit: No, it does the same. Unity freezes after several uses of the dash. I can only wait for a fix...


I guess I finally found a solution for myself. With the steps below I was able to get a tearing free experience and setting up my HiDPI display to get readable content. I wanted to avoid GNOME scaling mode under settings and display devices (see issues below between GNOME and NVIDIA) and to solve the scaling by setting up the DPI correctly. It didn't work out the way I imagined it would (the DPI scaling, tearing is fixed), however I am looking for your feedback. Maybe it can be made to work after all.

I had to deal with the following problems:

After installation of Ubuntu, I was unable to read anything on my display. Using a 4k display at 28" needed a HiDPI setup without using binoculars.
Setting up a scaling in Gnome Settings Menu to 200 was too much and 100 not acceptable. Fractional Scaling was OK.
Next thing was the tearing. Everything felt choppy and all windows had this horizontal line of doom. So I set up a 10-nvidia.conf.
10-nvidia.conf only fixed it partly as from time to time after a restart or a shutdown the tearing was back.
Gnome Scaling and the NVIDIA driver interfered with each other.

I noticed that my screen went black for some seconds when I opened nvidia-settings.
Flameshot (the screenshot App) was not working as the screen went black when I tried to take a screenshot. Hitting Esc to end the "take screenshot" action made the screen appear again.
I wanted to use a icc-color-profile for my monitor and sometimes it was applied and sometimes not. I noticed the slight change in color.

When I applied a scaling in Gnome Settings, I noticed that ViewPortIn in nvidia-settings changed to 5120x2880 even if I have 3840x2160. This is related to how DPI scaling is done in Gnome (correct me if I am wrong). Interestingly if I changed ViewPortIn to 3840x2160 (equal to scaling 100 %) Flameshot was working again.
Nightmode was not working, as soon as it got activated it was disabled by just launching the file manager or it happened because of other random reasons.

However with all those problems in mind I wanted to set everything back to default and start over again.

I removed everything in 10-nvidia.conf except the initial Section "OutputClass"
I executed sudo nvidia-settings navigated to "X Server Display Configuration", selected "Configuration" and chose "Disabled". I confirmed the dialog and chose to apply as much as it can. I did the same with nvidia-settings afterwards (executed without root after closing NVIDIA settings), to be safe.
Back in Gnome settings I selected a scaling of 100 % and executed gsettings reset org.gnome.mutter experimental-features to disable fractional scaling.

A reboot and several google requests later, I wanted to have a setup that would avoid Gnome's Scaling and doing all that DPI stuff in the NVIDIA driver.

Setting up 10-nvidia.conf:
I got the basics for that file by opening nvidia-settings -> "X Server Display Configuration" -> "Save to X Configuration File" -> "Show preview..." and copying all that stuff.
With sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia.conf I pasted the sections of "Show preview..." to the existing content. DO NOT REPLACE.

I then added/edited the following content (don't copy and paste my file:):

To actually fix tearing, that is the magic [reference]:Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
I then wanted to set up DPI scaling:Option         "DPI" "161 x 158"I thought that if I set it up correctly, I would get a correct DPI scaling by doing this:

It is very likely that xdpyinfo | grep -B2 resolution will output resolution: 96x96 dots per inch, but that is not actually the correct DPI. With whtyger's post I calculated my DPI:randr | grep -w connected
DP-4 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
The calculation:x = 62,1 cmy = 34,1 cmx = 62,1 cm / 2,54 = 24,4488 size in inchesy = 34,1 cm / 2,54 = 13,4252 size in inchesx = 3860 px / 24,4 inches = 158,1972 DPIy = 2160 px / 13,4 inches = 161,1940 DPI
Unfortunately either I forgot something or my way to apply a proper DPI scaling is not working. However I still had to pinch my eyes together (small font size).
I executed xrandr --dpi 144 to set DPI scaling to 144 %. The PC didn't react after the command. Strg + Alt + F1 brought me to login screen and I was able to log in again where I got my 144 DPI. However it didn't changed the scaling factor of UI elements.
I still didn't want to use GNOME scaling and so I used GNOME Tweak Tool to increase Font scaling. With the formula desired_DPI / 96 I got my 1,50 scaling factor (144 DPI / 96). Most desktop and application elements are readable now and I avoid using the GNOME scaling mode under display devices.
I added Option         "Composite" "Enable" and hoped to get a better performance with no tearing. With the magic fix in place, I didn't notice any better performance as the tearing is already fixed with ForceCompositionPipeline
with sudo nvidia-settings I navigated to "OpenGL Settings" and disabled "Sync to VBlank" and activated "Allow Flipping".

Final thoughts:

The overall feeling is much better and tearing is dead. However I still can not believe that a 60 Hz is that slow. So when I shake windows like crazy hell, I still see a lot of ghosting of the window. I am able to use Flameshot again! If I use nightmode and I start nvidia-settings, the nightmode ends as something interfere with that mode. Luckily Windows is fighting the same battle.
I hope that I didn't write too much and that I could help one or the other with his problem. I am looking forward to feedback.

References:
How to Enable Fractional Scaling in Ubuntu 19.04
How to Handle a Hi-Dpi Screen in Linux
How to find and change the screen DPI?
GNOME Tweak Tool
HiDPI
Nvidia proprietary driver DPI settings
Xorg
Screen tearing with a newer nVidia GPU

10-nvidia.conf - DO NOT COPY/PASTE:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia-418/xorg"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc ASUS PB287Q"
    HorizSync       24.0 - 160.0
    VertRefresh     30.0 - 80.0
    Option         "DPMS"
    Option         "DPI" "161 x 158"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080 Ti"
    Option         "UseEdidDpi" "False"
    Option         "DPI" "161 x 158"
    EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-7"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
        Modes       "3840x2160"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection


How does chown work with regards to files created by Mac OS X?

chown cannot make changes to read-only filesystems.


How do I create launcher icon for Chromium with proxy?

Just create an new empty text file in ~/.local/share/applications and open with a text editor. Then add the following lines to it.

[Desktop Entry]
Name=Chromium with Proxy
Comment=Launch Chromium with proxy
Exec=chromium --proxy-server="http://xxxxxxxxxx:yyyy"
Type=Application
Icon=chromium
Terminal=false

Then save the file as a .desktop file, say as chromium-proxy.desktop.

You can learn more about desktop entry specifications at freedesktop.org.

Also look into the /usr/share/applications/ directory for the pre-installed .desktop launcher for Chromium. If Chromium is installed as a snap then it should be at /var/lib/snapd/desktop/applications/. Note that in your file manager it might not show up as a file with a .desktop suffix, rather you should see a Chromium icon just with the name 'Chromium'.


Logitech H600 mic not working, Ubuntu 15.04

Try the solution posted here on Reddit. Worked for me.

  Open terminal and enter sudo -H gedit /etc/modprobe.d/alsa-base.conf,
  hit Enter. It will open a file alsa-base.conf. scroll to the end of
  the file and add this

options snd-hda-intel position_fix=1"

  as a
  new line, save the file and reboot. Enjoy this!

More details: https://wiki.ubuntu.com/Audio/PositionReporting


Prevent adding users via gnome-control-center

A Basic idea is to change polkit policy
edit the file /usr/share/polkit-1/actions/org.freedesktop.accounts.policy
sudo -H gedit /usr/share/polkit-1/actions/org.freedesktop.accounts.policy

Edited Content:
<action id="org.freedesktop.accounts.user-administration">
.........
.........
.........
    <defaults>
      <allow_any>none</allow_any>
      <allow_inactive>none</allow_inactive>
      <allow_active>none</allow_active>
    </defaults>
 </action>

I have edited 3 lines with none
Tested in gnome-shell 3.38.0

the above is just an idea.. you may dig further to have a localized location of the same file to prevent overwrite in updates..


I found that Nautilus bookmarks are dynamically changing when the content of the file ~/.config/gtk-3.0/bookmarks is changed. So my suggestion is the following script, that could be bind to a custom keyboard shortcut. Here is ho it works:

Create executable file, called nautilus-bookmarks-manager and located in the directory /usr/local/bin to be accessible as shell command (or use different name and location):

sudo touch /usr/local/bin/nautilus-bookmarks-manager
sudo chmod +x /usr/local/bin/nautilus-bookmarks-manager
sudo nano /usr/local/bin/nautilus-bookmarks-manager

Create Custom keyboard shortcut where the command should be:

/usr/local/bin/nautilus-bookmarks-manager

The script content is:

#!/bin/bash

# Initial variables; the last underscore in $PROFILE_NAME_TEMPLATE is important
BOOKMARKS_DIR="$HOME/.config/gtk-3.0"
BOOKMARKS="$BOOKMARKS_DIR/bookmarks"
PROFILES_DIR="$BOOKMARKS_DIR/bookmarks_profiles"
PROFILE_NAME_TEMPLATE="$PROFILES_DIR/bookmarks_profile_"

# If the profiles directory doesn't exist create it,
# otherwise renumber the existing profiles in case some of them were deleted
[[ ! -d $PROFILES_DIR ]] && mkdir -p "$PROFILES_DIR" || rename 's/[0-9]*$/our $i; sprintf("%d", 1+$i++)/e' "$PROFILES_DIR/"*

# Get the list of the profiles as an array,
# the expression `[[ -z ${PROFILES[@]##*\*} ]]` means `if the directory is empty` or not empty when there is a `!`
PROFILES=("$BOOKMARKS_DIR/bookmarks_profiles/"*)

main() {
        # Compare the current profile to each existing profile in $PROFILES and find the $CURRENT_PROFILE if it exists
        for profile in "${PROFILES[@]}"; do cmp -s "$BOOKMARKS" "$profile" && CURRENT_PROFILE="$profile"; done

        # Get the number of the current profile
        CURRENT_PROFILE_NUMBER="${CURRENT_PROFILE##*_}"

        # If the $CURRENT_PROFILE doesn't exist in the list of profiles and the directory is epty: $NEW_PROFILE_NUMBER = 1
        # If it doesn't exist and the directory is not epty: $NEW_PROFILE_NUMBER = ( number of the profiles + 1 )
        # If this is the last profile from the list the next profile number is 1: $NEW_PROFILE_NUMBER = 1
        # In all other case increment the $CURRENT_PROFILE_NUMBER by 1
        if   [[ -z ${CURRENT_PROFILE+x} && -z ${PROFILES[@]##*\*} ]]; then
                NEW_PROFILE_NUMBER=1
        elif [[ -z ${CURRENT_PROFILE+x} && ! -z ${PROFILES[@]##*\*} ]]; then
                NEW_PROFILE_NUMBER=$(( ${#PROFILES[@]} + 1 ))
        elif [[ $CURRENT_PROFILE_NUMBER -eq ${PROFILES[-1]##*_} ]]; then
                NEW_PROFILE_NUMBER=1
        else
                NEW_PROFILE_NUMBER=$(( CURRENT_PROFILE_NUMBER + 1 ))
        fi

        # If the current profile doesn't exist in the list add it, else just switch to the next profile
        if   [[ -z ${CURRENT_PROFILE+x} ]]; then
                cp "${BOOKMARKS}" "${PROFILE_NAME_TEMPLATE}${NEW_PROFILE_NUMBER}"
                echo "Profile ${NEW_PROFILE_NUMBER} is CREATED"
        else
                cp "${PROFILE_NAME_TEMPLATE}${NEW_PROFILE_NUMBER}" "${BOOKMARKS}"
                echo "Profile ${NEW_PROFILE_NUMBER} is ACTIVATED"
        fi
}

killall notify-osd >/dev/null 2>&1  # Kill all notify-send messages
notify-send "$(main 2>&1)"          # Call the `main` function and output all messages through `notify-send`

The script will store each new profile in the directory ~/.config/gtk-3.0/bookmarks_profiles. If this directory doesn't exist it will be created. Otherwise the script will try to renimber the existing profiles in case you have removed some of them. This leads two cases:

When you want to delete certain profile, first you should activate some other profile;
When you want to move certain profile to the end of the list, activate it, then delete it and execute the script.

Next. The script will compare the file ~/.config/gtk-3.0/bookmarks with each file in ~/.config/gtk-3.0/bookmarks_profiles. If coincidence is found the script will switch to the next profile. If there is not coincidence a new profile will be created.

A more advanced version of the script could use named (instead numbered) profiles and and some tool like zenity to get the names of the new profiles.


Can an infected USB infect my PC through sudo and/or home?

Highly doubtful. Linux doesn't have autorun feature like Windows does, so whatever is on USB drive is just data - passivelly stored, without any ability to act. With Ubuntu , USB drives get mounted automatically through Unity desktop's dbus methods to /media/USERNAME folder, file permissions being assumed as the current user and that's it.

There is however something known as udev rules, which are frequently used as sort-of autorun feature, for instance to run a specific script once a usb device is connected. This has to be set on your system, so in other words  unless someone has tampered with your system first (either locally or remotely), there is no potential for malicious action from the USB itself.


Wallch changing frequency resets automatically

Wallch developer here. No need to post a bug at askubuntu :D

I have changed the bug at launchpad to "Fix Commited"

Wallch 4.0 should be ready in 1-2 weeks, if you are in a hurry use our latest ppa of version 3

For 12.04:

sudo add-apt-repository ppa:wallch/12.04-3+
sudo apt-get update && sudo apt-get install wallch

For 13.04/13.10:

sudo add-apt-repository ppa:wallch/3+
sudo apt-get update && sudo apt-get install wallch

For instant updates (within 24 hours from the last code change):

sudo add-apt-repository ppa:wallch/wallch-daily
sudo apt-get update && sudo apt-get install wallch


18.04 Server can log in remote but not local

So here is what I found out.  As I was troubleshooting other issues that had shown up (prior to getting on to the routing/NAT issue, I found that I now had no way to even run sudo apt-get update, as I was getting all sorts of 'Failed to write, drive full' errors).

Long story short, apparently even though I have a 410G raid set up on the server and had partitioned it with LVM upon the original install, only 4GB was actually being used from the installer on root and I had the following:

System information as of Sat Jun  8 15:40:10 UTC 2019
  => / is using 95.7% of 3.87GB

After resizing the /dev/mapper/ubuntu--vg-ubuntu--lv  3.9G  3.8G     0 100% / I thought I'd try to log in and Voila! I was able to log in again.  Not sure if I missed something the night I did the install or what, as previously I had always done up specific partition sizes based off of what I'd read online (e.g. separate root / tmp / home / etc) but this time I went with what everyone recommended was let it do LVM and let it auto populate/adjust.  It gave me the full 410GB on the LVM but stuck root at 4gb which had filled up, thus not letting me log in with the GUI (local) nor do any updates/etc.

Figured I would post the solution I found in case anyone else had issues with not being able to log in to the Desktop GUI and turns out it was a full root partition.  Thanks all!  ~AW


shutdown in specific way, if no-one uses computer

One way to do this is to emulate a press of the power button. Then the following dialog will pop up, and shut down the computer after 60 seconds.

To do this, use acpi_fakekey 116 which will "press" the shutdown button (number 116). (At least 116 is my shutdown button. If it fails on your machine,try installing evtest and run it while you press the button)

To automate this every hour, add it to roots crontab like this:

sudo crontab -e and add the following line:

0 *  *   *   *   /usr/bin/acpi_fakekey 116

This will press the button at the 0th minute of every hour of every day of every week of every month.


Geany color scheme conf file: format and fields

So you open a Geany theme configuration file and you see something like this:

default=#fff;#1e1e1e;false;false
type=#2e8b57;;true
class=type
function=default
parameter=function
comment=#747474;#1e1e1e;false;true

Generally, the parameters for each category attribute are as follows:

[category] = [foreground color]; [background color]; [is Bold]; [is Italic]

There are exceptions in some cases where the boolean values determine when either the foreground and/or background colors are overridden (such as for a highlighted selection.)

So in my example above, "comment" is a medium gray color on dark gray background (same as default text) and italicized.

Optionally, you can duplicate an attribute by back-referencing the original definition ("class" is the same as "type", etc.)

Also from the geany-themes git page (https://github.com/geany/geany-themes/blob/master/ADDING-A-THEME.md):

  While there's no strict style guide for how the .conf file is formatted,
  here's some notes about preferred style:

  It's easiest to start by using an existing colour scheme that is
  similar to the one you want to create/port.
  Use HTML-style colours starting with a pound symbol (#), in
  lower-case hex notation, compressing to 3 digits if possible. Examples:

  #ff0
  #e4b211

  Use [named_colors] (see Geany Manual) where appropriate, if you want.

It may not be directly referenced, and a little tricky to find, but I did find more descriptive definitions in the online Geany Manual at https://www.geany.org/manual/current/index.html#named-colors-section (It's under the section titled Special file filetypes.common.)


dennis@lightning:/tmp$ apt-cache search doodle
doodle - Desktop Search Engine (client)

Ah. That'll be trying to index your filesystem, which usually slows machines down to a crawl. If you're not using it, remove it :)


How can I split a single partition into three when it already has tons of data?

install the relevant releases of Ubuntu on P1 and P2 (how?)

Well, classical. Just install from CD, and when asked where to install, choose the partition of your choice.

  create /home subfolders on P1 and P2 and symlink them to subfolders on P3

No. Where you get asked where to install what, you can declare to use partition xN as /home (without reformatting), and the system will mount the same home for both versions.

Backup important data before and just be concentrated at this point in the installation processes.


Do not do it in /etc/libvirt/qemu.conf, but rather do it in the definition file for the guest itself, for example in /etc/libvirt/qemu/serv64_dev.xml. here is an example of the relevant section:

<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
  <listen type='address' address='0.0.0.0'/>
</graphics>
<video>
  <model type='vmvga' vram='9216' heads='1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>

Use virsh edit domain name to edit, example virsh edit serv64_dev (from any directory), as it does some additional checks upon exit.

The default editor used by virsh edit is as defined by the $EDITOR environment variable, or VI if it does not exist. add export EDITOR="/bin/nano" to your ~/.bashrc file to set, for example, nano as your default editor.


Ubuntu 18.04 fails to start, please see the error message in the picture, the computer will stop to work and only display that message

Whoever faced this issue, the reason for me was I mistakenly changed /var/lib permission to a different user than root, I have solved the issue by these steps:

1- switch on or restart your machine.

2- before seeing the Ubuntu logo press shift key.

3- Select the line which starts with "Advanced options".

4- Select the line ending with "(recovery mode)".
    Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode).

5- After a moment, your machine should display a menu with a number of options. One of the options will be "Drop to root shell prompt". Press Enter with this option.

6- Then I prompted to enter my root password, after entering my password I went to that specific dir /var/lib which I changed the permission and changed back to the root.


Mythbuntu is still available from Mythbuntu releases on the cdimage server. If you are having trouble with torrents, consider downloading the 16.04.3 ISO directly and verifying that you have a good copy by checking the hash.

Here's a list of md5sums from the cdimage server:

1d24bbcc83f18069cd9f7562271181fb *mythbuntu-16.04-desktop-amd64.iso
153569d8fb6ac05881b5876df04f440a *mythbuntu-16.04-desktop-i386.iso
33d0dcd7b9da6adc2ed8da4c1a59b0aa *mythbuntu-16.04.1-desktop-amd64.iso
bd19ae5151e484c692baa9489952621c *mythbuntu-16.04.1-desktop-i386.iso
ba6518b77a4db6db899d370bedf2356c *mythbuntu-16.04.2-desktop-amd64.iso
4038c9a02a7c58c51f2febc5d38f04c1 *mythbuntu-16.04.2-desktop-i386.iso
eff5e3e9f33e8cdcea40d603ad08bc39 *mythbuntu-16.04.3-desktop-amd64.iso
64232638e1e88f893a6754666174e73c *mythbuntu-16.04.3-desktop-i386.iso

You might also find this related post useful. You can also find the SHA1SUMS and SHA256SUMS here.


configure: error: Can't find text2utt of festival in installing HTS-demo_CMU-ARCTIC-SLT

You can just copy the script text2utt.sh as "text2utt" into HTS-demo_CMU-ARCTIC-SLT-STRAIGHT-AR-decision-tree/

https://github.com/zeehio/festival/blob/master/examples/text2utt.sh


Can I tell GNOME to ignore mounts in my home directory?

In my opnion it related to gfvs.
Add in /etc/fstab to your bind mounts option
x-gvfs-hide

This removes in my case the entries under devices, in focal (lubuntu) with default filemnanager (pcmanfm-qt).


How to assign camera source by its USB identity?

For me, I just needed to run ls /dev/v4l/by-path/ The camera's USB port is consistently updated there, you can check by switching the camera on and off and watching its path value change there.

Alternatively, you can run ls /dev/v4l/by-id/, but this didn't work for me because all my cameras had the same ID. Specifying by USB port seems to work better for my situation.


Removing a core runtime for Snapd program does not work

You cannot remove it in this manner. It is required for snaps to work.

If you wish to remove it, you should remove all other snaps, then apt purge snapd. Then you can reboot and delete the /snap tree if you wish, which will get rid of the files for the core runtime package.


Can't login into GNOME Shell, running it always shows fallback mode

Gnome Shell requires that you have good hardware support from your VGA, and that you have good drivers. Your desktop is a fallback mode for hardware that can't handle Gnome Shell. If you want a modern desktop, you should probably give Unity 2D a chance. It's quite nice and works without 3D acceleration.


how to disable password and root ssh?

Lets rephrase it and I except you want

Deny all root login
Deny all password logins for all users
Allow other users with other authentication methods (publickey)

This is achieved using below configuration options:

PermitRootLogin no
PasswordAuthentication no
ChallengeResponseAuthentication no

If you change your config to have these (not append to the end!) and restart your server, you should achieve the above. If not, please, clarify the question and post the logs as asked already.


Updating man-db to patch CVE-2015-1336 / CVE-2017-9525

I ended up doing this:

sudo wget http://mirrors.kernel.org/ubuntu/pool/main/m/man-db/man-db_2.7.6.1-2_amd64.deb
sudo dpkg -i man-db_2.7.6.1-2_amd64.deb

Seemed to work.


It turns out it was an outdated driver for my GPU, as removing it made everything run boot up smoothly. My solution was to use the root shell in recovery mode to install the necessary drivers over apt, then replace the GPU.


Should I upgrade my Dell mini netbook from 10.04 to 12.04?

How about trying the new version by booting from USB a couple of times without doing a full blown complete install?  This way you can play around and see if there are any driver (or other) issues.


"Shared to other computers" not working on Lubuntu 18.04 and up

PLEASE READ THE ENTIRE ANSWER, AND UNDERSTAND IT, BEFORE MAKING ANY CHANGES.

DNS/DHCP is kind of messed up in 18.xx.

I had you install dnsmasq mostly for its DHCP server. Some configuration may be required in /etc/dnsmasq.conf. You'll have to check that it correctly identifies your ethernet port enp1s0, as it's probably currently set to eth0.

Of course, with recent versions of Ubuntu, they came up with this "easier/better" way to name comm ports... in your case... enp1s0 and wlp2s0b1. Not very user-friendly. If you'd like to revert to their original style names of eth0 and wlan0, you can make the following change...

Edit /etc/default/grub and find the line that has "quiet splash", and change it to "quiet splash net.ifnames=0", then do sudo update-grub, and reboot.

Your /etc/resolv.conf file is incorrect. You have a hard-wired file, and it should be a symlink to one of two places.

sudo mv /etc/resolv.conf /etc/resolv.conf.OLD # rename the current resolv.conf

With dnsmasq running, and doing DNS, it should probably be like this...

sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf # create a new symlink

With systemd-resolve running, and doing DNS, it should probably be like this...

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf # create a new symlink

But there's a problem. When dnsmasq AND systemd-resolve are running at the same time, they tend to step on each others toes, and DNS resolution gets even more wonky. To cure that, we tell systemd-resolve to back off, and let dnsmasq handle DNS.

Regarding dnsmasq and systemd-resolved...

Do a ps auxc | grep -i dns and ps auxc | grep -i resolv and look for dnsmasq and systemd-resolved, and if both are running, you need to disable the DNS part of systemd-resolved by editing /etc/systemd/resolved.conf and...

change:

#DNSStubListener=yes

to:

DNSStubListener=no

then restart systemd-resolve and dnsmasq, or reboot.

You may also need to edit /etc/NetworkManager/NetworkManager.conf. Edit the file and add a dns= line, like so...

[main]
plugins=ifupdown,keyfile
dns=dnsmasq (or dns=default would probably work also)
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no

On both computers, you should be able to execute both of the following commands to assure that DNS resolution is working correctly...

host 8.8.8.8

host www.ebay.com

Lastly, you need to monitor the contents of the two resolv.conf files that I noted earlier. Then decide which of the above symlinks that you need to recreate. If everything is working correctly, one of resolv.conf should probably contain 192.168.x.1, the address of the DNS server in your router, or x.x.x.x, the address of some other external DNS server. They probably should not contain 127.0.0.1 or 127.0.0.53.

Note: You may need to make some/all of these changes on the 2nd computer, if it's running 18.xx.

If all of this is a little confusing, it is. Ask more questions if you need to.


How to troubleshoot/bug report a problem that only appears right after startup?

You might want to look into ~/.xsession-errors for relevant error messages.


Move a logical partition to a primary and change MBR to GPT without data loss

If the ultimate goal is to convert to GPT, there's no point to first doing a logical-to-primary conversion; gdisk will read both primary and logical partitions and, when you save the partition table, convert them both to GPT partitions. This assumes, however, that there are no other problems, such as partitions that overlap GPT data structures or damaged MBR partition table structures. As oldfred points out, the official gdisk documentation provides explicit instructions on how to perform this conversion:

http://www.rodsbooks.com/gdisk/mbr2gpt.html

(Note that I'm the author of gdisk.)

If you want to do a logical-to-primary conversion without converting to GPT, or if you need to do a logical-to-primary conversion as a temporary measure before converting to GPT, you can do so with FixParts (fixparts), which is provided as part of the gdisk package in Ubuntu. See the official FixParts documentation for information on how to do this. Note that there are some caveats and limitations, but it looks like your /dev/sda5 should be easily convertible. As I said, though, doing this as a preliminary to converting to GPT is pointless, since gdisk will read both primary and logical partitions and convert them both, if that's possible. (Note that FixParts shares a lot of code with gdisk. In particular, both read MBR partition tables in the same way.)


How to maintain a file's 'last modified' date?

cp --preserve=timestamps <source> <destination>

If you are recursively copying you could use:

cp -a <source> <destination>

From the cp manual page:

-a, --archive
       same as -dR --preserve=all

-d     same as --no-dereference --preserve=links

-R, -r, --recursive
       copy directories recursively

--preserve[=ATTR_LIST]
       preserve  the specified attributes (default: mode,ownership,timestamps),
       if possible additional attributes: context, links, xattr, all


How to connect to a network from terminal

Ubuntu's NetworkManager service can be accessed via a command called nmcli. I'm not too sure if it's installed by default, but it seems it is, since it's part of the network-manager package.

To connect to a network, you need to know its NetworkManager ID. You can do so by using the following command:

nmcli connection

This should give you a list similar to this:

yjwong@yjwong-laptop:~/Documents/searchagram/build$ nmcli connection
NAME       UUID                                   TYPE              TIMESTAMP-REAL
Wong       6944f99a-21d2-4dd9-8ac4-a140e1024970   802-11-wireless   Fri 27 Sep 2013 04:26:04 PM
rpi        8084e8bd-c52c-4954-8721-0dac198604b7   802-11-wireless   Wed 01 May 2013 04:33:58 AM
AndroidAP  bb3e5a13-98e5-46eb-bfb4-c294f8757070   802-11-wireless   Mon 04 Nov 2013 05:01:11 PM
...

To bring up the "Wong" connection, simply execute:

nmcli connection up Wong

If your connection was named "EVDO Connection" you can execute:

nmcli connection up "EVDO Connection"


How to install XnViewMP in Ubuntu 18.04 and later

Download and install the XnView deb file from the Xnview Homepage. Although there were problems in Ubuntu 16.10, the newer versions (XnViewMP 0.9x) work fine in 18.04 and probably later. XnConvert also worked for me.

Update 19.04 and later (Thanks to Charles Green):
The XnViewMP .deb file does not install needed library libopenal1.
To fix this open a terminal windows (e.g. ctrl+alt+t) and enter the command
sudo apt install libopenal1

Install it as flatpack.
Follow the instructions from flatpack.org including the Software Flatpak plugin to setup flatpack including flathub support. After a system restart, you can find XnView and XnConvert in the Software Center and install it from there.

As AppImage, see other answer.


Upgrading to Ringtail 13.04 broke some APT repositories?

Your problem is a space in the apt line,

you've got:
deb http://overviewer.org/ debian ./

should be:
deb http://overviewer.org/debian ./


Why does my scroll reverse in Telegram desktop application?

I had the same problem on a new installation of Ubuntu 17.04.
I solved it by using dconf-editor to set org/gnome/desktop/peripherals/mouse/natural-scroll to true.

Now it's working in Telegram like in all other applications.


How to make the Facebook webapp work without keeping Firefox open?

In this method you can only see who are all on-line and you can just chat with them. By using Empathy which will installed by default in your Ubuntu version. Press super key ( windows logo key ) and type empathy. Once you open empathy press f4 and click on add button in the left. You will find so many accounts like gmail, facebook, yahoo etc. Add all accounts which you want to by providing their respective username and password.

To see some more good results for facebook goto software center which will be present in launcher and search for emesene(another facebook messenger). You will also find so many other softwares. Ask if have missed anything you want.

Updated:

It has been mentioned that it(jfbchat) provides voice notification but i don't know really weather they are notification of facebook or notification of message. Follow this link to install jfbchat "http://handytutorial.com/install-facebook-chat-client-in-ubuntu-12-04-windows-7/". Give it a try.


How do I save the settings on a Ubuntu Live USB?

It is possible, however, not with your current install of Ubuntu on your USB, you will need to reinstall it and follow the tutorial on this page:

https://wiki.ubuntu.com/LiveUsbPendrivePersistent

and for more information have a look here:

https://superuser.com/questions/174315/how-to-save-settings-on-bootable-usb-drive


Difference between vmlinuz *-generic and *-generic.efi.signed

The kernel with a filename ending with .efi.signed is signed by Canonical for use with Secure Boot. Most computers have firmware that does not trust Canonical's signature, though; it's only with the help of the Shim program (the shimx64.efi binary on the ESP) that the signed kernel is trusted.

To elaborate a bit, the loading path for signed components of Ubuntu with Secure Boot enabled looks like this:

EFI -> Shim -> GRUB 2 -> Kernel -> Kernel modules

The EFI trusts Shim because it's been signed by Microsoft, whose keys are embedded in the firmware.
Shim patches the EFI's Secure Boot subsystem and includes Canonical's public key. Shim trusts GRUB 2 because it's been signed with Canonical's private key.
GRUB 2 calls on the EFI's Secure Boot system (now patched by Shim) to verify the kernel, which is also signed with Canonical's private key.
The kernel verifies that kernel modules are signed by Canonical's private key or some other key in the Secure Boot chain.

Prior to, IIRC, Ubuntu 15.10, Ubuntu's GRUB 2 did not enforce Secure Boot policy on the kernel, and the kernel did not enforce Secure Boot policy on kernel modules. That's been tightened recently, though. AFAIK, there are no plans to require ordinary system binaries to be signed.

I don't know offhand why there's an unsigned kernel file in Ubuntu. The signed file works fine even on systems that don't support Secure Boot (including pure-BIOS computers). Thus, the unsigned file is rather redundant, AFAIK.

Note that each of the components from Shim onward can be obtained in unsigned form, or their signatures stripped away. If you build Shim yourself, you can replace Canonical's public key with your own, or with any other public key you like. (Most major distributions have their own Shim binaries with their own keys embedded within.) Building Shim from source would be pointless unless you get Microsoft to sign it, which would cost $100 and take a lot of effort. If you need to sign things yourself, adding your key as a Machine Owner Key (MOK) is easier than rebuilding Shim and getting it signed by Microsoft. You can also tweak the key sets supported directly by the EFI, which can obviate the need for Shim. Thus, there's a lot you can change about how all these pieces fit together. See my main page on Secure Boot and my page on taking total control of Secure Boot for more details on how to manage Secure Boot.


after first reboot choose wrong video port

You can turn this off in BIOS by pressing F2 / Del / F10 on startup; go to Chipset configuration > Initial display mode > PCi-E and if there is a setting to change shared memory, change it to auto and the onboard graphics will disappear in Ubuntu, so it can only select one.


Ubuntu 13.04 Installation on Lenovo U410 dual boot with Windows 8

Each new version of Ubuntu is working better with UEFI. Also the vendors are fixing the bugs they had in UEFI as they only tested with Windows.

If your model is an Ultrabook, you have UEFI as a new way to install, dual video which may require some effort and Intel SRT or RAID that adds issues.

If you are primarily a Windows user you proably want to keep the Intel SRT as it provides some speed up to Windows. Some with larger SSD just install Ubuntu to SSD and have a faster Ubuntu but then Windows is just running from hard drive like Windows 7 did.

You must turn off the permanent hibernation or fast boot and remove the RAID meta-data. Turning Intel SRT back on will create the RAID on the SSD if that is what you want.
Always backup efi partition and your Windows install first. Make a Windows repair flash drive.

Fast Startup off/hibernation
http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html
Force removal of hiberfil from Ubuntu
http://www.hecticgeek.com/2013/01/mount-windows-8-partition-ubuntu-hybrid-boot/

Remove RAID:

sudo dmraid -E -r /dev/sda
sudo dmraid -E -r /dev/sdb

Bumblebee:

https://wiki.ubuntu.com/Bumblebee

Also shows Windows 8 screens

Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

Shows install with screen shots.

https://help.ubuntu.com/community/UEFI

Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot. required for UEFI & grub bug fixes

https://help.ubuntu.com/community/Boot-Repair


For a screen shot type "Screenshot" into the search bar. (Its the one with a camera ;) )

It's possible you are seeing some of Gnome panel (but without seeing I cannot say for sure.) This is because gnome panel runs underneath unity panel! So if you set the opacity of unity to 0, you'd be able to see gnome. Weird eh!


Keyboard and touchpad do not work after upgrade

Maybe you have some problems because of uninstalled packages...

To repair that problem, try:

Start Ubuntu in recovery mode - hold SHIFT key before the system boots, and it will display Grub bootloader. Select the last version of the kernel with the [recovery] in the end of the name.

Select the root shell option

Try to upgrade your system - if there are problems (& errors), post them here... The other way, to select dpkg option - that may fix some other problems.
Reboot - type exit to jump back to recovery menu, then there select resume boot option.


After some poking, I got my configuration to work.
First, I had to reboot my computer. I don't know why that was necessary, but apparently it was.
The next time I ran arandr, I noticed that there was now a DP-1 entry that I could click on: (I suspected that this would be the case, since xrandr's output indicated that there was a connected DP-1 monitor)

When I expanded the DP-1 option, I was able to click "Active", and my third monitor turned on successfully.

As a final step, I selected "Save As", saved my settings in an automatically generated file which I called layout.sh, and then followed the directions in the highest voted (not the accepted) answer to this post.

P.S. I didn't exactly follow the instructions in the post's answer. My actual /etc/lightdm/lightdm.conf file looks like:

[Seat:*]
autologin-guest=false
autologin-user=my_user_name
autologin-user-timeout=0
display-setup-script=/path/to/layout.sh
session-setup-script=/path/to/layout.sh

as opposed to the suggestion in the post:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
# for your login screen, e.g. LightDM (Ubuntu 11.10) or GDM (11.04 or earlier)
display-setup-script=/path/to/layout.sh
# for your desktop session
session-setup-script=/path/to/layout.sh

I think the new format of lightdm.conf comes with Ubuntu 15.10 and onwards (I'm using Ubuntu 16.04 - the version number claim is a guess based on the difference noted on this site).
P.P.S. I also changed some settings between the "Active" and "Save Configuration" steps - such as rotating my third monitor and moving it to the place it physically is relative to my other two monitors on my desk.


Yes, I often use this technique. Open terminal type

sudo dpkg -i

Open Folder Where all .deb packages are located in another window in any media usb or CD, DVD. Select packages that you want to install. Now simply drag that packages to terminal. Come back to terminal  Press Enter. it will ask you password. Give it and packages are going to install.


Which one is better Ubuntu 12.04.3 (32 bit) or (64 bit)?

If your architecture supports 64 bit,it was better to install ubuntu 12.04.3 64 bit.Try to create live-usb through unetbootin software.
Error comes because of installation medium or software used to make bootable usb and not because of ubuntu 32 bit or 64 bit.


If you are able to access the main html page (ie, index.html or the like) or any other page, and the pictures are under the /var/www directory, then it would be a permissions problem. What kinds of errors are you getting? No permission? Not found? Login to your server via ssh (ssh USERNAME@SERVERIP or run PuTTY from Windows) and try the following in order until you run into a problem or/and STOP when the problem is fixed:

Ensure you can access any files on your webserver. Does the index page come up? If not, you have LAMP incorrectly set up. Go through the tutorials again or post another question here.
Ensure your files are even there. Do ls /var/www and make sure you see the files you are trying to upload. If you do see your files, skip to step 6.
Re-upload your files using ftp and either an admin's or the www-data user's credentials. Try viewing your images again.
If uploading worked and you see your files if you ls /var/www, skip to step 6. Manually add the files using scp if on Ubuntu:

scp /path/to/picture.png USERNAME@SERVERIP:/var/www/
If the files are STILL not there or if using Windows, manually add the files via external media (ie, flashdrive).
Run chmod 755 /var/www -R. That will allow all files to be read by anybody, but only allow the owner of /var/www to change the files. Try viewing your pictures again.
You may have some other permission issues if this doesn't work. Do ls -lR /var/www and show us the output.

The only other thing I can thing of would be some kind of filter blocking pictures from being accessed directly. Let me know if this helped you!


Ubuntu server 14.04 running on power edge 1950 not connecting to internet

Try this:

Place the DNS servers in /etc/network/interfaces, not in /etc/resolv.conf

Add this line at the bottom of your static configurations
dns-nameservers 208.67.222.222 208.67.220.220 #OpenDNS' servers as example

Then run these commands in the terminal to restart the interface.
sudo su

ifdown eth0 && ifup eth0

Hope this works!


How to stop pressing ctrl+c from closing the gnome terminal?

I also had this problem and the solution is to trap the Ctrl+C.
When Ctrl+C is pressed, you want the terminal to return to bash as if you had typed in the command manually.  You can trap the Ctrl+C signal (INT) and run exec bash instead.
This would look like:
gnome-terminal --tab --title="watch reason" --command="bash -c 'endyarnstart() { exec bash; }; trap endyarnstart INT; yarn start;'"
This will call the function endyarnstart when you press Ctrl+C, which will start bash and the terminal will behave as normal from then on.


getting error when trying to use dolphin instead of Nautilus

Although this is an old question, the same happened to me recently.

The solution I found:

On command line:
$exo-preferred-applications -c

In Preferred Applications dialog that opens:
Utilities tab --> File Manager
Change:
/usr/share/applications/kde4/dolphin.desktop"%s"
to just:
dolphin "%s"

An alternative solution may be to completely remove the exo-utils package

(Note: I am running KDE, but the Default Applications section in KDE System Settings had no effect (was already set to Dolphin). The application exo-preferred-applications appears to be from the xfce desktop environment.)


Go to system settings >> keyboard and make sure that repeat and speed are set correctly.

when this doesn't work, it sometimes helps to disable repeat keys and enable it again.


System not showing all 2560MB (2GB + 512MB) of the RAM

This is typical to see for pretty much all operating systems, Windows, Mac, and Linux all included.  I.E. not all the RAM installed is usable.

Note that 2GB RAM is 2048MB RAM.  Your free -m shows 2142MB total RAM.  So your 512MB RAM card is being detected and used.  Some is just not usable, though.

I hate Windows with a passion, but this statement is just here as a "case in point" example.

You can see this on Windows systems, as well.  In Windows, they show you how much RAM is on the system, and how much is usable.

On my system, when I am booted into Windows, it has 8GB (8192MB) of RAM available.  However, only 7.88GB (~8069MB) is actually usable, as reported by the system.  That's at least ~122MB of RAM not usable

This is typical for all operating systems, though.  Of the amount of RAM you have in your system, some is not usable for whatever reasons.


Update Package list in repository after motherboard change

There is no

ppa:gwendal-lebihan-dev/cinnamon-stable

this is why you are getting 404 Not Found

there is ppa:gwendal-lebihan-dev/cinnamon-nightly


Issues with running Ardesia on Lubuntu 13.10/14.04

Downgrade Ardesia to version 1.0-1
Launch an alternative window manager (xfwm4 is a light one used in Xubuntu):

xfwm4 --replace --sm-client-disable &

Run xfwm4-tweaks-settings → Compositor → Check Enable Display Compositing

Notes:

Some combination may not work, it's may be worth to try:

Compile it from source.
Other compositor in combination with xfwm4: xcompmgr -c , compton -c or cairo-compmgr

For permanent settings, replace openbox with xfwm4 in  .config/lxsession/Lubuntu/desktop.conf:

[Session]
windows_manager/command=xfwm4

Using separate compositor, add a composite manager command to .config/lxsession/Lubuntu/autostart, Example:

compton -c --backend glx


Your text and background colors are both black. Go to Edit -> Profile Preferences. There, disable the "use colors from system theme".

If that worked you should check the colors of the system theme, but this is beyond the scope here.


It's very simple. You have to just open Network in nautilus file Manager. You will get folder named Windows Network. You will find your shared drive vihcafil11 there.

Or Open file manager, Press Ctrl+L  Type

smb://<hostname or ip of shared machine on network>

For example

smb://ketan or smb://192.168.1.5


RTL8188CUS Wireless USB Dongle doesn't work unless I disable wireless security

I had the same problem and here's how I solved it. The summary is the built-in driver didn't work work completely, and I downloaded installed the manufacturer's driver instead, making sure the new driver was set to start on boot while the built-in driver was blacklisted.

Search on the Realtek site for your hardware. For me, I used lshw -c network to see that I had RTL8192cu, so I searched for that, which led me here
You should get a zip file to download it. I used a second computer for this and saved it to a USB drive, and then transferred it over the SneakerNet to the troubled computer.
After unpacking the 'zip' file, enter the directory it creates in the terminal and run  sudo bash install.sh
Disable the built-in driver by editing  /etc/modprobe.d/blacklist.conf and adding a line like blacklist rtl8192cu (The name you use should match output from lshw -c network
Set the new driver to be loaded by boot by editing /etc/modules and adding the line 8192cu
This step is optional. You can immediately test the new driver by manually unloading the old driver and manually loading the new driver. After these steps, the networking should work.

sudo modprobe -r rtl8192cu
sudo modprobe 8192cu
Reboot and test the networking again to confirm that your changes 'stick'.

I recommend keeping the "zip" file from Realtek around in case you need it again. The changes to files in /etc should survive upgrades, but the driver itself may not survive all kernel upgrades and the "install" step may need to be repeated.


Why does updating and upgrading Ubuntu results in reverting the numpy version to 1.8.2

It sounds like you have the python-numpy package installed in Ubuntu, and you also installed the package using pip. You probably want to remove the python-numpy package. See apt-get install vs pip install for more information.


Unable to resume from hibernation on boot- restarts instead of resuming

I found the answer!
My boot menu was long and had multiple entries. Hence I decided to reformat the swap partition, and restarted. I then ensured that the UUID of the newly created partition as mentioned by GParted was the same as that of the computer's registry.

I hence edited the file /etc/fstab using gksu gedit /etc/fstab and updated the UUID there.

This made sure that my swap was back in business in a clean condition. I then updated the GRUB entry. This was where the problem was- I added the option "resume=/dev/sda7" to the file /etc/default/grub in the appropriate place a countless number of times, but my system still booted back as though it had not hibernated but shut down.

Then, while booting, I decided to edit the menus and look at the boot entries, and it turned out that the one that I was using to boot it up had the wrong UUID of the swap partition! I then edited the parameters there, booted in, and edited the menus properly once again, before updating grub.

Now everything is working as smoothly as I'd wish. :)

[What I think happened was, the default grub menu was the one being edited, and the default entry is the Windows one.]


Lenovo Yoga S740 booting Ubuntu installation media black screen

Try adding "modprobe.blacklist=nouveau". I still had to do it with MX150 and GTX1060 laptops with 19.04. I think nouveau does not play well with optimus.

If you manage to install, booting from HDD will also need it until you install NV drivers (which will put a file doing the same thing in /etc/modprobe.d).


Is there a difference between "." and "source" in bash, after all?

Short Answer

In your question, the second command uses neither the . shell builtin nor the source builtin. Instead, you are actually running the script in a separate shell, by invoking it by name like you would with any other executable file. This does give it a separate set of variables (though if you export a variable in its parent shell, it will be an environment variable for any child process, and therefore will be included in a child shell's variables). If you change the / to a space, then that would run it with the . built-in, which is equivalent to source.

Extended Explanation

This is the syntax of the source shell built-in, which executes the contents of a script in the current shell (and thus with the current shell's variables):

source testenv.sh

This is the syntax of the . built-in, which does do the same thing as source:

. testenv.sh

However, this syntax runs the script as an executable file, launching a new shell to run it:

./testenv.sh

That is not using the . built-in. Rather, . is part of the path to the file you are executing. Generally speaking, you can run any executable file in a shell by invoking it with a name that contains at least one / character. To run a file in the current directory, preceding it by ./ is thus the easiest way. Unless the current directory is in your PATH, you cannot run the script with the command testenv.sh. This is to prevent people from accidentally executing files in the current directory when they intend to execute a system command or some other file that exists in some directory listed in the PATH environment variable.

Since running a file by name (rather than with source or .) runs it in a new shell, it will have its own set of shell variables. The new shell does inherit the environment variables from the calling process (which in this case is your interactive shell) and those environment variables do become shell variables in the new shell. However, for an shell variable to be passed to the new shell, one of the following must be the case:

The shell variable has been exported, causing it to be an environment variable. Use the export shell built-in for this. In your example, you can use export MY_VAR=12345 to set and export the variable in one step, or if it is already set you can simply use export MY_VAR.
The shell variable is explicitly set and passed for the command you're running, causing it be an environment variable for the duration of the command being run. This usually accomplishes that:

MY_VAR=12345 ./testenv.sh

If MY_VAR is a shell variable that hasn't been exported, you can even run testenv.sh with MY_VAR passed as an environment variable by setting it to itself:

MY_VAR="$MY_VAR" ./testenv.sh

./ Syntax for Scripts Requires a Hashbang Line to Work (Correctly)

By the way, please note that, when you invoke an executable by name as above (and not with the . or source shell built-ins), what shell program is used to run it is not usually determined by what shell you're running it from. Instead:

For binary files, the kernel may be configured to run files of that particular type. It examines the first two bytes of the file for a "magic number" that indicates what sort of binary executable it is. This is how executable binaries are able to run.

This is, of course, extremely important, because a script can't run without a shell or other interpreter, which is an executable binary! Plus, many commands and applications are compiled binaries rather than scripts.

(#! is the text representation of the "magic number" indicating a text executable.)
For files that are supposed to run in a shell or other interpreted language, the first line looks like:

#!/bin/sh

/bin/sh may be replaced with whatever other shell or interpreter is intended to run the program. For example, a Python program might start with the line:

#!/usr/bin/python

These lines are called hashbang, shebang, and a number of other similar names. See this FOLDOC entry, this Wikipedia article and Is #!/bin/sh read by the interpreter? for more information.
If a text file is marked executable and you run it from your shell (like ./filename) but it doesn't begin with #!, the kernel fails to execute it. However, seeing that this has happened, your shell will try to run it by passing its name to some shell. There are few requirements placed on what shell that is ("the shell shall execute a command equivalent to having a shell invoked..."). In practice, some shells--including bash*--run another instance of themselves, while others use /bin/sh. I highly recommend you avoid this and use a hashbang line instead (or run the script by passing it to the desired interpreter, e.g., bash filename).

*GNU Bash manual, 3.7.2 Command Search and Execution: "If this execution fails because the file is not in executable format, and the file is not a directory, it is assumed to be a shell script and the shell executes it as described in Shell Scripts."


I had the same problem, as did the people here.

One of them posted this link to a workaround to our problem.

Type which xdg-mime in the terminal. If the output is /usr/bin/xdg-mime then create a file called xdg-mime in /usr/local/bin/, containing the following:

#!/bin/bash
if [[ "$@" == *"x-scheme-handler/discord"* ]]; then
    /usr/bin/true
else
    /usr/bin/xdg-mime $@
fi

Make the file executable.

If xdg-mime is not installed at /usr/bin/ then, instead, report back and I will try to help.

I hope the people at Discord fix the problem for real, but for now, this is good enough.


How to keep track of password ages using samba?

pdbedit
DESCRIPTION

  This tool is part of the samba(7) suite.

  The pdbedit program is used to manage the users accounts stored in the sam database and can only be run by root.

  The pdbedit tool uses the passdb modular interface and is independent
         from the kind of users database used (currently there are smbpasswd,
         ldap, nis+ and tdb based and more can be added without changing the
         tool).

Command ...

pdbedit -v -u $USER | grep must

shows

Password must change: {date time}

pdbedit -L -v $USER

shows lots of info about a user.

That command needs to be run as "root".


(Credit goes to the answerer of this post in Super User)

Install trickle with this command:

sudo apt-get install trickle

Or using Software Center:

Start any program with trickle specifying it's download limits. For example, opening a new Firefox instance with 20 KB/s download limit, use this command

trickle -s -d 20 firefox

Here, -s saying trickle is running in standalone without any daemon, -d is doing the limit on download speed. You can also use -u option to specify an upload speed.

See the trickle manual page for more help.

If you want to limit the bandwidth of the interface card

There is also another tool which can be used to limit the speed of a Network interface. It's called wondershaper. With this tool you can limit the speed of the interface card.

Install it with this command:

sudo apt-get install wondershaper

Or using Software Center:

To limit the download speed of eth1 interface to 2000 Kilobit/sec, I'd run this command:

wondershaper eth1 2000

The exact syntax is

wondershaper [ interface ] [ downlink ] [ uplink ]

Manual page for wondershaper


Try this on your terminal:

sudo su
rm -rf .gnome .gnome2 .gconf .gconfd .metacity

It will delete gnome configuration and resets everything !


Ubuntu 14.10 does not shut down on Acer Extensa 2509 notebook

Just thoughts...
I have equal problem with Fujitsu-Siemens AMILO Pro V3505, started at unnoticed moment of time (13.10 or 14.04). Upgrading to 14.10 did not solved the problem. Even the shutdown screen is similar to yours: after shutting down the ModemManager (do you have built-in dial-up modem?) system stuck on "Will now halt"

And it is not the installed system's fault: USB-HDD with installed 14.04 behaves equally, while works just fine on other PCs. (can't remember, if there's ModemManager installed on that HDD)

Preinstalled Windows XP Home (bootable via GRUB) shuts down/reboots the PC  correctly. It looks like something broken in ACPI control software.

When I tried REIUSB, REI all gave me "This function is disabled", while USB did what intended: emergency remount R/O, emergency sync and reboot.


How do I get an Acer FlatBed Scanner 22 working?

Ok. Just made my s2w 5300u working on 11.10.
Here is the instructions:

(do not forget to provide admin access if it's necessary with 'sudo')

1) Open terminal and check that system recognized scanner:

lsusb

Output:

Bus 007 Device 046: ID 04a5:20fe Acer Peripherals Inc. (now BenQ Corp.) SW2 5300U

2) Check if SANE can see the scanner:

scanimage -L

Output:

device `snapscan:libusb:007:045' is a Acer FlatbedScanner22 flatbed scanner

3) Now we have to download firmware for the scanner. Go download it from BenQ Service & Support site

4) Unpack 'Bin' folder from archive to, for example, your home directory.

5) Now check if folder '/usr/share/sane/firmware/' exists. If not -- create it:

mkdir '/usr/share/sane/firmware/'

6) Copy your firmware to '/usr/share/sane/firmware/':

cp -v '/home/user/Bin/u254v042.bin' '/usr/share/sane/firmware/'

Notice: unpacked folder 'Bin' may contents several file's and you have to choose one which suits you scanner. I did't know which one exactly and just tried a few of them. For s2w 5300u you need u254v042.bin If it'll necassery repeat steps 6, 7 with another firmwre files.

7) It's better to establish the right to read the file for other users because it is not known with what rights were packed file:

sudo chmod 754 /usr/share/sane/firmware/u254v042.bin
sudo chmod o+r /usr/share/sane/firmware/u254v042.bin

Notice: I did't do this step cause it was not so necessary for me.

8) Now we have to right path to file in config:

gedit /etc/sane.d/snapscan.conf

Find line 'firmware  /usr/share/sane/firmware/' and comment it with '##':

##firmware /usr/share/sane/snapscan/your-firmwarefile.bin

Add after this line path to your firmware file:

firmware /usr/share/sane/firmware/u254v042.bin

Notice: you may not comment first line. It's also can be replaced 'your-firmwarefile.bin' with 'u254v042.bin'. I think you understand.

9) Replug your scanner. That's all.

Good luck.

Source


You can try the following US-only websites/services which are compatible with Ubuntu/Linux (mainly because they use Flash):

Hulu: offers free (ad-supported) streaming of many current and old TV shows as well as some movies. (More programming information)
Amazon Prime Instant Video: offers no-additional-cost streaming of TV shows and movies (wider selection than Hulu, narrower than Netflix) with a $79/year subscription to Amazon's free-shipping service, Prime.
Youtube now also officially offers Movies and TV Shows for streaming/purchase. Some are also available for free.

This Wired article from late 2011 compares more services, including pay-per-movie or pay-per-show ones such as iTunes. See also this article.

  Note: As dobey helpfully notes in the comments, "You can also simply rent shows or movies on Amazon as well, without paying the yearly fee, nor are all the shows and movies they have available to stream, available for free with the Prime subscription."


Very Low Temperature Reading for graphics driver using lm-sensors

I think it is supposed to be like that. New kernel 3.13 has an advanced dynamic power management of the ATI card with the radeon driver. In normal conditions the ATI discrete is off:

[:~/Pictures/2014] 1 % sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :DynOff:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

so when we read the sensors:

[:~/Pictures/2014] % sensors
[radeon-pci-0100
Adapter: PCI adapter
temp1:       -128.0°C  (crit = +120.0°C, hyst = +90.0°C)...]

The sensor read nothing --- the card is off, its sensor too.

If you start the card (see for example this blog entry), for example by opening another windows and starting in it:

DRI_PRIME=1 glxgears -info

and check again, you'll have:

[:~/Pictures/2014] % sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :DynPwr:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

the card is ON and...

[:~/Pictures/2014] % sensors
radeon-pci-0100
Adapter: PCI adapter
temp1:        +65.0°C  (crit = +120.0°C, hyst = +90.0°C)

...the sensor too.

A lot of info is from this Arch forum entry and this Arch doc page (hat off to Arch for the quality of documentation and for having it up-to-date...).


problem in installing : unmet dependencies

Solved using the following command

   sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update


When I installed the latest OS upgrade I had the same issue, I just ran though the full set of sudo apt-get commands then I did a software update check and after all that i ran sudo apt-get autoremove and and autoclean and it fixed the issue


Publicly Available Containers via Ubuntu 18.04 -- help question

You need to dedicate a single LXD container to proxy those HTTP (or even HTTPS) requests to the corresponding containers with the WordPress installations.

First, create a proxy container and get your host to forward connections to port 80 (web) to port 80 of that proxy container. You can do the forwarding with either iptables or, if you use LXD 3.0, with the LXD proxy device.

Second, in this proxy container install a suitable http proxy. Examples are HAProxy (see https://www.digitalocean.com/community/tutorials/how-to-host-multiple-web-sites-with-nginx-and-haproxy-using-lxd-on-ubuntu-16-04), nginx as reverse proxy, or even caddy (see https://gist.github.com/turtlemonvh/1e6dc4621202b2c1a8c4).

Third, each WordPress website needs a database. It would be overkill to install MySQL/Mariadb on in each WordPress container. You might consider creating a db container with the database, and then create different account in the database for each website.


Shell session is your current state/environment in the shell/terminal. You can have only one session in a shell/terminal.

Job is a process which runs in your shell.

You can list all your jobs by entering the jobs command.

E.g. when executing some process you can press Ctrl+Z and the previously running process will be suspended. You can then execute such commands as fg to bring it back to the foreground, or bg to run it in the background.


Install 7zip and unzip by executing the following command on the terminal:

sudo apt-get install 7zip unzip

and then use the terminal to unzip the file by executing the following in the terminal:

unzip filename -d directory


Why can't I type a new password after I've entered the "passwd" command?

Although it looks like nothing is happening, your password as you type it is placed character by character by the command in the buffer. It's there. You just can't see it. Just keep typing. This is by design for the purpose of preventing so-called shoulder surfing—it's when somebody behind your back is looking over your shoulder at what you are typing at the keyboard. So, this is really just a security measure. No need to panic.


Windows 8 not booting after manually upgrading to 14.04

I faced that problem when  I installed Ubuntu 14.04 LTS alongside my pre-installed Windows 8.

After installing Ubuntu I ran the recommended repairs in Boot Repair. However, the grub menu disappeared and my laptop booted straight to windows 8. Inside windows I opened a command prompt as administrator and typed in this command exactly as it is:

bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi

After it concludes successfully just restart your computer and grub should turn up with functional boot for both Windows and Ubuntu.

I strongly recommend reading this though. (if you have not already)

A small tip when installing Ubuntu using the “Something else” option, create a swap partition (if you have not done that already) that is twice your RAM size at least. If you have an SSD then just forget the swap partition.


so I was able to find a solution, still using the guide specified above, just simplified-ish as well as the original solution from this guy

https://bbs.archlinux.org/viewtopic.php?id=213137

I just created a file /lib/firmware/asus-g752vt.fw where it contained this information

[codec]
0x10ec0668 0x10431ced 0

[pincfg]
#Pin 12 is Internal Mic
0x12 0x90a60160
#Pin 14 is Internal "front" speakers
0x14 0x90170110
#Pin 15 is "Line Out" according to the manual, But Pin 15 won't work
#Trying to use this as an output will have a constant tone too.
#Using this as an output breaks the front speakers working correctly with deteciton
0x15 0x40f000f0
#Pin 16 is the headphone jack.
0x16 0x0321403f
#Pin 18 is the external Microphone jack.
0x18 0x03a19020
#Pin 19 is nothing.
0x19 0x411111f0
#Pin 1a is the internal subwoofer.  (Set the sound system to Stereo 2.1)
0x1a 0x90170151
#Pin 1b is nothing.
0x1b 0x411111f0
#Pin 1d is nothing.
0x1d 0x40c6852d
#Pin 1e is the internal SPDIF out.
0x1e 0x014b1180
#Pin 1f is nothing.
0x1f 0x411111f0

and then added a option to the /etc/modprobe.d/alsa-base.conf

options snd-hda-intel enable=1 index=0 enable_msi=1 model=asus-mode5 patch=asus-g752vt.fw

reboot and works.


How to remove all associated files and configuration settings of an app installed through 'force architecture' command

Maybe we can bypass dpkg like this.
First backup your original file:
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.orig
After that open it to edit:
gksudo gedit /var/lib/dpkg/status
Search for a block something like that:

Package: crossplatformui
..
..
Package: another_package_name

Here, you will delete only crossplatformui block. This means starting with Package: crossplatformui and till the other package block. After deleting the blocak try to remove it again:
sudo dpkg -r crossplatformui


Assuming a single harddrve is being used.
M$ Windows needs to reside on the primary disk/partition -- C:/.
If your using a single harddrive, you need to install Windows first.
Then you can install Ubuntu - you'll be able to resize the Windows
partition to reserve space for Ubuntu.


Are partition sizes displayed in megabytes or mebibytes during installation?

Ok, I tested it today. Simply by doing a fresh install. Ubuntu uses MB during installation, i.e. the decimal base. However, GParted shows the partition size in MiB.

And in Kubuntu, it's total crap. Because both, Dolphin AND the partition manager, show file/partition sizes in MiB.

This is totally inconsistent. It should be the same systemwide, during install and after.


New icon for Google Drive locked on the dock after upgrade to Ubuntu 19.10

Please, try this command:

gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false


Searching for Ubuntu video I saw that covered Ubuntu One

http://www.youtube.com/user/myubuntuone perhaps is the channel you're looking for?


STEAM games crashes on LENOVO Z50 70 with DUAL GRAPHICS (intel+nvidia)

BUMBLEBEE is solution. Now all steam games I have work perfecly (inc. performance-intensive War for Overworld). Thank you again.

sudo apt-get install bumblebee-nvidia


Upgraded to 14.04 from 13.10 and it made my computer slow

The same problem: all applications, and especially firefox are very slow after upgrade from 13.10 to 14.04. The internet link is normal.
I found the answer here:
http://gaijin-nippon.blogspot.ru/2014/04/baloofileextractor-makes-disk-spinning.html

One has to kill baloo_file_extractor:
$ cp /usr/share/autostart/baloo_file.desktop ~/.kde/share/autostart/
$ echo "Hidden=True" >> ~/.kde/share/autostart/baloo_file.desktop

After logout and login again to kde-plasma session, everything is OK


How to use loose focus feature of Xserver?

I'm not an X expert, but I don't think that patch is really relevant to having different focus behaviour between different windows.

If you are asking for just some windows to use focus-follows-mouse, you can probably configure that into a sufficiently flexible window manager.  It might be possible in Compiz; it's almost certainly possible in Sawfish.

If your problem is just that the game uses Alt-tab for its own purposes, you can just remove that from the Ubuntu Keyboard Shortcuts configuration window.


There are many modes of networking in virtual box. If you have internet in you host the easiest is to make it NAT as the image below.

There are many modes to do also. You can make it bridged and assign an ip to the client OS.

To learn more about networking in virtual box please refer to this and this.


Configuration of Gaomon M106K (equal to Huion New 1060 Plus) in Ubuntu 20.04

I have a Gaomon m10 in Ubuntu 20.04 and I use the Digimend drivers.
To configure the buttons, use xsetwacom from the driver that is installed with digimend.
To find out if you are using that controller, with the tablet connected, open a terminal and type xsetwacom list.
Something like this should come out:
GAOMON Gaomon Tablet Pen stylus id: 8 type: STYLUS
GAOMON Gaomon Tablet Pad pad id: 9 type: PAD

If so, you can configure the buttons using xsetwacom in terminal, but GNOME will only keep it for the session and it will be lost when turning off the PC.
To solve this, you can make a script and place it at startup to configure it on every power up of the PC.
This is the script I made:
!/bin/sh
pad

xsetwacom set "GAOMON Gaomon Tablet Pad pad" button  1 key Ctrl Shift I
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button  2 key Ctrl Shift A
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button  3 key Ctrl A
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button  8 key Ctrl N
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button  9 key Ctrl Z
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 10 key Ctrl X
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 11 key Ctrl C
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 12 key Ctrl V
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 13 key Ctrl E
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 14 key Ctrl Shift E
xsetwacom set "GAOMON Gaomon Tablet Pad pad" button 15 key Ctrl Y


Ping IP or URL from different IP with same Ubuntu

If you control multiple machines (and have SSH access to them) you could use something like dsh to control them all at once, and by doing that, run something like:

dsh -M -c -a -- 'ping <<target_host>>'

Obviously that's going to require key-based access to all the hosts and you'll need to spend some time setting up dsh (here's a tutorial).

The easier solution is to use an external tool like one of the many ping services... Pingdom, Monitor.us, CloundMonitor, etc. They'll all offer to ping your IP from dozens of IPs in various places around the world.


Assuming you deleted your entire local repo:

Go you your git project on Github. (I'm using gitignore for demonstration purposes) Find the green "Clone or download" button.

Copy the url from the dialog.
In your terminal: git clone [your repo address]

and cd [repo name] into it.


Just in case someone else has this problem, I'll go ahead and post my solution. After discovering it was profile specific, I set off to try to find relevant config settings. The solution for me was to remove/rename the ~/.cache/gstreamer-1.0 folder. I did rename a few others, but I'm fairly certain this was the fix.


Turns out there is a simple solution, the kind worthy of face palms. I was trying to run the command:

bash LoadTools.sh

Where LoadToals is the name of my script. This was causing all the changes that were being made to remain in the child shell and was leaving the parent shell unaffected, meaning all changes made by the configure files were neither permanent or even made to the parent shell.

Used the command: source LoadTools.sh instead and it worked perfectly.


Problems with installation from ppa:ondrej

There's no PHP 5.5 packages for Lucid, since it would require too much work (and forking the repository, etc...) that I don't have time for (in my free time).

You can either stick with PHP 5.4 in ppa:ondrej/oldstable or upgrade to precise and use the Apache 2.4/PHP 5.5 repository.

I am open to preparing PHP 5.5 for Lucid as a contracted work, but it won't happen in my free time, since I am trying to save it for my family. And preparing PHP 5.5 for Lucid (e.g. Apache 2.2) would take something like 2-5 days.


Problem with Broadcom BCM43142 wireless driver on 14.04

I've been struggling with the same issue with Broadcom BCM43142 on my HP Envy 15 Touchsmart, Ubuntu 14.04. The Wifi card performance deteriorated after an update I did with Software Updater.

I tried purging and reinstalling bcmwl-kernel-source, installing firmware-b43-install and b43-fwcutter in various combinations. Nothing worked.

In the end, I had to downgrade bcmwl-kernel-source to a lower version by doing the following in the terminal:

sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install bcmwl-kernel-source=6.30.223.141+bdcom-0ubuntu2
sudo reboot

It's not ideal, but the wifi now works as it did before the update.


Is there a "variable" to see if computer is in sleep mode?

There exists /etc/pm/sleep.d folder which is frequently used for running scripts upon suspend/resume.

The typical form is this:

#!/bin/bash

case "$1" in
    suspend)
        # executed on suspend
        ;;
    resume)
        # executed on resume
        ;;
    *)
        ;;
esac

I would suggest you  set for suspend option writing the time of suspend to a file (the date command , easiest probably will be date +%s to get the Unix epoch time ) and the same idea for resume, except you will be reading form file into a variable and calculating difference with current time.

Something like this:

#!/bin/bash

case "$1" in
    suspend)
        # executed on suspend
        date +%s > /tmp/suspend_time.txt
        ;;
    resume)
        # executed on resume
        suspend_time=$(< /tmp/suspend_time.txt)
        current_time=$(date +%s)
        difference=$(($current_time-$suspend_time))
        if [ $difference -gt 60  ]; # greater than 1 minute (60 seconds)
        then
             # put some kind of command you want to run here
        fi
        ;;
    *)
        ;;
esac

Note this is just a draft, and untested, but it's a probable suggestion one could follow.


Lubuntu window geometry - force window to always open in the same location?

Here's a way to get Google Chrome (and presumably Chromium) to always open with the same size and in the same screen position in a default installation of Lubuntu 12.10:

Part 1:
Back up ~/.config/openbox/lubuntu-rc.xml.
Open ~/.config/openbox/lubuntu-rc.xml in a text editor.
Just above the line that contains only </keyboard>, paste the following (modified as per requirements):

<keybind key="W-C">
  <action name="Execute">
    <command>/opt/google/chrome/google-chrome --window-size=675,725 %U</command>
  </action>
</keybind>

Part 2:
Just above the line that contains only </applications> (near the end of the file),  paste the following (modified as per requirements):

<application name="google-chrome">
  <position force="yes">
    <x>-0</x>
    <y>0</y>
  </position>
</application>

Save the file and exit the text editor.
Open a terminal and run openbox --reconfigure to register the changes made to lubuntu-rc.xml.
Launch Google Chrome by pressing Super+C.

Notes:

the window-size=w,h switch and other switches can be found here: List of Chromium Command Line Switches.
C, S, A, W stand for Control, Shift, Alt, and Super (or Windows) keys, respectively.
The combination of <x>-0</x> and <y>0</y> forces the upper right corner of the Google Chrome window to be positioned in the upper right corner of the screen.
A combination of <x>0</x> and <y>0</y> would force the left upper corner of the Google Chrome  window to be positioned in the upper left corner of the screen.
The comments in the Applications section of lubuntu-rc.xml have further details on window placement.


adding fonts to photoshop CS6 run with wine

For those still searching for a solution in '17, you should install to the same wineprefix with wine or playonlinux's run exe in this virtual drive function (configure > Miscellaneous / Run a .exe ...) the program from this site:
http://www.ampsoft.net/utilities/FontViewer.php#Download


Currently Unity does not come with an onscreen keyboard of that sort. You can use onboard  (open it from dash) to type using the mouse/touchpad, though it won't be a wonderfully smooth experience. Unfortunately there is no "Ubuntu Tablet Edition", so until (if) that happens, you will have to resort to "hacks" or "workarounds" to get such functionality.

Onboard screenshot:


Wireless network connection help on 12.04?

Try to do from a terminal: ifconfig WIRELESSDEVICE down and then ifconfig WIRELESSDEVICE up.
If you don't know the device name use iwconfig (it's wlanNUMBER).
If, after that (it's a highly unprofessional solution), the device finds your AP, this is a problem with the card internal configuration which can be resolved in two ways:

Use wicd of another network manager wich brings the interface down & up at the system startup;
Create a simple .sh script with this inside:

ifconfig WIRELESSDEVICE down
ifconfig WIRELESSDEVICE up

...and execute it after the boot manually or by editing the boot sequence.
Important note: install only the drivers you need for you exact model, use a packet manager (I suggest synaptics or aptitude) to find the correct driver manually if the system can't suggest a good driver.
If you can't resolve the problem, before tweaking, fully upgrade your system to the latest version with sudo apt-get dist-upgrade.
Important note 2: do not alter the kernel packages (linux-*), but if you have an old kernel try booting with it if you have a problem, in some cases it can help.
If you have other problems don't hesitate to write here. Have a nice experience.


Unable to install bootloader at the specified location while installing Ubuntu as a Dual boot OS

Dedicating a /boot partition should solve the problem because GRUB will be installed there.
I've set up an example to test and demonstrate how to do this using an SSD that has a fresh installation of Windows 10 "2004", leaving free space at the end for our Ubuntu installation.  There's also a HDD which has free space at the end for your /home partition.

Before starting the installation, use the "Disks" application in the live session to make sure your space is available.  Clean up any remnant partitions that might have been created by failed installation attempts.  Take care not to accidentally delete EFI or any partitions related to your Windows install (MSR, recovery, system)

Launch the installer and choose the "Something Else" option when you get to it.

Set up your partitions manually:
Double click your pre-existing EFI partition and make sure that "EFI System Partition" is selected.

Create your boot partition and set the /boot mount point.
(/boot is also a home for kernel modules.  Unless you like to keep lots of old kernel versions, a 500MB partition should be plenty.)

Create your root partition and set the / mount point.

Create your home partition and set the /home mount point.

Device for boot loader installation:
Select the physical disk where your EFI partition is located.  In this example it is /dev/sda  NOTE: that it is not /dev/sda1, which is the EFI partition itself.
Click "Install Now" to continue with the guided installation.

When your BIOS boots to the physical volume with your EFI partition, GRUB should load and allow you to choose either Windows or Ubuntu.
If GRUB doesn't have Windows, boot into your newly installed Ubuntu (not the live session, and run the following commands:
sudo os-prober

(to verify that Ubuntu can find Windows)
sudo update-grub

(to update/repair the GRUB menu)

This answer has been tested using Ubuntu 20.04 installation media.