How do I configure startx to start only Gnome Fallback session in 14.04

It seems the key is to use update-alternatives to define the session.

Running  update-alternatives --config x-session-manager will list all of the sessions x-session-manager knows about and will allow you to choose which one to use.

In my case I set the session using this command.

update-alternatives --set x-session-manager /usr/lib/gnome-session-flashback


Identical network printers: find the right one

KM3C991.local is the name of your printer on your network.

ping -c1 KM3C991.local will show you the IP address of the printer.


and welcome to Stack Overflow.  I hope we don't take up too much of your time.

As for your issue - this is just a recommendation, and this is purely based on my opinion: gddrescue or GNU ddrescue (ddrescue).  It clones items, but with a -v or -vv it gives good indications about where it is in the recovery process and is very configurable in its options (such as bad skip amount, read direction, direct v. indirect reading, and things of that nature).

Before I can give you the command line to use it, I need to know:

Were you planning on backing up the item to another physical disk (/dev/sdc) or as an image on a filesystem?
Are you backing up the whole disk as an image? (e.g. /dev/sda )
If 1 & 2 , Are you familiar with using loop + offsets to mount a partition in the whole disk image?
If you are doing a straight copy, I'll assume that the target is larger than the destination, right?  There's some oddness with the way that certain manufacturer's label disk sizes, so keep that in mind (GB = 1000^3 instead of GiB 1024^3 - GiB are bigger)

I'll update this as you get back with me, as the recommendations I give will be based on what you tell me.  Even if you were using just dd, the top 4 questions would still apply.

Be aware that dd is sometimes referred to as "destructively duplicate" or "dangerously duplicate", and ddrescue is derived from dd.  If you confuse input and output, it is possible to completely destroy what you are trying to save.

Be careful!

edit 1:

If you believe that the partition was deleted or has some otherwise user-injected corruption, rather than device injected, the safe route is to duplicate the device first.  Then duplicate the duplicate.  Then run your tests on the third generation copy, whether it be testdisk for partition recovery/repair, or photorec to recover lost photos from the partition.  That way, if things are hopelessly scrambled, you can just go back a generation and duplicate that and try again.  I recommend refraining from running testdisk on the master copy (unless one of the copies responded positively to your probes, and you could verify the items enclosed weren't corrupted).

If the partition was BitLocker or LUKS encrypted, you may have an uphill battle in front of you.  Best of luck.


Can I install and run native GUI Linux apps on Ubuntu Touch?

there is a couple of things to say about that:

1) apt-get in itself does and will still work. That isnt going away. To the best of my knowledge, you can even still do apt-get update/upgrade to update your packages on touch. However for easier deployment, we now use click packages to deploy apps to touch.

2) will native apps run on touch? Well that depends. When you mean apps with a GUI then no, most likely not. When they haven’t been built using the Qt/QML sdk for Ubuntu, they wont be environmentally aware enough to function on touch. (Though theoretically you could build an app in (say) C++ without the sdk that would work on touch. It would just be an enormously complicated task)

So no: GUI-apps for Desktop Ubuntu in reality just will not run on Touch. The basic difference between Touch and Desktop Ubuntu (at the moment) is that Desktop uses the X display server. All Desktop GUI programs rely on X to render them to screen. Touch does not now and will not have X. A new display server called Mir has been designed for Touch. That brings great advantages compared to X but that means that applications that need X, just will not run on Touch. (Again, this is only for the GUI part of an app). Note also that in the near future, Ubuntu Desktop will also get MIR, but with a fallback to X for apps that don´t do MIR.

Most Commandline interface programs (like corkscrew for instance) will have no inherent problem with Touch. (Touch is however still under heavy development so it may not work right now.)

Sorry for the lenghty reply. This is however pretty complicated stuff :)


Have you tried an alternative installer perhaps the b43fwcutter which can sometimes do a better job with other wifi elements such as N

Open up a terminal and type this.

sudo apt-get update
sudo apt-get install b43-fwcutter

Then get it switched on by trying the following

sudo modprobe -r b43 ssb
sudo modprobe b43

Have a go and let us know if it works


Wifi power management turns back on when connecting

From the comment by @waltinator here's what I did.  As of right now, it looks like this has fixed things.

Make a file in /etc/network/if-up.d called wifipower (the name doesn't matter):

sudo -H gedit /etc/network/if-up.d/wifipower

And write in it:

#!/bin/bash
iwconfig wlan0 power off

Save and make it executable with

sudo chmod a+x wifipower

Basically, every time a connection is established the script wifipower will be executed and turn power management off.


The command is pgrep.

For finding all processes that starts with A or a, only PID:

pgrep '^[Aa]'

You can use any ERE (Extended Regular Expression) pattern.

To get process name to, use -l:

pgrep -l '^[Aa]'

To get full command line, use -a:

pgrep -a '^[Aa]'

You can also match the pattern against full command line using the -f option.

Check man pgrep.

Just to note, your Regex pattern is wrong, the Regex token $ match the end of a line, not start, ^ matches start. So your pattern, [Aa]$ would match any process name (or full command line if -f is used) with A or a at end.

Also refrain from using:

ps -ef | grep ...

this is clumsy, and involves unnecessary spawning of an extra process, and an anonymous pipe where pgrep can do this easily, and in one go too. Moreover pgrep (and it's brother pkill) was specifically designed for this purpose.


Ubuntu installation problem in remaining free space

You cannot see a partition in Windows because you did not create one - it is unallocated space.
Download an Ubuntu installation image and burn the ISO file to a DVD or create an USB media.
To create the USB media in Windows - open command prompt as administrator and execute :

diskpart
list disk
select disk *
clean
create partition primary
active
format fs=fat32 (quick)
assign letter=**
exit

Note : * = number of the USB drive | ** = select a free drive letter

Mount the Ubuntu ISO file and copy everything to your USB drive.

Open command prompt as administrator again and execute :

powercfg /h off

Then open Windows Control Panel (the old version - not the modern design).
Select Energy Settings - enable show hidden settings - uncheck Fast Boot.

After having done this - shutdown the machine completely - do NOT reboot !

Start the computer and select the UEFI Ubuntu USB drive option to boot from.
Select Try Ubuntu without installing and wait until the Live desktop appears.
Click Install Ubuntu on the desktop and when asked, choose Something else.

Install Ubuntu to the unallocated (free) space that you created in Windows before.
After installation has finished, boot into BIOS and select Ubuntu as default system.


how to make putty ssh connection never to timeout when user is idle?

If you go to your putty settings -> Connection and set the value of "Seconds between keepalives" to 30 seconds this should solve your problem.


Chrome tab syncing across devices not working

The article that you are referring to was published in 2011.
When opening Chrome, or chromium, it is stated at the top of the page that:
WARNING These experimental features may change, break, or disappear at any time...
It does appear to be the case that the option within "http:// flags" has indeed disappeared.
That particular option of syncing open tabs is not available in either chromium(Version 25.0.1364.160) or Chrome stable(Version 26.0.1410.43) on Ubuntu 12.04.02.
Take a look a more recent guide, from Google, regarding the Sync tabs across devices functionality.
However, there is an option to look at the open tabs on some other devices(see note below).

You need to be signed-in a Google account to use this functionality.

Open wrench in upper right hand corner of your browser

Select "Advanced sync settings"

Open a new tab

Look in the lower right hand corner of the browser and click on the area that say "Other devices" as indicated below:

Note: I can't speak to how this functionality works across all devices. My tablet syncs partially but my android phone does not appear to sync completely (it only shows most recent tab-singular. YMMV).
It sounds like you are looking for functionality that will allow you to open all tabs open on a remote computer. In that case, I would recommend using the Xmarks plugin
See also: http://www.xmarks.com/ and http://blog.xmarks.com/


Granting access to a file or directory to another user but not all users

The way of doing it as described in the question is correct.

However, when you update the groups, the permissions of the current process, including your shell, are not updated. So in my case groups (current shell started by bob before the groups were changed) and groups bob (current permissions of user bob) showed different results:

$whoami
bob
$ groups bob # current membership of bob
bob alice
$ groups     # shell run by bob BEFORE the groups changed
bob
$ cd /home/alice/dir
bash: cd: test: Permission denied

So I had to close the shell, and even close the tunnel (I was connected to the Ubuntu box via a SSH tunnel) and open a new shell (after I connected to SSH again) and then I saw

$whoami
bob
$ groups bob
bob alice
$ groups     # current shell run by bob AFTER the groups changed
bob alice
$ cd /home/alice/dir
$ pwd
/home/alice/dir

If bob is a service, that service is to be restarted!


How do I migrate from systray to AppIndicators?

Homepage on unity.ubuntu.com
Design Guidelines
Implementation Guide with code samples
Mailing List


bash uses the GNU readline library to provide editing feature. You can see the difference if you launch a bash shell without readline support from your terminal with:

bash --noediting

It will behave exactly the same as sh (dash) or as your current zsh.

Zsh does not use readline (it does not read inputrc), but it has editing feature too, which for me was set up correctly when I choose the default setting when launched zsh for the first time. It gets the keybindings from the system-wide configuration file from /etc/zsh/zshrc. If you don't have that file or it doesn't set up keybindings then it is your job to set it up in your ~/.zshrc, with the bindkey, like it is written here. Or just get a proper system-wide zshrc file. Mine looks like this

# /etc/zsh/zshrc: system-wide .zshrc file for zsh(1).
#
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin

READNULLCMD=${PAGER:-/usr/bin/pager}

if [[ "$TERM" != emacs ]]; then
[[ -z "$terminfo[kdch1]" ]] || bindkey -M emacs "$terminfo[kdch1]" delete-char
[[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line
[[ -z "$terminfo[kend]" ]] || bindkey -M emacs "$terminfo[kend]" end-of-line
[[ -z "$terminfo[kich1]" ]] || bindkey -M emacs "$terminfo[kich1]" overwrite-mode
[[ -z "$terminfo[kdch1]" ]] || bindkey -M vicmd "$terminfo[kdch1]" vi-delete-char
[[ -z "$terminfo[khome]" ]] || bindkey -M vicmd "$terminfo[khome]" vi-beginning-of-line
[[ -z "$terminfo[kend]" ]] || bindkey -M vicmd "$terminfo[kend]" vi-end-of-line
[[ -z "$terminfo[kich1]" ]] || bindkey -M vicmd "$terminfo[kich1]" overwrite-mode

[[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-line-or-history
[[ -z "$terminfo[cuf1]" ]] || bindkey -M viins "$terminfo[cuf1]" vi-forward-char
[[ -z "$terminfo[kcuu1]" ]] || bindkey -M viins "$terminfo[kcuu1]" vi-up-line-or-history
[[ -z "$terminfo[kcud1]" ]] || bindkey -M viins "$terminfo[kcud1]" vi-down-line-or-history
[[ -z "$terminfo[kcuf1]" ]] || bindkey -M viins "$terminfo[kcuf1]" vi-forward-char
[[ -z "$terminfo[kcub1]" ]] || bindkey -M viins "$terminfo[kcub1]" vi-backward-char

# ncurses fogyatekos
[[ "$terminfo[kcuu1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" vi-up-line-or-history
[[ "$terminfo[kcud1]" == "O"* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" vi-down-line-or-history
[[ "$terminfo[kcuf1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char
[[ "$terminfo[kcub1]" == "O"* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char
[[ "$terminfo[khome]" == "O"* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line
[[ "$terminfo[kend]" == "O"* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line
[[ "$terminfo[khome]" == "O"* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line
[[ "$terminfo[kend]" == "O"* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line
fi

zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \
                 /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin

unalias run-help
autoload run-help

# If you don't want compinit called here, place the line
# skip_global_compinit=1
# in your $ZDOTDIR/.zshenv or $ZDOTDIR/.zprofice
if [[ -z "$skip_global_compinit" ]]; then
  autoload -U compinit
  compinit
fi


Unable to locate mono packages in Ubuntu 14.04

All works great. I assume, you forgot

sudo apt-get update

or simply start all steps again:

sudo rm /etc/apt/sources.list.d/mono-xamarin*
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

% apt-cache policy referenceassemblies-pcl
referenceassemblies-pcl:
  Installed: 2014.04.14-1
  Candidate: 2014.04.14-1
  Version table:
 *** 2014.04.14-1 0
        500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
        100 /var/lib/dpkg/status

% apt-cache policy mono-complete
mono-complete:
  Installed: 4.0.2.5-0xamarin1
  Candidate: 4.0.2.5-0xamarin1
  Version table:
 *** 4.0.2.5-0xamarin1 0
        500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
        100 /var/lib/dpkg/status
     3.2.8+dfsg-4ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ vivid/universe i386 Packages

% apt-cache policy mono-complete
mono-complete:
  Installed: 4.0.2.5-0xamarin1
  Candidate: 4.0.2.5-0xamarin1
  Version table:
 *** 4.0.2.5-0xamarin1 0
        500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
        100 /var/lib/dpkg/status
     3.2.8+dfsg-4ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ vivid/universe i386 Packages

% apt-cache policy ca-certificates-mono
ca-certificates-mono:
  Installed: 4.0.2.5-0xamarin1
  Candidate: 4.0.2.5-0xamarin1
  Version table:
 *** 4.0.2.5-0xamarin1 0
        500 http://download.mono-project.com/repo/debian/ wheezy/main i386 Packages
        100 /var/lib/dpkg/status


There is now a displaylink driver for Ubuntu. Installing this in Ubuntu 15.10 fixed all problems with multiple displays on the Dell D3100.


Installing Ubuntu on a separate hard drive alongside Windows 10

I used the link shared by dear mAnN for partitioning my drive. I tried to install Ubuntu on a partition which starts somewhere in the middle of my drive. The installations ended normally and Ubuntu booted just fine. But after rebooting it happened to lose the path of Ubuntu's bootloader (grub). To be precise, Here is what I faced with: if my boot priority was set to be my HDD (Ubuntu's host), after every single reboot I would see the grub rescue message.

I could boot into Ubuntu by redefining the path with the following commands from secure grub:

set prefix=(hd0,msdos1)/boot/grub
insmod normal
normal

but that was for sure a painful procedure. Moreover, I wasn't able to boot into Windows either unless I changed the boot priority.

I repartitioned my whole HDD (as the basic drive) such that my first partition is the one which Ubuntu is installed on (this partition shrank into root ("/") and home ("/home") during installation later) and installed Ubuntu. This time surprisingly everything worked out! Now everytime after turning on the machine, I see a menu which I can choose which OS I want to boot from. Note that my main boot priority is set to be my HDD which contains Ubuntu, not Windows.

PS:I'm not sure if unallocating my HDD, repartitioning and installing on the first partition was the real reason that fixed the grub problem. Maybe the problem was much easier and just something had gone wrong during my first installation.


How can you enable GTK3 themes' dark theme mode when using Unity 7?

You can enable 'Global Dark Theme' mode on Unity 7, the same way it's enabled on Gnome Shell. Just install GNOME Tweak Tool by clicking here:

Or run this in Terminal:

sudo apt install gnome-tweak-tool

When it's installed, open Tweak Tool from the Dash and toggle on 'Global Dark Theme' switch as shown below:

From now on you can use the dark mode of themes under Unity 7 the same way you use them on GNOME! If it's not working, just check if the theme implements GNOME's dark theme mode.

Manual Method

GNOME Tweak Tool and most of the options it provides are tailored for Gnome Shell and so may not work as intended on Unity. Coz of this, many users prefer not to install GNOME Tweak Tool and choose Unity Tweak Tool over it. If for any reason you don't wanna install GNOME Tweak Tool, this is how you can enable the 'Global Dark Theme' mode manually:

Step 1: Open the GTK3 configuration file in Text Editor:

gedit ~/.config/gtk-3.0/settings.ini

Step 2: Paste this into the file opened by Text Editor:

[Settings]
gtk-application-prefer-dark-theme=1

and save it. That's all! Enjoy your dark themes


Shell script file (.sh) does not run, and throws an error

bash: ./test.sh: bin/bash: bad interpreter: No such file or directory

Replace:

#!bin/bash

With:

#!/bin/bash

bin/bash is a path relative to the current directory.  /bin/bash is an absolute path that works whatever the current directory is.

Also, have a look at your PATH:

echo $PATH

If you place test.sh in any directory listed there and you will will be able to execute  it without the ./ or other path specifier.  Many people create a $HOME/bin directory, place all their scripts there, and add it to their PATH.


running the tcpdump (in multiple places) gave me the clue to the fix on this. i noticed that arp traffic was showing up in the dumps on the vm and on the host, but outgoing and incoming traffic would only show up at the host, not at the vm. ufw was running but nothing was set (far as i could tell, dont really know anything about it), BUT i noticed that iptables -L showed the FORWARD chain had a policy of DENY! i compared that with another ubuntu installation i had and it had a default policy of ACCEPT, so - sure enough - change the policy to be ACCEPT and all was well!

i have a feeling that installing docker.io made some iptables changes, but i wont know for sure, just glad to have this issue behind me!

hope it helps someone else


Go back into the software centre and verify that wine was actually installed. The error message seems to indicate that it did not install (at all or correctly). If you can't get it installed through software centre try installing it from the command line. Open a terminal and type sudo apt install wine-stable winetricks for the stable version or sudo apt install wine-development winetricks for a more up-to-date (but possible unstable) version.


Dell Inspiron 1210 mini Blank Screen on boot 12.04

Did some research and found that ctrl alt F7 will bring up the display, as wonky as it is with the ghosting and cropped display area, so there's that... Just really need help finding a suitable display driver that will make my experience better.

I ran into this issue on an old inspiron 1100. I have no idea why I thought things would be different on an inspiron 1210... :( Oh, Dell...


This bug has already been reported and fixed. See GitHub issue 575 or the patch


You can always have a choice between official APT repositories and third-party ones and/or PPAs. For example GIMP has a PPA.

Snaps and Flatpaks need to download big runtime parts. You should learn more about them before actually using them. And you can choice - do you want to waste disk space and network traffic to use them, or not.

Some developer applications are available in Ubuntu Make.

In your particular case - GIMP needs to download GNOME runtime (runtime/org.gnome.Platform/x86_64/3.28) and dependencies (check flatpak  org.gimp.GIMP.json for details):

$ flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref
The application org.gimp.GIMP depends on runtimes from:
  https://dl.flathub.org/repo/
Configure this as new remote 'flathub' [y/n]: y
Required runtime for org.gimp.GIMP/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.28) found in remote flathub
Do you want to install it? [y/n]: y
Installing in system:
org.gnome.Platform/x86_64/3.28             flathub 6d1d0ebbd724
org.freedesktop.Platform.ffmpeg/x86_64/1.6 flathub d757f762489e
org.gnome.Platform.Locale/x86_64/3.28      flathub 2823e3d81b74
org.gimp.GIMP/x86_64/stable                flathub 1fcb2c783cf6
  permissions: ipc, network, x11
  file access: /tmp, host, xdg-config/GIMP, xdg-config/gtk-3.0
  dbus access: org.gtk.vfs, org.gtk.vfs.*
  tags: stable
Is this ok [y/n]: n

Here there is one positive moment - this runtime may be reused by other later installed FlatPaks.

Personally I prefer PPAs over Snaps and Flatpaks and install several applications from umake (for example Arduino IDE).


${num} takes the whole file name. You need to get filename without extension and add your new extension. You can make a string formatting. Use the following command:

for num in ./*; do mv ${num} ${num%.*.*}.ostat ; done

% deletes shortest match of $substring from back of $string.


This is a valuable clue: Replaced by files in installed package steam-launcher (1.0.0.54) How did you install steam the first time? I have a working steam installation, and I don't have a steam-launcher package. I can't find it in the standard repos.

As a minimum, looks like you should purge steam-launcher and then try reinstalling.


First of all let me thank all of those that commented above.

UPDATED - This is what worked on Ubuntu Mate 15.10.

Download Simon Clausen's script linked below.

https://github.com/simonclausen/dnscrypt-autoinstall.

Ubuntu 15:10 breaks Simon Clausen's script so that it only works until you reboot. This is because Ubuntu 15.10 has a symlink from /run/resolvconf/resolv.conf to /etc/resolv.conf. Simon tries to lock down the /etc/resolv.conf using chattr +i /etc/resolv.conf which fails. To fix this do the following before running his script.

sudo rm /etc/resolv.conf

sudo cp /run/resolvconfig/resolv.conf /etc/resolv.conf

Note: The new versions of dnscrypt downloaded by Simons script take systemd into account without modification.

Once the script was run and tested, I did the following.

I used the above systemd file, but needed the resolver added to the last line after all.

[Unit]
Description=DNSCrypt client proxy
Requires=dnscrypt-proxy.socket

[Install]
Also=dnscrypt-proxy.socket
WantedBy=multi-user.target

[Service]
Type=simple
NonBlocking=true
ExecStart=/usr/local/sbin/dnscrypt-proxy -R dnscrypt.eu-nl

create a text file from the text above and name it

  dnscrypt-proxy.service

then put your new   dnscrypt-proxy.service   file into

  /etc/systemd/system/

  We do not overwrite /lib/systemd default service definitions or we'll have troubles when the package is updated. Systemd checks /etc/systemd/system first before /lib so you're safe putting your customized service definitions in /etc/systemd.

When done, the full path is

  /etc/systemd/system/dnscrypt-proxy.service

  same thing - use /etc/

Next create the dnscrypt-proxy.socket file from the sample below.

[Unit]
Description=dnscrypt-proxy listening socket
After=network.target

[Socket]
ListenStream=127.0.0.2:53
ListenDatagram=127.0.0.2:53

[Install]
WantedBy=sockets.target

it also goes in

  /etc/systemd/system/

The full path is

  /etc/systemd/system/dnscrypt-proxy.socket

Activate the scripts (which creates symlinks in the correct folders)

sudo systemctl enable /etc/systemd/system/dnscrypt-proxy.socket

sudo systemctl enable /etc/systemd/system/dnscrypt-proxy.service

stop the service so systemd can start it correctly.

sudo /etc/init.d/dnscrypt-proxy stop

you should take all the settings you have in /init.d/dnscrypt and move them to /etc/systemd/system/dnscrypt-proxy.service -- else systemd takes the scripts found in etc/init.d and makes a temp service definition you can find in /run/systemd/generator/XYZ.service. If you have a service in /etc/ with the same name as a script in init.d, the script gets ignored in favor of the service def'n

you shouldn't see any errors when starting the service with.

sudo systemctl start dnscrypt-proxy.service

sudo service dnscrypt-proxy start

This method survives a reboot for me on Ubuntu 15.10.

I am NOT an advanced user of Linux in any way. I just started. Thanks go to Chev_603 and all those he credited, not me. I hope you find this help full. Any comments about improving the scripts would be appreciated.
 It would be nice to have a secondary DNS server. Anyone know how?


firefox won't start after accidental power fail of ubuntu VM

I suffered the same fate albeit on a Ubuntu 16.04.3 LTS box. Here is how i solved my problem,,..

You will need to first back-up the folder 'bookmarkbackups found on
this directory ->
'/home/*your_directory_name*/.mozilla/firefox/bookmarkbackups'.
Secondly you will need uninstall firefox by writing this command on
the shell sudo apt remove firefox and then re-install using sudo
apt-get install firefox
Third you will be required to rename '.mozilla' folder found here /home/*your_directory_name*/.mozilla/
Fourth you will need to open mozilla and it will be working.

However, you will need to restore your bookmarks(if you had stored any). Ubuntu 16.04 usually stores its backups in .json format and not .html. Instructions to restore bookmarks store as .json can be found here


Luckily I found a way to get to the UEFI settings by holding the volumebutton at the top of the surface and pressing the boot button. I'm so glad that I didn't destroy the surface.


Ubuntu 20.04 - Wireless card and boot issues

Managed to fix this by disabling the use of additional drivers by selecting "do not use the device" that made wifi work again. I'm not sure why/how that works, but in case anybody out there faces the same problem, you may want to try that.


How do I fix a random crash/freeze with audio loop?

This also happened to me on debian based distributions using an amd ATI graphics card, for the sound problem read this comment
I had no solution for this, but I think it's a GPU problem
Finally switched to arch linux and I haven't any freezes for now


As you maybe know, you can pin packages to their current versions. That's done by giving the package the status "hold". For example, if you have installed version 1.1 of some package and set this package to status "hold", it won't get updated, even when version 1.2 or later become available.

In your case it seems there are one or more packages set to "hold". That prohibits apt-get from resolving some dependencies when you try to install apache2. Say, for example, you pinned apache2-bin at a version earlier than 2.4.7-1ubuntu4.4. Then you try to install apache2 in version 2.4.7-1ubuntu4.4. apache2 2.4.7-1ubuntu4.4 depends on apache2-bin 2.4.7-1ubuntu4.4, so apt-get tries to resolve this dependency by installing apache2-bin 2.4.7-1ubuntu4.4 as well. But it can't do so, because apache2-bin is on status "hold" for a previous version. So, apt-get tells you "Unable to correct problems, you have held broken packages."

That's just one of the possible scenarios, but it should give you an idea where your problem probably lies.

There are two ways you can try: One possibility is, have apt-get have a try at the problem. This should get you some solution, but not necessary the one you're looking for. The command to have apt-get try and fix the mess would be

apt-get upgrade -f

The -f is for "fix broken" or rather, "try to fix the broken things".

The other possibility is to look for the pinned package yourself and "un-pin" it. That's more work, but I'd be more comfortable with it compared to telling to apt-get "just do something to make it right" ;)

You can get the stati of all installed packages with

dpkg --get-selections

To filter those of interest, you can just grep for the names, say

dpkg --get-selections | grep -i ^apache2

That should give you something like

apache2                     install
apache2-bin                 install
apache2-data                install
apache2-doc                 install

I'd assume one or more of the packages related to Apache are "on hold". You can change the status of a package by

# set a package to status "hold"
apt-mark hold somepackage
# for example
apt-mark hold apache2-bin

# remove status "hold" from a package
apt-mark unhold somepackage
# for example
apt-mark unhold apache2-bin

The package that's "holding things up" may be apache2-bin itself, or another package that apache2-bin depends on. You can check which packages a package depends on by

apt-cache depends somepackage

for example

apt-cache depends apache2-bin


How do I get SDL Audio working on 32 bit?

I have finally figured out what the problem was, I post it here just to close my question and maybe help anyone else having the same issue:

I had downloaded the SDL sources to my ubuntu installation and installed SDL manually (using ./configure, make, make install), I guess this did not agree with the already available default installation. When I now uninstalled the 'manual' version (make uninstall) and installed the library libsdl1.2-dev on top of the already installed libsdl1.2debian-pulseaudio and libsdl1.2debian. Everything works fine and I can also build my app without any problems.

Cheers, Marcel.


iMac freezes on a white screen when trying to start 64-bit install from a live DVD

With much help I found out that older Macs can run 64 bit but require 32 bit EFI. We found a 64 bit .iso with the 32 bit EFI and the install ran perfectly. The .iso can be found here: https://www.dropbox.com/s/mp1c2cf3f2dw25u/blackmacbook64.iso?dl=0


If you want to debug some command using its error messages you should do the following command 2>debug.txt - thus all information from STDERR stream about errors will be saved in file named debug.txt.


Problems encountered when installing Ubuntu 12.04 alongside Windows 8

You didn't tell us if you can boot into Ubuntu or Windows, so I'm considering you can use Ubuntu. Try to be more specific next time.

Boot into Ubuntu. Open a terminal window (Ctrl+Alt+T) and run the following commands:

sudo gedit /etc/default/grub/

Find the two lines that begin with GRUB_HIDDEN and put a # in front of both of them. Find GRUB_TIMEOUT and change its value to 10. Make sure GRUB_DEFAULT is also set to 10. Save the file and exit. Again in the terminal run:

sudo update-grub

Reboot and you should see the GRUB menu. You should be able to select Windows from there.


The tutorial is written for Ubuntu 8.10. In Ubuntu 11.10 the package libsyck0-dev doesn't exist any more so you can't install it.

If you just want to install Nginx you can use the package from the official package sources. If that doesn't fit your needs for some reason try to find a tutorial that's written for a more recent version of Ubuntu.

Quite likely not only Ubuntu but some of the software it describes has changed in the 3 years since the tutorial has been written, too.


Backing up to two locations at the same time?

Is there any way to do this?

/etc/crontab

Add a line that copies every so often (or a couple of minutes after the backup is made) files over to that 2nd directory.

An example of this would be:

# m h dom mon dow user  command
# LogRotate
07 01 * * 1-5   root    /u1/bin/LogRotate.pl

This will start script /u1/bin/LogRotate.pl as root on days 1-5 (monday-friday) at 1:07 AM.
Similar to this you can create and add a script copying the files made by the backup to a 2nd location.

This also works for commands so in theory this is possible:

07 01 * * 1-5   hannibal  cp -rf /usr/tmp/* /tmp/

and would copy contents of /usr/tmp/ to /tmp/ including directories and overwrite if the file already exists as user hannibal.


How to manage users and groups using GUI?

Gnome System Tools for 11.10 & later Ubuntu versions

The old Users and Groups GUI is available by installing from Software Center the gnome-system-tools package

or from a terminal:

sudo apt-get install gnome-system-tools

Search in Dash:

Click and it will run the Users and Groups applet:


Uncompleted downloads: .part file present

No, that isn't a downloading problem. But rather that's how modern browsers/downloaders download files. Instead of downloading file in a single file, it downloads the file in some temporary files (.part in case of Firefox and Unconfirmed some_number.crdownload in case of Google Chrome). These temporary files can be single or multiple depending on the server it is connected to and the file size. These parts are generally done to establish multiple parallel connections from a single IP and improving the  download speed.

Consider a file of 1GB is being downloaded. The server allows a maximum speed of 1MBPS. It would roughly take 1024 seconds to get downloaded. But if browser requests server for multiple connections to download a single and if server supports that, file could be downloaded in lesser time. Browser/Downloader will request server for downloading multiple files but with different starting and ending byte stream. This way the effective downloading speed is increased and you can enjoy the actual connection speed ISP provides.

Once downloading finishes, all part files are integrated into a single file and part files automatically gets deleted.


How to make Dash-to-Panel in Ubuntu 18.04 transparent on maximized windows?

The steps you followed are related to the original Dock in Ubuntu 18.04, but you are clearly using Dash-to-Panel GNOME extension which can be made transparent easily using another GNOME extension called Dynamic Panel Transparency.

To specify custom transparency values, all you need to do is:

Enable the extension from Dynamic Panel Transparency's page on extensions.gnome.org.
Refresh the extension's page for the setting icon to appear. (top-right, next to the enable switch)
Access the extension's settings and go to Background tab.
Enable Enable custom opacity and set your custom values.
Done.


How to make a sound bug on Focal Fossa to be fixed

It's not about bugs being ignored. It's about limited number of volunteers triaging those bugs.
Fundamentally, what the Kernel developers need to know is:

The priority of the bug. Issues that crash systems and lose data come first.
Which project should be responsible for fixing the bug. If the next release of Alsa has already fixed the bug, Ubuntu won't waste effort re-fixing it.
Where in the kernel code the bug is likely to be located.

To get to that point, bugs must be triaged. When a Kernel Team bug triager looks at the bug report, there are still a lot of questions. The more of these you can answer in the bug report, the more likely the bug will be triaged quickly. If the triager has to do all this research themself, the bug will wait until they feel like doing it (remember: volunteer). If the triager cannot reproduce the problem or lacks the correct hardware, the bug will wait until somebody else comes along.

Does this bug affect lots of people? Does it crash systems or lose data? Or is it merely annoying?

Has the bug been reported upstream (debian, alsa, kernel)? Have they made progress upon it?

Is this new hardware that has never worked? Or did it work in the past (regression)? Can it be duplicated on similar hardware (reproducible)? If a regression, has it been bisected?

Is the proposed fix a mere workaround? Or a real fix? Is the bug really a code problem? Or is it a design problem?

Now let's apply this to the Ubuntu-specific kernel development workflow:
Kernel developers are generally focused on the next release of Ubuntu (20.10). They can backport some features to older kernels...but that's generally unnecessary since most LTS users should be using HWE to get newer kernels.

This means that you should always test the bug in the pre-release version of Ubuntu. If it's not fixed, then it's a valid bug report against the pre-release version of Ubuntu (and more likely to get triaged sooner).

If it is broken in an older kernel, but fixed in a newer kernel, then somebody has already fixed the bug. It's a stable release update request or a backport request. Developers might reject low-priority requests, since that newer (fixed) kernel will show up in the LTS with the next point release anyway.

Release cycle deadlines: Ubuntu 20.10 Kernel Freeze will be in a couple weeks. If it's not fixed by then, you must re-test the bug with 21.04 in November as the Kernel Team moves on to the next pre-release version of Ubuntu.

If you are interested in becoming a volunteer bug triager, we always welcome new participants!


Taken from: askubuntu.com/questions/1029117

Snap is probably still working on something in the background (or at least it thinks so). Open a terminal and run snap changes so see a list of ongoing changes.

$ snap changes

...
8  Doing   2018-04-28T10:40:11Z  -  Install "foo" snap
...

You can abort ongoing "Do" or "Doing" change(s):
sudo snap abort 8

Original answer by fnkr


Sharing an encrypted home directory between Ubuntu installs

Its not really a problem of whether you can do it, it is a problem of how far you are willing to compromise your encryption.

From any system you can mount any encrypted partition, as you have found. But to do this you must have credentials (the password or key to decrypt it). If you want a system to be able to automatically mount something that is encrypted then you must give it the keys to that encryption, and in this case the most straightforward solutions (and probably the only solutions, were you to opt for automount) would be to store your password in plain-text and have it accessed as a part of boot. The reason for this is that when you login your system must be able to read some home/ for you somewhere before you can manually provide credentials unless they are stored somewhere vulnerable outside the encrypted partition.

In any case, this point is moot. Sharing /home between two major versions is a bad idea -- your dotfiles are not going to be interpreted the same way between two major releases and some setting is either going to get corrupted or just not work at all the way you expect (or not work at all).

I suggest that instead of sharing /home itself, you might want to have a third partition that contains things like documents/, videos/, pictures/, bin/, and whatever other application data you actually use yourself, and leave the dotfiles, settings, browser history, etc. separated. An easyish way to accomplish this is to just replace the default user data directories with symlinks that point to your mount location. So, for example:

sda1  -> mounted at / for 11.04
sda2  -> mounted at / 12.04
sda3  -> encrypted, mounted at /home/you/mnt/ under both

sda3 will contain your user data, so when you mount it you will get

/home/you/mnt/documents
/home/you/mnt/pictures
/home/you/mnt/videos
/home/you/mnt/music
/home/you/mnt/bin
# ...etc

Your original directories will be replaced by symlinks of the form:

/home/you/documents -> /home/you/mnt/documents
/home/you/pictures  -> /home/you/mnt/pictures
# ...etc.

Mounting sda3 will always require providing extra credentials the first time you access anything within it, but this only has to occur the first time when it is mounted. Placing the mount location in /etc/auto.master explicitly under each system should cause a LUKS password prompt the first time you access data -- but the right way to do this might require some research (I've only done this on RHEL and Gentoo, and have no idea what the differences may be in Ubuntu).

In any case, the effect you are trying to achieve is certainly a reasonable goal, but shortcutting by directly sharing an encrypted home directory between major versions is far less secure and ultimately a lot more trouble than its worth.


No GUI when I login to the Enlightment DE (Ubuntu 13.04)

The enlightenment version in the official repositories is quite old and buggy. If you need a (more or less)  stable e17,I'd go with the semi-official PPA:
https://launchpad.net/~efl/+archive/trunk

It might not work, to directly install the PPA packages without first uninstalling e17 (and maybe also all the EFL libs).

To completely get rid of e17, run the following command:

sudo apt-get purge e17

To also remove libs installed by e17 and not needed by anything else:

sudo apt-get autoremove

You can also try to reset your e17 settings to defaults. To do this, you can simply remove the hidden folder .e in your home directory.


Welcome Rohit.Run synaptic package manager,then check this line Community-maintained free and open source-software(Universe) from Settings>Repositories.Come to terminal and type this command sudo apt-get update.This should help you install Gnome-shell.


Force PPA package to satisfy distro meta-package dependency

Because the main metapackage that is updated to depend on Boost 1.55 libraries isn't supplied through the PPA, you get the dependency errors. No builder (pbuilder or sbuild) or package manager (apt-get) will allow building/installing a package where the dependencies aren't met, as this indicates that the package will fail to build or work. Therefore, you will have to go into debian/control. To get around the error, try using dependency alternatives to specify using either the main metapackage if it is of a sufficient version or the alternative version.

To do this, in the case of a Boost module called name, the dependency for that module would look like libboost-name-dev (>= 1.55.0) | libboost-name1.55-dev. In this case, the libboost-name-dev will be used if it is at least version 1.55; otherwise, it will use libboost-name1.55-dev.

Note that you may need to manually enable using alternatives in pbuilder.


As a release gets old (especially if it is not a LTS release), it becomes no longer hosted at archive.ubuntu.com. However, the repository is still hosted at

http://old-releases.ubuntu.com

So try changing your repository source to http://old-releases.ubuntu.com.


Get GUI back from background application

you can list all background jobs using jobs command:
$ jobs -l
[1]+ 15024 Running                 nohup firefox &

you can bring the process with fg command.
BUT
It's better to use screen other than nohup. It will detach your commands but you can resume your screen session easily and get the background processes easily.
Take a look for this screen tutorial in addition to the link above


How to run compiled C++ program on startup?

You can call it from ~/.bashrc file. Put path to your executable at the end of it:

~/Documents/myCompiledExecutable


When Chinese ibus input is on, selecting text on Firefox textareas makes the text disappear

If you are using ibus-pinyin now, you can try to use ibus-libpinyin package instead of ibus-pinyin.


How to get OpenCL working with AMD GPU on Ubuntu 18.04

You can try to install their experimental driver from here:

https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx

Hope it works for you


The download page can be in fact used with https, it seems you're just using an http version of it. See: https://ubuntu.com/download/desktop

Also, the iso won't be executed as soon as you download it. It contains a kind of file system which you need to open first (or put on a USB stick) to run.

While it is true that the data could be manipulated during transfer if you only use http, it is not only unlikely to happen, but you'd verify it with the hash after downloading it. Especially when it came from an http source. Your bigger concern should probably be that the file was tampered with beforehand when downloading it from a non-trustworthy website, even if it does have https.


Get Compiz Config Settings Manager
Install the package compizconfig-settings-manager
Via Command Line:
sudo apt-get install compizconfig-settings-manager

Via Software Center:
Or you can install it via Software Center. Open Dash and type software which will show Software Center`

When Software Center is opened then search for compiz on the top-right hand side

In my case it shows Remove since I have it installed. In yours it will show Install. Just go ahead and install it. If a password is asked, enter the password you use to login to Ubuntu.
Open Compiz Config Settings Manager or ccsm
Then open Dash and search for ccsm

After CCSM has opened.

Select General Options. It is in the second row
After you click on General options, select the last tab named Desktop Size

Now check the Horizontal Virtual Size and Vertical Virtual Size
In my case both are 2, so I have 4 workplaces 2X2
In your case it would be 1. Increment and make it 2 and then click on Launcher > Workplaces icon. The changes should be reflected


Ubuntu and windows bootable usb partition type

FAT32 has always worked good for me in a Live or Persistent install.
If you want persistent partitions, (casper-rw and home-rw), to get more persistence than FAT32 allows you, (4GB per file), you can make these ext2, (non-journaling)  or ext4, (journaling).

FAT32 offers improved disk utilisation over FAT16


The easiest way is as follows:

Right click on the 'K-Menu' icon and select 'Edit Applications'
Navigate to System --> Konsole
Select the 'Advanced' Tab
Click on the long tab next to 'Current shortcut key' and type in your required key combination

That is all that is required, I attach a screenshot showing the menu on my own system:

KDE will warn you of any keyboard shortcuts clashes and give you the option of reassigning a currently used key combination to Konsole if required...


At a minimum, you'll get an error report during Ubuntu startup, saying the swap partition isn't found.  Depending on exact details, this may prevent Ubuntu from starting and drop you to an emergency shell.  However, if you have enough RAM (typically, for Ubuntu, 4 GB or more), Ubuntu should at least finish starting with no swap; the error happens because Ubuntu expects to find a swap partition.

Even if Ubuntu starts successfully without a swap partition (in my experience, this will happen only if you didn't create one during installation, but there may be other circumstances that permit it), you'll have trouble if running processes begin to require more RAM than the physical RAM available in hardware; for instance, if you have 4 GB installed, and load programs that, together, need more than 4 GB, you'll run into issues with extremely slow performance and possibly even a system freeze.

Because of this, I'd recommend against deleting your swap partition.  They're typically small, compared to the size of modern hard disks or even SSDs, and they're part of how Ubuntu performs as well as it does.


How to fix a build when trying to patch the original file?

The patch that you are trying to apply in the branch has numerous patch hunks with incorrect whitespace or line counts. Both of these will cause the patch hunk to fail to apply.

In the example above, the first hunk has a missing space from most of the lines, causing it to not match the source. The second file has lines which aren't preceded by a single space, causing patch to try & interpret it as patch information. Once these errors are fixed, the are several more to fix in the patch.


How to create post-up and pre-down routes in interfaces file?

Try with up and down instead of post-up and pre-down.

Example :

auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1

Or, but I didn't test it, you can write a bash script and put it in the folder /etc/network/if-up.d/ and /etc/network/if-down.d/ (you can use the variable $IFACE to know which interface is getting a connection).

In /etc/network/if-up.d/some-script:

#!/bin/bash

if [[ $IFACE == "eth0" ]]; then
  ip route add x.x.x.0/24 via x.x.x.254 dev $IFACE
fi

Hope this help.


Permission denied to run git in mounted directories

Try to run as root

You can use this command to run the entire terminal as root

sudo  -i

or

sudo su

Enter your password and you can do all commands as root


Only if it is formatted as Btrfs. Ext4 does not support online shrinking. E.g. I was doing this with KDE Partition Manager 3.0:

https://www.youtube.com/watch?v=FKCQ7pJN1vY


Remove the old version:

sudo apt-get purge git

Add the new Version to the $PATH:

export PATH=/usr/local/git/bin/git:$PATH
cd
source .bashrc


add-apt-repository returns unexpected length error

It appears this is a known issue/bug, you could try this workaround:

To install PPA's, add them to /etc/apt/sources.list in the form:

Before:

ppa:<user>/<repo>

Add to sources.list:

deb http://ppa.launchpad.net/<user>/<repo>/ubuntu oneiric main

Then sudo apt-get update and download whatever packages you want.


Failed to install Ubuntu: drm failed to create kernel channel 22

Well if you used the rufus software for booting your usb. It should work. Try from rufus. Thank you!


Mouse doesn't work in the guest OS (Ubuntu 14.04.2) on Virtual Box (installed on MAC OS X)

... with an update to VBox 5.0.24 r108355 my "pointing device" setting in the "motherboard" tab changed to "USB tablet" ... I changed it back to PS/2 mouse and everything was fine again ...

host: windows 10
guest: ubuntu 14.04


This was only because I had the 173 driver installed, although my nvidia 9500 GT should use the current version. Switching to the current driver resolved this problem.


cd in to the directory which contains your file and run :

ll

check this link for more details :permission
Hope this'll help you.


Lubuntu Theme not applied to all programs

Clearlooks is only for gtk2. Check for a theme that provides for both gtk2 and gtk3 themes. For example, the default theme, lubuntu-default, has subfolders for both gtk2 and gtk3 in /usr/share/themes/Lubuntu-default. Gnome-terminal is a gtk3 app.

You can install other themes from the software center that provide both gtk2 and gtk3 themes: try the light-themes or shimmer-themes packages, for example.


Script not working when called externally

You are using a relative path, where your script is looking for the .mp4 files in the current directory i.e. the directory from where the script is being run, and finding that no such .mp4 file exists, then it looks for a literal *.mp4 file (assuming nullglob/failglob is not set, which is the default), and that file does not exist too, hence the error message *.mp4: No Such File or Directory.

You should use absolute path instead:

for i in /directory/*.mp4; do ...; done

Replace /directory/ with the actual directory path; if you want you can take the directory name as first argument too:

for i in "$1"/*.mp4; do ...; done

You can use absolute or relative path here, but again absolute path is always the safer option.

Now call the executable script in usual manner:

/path/to/script.sh /directory

From the script directory:

./script.sh /directory


How can I connect to a Samba server using its hostname instead of the IP?

There are a couple of issues that could lead to this:

Enabling Netbios in your samba configuration file

in your /etc/samba/smb.conf file, after the WORKGROUP line, add the following:
netbios name = PC_NAME Where PC_NAME is the name of your PC as it will show in the network. Then reset the samba service sudo service smbd restart
Not having STATIC IP

Need to have static IP set in order for other PCs on that network to see you. This also depends on your router and the configuration of your network.
Hostname length should be less than 15 characters

If your hostname is longer than 15 characters it will give an error in some cases. Type hostname to see your hostname. To change it you can either:

sudo sysctl kernel.hostname=NAME

or you can edit the /etc/hostname file and reboot.
In the /etc/samba/smb.conf file, look for the line that says the following:

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

Uncomment the line that says name resolve order and make sure that bcast is the first on in the list, should look like this afterwards:

name resolve order = bcast lmhosts host wins

Then restart the Samba service as I mentioned above.

This is all assuming it is Ubuntu the problem, you have already Samba installed and you are not working through Active Directory.

In many case it is also Windows. You would need to do stuff like flush the DNS and the register to it. On Windows in the terminal (cmd) do the following:

ipconfig /flushdns
ipconfig /registerdns

You need to reboot the PC afterwards. After this, check to see if you can see the Ubuntu PC by doing for example net view in Windows.


Try running powertop to see which is the offending app.

sudo apt-get install powertop
sudo powertop

You can find more information about it in powertop github


Username Modification while Retaining Data Structure

If you change only the username (presumably by editing /etc/passwd, /etc/shadow, and /etc/group), then simply doing mv /home/USER /home/NEWUSER as root should be enough, assuming you also changed the directory in /etc/passwd which is used as the home for that user.

If the UID (and or GID) was also changed, you'll need to run chmod -R NEWUSER.NEWGROUP /home/NEWUSER as well.


systemd-journal + systemd-resolve + dnsmasq high cpu usage

Suggested by another Steps of solution

Add the line DNSMASQ_EXCEPT=lo to /etc/default/dnsmasq

sudo nano /etc/default/dnsmasq

Restart dnsmasq via

sudo service systemd-resolved restart

Say Thanks If I helped, It went back to normal and does NOT screw around with other apps, as the previous method DID.

Cheers, Mark


To open the alsa mixer control panel, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo alsamixer

To check if a user is added to a certain group, run the command

groups <username>

To add a user to a group, use the following command

sudo adduser username groupname


Unable to Boot after installation , ACPI errors

To Help ALL,
First an explanation of why ACPI errors occur in Linux, and why it can USUALLY be ignored
Second, if hundreds of errors happen on boot like my Hp OmenX Bleeding Edge Laptop, I will show you a trick for Grub (the boot loader) to ignore them, and boot normally
Third, I am posting this as I just upgraded my kernel, and all my "Errors:
Quote:
ACPI:3400 Unsupported Event"
have disappeared, and I will show you how to upgrade your kernel.
ACPI Errors - Microsoft's Fault!!

It's supposed to be a standard that any operating system can properly implement. However, in typical Microsoft fashion, MS operating systems do not follow or properly implement the ACPI standard. Instead, MS gives motherboard manufacturers their own improperly implemented ACPI code for inclusion in the motherboard BIOS/UEFI. The code runs fine with MS windows but all for other operating systems like linux there can be problems.
Because of MS's market dominance, the faulty ACPI implementation from MS has become the de facto industry standard. As a result, Linux and other non-MS operating systems have to reverse engineer the faulty ACPI implementation from MS. That's why you can see problems in Linux with ACPI related functionality like suspend to RAM, hibernate, etc.

Apparently, the ACPI related code in certain newer Linux kernels has a problem with the typical BIOS/UEFI ACPI implementation on certain motherboards which is why we're getting those error messages. Even though I get those error messages at the beginning of the boot process, I've had no problems with suspend/resume or any other ACPI related issues.

I have seen advice to not run in BIOS legacy mode by disabling UEFI but to run in UEFI mode instead with secure boot disabled. I haven't bothered with it myself since I have several operating systems already installed with BIOS legacy mode and I would have to reinstall everything if I wanted to switch to UEFI mode.
(UEFI Mode is working GREAT for my install)

Hp / ACPI Errors
ACPI - Advanced Configuration & Power Interface
To avoid seeing ERROR "acpi int3400 unsupported event" ERRORS...
In the file /etc/default/grub
Add to the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" the parameters
acpi=off or noacpi acpi=strict
So that after your edit it looks, for example, like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=strict"

For me, acpi=strict is working best. You can also try acpi=force, and pnpacpi=off worked For another HP Spector user.
To edit the file you need to open it with root permission, for example by running
sudo -H gedit /etc/default/grub

After editing, update the configuration by running
sudo update-grub

and regenerate the initrd:
sudo update-initramfs -u

and then restart to see the effect
The latest kernel 4.19.5 has ELIMINATED ALL my problematic acpi:3400 errors
Install UKUU:
UKUU - Ubuntu Kernel Update Utility: Manage and Install Newest Bleeding Edge Kernels
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt update && sudo apt install ukuu

and after run UKUU and it will offer to install or uninstall any and of course the newest (stable or not so stable) KERNEL.
IT ALWAYS LEAVES your last working kernel as a backup should the new one not work as well as you would like.


Lubuntu: After boot, Keyboard does not work

I have a similar problem. Installed Lubuntu 12.04 on my laptop and when I login as admin, my keyboard does not work.
What I do to resolve this issue is that I first log in as guest, log out and log back in as admin again and the keyboard works.
I know this is not a permanent solution, but reduces frustration.
Hope this helps.


How to reset the Nautilus window position?

At first try move it with Alt+F7 and mouse/touchpad:

press Alt+F7 when Nautilus window is focused
move it with mouse or touchpad to position

If it does not help try to reset its position with dconf:

nautilus -q
dconf reset -f /org/gnome/nautilus/window-state
nautilus &


Installer installed system to USB stick, not main hdd

Create a USB drive or bootable CD if you have a spare drive or system. Simply follow the instructions at ubuntu. See the right side for information specifically on your OS.


Update-grub links to incorrect partition

Turns out the problem was with multiple grub installations so one of them was effectively not being used. I managed to save this problem by following the post askubuntu.com/questions/1168713 which was directed at non-UEFI systems but turns out to work for UEFI systems too.


Check your graphics card:

lspci | grep -Pi 'vga|3d|2d'

Sample output

01:00.0 VGA compatible controller: NVIDIA Corporation GK104GLM [Quadro K5000M] (rev a1)

Now get more informations with:

sudo lspci -v -s 01:00.0

Check the entry Kernel driver

An other way:

sudo lshw -c video

Sample output

  *-display
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:45 memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:3000(size=64)

Check the used driver with

LANG=C sudo lshw -c video | grep configuration

Sample output

configuration: driver=i915 latency=0

And check the details, eg

modinfo i915


Which Tor to install on Ubuntu 16.04.3 LTS?

'tor' gives you the binary only.  (the code your machine runs)

'tor from source' gives your the source code us humans read. this allows you to inspect it, [potentially change] then compile it yourself to get the binary that way. 'from source' is an option you only see with open source software.


Since your main issue seems to be on how you create a Live-CD. I suggest you take a look at this question. it's a guide on how you create a Live-cd with USB (Unetbootin).


Ubuntu saying No operating system found when installing

Follow these instructions:

Boot into BIOS
Set the SATA mode to IDE
Set the SATA3 mode to AHCI
Install. You will need to change these settings back when you boot into Windows and vice versa, as Windows cannot boot with these settings.
It is likely the bootloader will not show up, but that can be fixed easily by first typing sudo fdisk -l in a Terminal
Then, run sudo mount /dev/STEP_5_OUTPUT /mnt && sudo grub-install --root-directory=/mnt/ /dev/sda

Now you should be able to boot, but be sure to revert the changes to BIOS to boot Windows and vice versa


Landscape is not running after a reboot with juju-core 1.20.x

Glad you got it working with a more recent version of Juju.

The log you pasted appears to be machine-0.log, we actually needed to see /var/log/juju/unit-landscape-0.log.  If someone sees this again, something to try is:

juju run --service landscape,landscape-msg 'sudo lsctl restart'

Which should show you more details on your console on why things are failing to start.


Psensors is a graphical front end to lm-sensors. If the CPU usage is purely down to a problem with Psensors then you can install an alternative front end. I recommend XSensors.

Alternatively you can monitor the values returned by lm-sensors in real time simply by using the command watch sensors in a terminal.


How can I hover over icons in Ubuntu Dock to see all windows of one application?

I am not aware of any window-preview-on-mouse-hover feature, but you can activate previews of open windows on

Primary mouse button click by running

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'previews'

shift+click by running

gsettings set org.gnome.shell.extensions.dash-to-dock shift-click-action 'previews'

Middle mouse button click by running

gsettings set org.gnome.shell.extensions.dash-to-dock middle-click-action 'previews'

shift+middle mouse button click by running

gsettings set org.gnome.shell.extensions.dash-to-dock shift-middle-click-action 'previews'

(To find out all possible options for an action, run

gsettings range org.gnome.shell.extensions.dash-to-dock click-action

and so.)

As a side note, a GNOME extension called Dash to Panel puts the application icons to the top bar (and provides an option to move top bar to bottom):

It also provides the window-preview-on-mouse-hover feature:

(source: official GitHub page)


Why are some icon-theme.cache files huge?

The icon theme cache contains an index of the image files contained in the directory, and can optionally include the corresponding uncompressed image data.

The rationale for including image data was that instead of opening and decoding each individual image file, the app would just memory map the cache file and access it directly.

The default used to be to include image data in the cache, but this was changed in mid 2014.  The main reason for this was that the format used to store raw image data in the cache no longer matched what was used for displaying the images, so it was no longer offering zero copy access.  Also, the improvements in CPU speeds over the years relative to hard disk speeds mean it is not obvious that avoiding the need to decompress data is a win when it means reading more data off disk.

So getting back to the original question: the reason the caches are smaller on your home system compared to your work system is most likely because the work system is running an older distribution release where the caches have been built to include image data.  When the work system is upgraded, its cache sizes should shrink.


This scenario is for unbuntu(Linux) and I'm currently using ubuntu
  18.04.

  In dev is there root direct:

my@my-u18gv:~$ cd /dev/video0

  If the bellow msg come:

No such file or directory

  Then there may be two cases if i found and try to fix:

  1.) The ubuntu machine or linux machine.

  There may be various scenario or dependencies which may be causing
  this but this what i check on both condition. The the packages and
  retart the system sudo apt-get update

  To check the webcamp you can use cheese or any other it depends on
  you:

sudo apt-get install cheese

cheese

  2.) Ubuntu in Virtual Machine running on windows. I'm using ubuntu 18.04, virtual machine 5.2.14 on windows 10 64bit.

  Steps:

  Open the VM Virtual Box and select the snapshot you are using.
  Select the Settings
  Select the USB menu at the left
  Enable the usb controller and select the USB 2.0 (EHCI) cintroller
  Click from USB Device_filter there is a usb cable icon with '+' sign at the right side.
  Select your device from the list. In my list it was realtek semiconductor corp.

  Here you may face one issue: while selecting and USB 2.0 and when you
  start then if you get below error.

  failed to install extension pack VERR_SYMBOL_NOT_FOUND ..

  Then you need to install  VM VirtualBox Extension Pack.

  Note: take care that the version of the VM virtualbox and extension
  package should be same or it might give you error.

  Steps: For installing VM VirtualBox Extension Pack
  link:https://www.virtualbox.org/wiki/Download_Old_Builds_5_2 For every
  version you will find the extension package you need in above link.

  Open the VM Virtual Box and click on File --> Preferences --> Extensions
  Click on Plus icon and Add the extension which you downloaded.


This doesn't seem like an Ubuntu problem.  You may find helpful info here:

http://www.itoctopus.com/jhtmlbehavior-polyfill-not-found-fatal-error-on-joomla


How to make & install self signed certificate in apache ubuntu 16.04?

Follow below command for SSL in Ubuntu 16.04

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt

Output:

Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:New York City
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Bouncy Castles, Inc.
Organizational Unit Name (eg, section) []:Ministry of Water Slides
Common Name (e.g. server FQDN or YOUR name) []:server_IP_address
Email Address []:admin@your_domain.com

sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

Modify the Default Apache SSL Virtual Host File:

sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf.bak

$ cat /etc/apache2/sites-available/default-ssl.conf

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on

                SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

                # BrowserMatch "MSIE [2-6]" \
                #               nokeepalive ssl-unclean-shutdown \
                #               downgrade-1.0 force-response-1.0

        </VirtualHost>
</IfModule>


Why Firefox on the VM has the same capabilities of the Firefox of the host machine?

Firefox (and Chrom(e/ium) can sync your password, add-ons, bookmarks and more from any device to any other device. For firefox it is explained in this link. From chrome here.

You have this enabled it seems ;)


Switching away from the Italian servers to the main ones seems to fix everything. I guess something is broken now in the Italian mirror.


I've tried a lot of solutions but non of them worked
So i had to remove all the snapd / snappy packages
Which i found here
Solution


"No session found for uid 1000" being solved by reinstalling dbus package.

apt install dbus

then it's important to reboot, as dbus configs gets upgraded only after.


Highlights in Libreoffice Writer cannot be undone in Office Word

UPDATE 2017: This bug was fixed in recent 5+ versions of LibreOffice.

Looks like it was a known issue in OpenOffice: https://issues.apache.org/ooo/show_bug.cgi?id=24317

The bug is presented as:

1) Highlight some word in OOo

2) export document to DOC

3) Open this document in Word - highlighting is visible

4) Try to remove highlighting in Word - nothing happened

The issue should be similar in LibreOffice and so you should be able to remove the highlighting by doing:

Select the highlighted text
Go to Format, Character and then remove the background (format->paragraph->shading: set to "no fill")
Maybe you should remove also some text effects (not sure)

(The 'highlight' option in Libre/Open Office corresponds in MSOffice not to 'highlight', but to 'Shading'. In the old menu of MSO, that is in Format/Borders and Shading/Shading. In MSO 2007 go to Menu, and in the Paragraph group click the bottom right button and look for 'Borders and Shading'.)


Locked out from system after adding Yubikey 2FA

Boot rom a live CD.

Mount your root file system at some place, and bind mount /dev, /proc and /sys.  Assuming your root file system is mounted at /mnt in the live session, the following commands will do this:

sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys

Then you have to chroot to your system

sudo chroot /mnt

Edit your PAM configuration and comment out the relevant line, like you suggested - and after saving the file, run pam-auth-update and disable the yubikey module.


How can I remove or hide Disk Utility software from my computer?

There is no way to remove gnome-disk-utility form Ubuntu without removing desktop environment.

This utility requires sudo password to perform any dangerous tasks.

You can hide it by removing .desktop shortcut from /usr/share/applications

The correct way to prevent users from dangerous actions is not to give them administrative rights. You can create an ordinary user by

System Settings -> Users & Groups

and let people you do not trust login only with that account.

There is also a workaround, but this is a bad practice.

sudo mv /usr/share/applications/gnome-disks.desktop /usr/share/applications/gnome-disks.desktop.bak

This will remove shortcut from unity panel and programs menu.

To revert it back run

sudo mv /usr/share/applications/gnome-disks.desktop.bak /usr/share/applications/gnome-disks.desktop


"operating system not found " after installing ubuntu 13.04

According to your information, I think you do not have a boot loader. The boot loader directs you to your operating system. You must have a boot loader if you are doing dual boot. If you are not dual booting, then don't bother reading this. Please give more information.


You are right, the jobs in /etc/cron.daily (and weekly/monthly, etc.) are always
executed as user root but you can simply swith the user from within the script
and call that very script again as that other user, including all supplied
arguments (although there won't be any in a cron.daily job):

File /etc/cron.daily/my:

#!/bin/sh

# If started as root, then re-start as user "gavenkoa":
if [ "$(id -u)" -eq 0 ]; then
    exec sudo -H -u gavenkoa $0 "$@"
    echo "This is never reached.";
fi

echo "This runs as user $(id -un)";
# prints "gavenkoa"

exit 0;

When the script is started as user root it will detect so and
re-execute itself via sudo -H -u gavenkoa, that is: as
user gavenkoa. This requires no special entries in /etc/sudoers
because root is always allowed to switch to any user.

The exec replaces the current process with the new sudo … call
and never returns. That's why you don't need an else clause.


How do I lock the screen after resuming from hibernation?

I have added an alias into  ~/.bashrc file

alias hibernate='sudo echo "Hibernating..."; gnome-screensaver-command -l; sudo pm-hibernate;'

So that it locks the screen before hibernating.


set monitor resoution for a different user in Lubuntu 17

I am happy to say I have been able to find the answer to my question..

The culprit was a file named ~/.config/autostart/lxrandr-autostart.desktop
which contained....

[Desktop Entry]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=sh -c 'xrandr --output VGA1 --off'
OnlyShowIn=LXDE

commenting out the "Exec" line or even better deleting the file entirely solved the problem.. Guess I was too lazy to look up the correct xrandr parameters.. but I noticed that the other accounts that were working did not have this fie...


Dell Vostro hangs/freezes randomly after AC power or wifi swtiched off

My DELL Vostro 3700 behaved very similarly last weeks. I've solved these issues today, after having installed 3.0.0-13-generic kernel. So, try to:

pass pcie_aspm=off to kernel (edit /etc/default/grub and run update-grub);
install Broadcom's STA driver which works great while on battery also.

Hope this helps you too.

Well, I have got my wired network with me while reinstalling BTA's drivers.

FYI, now I have GRUB_CMDLINE_LINUX="acpi_osi=Linux pcie_aspm=off" in /etc/default/grub.


mv: missing destination file operand after with grep

Likely the error is because $(ls *.md | grep -v _index.md) evaluates to an empty string (i.e. there are no .md files that do not match _index.md) so that your command becomes
mv markdown

In general, you should avoid constructions like $(ls *.md | grep -v _index.md) for the reasons discussed here:

Bash Pitfall #1: $(ls *.mp3)
Why not parse ls (and what to do instead)?

Bash has a couple of nice "globbing" features that allow you to avoid such problems:
#!/bin/bash

shopt -s nullglob extglob

mdfiles=( !(_index).md )

if (( ${#mdfiles[@]} > 0 )); then
  if mv -t markdown/ -- "${mdfiles[@]}"; then
    echo "    Put Markdown files back in 'markdown'"
  fi
else
  echo "    No Markdown files to move"
fi

This should work unless the number of .md files is large enough to overflow the shell's ARG_MAX.
See also

What is the purpose of shopt -s extglob
Is it possible to exclude some files from rm -rf?


How do I send desktop notifications using Python 3?

You can use notify-send as an external command:

import subprocess as s
s.call(['notify-send','foo','bar'])

Or you can use the notify2 module (sudo apt install python3-notify2):

import notify2
notify2.init('foo')
n = notify2.Notification('foo', 'bar')
n.show()

There are more examples included in the package (see /usr/share/doc/python3-notify2/examples/).


How to auto load source file on bash startup?

Assuming the .rvm/scripts/rvm file is at your home. Use the following command in a terminal,

echo "source ~/.rvm/scripts/rvm" | tee -a ~/.bashrc

It will add the command at the end of your ~/.bashrc which is non-login interactive shell initialization file. when you open a terminal you get a non-login interactive shell. So the command will be executed every time you open a new shell or terminal and will serve your purpose.

Open a new terminal to see the effect or use the following command in the same terminal,

. ~/.bashrc


Audio editor that can add an echo effect

Audacity is the powerful audio editor and it is available in Ubuntu Software Center. It is not very user friendly and intuitive as for today standards, but definitely will do the job.

Official documentation is good starting point; it contains manuals, tutorials and usage tips:

Audacity  Help

Regarding to your question, the crucial section is:

Reverb Section of Audacity Manual

You may also find helpful:

Youtube echo/reverb walkthrough


Thinkpad T410 abnormal power consumption and brightness keys behaviour

Brightness keys work on my Thinkpad (T410i) after fixing /etc/X11/xorg.conf (you need to relogin to apply these changes):

Section "Device"
    Identifier "Default Device"
    Option "NoLogo" "True"
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

The high power consumption might be related to a kernel issue. Downgrading to 10.10 might help, but I haven't tried this yet.

Generally, Ubuntu runs quite well on the T410. (I've written a short overview).


If you click "Connection Information" in Network Manager, you will see it.

And generally speaking, you either configure network using Network Manager or using CLI and configuration files. It is not supposed to use both.

If you change some settings for an interface in /etc/network/interfaces, Network Manager will stop managing that interface.


How do I install software from the Gnome Extensions Website?

First you need to install Gnome-Shell which can be done either, by using Ubuntu Software Center and searching for GNOME Shell or by using Terminal and the proper apt-get install.. commands, depending on your OS and version number.

Example for Ubuntu 11.10
Example for Ubuntu 12.10
Example for Ubuntu 13.04

Also of interest might be the Gnome Wiki

Secondly you can download a program, called Advanced Settings (Tweak advanced Gnome3 settings), using Ubuntu Software Center again, which is very helpful as well to choose a gnome-shell theme, window and icon theme, manage fonts and font size and gnome-extensions.

It is also very helpful, like in the response-comments stated above, that you edit your question and add the following information:

Ubuntu version
Gnome Desktop Environment installed/or not

Source: Gnome Shell Extensions Homepage > About

I'm using GNOME 3. Why can't I install extensions?

If you are using GNOME 3.4 or newer and installation still doesn't work, check to make sure that the "GNOME Shell Integration" plugin is installed and enabled in your browser preferences. Some browsers have a feature, click-to-play, which make it so the plugin cannot start without user intervention. Make sure that either http://extensions.gnome.org is whitelisted for the click-to-play feature, or click-to-play is turned off entirely. Check your browser's help for more details.

If you are behind a proxy, make sure you have configured your proxy in both your browser's configuration dialog as well as GNOME's Network panel under System Settings. GNOME Shell Extensions needs both settings panels configured for the one-click installation to work.

Some distributions don't quite package GNOME correctly. Make sure that you have the unzip package installed.

If you have checked all of these solutions and are still having trouble installing extensions, please file a bug report using the link in the footer of the page, giving your GNOME version, distribution and version, what solutions you have already tried, as well as what the Looking Glass says in both the Extensions and Errors tabs. It's also helpful to have a copy of the ~/.xsession-errors file from the session that you installed extensions from.


This has since been "fixed" with systemd v244-rc1.


Just type in a terminal:

sudo apt-get install libgtk2.0-dev

You should get gtk-pixbuf-csource.


"kernel-upgrade-required" is not one of applied, apply-failed, unapplied, needs-check, nothing-to-apply, unknown, check-failed

I'm not sure what your question is, but there is a difference between the following two commands:

apt-get upgrade
apt-get dist-upgrade

Typically (or always?), upgrade will not install new kernels, whereas dist-upgrade will.

From the apt-get man page:

   upgrade
       upgrade is used to install the newest versions of all packages
       currently installed on the system from the sources enumerated in
       /etc/apt/sources.list. Packages currently installed with new
       versions available are retrieved and upgraded; under no
       circumstances are currently installed packages removed, or packages
       not already installed retrieved and installed. New versions of
       currently installed packages that cannot be upgraded without
       changing the install status of another package will be left at
       their current version. An update must be performed first so that
       apt-get knows that new versions of packages are available.

   dist-upgrade
       dist-upgrade in addition to performing the function of upgrade,
       also intelligently handles changing dependencies with new versions
       of packages; apt-get has a "smart" conflict resolution system, and
       it will attempt to upgrade the most important packages at the
       expense of less important ones if necessary. The dist-upgrade
       command may therefore remove some packages. The
       /etc/apt/sources.list file contains a list of locations from which
       to retrieve desired package files. See also apt_preferences(5) for
       a mechanism for overriding the general settings for individual
       packages.

Confusingly, apt upgrade is different from apt-get upgrade.  I believe apt upgrade is the same as apt-get dist-upgrade.

Rick also says he is using the following command:

sudo apt-get upgrade linux-generic linux-headers-generic linux-image-generic

However, the following should suffice:

sudo apt-get upgrade linux-generic

The above will upgrade all packages, and will install any new packages required by the latest version of linux-generic.  (And linux-generic depends on linux-headers-generic and linux-image-generic.)

Alternatively, if you only want to install the most recent linux-generic (and its dependencies), and not upgrade any other packages, consider:

sudo apt-get install linux-generic


What is the difference between "systemctl mask" and "systemctl disable"?

If a service is enabled, then there is a symlink somewhere in

/etc/systemd/system

to a unit file, most often somewhere in

/lib/systemd/system

Helpfully, when you enable a service, the full paths of the created link and target will be printed to stdout.

Disabling the service deletes the symlink, so the unit file itself is not affected, but the service is not loaded at the next boot, when systemd reads /etc/systemd/system.

However, a disabled service can be loaded, and will be started if a service that depends on it is started; enable and disable only configure auto-start behaviour for units, and the state is easily overridden.

A masked service is one whose unit file is a symlink to /dev/null. This makes it "impossible" to load the service, even if it is required by another, enabled service.

When you mask a service, a symlink is created from /etc/systemd/system to /dev/null, leaving the original unit file elsewhere untouched. When you unmask a service the symlink is deleted.

However, I have noticed that these commands are not always honoured.

When I try to mask most services, it fails:

$ sudo systemctl mask bluetooth.service
Failed to execute operation: Invalid argument

Of course, I stopped the service first. @Anwar suggests masking is only possible for non-critical services.

Unmasking a masked service, unless I masked it myself, also fails (silently). I believe this is because there is no unit file for the service anywhere, except in the form of a symlink to /dev/null, this time in /lib/systemd/system:

$ file $(locate fuse.service)
/lib/systemd/system/fuse.service: symbolic link to /dev/null
$ sudo systemctl unmask fuse.service
$ systemctl status fuse
● fuse.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

I'm not the only one having this problem

To actually unmask the masked service x11-common, I had to delete the symlink to /dev/null and sudo apt-get install --reinstall x11-common && sudo systemctl daemon-reload. Now when I query it with systemctl status x11-common I see the service has a nice green circle and is loaded and active (exited) although it has no unit file.

For further reference this article on How to Use Systemctl may be of some use.


Is it a network printer?
The printing system in ubuntu is called CUPS (common unix printing system).
CUPS has a web management interface that is much more powerful than the little app ubuntu has.
Open up a web browser and type "localhost:631" in the address bar to access it.
You may find it has the settings you need.


How to change the font size in terminal from terminal without the use of a mouse

The configuration file for lxterminal is: $HOME/.config/lxterminal/lxterminal.conf with the default font and size showing as:

fontname=Monospace 12

Simply alter this with your favourite command line editor such as vim and your changes are made. However it would be far cooler to use sed to accomplish with something like the following one-liner:

sed -i_bak '/^fontname/s/[0-9][0-9]$/22/' $HOME/.config/lxterminal/lxterminal.conf

This works by:

sed -i_bak: Make the changes inline and save a backup of the original file with the suffix _bak
'/^fontname/: Match the line with 'fontname' at the beginning.
s/[0-9][0-9]$/22/' Substitute the last 2 numbers with '22' or the number for the size of the font that you require.

How cool is the command line!

References:

How to use sed to modify last 2 digit of a line when a string matches in a file


Incorrect CPU temperature reprted (AMD fx-6300

First, the goal of the sensor is to detect high and dangerous temperature and not to report an exact temperature. The sensors are less accurate for lower temperatures.

Psensor is using the lm-sensor lib to retrieve the AMD CPU temperature.

BTW, if the BIOS is reporting a different temperature, it should indicate an issue on lm-sensor side or the need of a specific configuration for your MB/CPU.

You should probably get in touch with the lm-sensor dev and ask them some guidance. You can find contact information at: http://lm-sensors.org/wiki/FeedbackAndSupport


Ubuntu Touch: kill Windows Manager and start xterm in GUI Mode

you have to tell your terminal that you want xterm to start on the display you are currently sitting in front of. You can do so by typing

export DISPLAY=:0.0

before you execute xterm


Recursive display of remote desktop screen

On your own pc, there is already a vnc server running. So the port forwarding fails, as port 5900 is already open.

Change the ssh command:

ssh -i MyKeypair.pem ubuntu@my.ip.address -L 5901:localhost:5900

Then connect to:

localhost:5901

But let me add something here: What you are doing is the wrong way. Why do you want to administrate a server using a GUI?
You do have ssh, that's faster and made for administration.


Ubuntu 12.10 - xinput test 8 command which shows where i am touching the screen, but its showing me nothing at all

It's not entirely clear from your question whether your touch screen completely stopped working, or that it's just xinput test that stopped working.

In the latter case: It is possible that the device id 8 has changed. Try running

xinput list

and see what id number it says next to your touch screen. Then substitute it like

xinput test NUMBER


Ubuntu Phone BQ Aquaris E4.5 still need Android OS?

All the BQ phones use Android except for 1 -limited- version that has Ubuntu Touch on it. That is not the one you are looking at: the one with Ubuntu on it is called Bq Aquaris E4.5 Ubuntu Edition and you can not order it normally; you have to wait for a flash sale.


Restart your machine. When you get to the grub screen press ESC and choose a "rescue mode" option. This will let you get into the system but / will be read only.

Then run your normal fixes. More then likely:

fsck /

Once it's done reboot. Everything should be back to normal. As a side note, if you need to remount the / as read write for some reason the command is:

mount -o remount -w /


Where synaptic touchpad settings in user account?

Well I haven't found the config file for the touchpad, but I did found this:

Touchpad-Indicator

With this simple tool you can disable your touchpad with key-shortcuts etc.

Install Touchpad-Indicator:

Open a Terminal (ctrl + alt + T) and type in the following commands:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

Alternative to Touchpad-Indicator --> gpointing-device-settings:

open a Terminal. (ctrl + alt + T)
Type in: sudo apt-get install gpointing-device-settings
After the installation is complete type in gpointing-device-settings and press enter. It will automatically open a window with the Touchpad-Setting as well as the Mouse-Setting (only if you have a mouse plugged in).

If that does not solve your problem then try this:

open a Terminal. (ctrl + alt + T)
Type in: xinput list

NOTE: If one of the lines mentions a touchpad or glidepoint (perhaps also "Synaptics" or "ALPS"), your touchpad has been detected.

If one of the lines mentions an "ADB mouse", then your touchpad is old. Use the trackpad command line tool to configure it. Here's an example to switch on tapping and dragging:

sudo trackpad show
sudo trackpad tap
sudo trackpad drag

And if none of the above work check here: SynapticsTouchpad

Hope this helps :)


How to launch nano from within a PowerShell session?

From Ubuntu
I tested launching nano from PowerShell running in Ubuntu 20.04 which was installed by sudo snap install powershell --classic and it worked as shown in the following screenshots.

Launch nano from PowerShell running in Ubuntu.

nano opens in the same terminal window. PowerShell in still running in the background.
You can return to PowerShell from nano by pressing the keyboard combination Ctrl + X to exit from nano.
From Windows 10
The Windows Subsystem for Linux (WSL) is continuously improving integration between Windows and Linux. You can:

Run Windows tools (i.e. notepad.exe) from a Linux command line (i.e. Ubuntu).
Run Linux tools (i.e. grep [or nano] ) from a Windows command line (i.e. PowerShell).
Share environment variables between Linux and Windows. (Build 17063+)

Run Linux binaries from the Windows Command Prompt (CMD) or PowerShell using wsl <command> (or wsl.exe <command> ). Binaries invoked in this way:

Use the same working directory as the current CMD or PowerShell prompt.
Run as the WSL default user.
Have the same Windows administrative rights as the calling process and terminal.

The Linux command following wsl (or wsl.exe) is handled like any command run in WSL. Things such as sudo, piping, and file redirection work. source


mongstat Failed: not authorized on admin to execute command { serverStatus: 1, recordStats: 0 }

With authentication enabled, you have to create a role (and a user with that role) that is sufficient to run mongostat.  The built-in ClusterMonitor role will give you the required permissions.

There is a step by step guide to adding a role for mongostat in the docs here.  Similarly, you can find the details in the docs on how to run mongostat with username and password specified (or prompted).


If encrypting the whole installation, do I need to encrypt my home too?

If you want anyone who has the ability to decrypt your LVM to be able to see the contents of your home folder, then you don't need to encrypt your home folder.

If you want there to be people who have the ability to decrypt your LVM but not access your personal files (this might apply to other users of your computer), then you should consider encrypting your home folder as well.

By the way, depending on your needs, you might also decide to encrypt your home folder but not have an encrypted LVM (or other sort of whole-disk encryption).

There is a special case in which encrypting an LVM and encrypting a home folder are typically equivalent in terms of security--if you have a separate LVM for your home folder, and it is not decrypted until you log in. However, that's very rare (and I'm not aware of a compelling reason to do that).


Creating a 'public' group for accessing programs throughout the OS

First, the comments from @user68186 are totally right and you probably should do it in the right way. But to answer  you:

create a new group

sudo groupadd androidStudio

Now add your user and your sister user to this group

sudo usermod -a -G androidStudio  suryateja

do same as above for your sister username.

Now you should change the group ownership of /opt/Android to the newly created group

sudo chgrp {-R} [group] [file|directory]

so for you

sudo chgrp -R androidStudio /opt/Android/


I altered the Grub file again and found out that it works, though the first time I did it, it didn't work.

This time the HDMI/DisplayPort showed up, but with no number after it. There is a little 1 second delay before the Audio goes to the TV but it is nothing major.


I can't imagine a way this would be viable. Even on a hardware level, both ends are fighting to be host. It won't even handshake let alone enter into some sort of dialogue where the sound is sent to the right place.

I can think of a few alternatives:

Software on the phone to send the sound over wifi (various vnc servers, ArkMC, Airplay, etc)
A bluetooth receiver (A2DP) the phone connects to, line out into laptop
A USB DAC/sound card plugged into the phone in OTG mode. This relies on the phone being able to use an external sound card.
A male-to-male 3.5mm jack cable.


How to fix the error warning failed to connect to lvmetad falling back to internal scanning

Download Ubuntu from here. If your computer was made in the past 8 years then you probably want the 64 bit version. If not then use the 32 bit version.

If you do not know how to make a bootable disk then click here. I prefer to use unetbootin with USB which can be downloaded from here. If you use the USB method then make sure to use a partition on the drive that is smaller than 4 GB and is FAT32.

Insert the disk into the tray or the USB drive into the port. Reboot and select to boot to that device. Go ahead and let it boot to the normal live session. Click on the desktop icon to install Ubuntu.

Somewhere, around the 7th step as I recall, you're given an option. The option reads "Erase disk and install Ubuntu." Select that, instead of selecting "something else." This will completely wipe the entire system and give you a brand new starting point per your request.


Headphone jack doesn't work in Asus GX502GW

The Realtek ALC294 chipset on the Asus GX502GW is not supported by ALSA yet since it's quite new.
Please see this duplicate for additional details.
Asus ROG Zephyrus S GX502GW headphone jack not working


How to install mosquitto with websockets on ubuntu 16.04

The official method for Mosquitto on Ubuntu is:

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto

Sources:

https://mosquitto.org/download/
https://launchpad.net/~mosquitto-dev/+archive/ubuntu/mosquitto-ppa


Have you tried a different machine to isolate if its the computer or if its the USB disc?

If it happens on another machine then its the USB. Try installing it on the USB again.

If it doesn't run, try a different USB drive


How to set keyboard shortcuts from a script

I think you can achieve that effect using a script like this (only deals with switching desktop, but it can be extended changing switch-to-workspace* with move-to-workspace*):

#!/bin/bash
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Control><Primary><Alt>k']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Control><Primary><Alt>j']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Control><Primary><Alt>h']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Control><Primary><Alt>l']"

NOTE: Maybe the <Primary> part in shortcut is redundant. Try by yourself.

To automate the process you can also make this script run at startup, using the "Startup Applications" program.


Camera involentarily listing to the right in Psychonauts

I had the same problem. After a little experimenting I discovered that increasing the deadzone setting cleared it up even though I was using a mouse and not a gamepad.


sudo: unknown uid 1000: who are you? (sudo completely broken)

Obviously the password file is protected from update.  It is almost certain you're going to need root access there.

Try sudo  (in this case, it didn't work)

Try signing in with root's password or perhaps using the su command as in
su root

Something I've not tried, what if you could mount the harddrive using a system booted from say a USB stick.  In that instance, you probably have root and sudo access (on the stick) if the operating system is coming from the stick. In that situation, the password file of the harddrive is just a file which the stick's root should be able to modify/replace.


Is there any way to adjust the width of taskbar items on Gnome desktop?

That is not normal behaviour for the task bar. If you are using the standard task bar, you have something blocking it. Right click your panel and click on "Add To Panel", then drag the applet/separator that is blocking the taskbar.


Empty disk partition after opening Windows 8

This has happened only one time for me. The solution was to go to Ubuntu and run fsck on the partition. Or open gparted and do a check on the partition in question.

I would first do gparted (You need to install it first). This way you graphically know what the problem is and if it was solved (by simply mounting the partition you should know if everything is correct when you start seeing the folders and files).

After that do an fsck just to make sure.

If you ran Windows 8 and it happened exactly as you mentioned, then doing it like this will solve the issue. Do not run chkdsk from Windows or try to restore something on the partition. That will create other problems if you try to repair the problem from within Ubuntu. If you already did this then install testdisk:

sudo apt-get install testdisk

And run it like sudo testdisk in the terminal. Follow the steps to restore a lost partition.


How to enable wobbly windows in the xfce desktop ubuntu 11.10

I really can't say for sure since I haven't been using Xfce for a while now. But I think you just have to switch WMs i.e. type "compiz --replace" into the command line. Check your settings in CCSM and if it works put a launcher in ~/.config/autostart with said command in it. That should do the trick.