Running any command returns "Cannot allocate memory" on Ubuntu Server

Solution
As it says in the error messages, your machine has run out of memory. This can be for a number of reasons, but basically, something is eating up all of your memory and not leaving any left for even basic command usage.
I would suggest that you reboot your droplet (just go to your client control panel and select "Reboot"), ssh in and then run top or htop. Keep an eye on the memory usage and see what process is using up all the memory. From there, try either

Killing/Removing the faulty program/process WARNING: PLEASE do your research on if the process is an essential system process, first! If a system process is causing memory issues, don't just kill it, do research on it and for specific ways to deal with it.
Changing configuration for that program/process so that it doesn't eat up all of your memory.

Suggestions for preventing the issue from happening again

Something good to do is to add swap memory, as it allocates more memory if you're running out.
Whenever you install programs, make sure you configure them correctly so that they don't perform in unintended ways (like eating up memory)
After each time you add a package or basically anything new is configured, check with htop or top to see how much memory you're using up with the current programs. If you notice that you're using almost all of it, try and clear some out by going through and removing unnecessary programs/processes.
If there is anything that's being auto-started (besides system processes, of course!) that you don't recognize or want to be auto-started, remove it! But always do your research on what a process is before killing/deleting it, as it could be essential for bootup procedures or system functions, etc.


Migrate FTP users from one server to another

Generally speaking all you need to do is migrate the relevant lines in /etc/passwd, /etc/shadow and the group variants (/etc/group and /etc/gshadow) along with home files.

You might be able to just clone these files over but I think it's probably better to strip out the system accounts which might (poor design, but they might) store their passwords around the system which might be different on your new installation.

The best guide I've seen to do this selectively is this one. Just be careful that in the end you're using >> to append the old user accounts on to the new server's files and not > which would replace them.


How can I list the packages I removed on a specific day?

Use this line:

cat /var/log/dpkg.log | grep "2016-05-05" | grep "remove" | grep -v "startup"

And for putting it into a file:

cat /var/log/dpkg.log | grep "2016-05-05" | grep "remove" | grep -V "startup" > removed-files.txt

There are surely multiple and maybe even more elegant ways of doing this, if you point them out I'll add them to my answer here.


Switching back from development to default kernel

The problem with trying/testing kernels from a series more recent than the series used in your version of Ubuntu is that it will be what grub loads by default. You will have to delete kernel the 3.16 series kernel for things to fall back to working by default.

First, make sure that you can easily get to grub during boot time, so that you can select which kernel you want the system to boot with. As sudo edit /etc/default/grub, and set a long enough timeout to ensure that you have time to access it during boot. Perhaps save a copy of the original file first. I use these settings:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=20

After the edit do:

sudo update-grub

Now, re-boot. During re-boot access the Advanced Options for Ubuntu line to open the secondary menu. From the list of kernels select the most recent 3.13 numbered kernel.

Once booted, proceed to deleting kernel 3.16.0-031600rc4-generic. For the RC kernels, typically this would be 3 packages. To confirm:

dpkg -l | grep linux-

then (I think):

sudo dpkg -r linux-headers-3.16.0-031600rc4-generic
sudo dpkg -r linux-headers-3.16.0-031600rc4
sudo dpkg -P linux-image-3.16.0-031600rc4-generic

Note: I always purge the kernel image.
re-boot, and let the grub timeout expire without doing anything. i.e. do a default boot. Do you know have a 3.13 series kernel? Now, you can go back to whatever grub timeouts, or lack thereof, you prefer.


Stuck on GRUB, won't load win 10 or Ubuntu

If it's just your MBR or grub at fault (and you didn't accidentally wipe your os), try booting on a LiveCD and run boot-repair, that should fix grub and add existing operating systems it can find back to the menu.

With the Ubuntu LiveCD, open a terminal and run

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

then start it with

boot-repair

There are advanced options available, but the automated ("Recommended repair") option works in most cases.


How can I detect the BPM (beats per minute) of a song?

bpm-tools are command-line tools for detecting and tagging BPM.

Here's the man page of the package in Ubuntu 14.04 LTS.

You could use a loop or xargs in a shell script to run this on a library of songs.


Do you use lvm method in  d-i partman-auto/method string?
Partitioner doesn't understand what is the rest partition method - if it's under lvm, you should use $lvmok{ }

Check these preseed files https://github.com/bonddim/linux-unattended-installation/blob/master/ubuntu/preseed


Fastest/easiest way to install Ubuntu on Windows 8

You dont need to install Ubuntu. Just make a live USB media using Linux Live USB Creator from Windows.

Here is the guide.

While creating USB use persistence.

  What is persistence?

  Usually, on a live CD or Live USB key, all modifications are discarded
  when you reboot.

  The persistence allows you to keep your preferences and data even
  after reboot.

  The data are stored in a special file called casper-rw (for Ubuntu)
  and overlay-USBLABEL-UUID (for Fedora). This is a completely
  transparent process for the user.

  Usually, 300 MB are enough to install some software but you can use
  more.

The Linux Live USB Creator also has an option to run inside windows using virtual box which it downloads if the option is checked.


Try xfdesktop in the terminal without root


Why does removing a "metapackage" not remove the dependencies which it installed?

Meta-packages are not magic in any regard: the concept "of meta-package" is not part of the APT system - a meta-package is simply a package which doesn't have actual content, just dependencies. So removing them has the same effect as removing a package with actual content that also depends on some other stuff, like a web server application module will require a web server, but when you remove it - the web server should still stay installed.

That being said, APT keeps track of which packages were automatically installed because another package requested them (like a meta-package requesting "actual" packages, or a web server application module requiring a web server), and once you remove the requiring package APT will suggest you run apt autoremove to get rid of such automatically installed packages.

The main problem with "meta-packages" as they are used in the Ubuntu operating system is that they depend on a lot of packages, essentially installing a huge selection of software with a single install. When installing so many packages, especially such that are very closely tied together - you can get a lot of cross-dependencies: the meta package requires packages A, B and C for you, but A also depends on B and B (maybe surprisingly) also depends on A. So if you remove the meta-package, only C will get removed.

As a concrete example, lets consider the LXDE meta-package lubuntu-desktop:

lubuntu-desktop requires lxqt-core
lxqt-core requires lxqt-panel
lxqt-panel depends on lxqt-core. Actually, this dependency is not Requires, but Recommends - but that should be enough for apt to decide not to automatically remove either package.

The following answers have more details:

https://unix.stackexchange.com/a/447957/4323
https://unix.stackexchange.com/a/265186/4323


localhost/phpmyadmin is giving 404 error and http://localhost in thr url is not showing any file list

You will need to configure your apache2.conf to make phpMyAdmin works.

sudo nano /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

Then restart apache

/etc/init.d/apache2 restart


Change specific line in a file while transfering using SSH

You can do it with a sed command and the -i flag to edit the file in place:

sed -i "s/SetEnv KOHANA_ENV 'DEVELOPMENT'/SetEnv KOHANA_ENV 'PRODUCTION'/g" /path/to/.htaccess

Via ssh I would look like this:

ssh user@host "sed -i \"s/SetEnv KOHANA_ENV 'DEVELOPMENT'/SetEnv KOHANA_ENV 'PRODUCTION'/g\" /path/to/.htaccess"

Working with sed to replace strings in files is quite simple:

sed -i 's/search_string/replace_string/g' file

Replaces all occurences of search_string with replace_string of the gives file. -i causes sed to edit the file in place, instead of writing to standard output (stdout).

If you only want the first occurence to be replace use this sed command:

sed -i '0,/search_string/s/search_string/replace_string/' file

For more information about sed use man sed.


Gradients look bad after installing nvidia drivers

The better way to install latest Nvidia drivers are

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt-get update

sudo apt-get install nvidia-

then press tab to show the list of candidates. You should see many nvidia-xxx where xxx is a 3 digit number. Then, find the biggest number!

For example if it is 361, your last command will be

sudo apt-get install nvidia-361

Installing latest driver could fix many problems including your.

update:

Open NVIDIA X Server Settings
select LGD (DP-0) or something similar.
select the Controls tab on the right panel
Enable Dithering option


No, this is impossible. Sorry. :(

Silverlight is proprietary; run by Microsoft, if I'm not mistaken. As for the sites that don't work with Moonlight, well, you're screwed unless you can get Virtualbox to work for you.

Moonlight works with Firefox these days (I'm running 19.0 right now, and it's working,) but, so far, I have never, ever, seen a single thing that supported Moonlight: video, service, anything.

If you've installed Moonlight on your Firefox after updating, but it still appears not to work, I'd recommend contacting the site's feedback centre to let them know how much you'd appreciate Moonlight support.


Sound problem with onboard sound and USB sound

I have had the experience that the existing sound settings of Ubuntu (the ones that appear if you click on the sound icon next to the time) are too simplified and do not control all the options of my sound card.

For that reason, I got the suggestion to use a more advanced controller, which works with pulse. It is called PulseAudio Volume Control (or pavucontrol) and you can install it from the Software Center. You most probably have to re-install Pulse, it's the best way to get along with sound if you have latest Ubuntus.

You could also try other ubuntu packages for this purpose, such as Default Sound Card asoundconf or PulseAudio Manager paman. Unfortunately I have no experience with those myself


How do I install a specific version of java on Ubuntu

You can get access as well as information regarding why you shouldn't here:

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html

I have had trouble with java in the past when I had both iced tea and SUN/Oracle versions installed. That looks like the case here. I'm not sure whether this will help in your specific instance but I would remove all java and then reinstall from the oracle archive if you are intent on using a security flawed version. Best of luck!


Can't boot Ubuntu 18.04 LTE to desktop after upgrade to 4.15.0-51

I solved the problem by disabling Wayland by modifying /etc/gdm3/custom.conf:

Create a backup of the file:

sudo cp /etc/gdm3/custom.conf /etc/gdm3/custom.conf.old

Open /etc/gdm3/custom.conf in a text editor:

sudo nano /etc/gdm3/custom.conf

Uncomment the line WaylandEnable=false by deleting the preceding #
Save the file CTRL+O and exit CTRL+X.
Reboot the system.

Once I disabled Wayland, my VM is again usable on the first boot without having to use recovery mode.

This issue is being tracked as Login screen never appears on vmwgfx but installing kernel >= v4.17-rc1 (or using WaylandEnable=false) fixes it on launchpad.net.


Lubuntu 12.10 : won't boot, won't let to boot from LiveCD/USB either

Have you tried to reinstall Lubuntu? Because maybe during the instalation process occurred problems that affected the system initialization.

Other explanation for this is that the Lubuntu image in your Live CD/USB can be corrupted, you can try downloading Lubuntu again to use as Live CD/USB.

A third explanation, that occurred with me already, is that the Startup Disk Creator you are using to create the Live CD/USB can be broken, then you can reinstall it's package with the command:

 sudo apt-get --reinstall install usb-creator-gtk

And now you should have your Disk Creator fixed.


Apparently nautilus-gksu has not been in the Ubuntu repositories since 12.04.

I got the below from:
http://www.upubuntu.com/2012/09/open-files-and-folders-as-root-from.html

sudo apt-add-repository ppa:upubuntu-com/ppa
sudo apt-get update
sudo apt-get install nautilus-gksu

Then restart nautilus with this command:

nautilus -q

I didn't try this myself, and don't know if there's a better repository to add than upubuntu; it's also supposed to be available from the Linux Mint repositories from my quick Google search.  If you Google for alternates, I would recommend limiting the results to the last year, to avoid obsolete references.


How to change external monitor brightness via DDC/IC?

You find the necessary files here:
https://packages.debian.org/unstable/ddccontrol

ddccontrol
libddccontrol
ddccontrol-db

which I had to install.
Then I had to run the following commands:

sudo modprobe i2c-dev
sudo modprobe intelfb
sudo chmod a+rw /dev/i2c-*

Now I can change the brightness to a value (here 53) representing the backlight level of my external monitor without the On-Screen-Display with the command:

ddccontrol -p -r 0x10 -w 53

Now I still need to get my special brightness keys from my keyboard linked to the brightness command (with paying attention to the max. brightness level). Any idea how to do that?


Why can't I move a window to the top left corner with wmctrl in Unity?

Probably not the answer you were looking for:

Issues with the combination of Unity and wmctrl

The combination of Unity and wmctrl unfortunately has a few peculiarities, of which the behaviour you describe is one.

Looking at your output

The 65,24 you mention, are the width of the Unity Launcher and the height of your panel.
In the line:

0x03400005  0 0   24    65   1111  janw_VirtualBox unity-launcher

in the output of wmctrl -lG, you can see that the Launcher is positioned at x=0, y=24, while the size of the launcher is 65 x 1111. (1111 is the height of your screen minus the height of your panel)

Strictly, the command to place the active window in the top left corner should therefore be:

wmctrl -r :ACTIVE: -e 0,65,24,1500,550

and not:

wmctrl -r :ACTIVE: -e 0,0,0,1500,550

However, this will not solve the issue, it simply is a bug. There still will be the marge you describe. The same will happen by the way when using xdotool (not installed by default):

xdotool windowmove "$(xdotool getactivewindow)"  65 24

or

xdotool windowmove "$(xdotool getactivewindow)"  0 0

Reading the output of wmctrl -dG

Looking at the 1792x1111 in WA: 65,24 1792x1111, you can see that you have a monitor resolution of 1857 (65+1792) x 1135 (1111+24).
In this case, it matches exactly the values in DG: 1857x1135, since you only have one viewport (workspace): DG stands for the total size of your desktop (all viewports).

Summarizing

Both wmctrl and xdotool work fine if you set a window maximized. The effect you describe will not occur. Moving or resizing windows will however leave a few pixels from both the launcher and the panel, as described in this answer.:
"The window to be moved/re-sized needs to be at least a few px from both the Unity launcher and the top panel."

Apart from what you describe, another issue you will run into if you start playing around with wmctrl and Unity is the deviation, as described in this one.


Unity 3d Not supported, Intel 945GM graphics card

Make sure that xserver-xorg-video-intel is installed.

After that, you should be able to purge the ones you're not using, without uninstalling xorg. To see what video drivers you have installed, use something like:

dpkg -l | grep xorg-video


xfce launcher problems with java programs

It will be because the startup scripts are looking for a JDK_HOME environment variable, and none is present.

You can edit the startup scripts to set the JDK_HOME at the start of the scripts, or edit the /etc/profile file to set it (then log out and log in).


Cisco VPN .pcf profile can't be imported in Ubuntu 14.04


Access remote multiple servers behind NAT

If we have access to a server with public IP address, then we can use it as a gateway. We could achieve this via Reverse SSH Port Forwarding connections. Let’s say we have three instances:

Public Server: Here we have an operational SSH server and public IP address (and/or domain name). We are able to connect to this server with public-private key pair, which is not passphrase protected (setup reference).

Private Server: Here we have an operational SSH server. It is behind a Firewall (NAT, ISP, etc.) and doesn't have a public IP address, but we are able to establish a SSH connection from it to the Public Server, so here we have also SSH client.

Client Machine: Here we (need to) have only SSH client. We are able to establish a SSH connection to the Public Server. We want to establish a SSH connection from this instance to the Private Server.

The principal level
At principal level we could apply at least two scenarios.
Scenario 1. Where we don’t want to open an additional ports in the Public Server’s Firewall:

Establish SSH connection with Port Forwarding from the Private Server to the Public Server.
Establish SSH connection with Port Forwarding from the Client Machine to the Public Server.
Connect to the Private Server from the Client Machine via the forwarded port (through itself).

Scenario 2. Where we are inclined to open an additional port in the Public Server’s Firewall:

Establish SSH connection with Port Forwarding from the Private Server to the Public Server.
Connect to the Private Server from the Client Machine through the Public Server.

The main advantage of the Scenario 1 is that we don’t need to think how secure is our Private Server. The main advantage of the Scenario 2 is that we ommit one step, but in this case we should think about the security of the Private Server, because it becomes public accessible through the forwarded port. In addition, these scenarios could be applied to different port and services, not only SSH, for example to HTTP.

How to apply Scenario 1 within Ubuntu
Establish SSH connection with Port Forwarding from the Private Server to the Public Server
We could do that by the command:
ssh user-of-the-public-server@public-server -p 22 -R 2222:127.0.0.1:22 -i ~/.ssh/pass-less/id_rsa

-p 22 provides the SSH port of the Public Server (it is not mandatory).

-i ~/.ssh/pass-less/id_rsa provides the authentication key file.

-R 2222:127.0.0.1:22 means that port 2222 on the (remote) Public Server will be forwarded to the SSH port of the (local) Private Server that, in this case, is 22.

We can push this connection into the background by adding the options -fTN (of the OpenSSH Client – reference). We could use also the tool autossh to be sure the connection will be kept alive for a long period of time (reference):
autossh user-of-the-public-server@public-server -p 22 -fTN -R 2222:127.0.0.1:22 -i ~/.ssh/pass-less/id_rsa

We can simplify the above command by implementation of the following lines in our ~/.ssh/config file:

Host public-server-reverse
    HostName 100.100.100.100  # this is the IP address or the domain name of the Public Server
    IdentityFile ~/.ssh/pass-less/id_rsa
    User user-of-the-public-server
    Port 22
    RemoteForward 2222 localhost:22

In this case the above command will become:
autossh public-server-reverse -fTN

We can easily automate this task on system reboot by the next Cron job (or we could create service that should be the better approach):
@reboot sleep 45 && autossh public-server-reverse -fTN

Once this connection is established we can connect to the Private Server from the Public Server, through the reverse tunnel, by the command:
ssh user-of-the-private-server@localhost -p 2222    # provide an additional authentication data (for the Private Server) if it is needed…

Establish SSH connection with Port Forwarding from the Client Machine to the Public Server
We could do that by the command:
ssh user-of-the-public-server@public-server -p 22 -fTN -L 1111:127.0.0.1:2222 -i ~/.ssh/pass-less/id_rsa

-L 1111:127.0.0.1:2222  means that port 1111 on the (local) Client Machine will be forwarded to the (remote) Public Server’s port 2222 (that is forwarded to the SSH port of the Private Server). Note we could use -L 2222:127.0.0.1:2222.

-fTN these options will push the connection into the background as it is described above.

We can implement also autossh and ~/.ssh/config file, with directive  RemoteForward or LocalForward.

Connect to the Private Server from the Client Machine through itself
Once the above two steps are implemented, we can connect from the Client Machine to the Public Server by the command:
ssh user-of-the-private-server@localhost -p 1111    # provide an additional authentication data (for the Private Server) if it is needed…

How to apply Scenario 2 within Ubuntu
Establish SSH connection with Port Forwarding from the Private Server to the Public Server
This step is identical as the first one from the Scenario 1, but few additional things should be done.
Open the forwarded port 2222 on the Public Server’s Firewall - this is out of the scope of this answer.
Modify /etc/ssh/sshd_config of the Public Server and add the next directive, that will allow to open our SSH tunnel to public (don't forget to restart the server: sudo systemctl restart sshd.service):
GatewayPorts yes

Make our SSH tunnel open to public. This step is well described within the question: (How to make ssh tunnel open to public?). According to the answers there we could add the -g option to the commands that make a connection between the Private and the Public servers:

autossh public-server-reverse -gfTN

@reboot sleep 45 && autossh public-server-reverse -gfTN

Or, alternatively, instead that we could modify the ~/.ssh/config file in this way:
Host public-server-reverse
    HostName 100.100.100.100  # this is the IP address or the domain name of the Public Server
    IdentityFile ~/.ssh/pass-less/id_rsa
    User user-of-the-public-server
    Port 22
    RemoteForward \*:2222 localhost:22

Finally we should killall autossh and establish the connection again.

Connect to the Private Server from the Client Machine through the Public Server
Once the above step is performed, we can achieve our goal by the command:
ssh user-of-the-private-server@public-server -p 2222    # provide an additional authentication data (for the Private Server) if it is needed… forward some ports, etc.


Compiz crashes with in 13.04 when plugging a second monitor in

I have the same problem, don't reboot, just start "compiz config manager" and toggle checkbox on "Window decoration".  It is still annoying, but will do the job for now.


I cannot open Gnome Tweak Tool on gnome ubuntu 12.04

Open HUD and find Advance setting - For gnome tweak tool.

Did you place your theme and icon on correct place?

This is manual step to change icon and theme using terminal on ubuntu.

Change Icon

Enable the default Faience icon theme with this command:

gsettings set org.gnome.desktop.interface icon-theme 'Faience'

For Faience-Azur:

gsettings set org.gnome.desktop.interface icon-theme 'Faience-Azur'

For Faience-Ocre:

gsettings set org.gnome.desktop.interface icon-theme 'Faience-Ocre'

For Faience-Claire:

gsettings set org.gnome.desktop.interface icon-theme 'Faience-Claire'

Change Theme

gsettings set org.gnome.desktop.interface gtk-theme 'Holo'

gconftool-2 --set --type string /apps/metacity/general/theme 'Holo'

#Replace holo-theme with your Folder theme name

http://penreturns.rc.my/2012/02/how-to-install-and-enable-faience-icon.html


Copy group of files (Filename*) to backup (Filename*.bak)

You can use find:

find . -max-depth 1 -name 'gmail-meta3*' -exec cp "{}" "{}.bak" \;

That will find in the current directory . all files with a name matching the glob pattern (mind the single quotes around the pattern to prevent shell globbing). For each file found, it will exec cp from name to name.bak. The \; at the end ensures it will do each file individually instead of passing all of them at once. The max depth as 1 only searches the cuurent directory instead of recursing down.


18.04 to 20.04 Upgrade Text Is Now Just Boxes

Tweaks>Fonts>Interface Text select anything to change boxes to characters.


error while loading shared libraries: libpng12.so.0

you can either

install the supplied .deb file available from

https://packages.ubuntu.com/xenial/amd64/libpng12-0/download
http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_amd64.deb

or compile and install  :

download source code  https://packages.ubuntu.com/xenial/libpng12-0
wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz

tar xvf  libpng_1.2.54.orig.tar.xz

cd libpng-1.2.54
./autogen.sh
./configure
make -j8
sudo make install

then update the links with:
sudo ldconfig

prior to any of this assure you machine has these preliminary packages installed ... baseline for any dev kit
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libtool autoconf build-essential pkg-config automake tcsh

good news is freesurfer 7 on Ubuntu 20.04 runs fine out of the box


Help removing grub from dual booted Surface Pro

The simplest way of getting Windows back as the only OS on the system would be to run a Windows install disc for your version or Repair disk ... If it is windows 10 you would select repair then troubleshoot then startup repair and that will restore the Windows Boot loader. The steps are basically the same for Windows 8/8.1 and 7 but off hand I don't know the actual steps to get to the startup repair in those OS's .. it should be easy enough to find though

If worse comes to worse and you want a real easy way.. I can set you up so that Windows is the default boot and with no menu delay so basically it will boot right into Windows and you wouldn't see Grub at all but it would still be there


Instead of using vanilla Ubuntu on very old hardware, I would recommend trying Lubuntu or Xubuntu. They are lightweight distros and should be better suited for your computer.


Ubuntu 17.10: Unclickable menus on JDownloader 2

The problem was that the bundled JRE is not updated automatically by JDownloader and that was causing the problem.

To fix it you have to either delete/rename the ~/jd2/jre folder to fallback to the system JRE or reinstall JDownloader completely to get an updated bundled JRE.


File manager (Nautilus) hangs or is ultra slow when listing contents of ssh/sftp server

I have a similar problem with 12.04 that was not there with 10.04.

when opening any large directory, the Nautilius file manager becomes ultra slow when listing the directory conents. The other installed programs work rapidly as usually.

This problem was not there from the beginning, but appeared after I had installed several programs and filled the harddisk with document files by about 80%.

So there seems to be some weakness in Nautilius that is activated in conjunction with the installation of some other program or just because the amount of files is large.

Jaan


What's the difference between gnome, gnome-shell, and gnome-session-fallback?

If you check on the description of gnome

  The GNOME Desktop Environment, with extra components

It will install both the Gnome Shell, and the Fallback session, along with the Gnome games, Evolution, Epiphany, Empathy, Rhythmbox, etc. It will install everything gnome.

Whereas gnome-shell will install just the Gnome Shell and its dependencies. Same is for the the fallback session package.

You can get this info either from Synaptic or using apt-cache show gnome and apt-cache show gnome-shell.


Can't use ALT-TAB to switch between windows

Open dach :

type keyboard and navigate to Keyboard

This could work if you are using unity 2D

If you want if with effect you should logout and login as 3D


Admin users on an Ubuntu Core installation

On traditional Linux/Unix systems there is no "admin" group, such group was widely introduced for desktop usage.
If you really need an admin group on a core system (you may not needed), you will need to create it manually:

groupadd admin -g 120


I'm fairly certain that the problem isn't with Unison, but with inotify. When you use the option repeat=watch, Unison calls a helper program unison-fsmonitor which uses inotify to watch the filesystem for changes. It puts a "watch" on each file that you are syncing with Unison.

By default there is an upper limit on the number of watches a single user can evoke. On my machine that upper limit is only 8192. You can increase the number of watches by editing the file

/proc/sys/fs/inotify/max_user_watches

I would be a bit concerned that since you want to watch about 125k files and the default maximum is only about 8k, you might see a dramatic hit in performance if you increase the maximum by that much.


Creating live windows usb with persistence storage

Try installing the balena etcher app and download the windows ISO you want. Then run the balena etcher app which will make you a bootable USB stick.


I cannot install Skype on Ubuntu 12.04 - 64bit

For skype installation, if your system is 64 bit you need to enable 32 bit support. To enable multi-arch support, run the following commands in the terminal. Note: if you have already done that then no need to run this

sudo dpkg --add-architecture i386
sudo apt-get update

sudo apt-get install -y ia32-libs

Then download skype from their website for Ubuntu 12.04 multiarch.deb. The latest skype version (4.3.0.37) has some bug fixes and updates.

After downloading, open the terminal and go where the deb has been downloaded:

cd /path/to/directory/

Install the skype deb file:

sudo dpkg -i skype-ubuntu-precise_4.3.0.37-1_i386.deb

Install the missing dependecies:

sudo apt-get -f install

That's it.


Lost files after 'fix' for missing Unity menus

I'd bet that all that has disappeared is symlinks and desktop files, not actual applications and data files. I don't know much about Compiz or Unity, but I suspect you could go to /usr/share/applications and copy the desktop files you want to be able to launch from icons on your desktop to /home/your-user-name/Desktop/

For direct access to directories (aka "folders") from your desktop, you can make new symlinks and put them in /home/your-user-name/Desktop/

For each such directory:

ln --symbolic -T /actual/path/to/directory /home/your-user-name/Desktop/whatever-you-want-to-call-the-link

Probably you deleted something that tells compiz to put those things there, so try putting them there yourself.

If that doesn't work, try reinstalling compiz.

In the future, NEVER delete any kind of config file without making a backup copy.


"Loading operating system... boot error" when booting from live CD

Try using the bootable flash drive made from the Startup Disk Creater. then try booting the PC with the flash drive.


Can I make apache init run after shared folder is mounted?

Ok, so I figured out an answer. I'm not super familiar with manipulating the linux boot sequence and even though this is a vagrant machine, I didn't want to break it.

So I found a vagrant solution for my problem.

I just added this bash script, startup.sh, to the virtual machine in a directory shared with the host:

#!/usr/bin/env bash

service apache2 restart

Then I modified my Vagrantfile to add the following line:

config.vm.provision :shell, path: "startup.sh", run: "always"

So, now my VM restarts Apache after boot, and everything works as I wanted it to.


Keyboard not properly functioning after installing 21.04

Regarding the Logitech wireless keyboard, I can confirm the solution in post #1333713 of starting the session as Xorg instead of Wayland works.
Wayland is obviously still not 100% mature...


You can make an alias for the command using the alias command:

alias 'start-minecraft-server'='cd Minecraft && java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui'

Now the command start-minecraft-server will execute those commands. You should probably use an absolute path though, since otherwise it'll only work if you're in the right directory:

alias 'start-minecraft-server'='cd /path/to/Minecraft && java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui'

Aliases are lost when you close your terminal, though. To make it permanent, you can add that alias command to ~/.bash_aliases, which is read automatically when you start the terminal on Ubuntu.

You can also put a shortcut on the desktop. To do this, you will have to put a .desktop file in ~/Desktop (for example, ~/Desktop/minecraft_server.desktop). Here is an example that should do what you want:

[Desktop Entry]
Version=1.0
Exec=bash -c 'cd /path/to/Minecraft && java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui'
Name=Minecraft Server
Comment=Start Minecraft server
Terminal=true
Type=Application
Categories=Application;Network;

(replace /path/to/Minecraft/ with the full path to the Minecraft directory)


These files are generated product of your compilation, so they are certainly not junk but the result of your efforts compiling.

Compilation doesn't occur in the same file; out.c compiled code doesn't get written to out.c but to out.o, for example. When you compile something you tell the compiler (more or less):

read this file.
process and link it
write the output here

So, what you are seeing is perfectly normal in most (if not all) languages possible. In your case, you can copy the new files into your system directory (sudo make install or equivalent) and then remove the sources completely, since the original sources are not necessary anymore.

These files can be cleaned (if you want the sources pristine again) with make clean or equivalent.


Seems to be packaging issue, I reported bug 1879450 about this.

Also what is interesting the WHATS_NEW file has the following lines:

Version 2.03.00 - 10th October 2018
===================================
...
  Remove clvmd

So the answer is never.
But you can still use Ubuntu 16.04 LTS and 18.04 LTS to use clvmd and other executables and services.


Python - pip module install 2.6 instead of 2.7

Run pip with python 2.7. Note that python2.7 isn't provided or supported for Lucid (10.04)


can I upgrade Ubuntu 14.04 LTS to 14.10 by sudo do-release-upgrade?

Yes, you can upgrade from 14.04 to 14.10.

You can always upgrade any version to the next version with do-release-upgrade.

For an LTS release, you have the choice to either upgrade to the immediate next version or the next LTS version (when it's released).

Note that do-release-upgrade doesn't require sudo, interestingly enough, because it makes its own calls to sudo during its run.


For both, if you are sure you don't want to use them you may be able blacklist the drivers of those pieces of hardware so they are not loaded on boot - blacklisting drivers is explained in full here. To determine the driver of the WiFi use lspci -k or lshw -C network, and blacklist the WiFi's driver module (You may also be able to do this with the 'Additional Drivers' GUI).
The (rather big) flaw with this method is what happens when you find you do need those pieces of hardware (particularly without a touchpad). You should be able to reload the modules using sudo modprobe MODULE in a TTY.
If you really never want to use that hardware, you could remove the driver packages, but this almost guarantees you will need them at a later date.You could also use rfkill and run it on boot similar to the method here.

For the touchpad this is more complicated with drivers, but you could use xinput to disable the touchpad:

xinput --disable ID

You can determine the ID of the touchpad from xinput -list
This might not work system-wide from /etc/rc.local, so instead you could use ~/.profile so it disables the touchpad on login.

Another method may be to send the signal's the key's send, though this is probably very difficult as this probably is in the hardware not the software - this may help though.


Ubuntu 20.04 Windows Printer via SAMBA browse click no response

sudo apt install python3-smbc smbclient

The above command works for me.


How can I get the username from a python script run with pkexec?

I fixed it like this:

import pwd
import os

user = pwd.getpwuid(int(os.environ["PKEXEC_UID"])).pw_name
working_dir = '/home/{}'.format(user)


An new monitor cable messed up my resolution

Few options/ideas:

Good VGA cables are not expensive. For about £20 you can buy a 2m, triple-shielded Lindy cable.
Good monitors aren't much more, to be fair and will give you much more value than a diamond-encrusted VGA cable. There's a reason DVI and HDMI replaced VGA: they're better.
Get somebody else to test the cable in their set up.


Are you running Ubuntu 14.04? If that's the case, jockey is not being used anymore, that's why is telling you that ubuntu-drivers-common are already installed.

I'm not sure which is the default package manager in Lubuntu, but in the standard ubuntu you can run software-properties-gtk and navigate to the drivers tab. It has the same functions that jockey-gtk use to manage.


Click on Dash
Search for Printers
Right click on the printer that's shown
Make sure that Enabled is checked


Cannot install icaclient due to problem with ia32-libs

There is a way under 13.10 brought to us by dark_harmonics on ubuntuforums (last post) - I just quote him here:

  Just to document this process so that when i google this problem i
  come across the compiled solution to this:

  Download citrix deb file from www.citrix.com. I used the new customer preview 12.9.999
  Open a terminal and change to the directory where the deb file is located
  Run the following commands

mkdir ica_temp
dpkg-deb -x icaclient-<tab> ica_temp
dpkg-deb --control icaclient-<tab> ica_temp/DEBIAN
sudo gedit ica_temp/DEBIAN/control

  Change the dependencies to be "Depends: libc6-i386 (>= 2.7-1), lib32z1, nspluginwrapper"
  Save and close the file
  Compile and install the deb file

dpkg -b ica_temp icaclient-modified.deb
sudo dpkg -i icaclient-modified.deb

  Cleanup with

rm -r ica_temp

  I also needed to run sudo apt-get install -f to install the dependencies I was still missing.

BTW: Customer Preview did not work for me, I used the official version.


This question could have multiple answers depending on how you're using 'cloud'?

Typically cloud would be considered a logical server delivered through virtualization.  Your cloud provider allows you to select an image to boot, which the image could be Ubuntu.  So there isn't really an 'installation' but you still end up with an Ubuntu ready server.

If you mean a physical server colocated at a remote location, the best way I've found to get Ubuntu installed is, having your remote hands put the CD into the drive and install Ubuntu over IPMI.  I've done it several times, if all goes well, the disc should only have to put inserted once.


This is not a solution to your issue, but you may want to take this into consideration:

  Low-latency kernel

  As of Ubuntu Studio 12.04, the default kernel is linux-lowlatency,
  which in essence is a generic Ubuntu Linux kernel, with a tweaked
  configuration to allow for stable operation for audio applications at
  lower latencies. Since much of the real-time patch has now been
  implemented into the vanilla kernel, and considering the difficulties
  in maintaining linux-rt, Ubuntu Studio decided on using
  linux-lowlatency in its place.

http://en.wikipedia.org/wiki/Ubuntu_Studio#Low-latency_kernel


Are there any hotkeys in dash for choosing among search term matches?

You can hit Enter after typing your query to launch the first match, you can also hit Enter Enter in quick succession to launch the first thing it matches whether it renders it in the dash or not (sort of like "I'm feeling lucky").

As far as I can tell, that's currently the only shortcut.


If the folder is owned by root, even if you have admin privileges, you still dont have permission, this happens when you use sudo while installing composer.

It can be solved by

sudo chown -R $USER $HOME/.composer


How can I write Nautilus scripts in Python?

Nautilus Scripts

Nautilus scripts can be written in any programming language, including python. You just need to make your python source file executable and copy it to ~/.gnome2/nautilus-scripts  in Ubuntu versions prior to 14.04. For Ubuntu 14.04 and newer the directory is different: ~/.local/share/nautilus/scripts

You will also need to add #!/usr/bin/env python as the first line of the file. Note that by default #!/usr/bin/env python points to Python2. If you need Python 3 specifically, use #!/usr/bin/env python3.

Once you have done all this, the script will be accessible from the scripts sub-menu of the  right click menu in Nautilus.

See also:https://help.ubuntu.com/community/NautilusScriptsHowto

Nautilus Extensions

Nautilus extensions have more flexibility than scripts - eg. they can be used to add an item directly to the context menu. There is are python bindings available (python-nautilus).

Visit the web page of this library and view the documentation for more information.


Can I install Ubuntu 12.04 LTS on Lenovo Ideapad S510p

Yes, of course you can.
Ubuntu can be installed on any laptop.
The only steps you have to follow are normal ones which you can easily google


How do I give permissions to allow SickRage access to a USB drive?

Looking through this question, I see that users need execute permissions for some types of access. Maybe someone could flush out the details further, but this fixed my problem.

sudo chmod -R a+x /media/niceraid


How do I send Alt+Ctrl+F1 through Synergy?

You need to run:

sudo chvt 1

Changing virtual tty's requires administrative privileges.


Which file holds the path settings? What are the difference between Windows and Ubuntu path setting?

Global path settings: /etc/environment

User specific settings: ~/.bashrc

The paths are normally updated by the system when you install packages or change configurations e.g. proxy settings. Anyway, you can also change the paths or other environment variables editing the above files directly.


Error when modifying rules file in debian packaging

For your particular debian/rules:16: *** missing separator.  Stop. error, make sure you have tab characters in your debian/rules file. Spaces to indent do not work.


after reinstalling KDE, everything is fine

 sudo apt-get install kubuntu-desktop


How do I upgrade my kernel on the Rackspace Cloud?

You need to edit /etc/default/grub and alter it to exclude UUIDs from the root device.
ie.

Open a terminal by pressing Ctrl+Alt+T and enter:

gksu gedit /etc/default/grub

Find and uncomment the following line. That is remove the # from the beginning of the line # GRUB_DISABLE_LINUX_UUID=true like this:

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
GRUB_DISABLE_LINUX_UUID=true

Save and exit from gedit.

You then need to run update-grub to affect these changes by entiering:

sudo update-grub

The root device in use on rackspace in something like /dev/xvda1, which is not a UUID but this is treated as one by grub. Consequently at the next boot grub searches for a device with that UUID and cannot find it, hanging the boot process.


How to start and kill tcpdump within a script?

I found part of the answer on this Stack Overflow post.

To summarize, tcpdump was buffering its output before writing to the output file, and this caused issues when the script attempted to interrupt it.  Adding the -U ("flush") option to tcpdump fixes this.

Also necessary were a sleep command immediately after issuing tcpdump to allow it to initialize, and also before killing it, to allow it to write to the file:

#!/bin/bash

#start a process in the background (it happens to be a TCP HTTP sniffer on  the loopback interface, for my apache server):

tcpdump -U -i lo -w dump.pcap 'port 80' &
sleep 5

#.....other commands that send packets to tcpdump.....

#now interrupt the process.  get its PID:
pid=$(ps -e | pgrep tcpdump)
echo $pid

#interrupt it:
sleep 5
kill -2 $pid

For reference, from man tcpdump, under the -U option:

If  the -w option is specified, make the saved raw packet output
``packet-buffered''; i.e., as each packet is saved,
it will be written to the output file, rather than being written only
 when the output buffer fills.

After this, the script worked fine.


Make an application require root permission

I would assume you would need to set the owner of the bin file (of the program) to be root, and make it executable only by the root.

So, as an example, this is the current permissions on my nautilus, which is located in /usr/bin/nautilus:

alaa@aa-UBUNTU:~$ ls -l /usr/bin | grep nautilus
-rwxr-xr-x 1 root   root       1542692 Feb 20 23:13 nautilus

In case you need to read more about permissions, click here. Also,
before doing anything, remember the permissions of your program before you execute any commands, so that you can change back to those permissions should anything go wrong.

Notice that there are three "x"s, which means that the owner, group, and other (basically meaning everyone) have access to execute it. If we want the application to require root permission, we need to set it up so that the root is the only one able to execute it, hence we need to remove the "x"s (which is the executable permission) from "group" and "other", and only leave the first "x". To do this, you would do:

sudo chmod go-x /usr/bin/nautilus

This command means:

chmod: change mode/permissions
go: apply the following to "group" and "other"
-x: remove (because of the minus sign) the executable permission from "group" and "other"
/usr/bin/nautilus: the file to apply this to

So we are removing the "x" from "group" and "other". Now, the permissions looks like this:

alaa@aa-UBUNTU:~$ ls -l /usr/bin | grep nautilus
-rwxr--r-- 1 root   root       1542692 Feb 20 23:13 nautilus

If I try to run nautilus with my username, I get this:

alaa@aa-UBUNTU:~$ nautilus
bash: /usr/bin/nautilus: Permission denied

To be able to run nautilus, I would have to do sudo nautilus.


Tail - how to quit tail and restore terminal window?


Rhythmbox duplicating songs in playlists

The problem could be because the Rythmbox's Plug-ins for iPod (I mean Copyright 2006, but I don't known the new versions), make sure that is not selected / activated.

It's just disable the plug-in for iPod and the problem stops, how even is possible to use the iPod with general players (MTP), the iPod will work just to put the songs there, not for playlist and every time your iPod will be song's recount! I know that it's not good! But, your playlists will be saved of the duplicate problems.

A tip, you can use the gtkPod. ;)


How to set Google Chrome to ask for a download location

In Google Chrome you can set to always ask for a download location.

Go to Chrome settings and check this option.


12.04 doesn't recognize my wifi Broadcom BCM94318MPG

Install firmware-b43-installer from the Ubuntu Software Center.

Ubuntu already includes drivers for Broadcom hardware, but for certain reasons can't include firmware. This has to be done by the user, as shown above.


Missing Calculator icon in Ubuntu 18.04 with vanilla GNOME

The pre-installed (GNOME) Calculator application on Ubuntu 18.04 is a snap application, it doesn't have .desktop launcher(s) for the application at traditional place(s), e.g. /usr/share/applications/. Check the /var/lib/snapd/desktop/applications/ directory instead.

Alternatively, you may consider creating a custom .desktop launcher for the application by hand. To do so, follow the steps below.

Create a new file, say calculator.desktop in your ~/.local/share/applications/ directory. You can do that by running the following in Terminal

touch ~/.local/share/applications/calculator.desktop

Open this file with a text-editor, for example by running

gedit ~/.local/share/applications/calculator.desktop

Add the following lines to this file and save the file.

[Desktop Entry]
Name=Calculator
Comment=Perform arithmetic, scientific or financial calculations
Exec=/snap/bin/gnome-calculator
Type=Application
Icon=accessories-calculator
Terminal=false
NoDisplay=false

You may also remove the snap version by running

snap remove gnome-calculator

and install the traditional apt versions by running

sudo apt install gnome-calculator


You can do:

grep -Eo '[^[:blank:]]+' file.txt | sort | uniq -c

grep -Eo '[^[:blank:]]+' gets the words of the file separated by any whitespace(s)
sort sorts the output
uniq -c gets the cound of words

Example:

% grep -Eo '[^[:blank:]]+' <<<'this  line this this line' | sort | uniq -c
      2 line
      3 this


Not able to see windows option while installing Ubuntu

In the ubuntu setup, select Something Else and select a drive partition on which windows isn't installed to install ubuntu.


waiting for xserver to shut down (ee) server terminated successfully (0)?

Don't be alarmed. You have to again type 'startx' to boot normally.


Why is the software center in the Debian repositories?

As you may know, Ubuntu is built upon Debian. LTS releases are based on Debian Testing, while regular releases are based on Debian Unstable. Ubuntu packages are therefore almost always compatible with the respective Debian release.

Ubuntu Software Center is a nice front-end for browsing and searching for packages, and it uses standard .deb downloads/installation on the back-end. It works just as well on Debian as on Ubuntu, and is there as an alternative to Synaptic, etc. for Debian users.

  Note: technically, the Debian USC is not an upstream package. In fact, as the filename software-center_5.1.2debian2.1 suggests, it's the Ubuntu (Launchpad) package which is the upstream here!


Ubuntu on Macbook Mid 2009 network not working

Perhaps this will help: https://help.ubuntu.com/community/MacBook

If you can give us the model info, it will help a lot. You can get it by writing this command to your terminal:

    sudo dmidecode -s system-product-name

It should print out something like this: "MacBook5,5". You can find the terminal by going to Applications -> Accessories -> Terminal.

If you are lucky, you may find the answer from the above link using the model name found by using the above command.


“psmouse.ko' not found” installing ALPS touchpad in a Lenovo Ideapad Flex 14

I had the same issue with my Lenovo Ideapad Z510.
Touchpad was recognized as PS/2 Mouse. No configuration available for scrolling or disabling while typing. Scrolling did not work.

I installed Kernel 3.14.1 then everything worked fine after reboot.


Blank screen on login after upgrading to 15.04

I had the same problem, Logging in the terminal mode (Alt+F1) and running the command:

sudo dpkg-reconfigure -a

and rebooting fixed my problem.


Code::Blocks output window Position in Ubuntu

I gave an answer in this thread (the only difference being the terminal you want to use).
But if you want to keep using xterm, use the following command instead :

In codeblocks :

Go to Settings > Environment > General Settings.
Change the "Terminal to launch console programs" option to :

  xterm -T $TITLE -geometry WIDTHxHEIGHT+XOFF+YOFF -e

  WIDTH : The width of the terminal window
  HEIGHT : The height of the terminal window
  +XOFF : The left edge of the window is to be placed  XOFF pixels in from the left edge of the screen
  +YOFF : The top edge of the window is to be YOFF pixels below the top edge of the screen

I used the following to have the terminal almost centered on my screen (change them to fit your screen resolution):

xterm -T $TITLE -geometry 80x20+300+240 -e


Can't access PostgreSQL after crash restart, reports dbus error

Dbus is an inter-process communication (IPC) solution used widely in Linux distributions. Also systemd uses it. However, it is independent from PostgreSQL.

The systemctl status commands shows an error message related most likely to that the systemctl command, as a command-line app, can't contact your systemd. Systemd is the top-top daemon of your system, managing all background services, including PostgreSQL.

So you have at least two, independent problems. Note, such events are rare on Linux, most likely you had bad luck. I hope, you have some type of backup if your Postgresql had important data in it.

Probably fixing your PostgreSQL is the more important. What is well visible, that your PostgreSQL didn't start (if it had, your django could have connected it). You can manually, and more directly check it if a ps uxa|grep postgres doesn't give any feasible result.

Check the end of your postgresql log, which is most likely in /var/log/postgresql.log. It is possible, that your database is corrupt. If it is so, you are struck - for postgresql, simply no low-level database recovery tool was ever developed. You need to have always good backups. There are some tricky way with what you can recover a little bit of your data, but these are well over the limits of this post.

Always have at least one backup from everything what is important on your system. It shouldn't be an useful, high-level, effective solution, but it should exist. For example, a daily pg_dump yourDjangoDb|pxz -9ve - >/var/backups/djangopg.xz is pretty okay for a development workstation.

Extend your question with the end of your postgresql.log.

About the dbus, to know if the service is still running, execute the ps uxa|grep dbus-daemon command. If it doesn't run, you have a problem. If it runs, you can  Dbus doesn't have any really important persistent data in itself, so you will be able to do more "direct" ways to make it working again. If it doesn't run, then there is some communication problem, which is most likely related to some unix sockets in /run. Anyways a strace systemctl status dbus.service could help a lot.


Make the KWIN cube act like the Compiz Cube

The titles I mention are relevant to systemsettings5, but they're also present in other versions — just, perhaps, might have a bit different name.

Disable desktop switch when dragging window to an edge:

systemsettings5 → Desktop Behaviour → Screen Edges, set the drop down list Switch desktop on edge to Disabled.

CTRL+ALT+Arrows to switch desktops:

systemsettings5 → Desktop Behaviour → Virtual Desktops, the tab Switching, shortcuts Switch to Next Desktop and Switch to Previous Desktop.

Don't forget that System Settings has a textbox to search in the upper-right corner, e.g. you can enter there edge, and the settings that mention the word would be highlighted.


Unable to connect other monitors, Lenovo L470

I took a more detailed look at dmesg and saw this:
[    0.050136] You have booted with nomodeset. This means your GPU drivers are DISABLED
[    0.050138] Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly
[    0.050141] Unless you actually understand what nomodeset does, you should reboot without enabling it

In the past, I had enabled nomodeset in grub, because Ubuntu didn't boot for whatever reason.
After i removed it and updated grub, everything work fine, as always.
Big thanks to @Alex for helping me with this issue.


how to create a debian package to install a python module

In the debian/install file, add this line (or only use this line, if there aren't any others in there):

moduleFileName /usr/local/lib/python2.7/site-packages/

You basically use the same line format for each file (or directory):

filename /path/to/destination/


Cisco AnyConnect dropped and can't reconnect without reboot

I was getting crazy with that problem. Update 2 works perfect!!!

systemctl restart systemd-resolved.service

Thank you :)


compiling blt2.4 on 64bit ubuntu machine

I recommend installing the blt package from the repositories. It will install all by itself, without any problems. There is also a blt-dev package if you need that. Checking the repositories for the program you need is always a good idea, to ensure compatibility with other Ubuntu programs.

If you still want to go ahead with this manual compile+install, then I don't have any suggestions for you. I prefer the path of least resistance.


Any alternative for dbmail for Ubuntu 18.04 Package

I do not see anything named dbmail in standard repositories from 16.04 LTS to 19.10.
But I can find this package only for Ubuntu 10.04 LTS (EOL):

# apt-cache policy dbmail
dbmail:
  Installed: (none)
  Candidate: 2.2.11-1build1
  Version table:
     2.2.11-1build1 0
        500 http://old-releases.ubuntu.com/ubuntu/ lucid/universe amd64 Packages
     2.2.9-1ubuntu1 0
        500 http://old-releases.ubuntu.com/ubuntu/ hardy/universe amd64 Packages

There is no such package for deb-based distros on Repology.
But for example ArchLinux has v3.2.3 from 2019-08-06, so the project is alive.

So we can download, compile and create deb-package of it from official site manually:

cd ~/Downloads
wget http://www.dbmail.org/download/3.2/dbmail-3.2.3.tar.gz
tar -xf dbmail-3.2.3.tar.gz
cd dbmail-3.2.3/

sudo apt-get update
sudo apt-get install build-essential devscripts \
automake libsieve2-dev libgmime-2.6-dev libldap2-dev libzdb-dev \
libmhash-dev libevent-dev asciidoc xmlto libpq-dev libsqlite3-dev libssl-dev
# also you need to choose from MySQLDB or MariaDB:
sudo apt-get install libmysqlclient-dev # or libmariadbclient-dev

rm debian/source/format # disable 3.0 (quilt) format
dpkg-buildpackage -uc -us -d # "-d" to ignore 'missed' automake1.9
# wait it to get compiled

# install the package
sudo apt-get install ../dbmail_*.deb

Then check it

$ dbmail-util -V | head -n1
This is dbmail 3.2.3

Note: I have never used this software, just compiled it to help you.


What does the 'defaults' mount option mean for NTFS drives/partitions?

According to man mount, the defaults option is filesystem-independent.

FILESYSTEM INDEPENDENT MOUNT OPTIONS
Some of these options are only useful when they appear in the /etc/fstab file.
Some of these options could be enabled or disabled by default in the system kernel. To check the current setting see the options in /proc/mounts.
The following options apply to any filesystem that is being mounted (but not every filesystem actually honors them - e.g., the sync option today has effect only for ext2, ext3, fat, vfat and ufs):
[...]
defaults
        Use default options: rw, suid, dev, exec, auto, nouser, and async.


Ubuntu Server Installation getting Stuck

It Might be problem of your Disk Drive, OR CD,if one of these two are very old then change them, as you are saying that you have checked it on another machine then it could be a problem of disk drive. I also used to get error when I was trying to install from my old Disk Drive Try installing from a new usb disk drive or make a bootable pendrive from the disk using that checked machine.

and see this question might be help you.
https://unix.stackexchange.com/questions/121047/error-8000-bad-sectors-when-installing-centos-6-5-minimum


This option was actually removed in Firefox 43 because it caused this bug.

But there are still the following options available through the about:config section:

browser.cache.disk.enable (The disk cache is used in normal mode (non Private Browsing mode) and stores persistent data on the hard drive.)
browser.cache.memory.enable (The memory cache is used in normal mode and in Private Browsing mode and is purged when you close Firefox.)

The first should be what you want. It is inadvisable to also disable the second one though as Firefox needs some sort of cache to function properly. Information taken from here.


Getting Google Talk/Skype to Work with Pulseaudio

This solution solved my problem:

1) Install Pulseaudio Volume Control

2) Go to Input Devices Tab

3) Make Left[Right] channel zero and Right[Left] channel non-zero. Adjust it to suit yourself.

Now everything works.

However, Skype and google talk have auto-adjust features that are turned on by default. These will turn the channel you set to 0 to something non-zero and nothing will work any more. So you have to turn these off.

In Skype, go to options, sound devices and uncheck "Allow Skype to automatically adjust my mixer levels".

Google talk is more complicated as there is no box to uncheck. The following will do it,

1) use your favourite text editor to edit the file ~/.config/google-googletalkplugin/options

2) Change the value of audio-flags to 1

Restart your computer and that should do it

Hope that helped


How to reset keyboard after running windows in vmware

One way is to go to the keyboard layout section of the configuration panel and press the restore default button. Of course then you need to reset the adjustments made, but it beats rebooting. It also opened the road for some more experimenting to take the edge off the rough edges.


Script to download music and transfer to Ipod?

Create mus.sh and make it executable (chmod +x mus.sh):

#!/bin/sh
cd /home/eric/Music
/home/eric/getmusic.sh "http://www.myspace.com/$*"
scp -r /home/eric/Music/* root@192.168.0.183:/var/mobile/Media/Music

Usage:

./mus.sh ARTIST


How do I force Juju to deploy a fresh charm, not a cached one?

You can use the -u option to juju deploy to speed iteration during development of your charms:

  -u, --upgrade         Deploy the charm on disk, increments revision if
                        needed

e.g.,

juju deploy -u charm-name


How to reset all settings their original state?

If you haven't change anything with root permissions (like in the /etc or /usr/share directory) you can always delete the folders ~/.APPLICATION_NAME, ~/.config/APPLICATION_NAME, ~/.cache/APPLICATION_NAME, ~/.local/share/APPLICATION_NAME and the folders will be recreated with default settings after you reboot or relaunch the application (the symbol ~ means your home folder which in my case is /home/thanos). In fact you can delete anything inside your home folder (you might get an error if you delete the trash folder) but you will loose any data that is in there (for example bookmarks in firefox, panel items configuration, installed games in steam, playonlinux's virtual drives or whatever), so keep a copy or choose wisely what you delete.
For example in  order to restore chromium settings you need to delete the folder ~/.config/chromium and it will be recreated when you relaunch chromium (delete the whole folder in order to be recreated not just some files in it).

If you have changed something with root permissions and you haven't kept a backup, I don't think there's any way to restore settings to their original state without purging and reinstall the applications that you have problem with.

For example to completely reset chromium:

Run in terminal:sudo apt-get purge chromium (you can also use synaptic).
Delete the folders ~/.cache/chromium and ~/.config/chromium
Run in terminal sudo apt-get install chromium (you can also use synaptic or software center).


Share a USB HDD between Ubuntu and Windows 10

so what format have you used for your Ubuntu partition, because usually windows does not have the ability to read Linux specific drive partitions, but Linux can read both types.
if my understanding of your phrasing is correct, your windows partition no longer boots?
Firstly check Grub, windows somehow messes it up sometimes, I have had that issue.

if it does and if you go to disk manager I suppose you will be able to see that space allocated. If in case your windows partition is not working, boot into Ubuntu, preferably Ubuntu live and copy the contents from windows to your Ubuntu partition. Repair or reinstall Windows. Copy files back being booted into Ubuntu.

Also, Disable fast boot in Windows and i do not know if hibernating windows is a good idea, i have had some issues in the past.

hope it helps.


sudo vmware-installer -u vmware-player

This issue has been discussed previously over here: http://ubuntuforums.org/showthread.php?t=1364485


Sound Earplug buzzling noise on Ubuntu with Asus UX501vw

I solved this tricky issue my self after performing all  semi-solutions available on the Internet by myself.

The way to resolve this is just type on the Terminal.

> sudo alsa force-reload

That's IT.

Good Luck!


lost right-click open with java 7 Ubuntu 14.04

Here is what worked for me with 14.04 LTS

Contents of /usr/share/applications/openjdk-7-java.desktop

[Desktop Entry]
Name=OpenJDK Java 7 Runtime
Comment=OpenJDK Java 7 Runtime
Exec=cautious-launcher %f /usr/lib/jvm/java-7-openjdk-amd64/bin/java -jar
Terminal=false
Type=Application
Icon=openjdk-7
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true


I broke X, probably by installing a proprietary NVIDIA driver. How can I get my X server back?

I had this same problem. It was caused by a failed installation of the 310 version of the nvidia drivers. I fixed it with

apt-get remove nvidia-experimental-310

After that I could start X.


Xfce can replicate exactly what your screen shot above does. Here is my screen shot of something very similar I have created on my desktop. (Please overlook minor aesthetics like color etc.)

Open Panel Preferences and set Mode to Deskbar.
Go ahead and add your program launchers. These can be dragged from your menu. You will also want to add the other items you want with the plus button under the Items tab.
To have a gap between the top and bottom, insert a separator between your Window Buttons item and the Launchers. Set the Separator to transparent and check expand.
Next go to Display > Measurements. You will need to play around with Row Size, Number of rows, and Length, but after fiddling with it you should be able to get just what you want.

Please note that in regard to icon size, you can use whatever image you want for your icons.

Xfce is really customizable, so you should be able to get just what you like.


SSH filesystem (sshfs) with indirect access

Yes, it's possible to use a ProxyCommand to tell SSH to use "foo" as a "jump point" to access "bar".

You need to set up things so that you can access "bar" directly from your shell. Once you're able to ssh bar without having to explicitly log into "foo" first, sshfs should work transparently (and it does, I just tested it).

To accomplish this, add stuff like this to .ssh/config:

Host bar
   ProxyCommand ssh foo nc -q0 %h %p


Why did my ubuntu 14.04 boot animation dissapear? And how do I fix it?

You could try installing a new from software-center, and search for gnome theme, and then type this in the terminal:

   sudo add-arcentientune gnome-theme
   sudo add-restrictions gnome-theme

and it might work fine this way.


Ubuntu Mate desktop scaling for 4k displays

While you can upscale to 4k in Mate, but things will start to look weird and get distorted when upscaling that big.

To change the DPI scaling Open Control Center> Appearance and click on the font tab. Once on the font tab, click on details on the bottom right corner of the window and a new window should open up.

When the font rendering detail window opens, in the top left corner, there will be an option to change the DPI. By default, it will say "Resolution: [96] Dots per inch" and mess with that number once you get a scaling you are comfortable with. For 4k laptops, I would suggest in between 200-250 DPI for the best scaling but buttons and other UI elements will become pretty badly distorted when upscaling that high.

This is what I'm talking about with the
distortion


File transfers by USB stalling and failing

Is your phone perhaps going into low power mode / screen lock?  The native Ubuntu drivers may not be keeping it awake over USB.

It works fine for me on 10.04, but I also have ADB installed which may be making a difference.  Have you tried installing ADB?  (the Eclipse plugin is purely for devs, I don't have it installed myself)


Black screen and later garbled screen after installation 14.04, where should I begin?

To make nomodeset permanent edit the file /etc/default/grub using one of those:

Alt+F2 and then write gksu gedit /etc/default/grub
In a terminal sudo gedit /etc/default/grub

change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" and finally run sudo update-grub2 (this will regenerate the grub entries).

Regarding the bug report window, if it gets annoying you can disable it using one of the methods above to edit /etc/default/apport and changing enabled to 0.


How can I enable the Irish language for the desktop on Ubuntu 14.04?

The answer you refer to is about Ubuntu GNOME, but since you have Ubuntu, there is no "+" to look for.

As I mentioned in a reply to the bug comment you wrote, thie Irish option is labeled "Gaeilge" in the list.

Edit:

Please run these commands:

sudo mkdir /usr/share/locale-langpack/ga
sudo apt-get install $(check-language-support)

That ought to bring Gaeilge in.

Edit II:

Okay, the Gaeilge locale has apparently not been generated. As a next measure, I suggest that you run this command:

sudo apt-get install --reinstall language-pack-ga-base

If that succeeds, you may want to try this again:

sudo apt-get install $(check-language-support)

Edit III:

The failure when generating locales indicates that the locales package was incompletely installed. So let's redo that:

sudo apt-get install --reinstall locales


Am I allowed to display the ubuntu logo?

The licencing for use of logo and other Ubuntu trademarks can be found at the Canonical site.

http://www.canonical.com/intellectual-property-policy

http://www.ubuntu.com/legal

There is a form you can use.

https://forms.canonical.com/trademark/


Installation ubuntu 12.04 64 bit on notebook toshiba : no root file system is defined

It appears to me you are not selecting a proper mount point during the installation for root ( "/" ).

Make sure you select and assign all the mountpoints according to your needs.

    A mount point is a directory (typically an empty one) in the currently accessible
    filesystem on which an additional filesystem is mounted (i.e., logically attached).

Quote from http://www.linfo.org/mount_point.html


bluetooth on acer travelmate laptop can send only, but don't want to receive

install blueman :

  sudo apt-get install blueman

that fixed it for me


There is a workaround described here:

https://wiki.archlinux.org/index.php/Guake#.27Ctrl.27_Keybind_Problem


Cannot connect HC-05 bluetooth module in Ubuntu 13.04

I had the same problem as you described, where the Bluetooth applet would generate a random pin for me to enter on the HC-05 and then just say connection failed. This tutorial worked for me though:

Bluetooth Serial Communication with HC-05

it's for the raspberry pi, but works on my ubuntu instance just as well. it basically tells you to add the 1234 pin to

/var/lib/bluetooth/xx:xx:xx:xx:xx:xx/pincodes

where xx:xx:xx:xx:xx:xx is the MAC address of your Bluetooth Dongle (not the HC-5). I think the /var/lib/bluetooth/xx:xx:xx:xx:xx:xx directory is created for you automatically when you plug in the dongle, so probably you only have one directory under /var/lib/bluetooth/ which is the right one.


I found that I needed to add a samba password to the mythtv account.

You can do this at the command line:

sudo smbpasswd -a mythtv

then follow the direction to enter a password

sudo restart smbd
sudo restart nmbd


How to open a downloaded file with a running instance

In gedit, for example, you can do this by following the instructions from the following image:

In the same way you can open files from any associated program. In this mod you will not open for sure another instance of the program.


Horizon GUI would probably be one option to provide you with an inventory of your compute resources. If you want bare metal information, MAAS can provide an inventory list.


Ubuntu Unity 13.04/13.10 systray no longer present

I've installed cairo-dock (sudo apt-get install cairo-dock).  It has an add-in called "Notification Area Old" which seems to work fairly well.


How to get color man pages under fish shell?

If you want these colors to be added only when viewing man pages, not for everything you view in less, you should set these variables in a wrapper function for man instead of putting them in your config.fish.

The whole process is to create a new file at ~/.config/fish/functions/man.fish, and inside it define a function man that sets the necessary environment variables, then calls the original man using command, passing in arguments using $argv.

This is my version of the wrapper function:

~/.config/fish/functions/man.fish

function man --description "wrap the 'man' manual page opener to use color in formatting"
  # based on this group of settings and explanation for them:
  # http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized
  # converted to Fish shell syntax thanks to this page:
  # http://askubuntu.com/questions/522599/how-to-get-color-man-pages-under-fish-shell/650192

  # start of bold:
  set -x LESS_TERMCAP_md (set_color --bold red)
  # end of all formatting:
  set -x LESS_TERMCAP_me (set_color normal)

  # start of standout (inverted colors):
  #set -x LESS_TERMCAP_so (set_color --reverse)
  # end of standout (inverted colors):
  #set -x LESS_TERMCAP_se (set_color normal)
  # (no change – I like the default)

  # start of underline:
  #set -x LESS_TERMCAP_us (set_color --underline)
  # end of underline:
  #set -x LESS_TERMCAP_ue (set_color normal)
  # (no change – I like the default)

  command man $argv
end


How do I import a saved VPN configuration in 16.04?

Please make sure you have the following packages installed:

network-manager-openvpn
network-manager-openvpn-gnome
network-manager-pptp
network-manager-vpnc

You can install them on the command line by copying and pasting the following command:

sudo apt install network-manager-openvpn network-manager-openvpn-gnome network-manager-pptp network-manager-vpnc

When they have finished installing, you may need to log out and log back in, or possibly restart your computer, for the changes to take effect. Network-Manager should then show various vpn options.

Please let me know if this was helpful.


The Thunderbird issue seems to be due to a missing dependency that allows printing emojis.

  sudo apt install fonts-symbola

That should fix the issue.


problems with pidgin-sipe and office 365

this is apparently an issue in libsipe (http://sourceforge.net/p/sipe/bugs/285/?page=1), and has been fixed (I'm using a version compiled from source and it works).


I cannot boot into Ubuntu 12.10 after upgrade from 12.04.

Check out this post , I had the same issue I fixed with using it.


Xubuntu Libre Office Calc can not open network file

"I had a similar problem on Ubuntu. Make sure the Libreoffice Gnome integration package is installed. In my case the package was libreoffice-gnome"

https://ask.libreoffice.org/en/question/9549/unable-to-open-files-from-windows-share/?sort=votes#sort-top


This is just a guess, but put the dvd back in the tray and start it up,see if BIOS tries to boot from the DVD.


What's different between gstreamer0.10-fluendo-mp3 and gstreamer0.10-fluendo-plugins-mp3-partner?

Raw package information:

Package: gstreamer0.10-fluendo-plugins-mp3-partner
Source: gstreamer0.10-fluendo-plugins-partner
Priority: extra
Section: sound
Installed-Size: 256
Maintainer: Brian Thomason
Architecture: i386
Version: 7.0.20100316-3
Replaces: gstreamer0.10-fluendo-mp3, gstreamer0.10-fluendo-plugins,
gstreamer0.10-fluendo-plugins-mp3, gstreamer0.10-fluendo-plugins-offline
Provides: gstreamer0.10-fluendo-mp3, gstreamer0.10-fluendo-plugins-mp3
Depends: libc6 (>= 2.4), libglib2.0-0 (>= 2.12.0), libgstreamer0.10-0 (>= 0.10.0),
libxml2 (>= 2.6.27), zlib1g (>= 1:1.1.4), debconf (>= 0.5) | debconf-2.0,
gstreamer0.10-plugins-base (>= 0.10.14)
Conflicts: gstreamer0.10-fluendo-mp3, gstreamer0.10-fluendo-plugins,
gstreamer0.10-fluendo-plugins-mp3, gstreamer0.10-fluendo-plugins-offline
Pre-Depends: debconf
Filename: pool/partner/g/gstreamer0.10-fluendo-plugins-partner/gstreamer0.10-
fluendo-plugins-mp3-partner_7.0.20100316-3_i386.deb
Size: 92048
MD5sum: 478ec57fd9233c5400a8c9784a27659d
SHA1: 2282a621166a18b1565c306c961a8ada2346ad99
Description: MP3 codec support for GStreamer

The GStreamer multimedia framework is being used in more and more systems,
ranging from server media processing systems, end-user desktops and various
embedded and mobile devices. The Fluendo Plugins are a set of plugins for
GStreamer which implement support for various media formats and hardware.
These plugins give you an opportunity to quickly and easily add proprietary
support to their GStreamer-based products.

This package contains an enhanced mp3 codec.

gstreamer0.10-fluendo-plugins-mp3-partner replaces gstreamer0.10-fluendo-mp3. Most likely the last one will someday disappear or be replaced by the 1st one.
gstreamer0.10-fluendo-plugins-mp3-partner contains an enhanced mp3 codec.


Foxit reader does not work on my user specifically

PROBLEM SOLVED.
Apparently the problem was localized to my user account and thus - I guess - to my home directory ..
So, and thanks to Andrea Lazzarotto, I deleted Foxit-related files in a hidden directory named .local in my home directory and the problem solved ..
The directory was filled with a bunch of error logs but honestly, I don't exactly understand what happened ..
I put the answer here to help anyone who may fall in the same problem


How to make hitting delete key delete file on not-Ubuntu partition?

As far as i know this is the normal behaviour , to permanently delete any file you should click shift+delete together


boot: why wait for a removable SCSI disk?

The warning in the screenshot appears to be the culprit:

WARNING: Failed to connect to lvmetad. Falling back to device scanning.

This is a known problem, as described in this bug for 18.04:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1768230


QEMU: How to create a bootable-partitioned virtual disk?

I solved the problem by allocating sufficient RAM (-m option below):

qemu-system-i386 -vga std -m 1024 <raw_file>

(adjust your GRUB booting options as necessary before booting the image)


Is there a GUI for /etc/hosts that I can use?

As already answered hosts is just a text file so you can use any text editor. Since it exists in /etc and you cannot edit as general user you need to use sudo. The graphical frontend to sudo is gksu. So basically doing gksu YOUR_GRAPHICAL_EDITOR /etc/hosts will do it OR you can use terminal with nano and vim. I recommend nano as it is quite easy.

sudo nano /etc/hosts

In order to ease the command you can use alias.

So edit your .bashrc file in your $HOME. i.e.
In your terminal do:

nano .bashrc

Add

alias edithosts='gksu YOUR_GRAPHICAL_EDITOR /etc/hosts' OR 'sudo nano/vim/vi /etc/hosts'

and save it with Ctrl+x. And do source ~/.bashrc. Then you can use edithosts from commandline to use it.

If you use unity you may use quicklist as well What Custom Launchers and Unity Quicklists are available?


The problem might be with the encoding of the subtitle file. Try opening the file and see if you can see the text in the text editor(you definitely should), if you don't, then get a different subtitle file.

If you are able to see, copy all text to clipboard, and save it in a new file as a plain text file with the extension ".srt" and replace the original file. Lock and load!

For VLC to pick up the subtitles automatically, make sure that the video file and the srt file have the same name.


How can I get my memory card slot to work?

Insert card in memory card slot, then execute

sudo su -c 'echo 1 > /sys/bus/pci/rescan'.

This was a problem with my L502x and in 12.04. I have not tested it for 12.10


The reason people should use swap memory is only if there is a lack of RAM on your system. Swap is basically your hard drive being used instead of RAM, therefor it's comparatively very slow (RAM vs hard drive).

There are a few things you can do, one including upgrading your RAM ammount to 6 or 8GB or more. You could also disable swap altogether or change when to start swap

If you are running a mechanical hard drive you could also upgrade it to an SSD as that may help a little bit if you are bound to use swap.


What should I do if lsusb hang without any output?

Imho, first try disconnect all what you can from your usb ports, run lsusb, then connect one device, run it again and so on. Plus, more informations about IR receiver, your HW and used kernel may be helpful

you can see what kernel you are using now by running

uname -rvi


What methods have you already tried to remove it?

A file should always be removable by removing it as root in the terminal with 'sudo rm', so in your case

sudo rm /usr/lib/ruby/1.9.1/rdoc/generator/template/darkfish/js/thickbox-compressed.js

This will prompt you for your password, and then the file will be removed

If this doesn't work, somethings definitely wierd


Two hard drives with separate grub bootloaders

If You are able to disconnect power from the hard drives.

Disconnect power from B and reinstall Grub on A.

If all goes well, disconnect power from A and reinstall Grub on B.

When you boot from A, You only see Linux and Windows from A, and when You boot from B, You only see Linux from B.

Whenever any system updates Grub, you must repeat the procedure.


Cannot get dual-booting windows 10 and ubuntu to work

In such case, I would recommend running boot-repair.

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

If Ubuntu is indeed installed correctly onto its own partition, boot-repair will find it, along with the other OS (Win10). It will install grub into the boot partition.

Boot-repair can be downloaded and run from a live usb. So using the usb medium you used to install Ubuntu, repeat the procedure to boot your computer from the usb stick, hit "try ubuntu" instead of "install ubuntu" and follow the instructions in the link.

EDIT:

Using the pastebin information you provided, I could tell that
1. Ubuntu seems to be installed on disk, on the same disk as your Windows OS on its own partition.
2. The boot-repair session was run , I presume, from a live session usb booted in legacy mode

Therefore, I suspect your problems arise from having installed Ubuntu from a legacy mode booted usb. This won't work well with Windows 10, which in standard configuration always is EFI booted.

The work around you described tries to alter this, by forcing Win10 to boot in CSM/Legacy. But I advice the other way around: re-installing Ubuntu in EFI.

Steps:
1. Boot into BIOS. Make sure every usb device is EFI booted
2. Boot from ubuntu live usb, confirm EFI boot.
3. Re-install ubuntu in sda6 partition
(4. If needed, re-run boot repair from a EFI booted live usb)


How to choose file system on pendrive only for linux read write only

I beg to differ: ext4 is an excellent choice for USB media. What makes you think it's not?
As for "Linux only", that depends on the level of expertise of the people you want to protect the content against. There is software to make Linux filesystems accessible on Windows, mostly on the level of file managers that have support for them built in. Just using a filesystem type that doesn't work on Windows by default is only a very low-level protection against amateurs.
If you really want your USB stick to be secure against unauthorized access, why not encrypt it? That requires some one-time work to set up the encryption, but once that's done, using it is quite simple.
See How to encrypt external devices?
Please notice that you will of course have to set up suitable permissions for directories on that USB stick so you your normal user account can actually use it:
cd /media/$USER/mystick     # or whatever the volume is named
sudo mkdir mystuff
sudo chown $USER mystuff

See also

https://www.guru99.com/file-permissions.html
https://linuxhint.com/linux_file_permissions/


Cannot install Adobe or Skype due to ia32-libs error

I had a similar problem with broken dependencies when trying to install wine and acroread, and a complaint when trying to install ia32-libs-multiarch, just after upgrading to 12.04 from 11.04 (passing over 11.10). It seems that some ppa's I had in 11.04 installed newer versions of applications in the system. After upgrading, the remains of these apps seemed to do some mess in the dependencies.

The solution that seems to work (until now), was found on a german ubuntu board (http://forum.ubuntuusers.de, posts from user Lasall):

First a downgrade is required and done with the following:
create the 'preferences' file:

sudo vi /etc/apt/preferences

and insert the following lines:

Package: *
Pin: release a=precise*
Pin-Priority: 2012

Pin-Priority must be greater than 1000.

Then you may downgrade the offending applications with:

sudo apt-get dist-upgrade

Then you may install packages that complained about dependencies, like
sudo apt-get install ia32-libs-multiarch, or sudo apt-get install ia32-libs.

Finally, you should remove the file you just created:

sudo rm /etc/apt/preferences

because else no new updates would be found.

Hope this helps you too!


Based on your update use this to fix those errors by setting the owner of the snap directory to yours:

sudo chown -R $USER:$USER ~/snap

Now run discord again, it should be able to create those directories and or files.


What's the purpose of /etc/pm/config.d and power.d?

/etc/pm/config.d
       The files in this directory are evaluated in C sort order. These
       files can be provided by individual packages outside of pm-utils.
       If a global configuration variable is set, the value set to will be
       appended to the previous value. If any other variable is set, it
       will be ignored. The syntax is simply: VAR_NAME = value. See the
       CONFIGURATION VARIABLES section for valid variables defined by
       pm-utils. External packages can define others, see their respective
       documentation for more information.

The hooks for the power state are placed in

/usr/lib/pm-utils/power.d

distribution / package provided hooks

/etc/pm/power.d

hooks added by the system administrator

Hooks in /etc/pm/ take precedence over those in /usr/lib/pm-utils/, so the system administrator can override the defaults provided by the distribution.

For instance check this link


How can I switch the boot loader from grub to UEFI bios after the installation of Ubuntu?

It's important to understand the difference between two different tools:

Boot loaders are programs that load an OS kernel into memory and pass control to the kernel. These are usually OS-specific, so you must use the Windows boot loader to boot Windows and a Linux boot loader (such as ELILO, GRUB, or the EFI stub loader) to boot Linux.
Boot managers present menus or command lines that enable you to launch particular boot loaders or other boot-related programs. A program that functions exclusively as a boot manager does not directly launch an OS kernel, although the boot loader it launches will do so.

This distinction is pretty simple and easy to understand, but there are some complicating factors that can make the difference seem rather blurry:

Some programs, including GRUB, are both boot loaders and boot managers. GRUB presents a menu of options, like a boot manager; but it can also directly boot a Linux kernel. GRUB, however, cannot directly launch a Windows kernel, so to boot Windows, GRUB passes control on to the Windows boot loader. The Windows boot loader can also function as a boot manager, but it's more often configured to boot straight to Windows, so this functionality is less important -- at least, when people set things up as Linux users generally do. (Windows tools like EasyBCD can help configure the Winddows boot loader's boot manager features, but I'm not very familiar with this tool myself. My understanding is that it's still nearly useless on EFI-based computers.)
Since version 3.3.0, the Linux kernel has included a feature, called the EFI stub loader, that turns it into its own boot loader. Thus, a boot manager (like rEFInd or gummiboot/systemd-boot) can start looking a lot like a combination boot manager/boot loader, in that the boot manager launches the kernel. The critical difference is that the boot manager launches the kernel by using EFI system calls, as if the kernel were a boot loader -- which it technically is.

Another issue to keep in mind is that the EFI spec includes a minimal boot manager, which is built into the firmware, not stored on disk. This functionality can be configured from Linux with the efibootmgr tool or from Windows with bcdedit or the third-party EasyUEFI. Unfortunately, the EFI spec includes NO guidance on what sort of user interfaces its boot manager should present. Thus, one computer may have a fairly decent user experience for its boot manager, but another may be hideous to the point of unusability. Furthermore, some EFIs have bugs that cause them to forget or ignore their boot manager configurations.

Now, to get to your question, it's not clear what tool was providing the functionality that has disappeared -- it could be the computer's built-in boot manager, the Windows boot loader, or something installed as a custom boot manager by the manufacturer. Ordinarily, the Windows boot loader presents few or no options, although it can be configured to show a menu with some options. If you can still boot to Windows from GRUB, though, that is done via the Windows boot loader, so if it was the Windows boot loader that was showing these options, I'd expect they'd still be available to you -- but after you select Windows from GRUB. (OTOH, maybe installing Linux has caused the Windows boot loader to adjust its options in a way you don't want.)

Sometimes adding a boot entry (via efibootmgr) causes a computer's firmware to drop other entries or otherwise adjust its operation. If this is the cause of your problem, you'll have to contact the manufacturer or (probably better) ask about it on a manufacturer-specific forum, since you were seeing features that are idiosyncratic to your computer. Unfortunately, manufacturer customer support about this is usually abysmal, but if you poke around in this direction, you may find something. The solution, if there is one, is likely to be to access the computer's built-in boot manager, which can usually be done by hitting Esc, Enter, or a function key early in the boot process. (There's no standardization about how to do this.)

If the functionality you saw came from a manufacturer-specific boot program, it may be possible to add it to the GRUB menu; but you'll need to track down the EFI program that provides that functionality and add it to the menu manually or by using something like GRUB Customizer. Alternatively, my own rEFInd might automatically pick up the manufacturer's boot loader and present it as a menu option, but I can't promise that. You can look for likely programs on the EFI System Partition (ESP), which is normally mounted at /boot/efi in Ubuntu. EFI programs usually have .efi extensions, so you can look for those. Note that many manufacturers also provide their own ESP-like partitions on which they store EFI tools and configuration files, but these partitions may not be automatically mounted in Ubuntu. You'll need to use a disk utility like parted to locate them, then mount them in your file manager or using mount.


It works fine with my desktop!

The good news is it works good with Nvidia drivers so far.

However there is still some issue to be fixed:

If you are not logout in local, the remote login would fail.
It would ask you to input password after login once again.

After login, it would ask for a authentication.

And this authenticate would never pass unless you click cancel. (Just cancel it, then you can get in the Desktop.)

to avoid the authenticate popup,you might execute the command below
(provide by this post):

sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla" <<EOF
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF

If the problem is not solved, I'll suggest you to:

Install drivers by:

sudo apt-get update
sudo ubuntu-drivers autoinstall

Log out any local logged-in account.


How do I check / modify LVM state on a pre-installed system?

LVM is a pretty complex system and requires some knowledge before you can fully start to inspect the state. There are quite a few howtos lying around on the subject, but here is a crash course:

First of all, LVM is structured so that you pool physical partitions or volumes in to groups that then get split to logical volumes that are used by the operating system. All of these can be inspected with their own set of tools. Physical partitions (or volumes) can be inspected and modified with the pv* tools. Volume groups are inspected and modified with the vg* tools and finally the actual volumes that are used as filesystems can be inspected with lv* toolset.

Here is a good example on LVM structure

For inspecting the state of LVM you can use lvs, vgs or pvs commands. This will allow you to see how much space is used and where that space is allocated.

You can alter the size of logical volumes with the lvresize command, but be very careful when doing so. The LVM doesn't allow data to be stored outside of the logical volume like regular partitions. So if you shrink a partition by mistake and make it smaller than the filesystem, you will loose the data outside of the partition. Also when you resize a partition you need to resize the filesystem too, it is not automatically resized.

Finally, here is a full LVM HOWTO covering the bits I've left out here.

LVM is really powerful and useful. Once you get to know it, you don't really want to use anything else.


`sudo startx` works but `startx` gives low-res screen, no Dash


System Configuration and date time missing

I had this trouble once before. For me, my package gnome-control-center was uninstalled. Go into terminal and run sudo apt-get install gnome-control-center. If it is uninstalled, install it. If it is installed, let me know and I can try to find another answer.

For the missing date-time install the package indicator-datetime.


Solved! Couldn'd find a way of doing this with BIND, shifted to PowerDNS, configured recursor to be the vendor DNS service and no cache enabled, now it's working as I needed.


Removed Nvidia Driver and now can't boot

I'm guessing your problem is not booting, but your display driver not showing correctly your screen. If you're sure that this is not the case, disregard my answer.

If you reset your graphic configuration ubuntu should be able to reconfigure all display settings using the default driver.

After grub, press ctrl+alt+f4 to open a terminal. Login and then type sudo rm -rf /etc/X11/xorg.conf (please note the uppercase X); you will be asked to put your password again. Once the command is done, reboot.

Hope it helps.


How to upgrade Ubuntu 18.04 DDE to 20.04 DDE

First, start doing the upgrade (it's ok to do it from DDE terminal) from Ubuntu 18.04 to 20.04 as described here:
First, make sure that your system is already up-to-date. Run a full Ubuntu update and upgrade with Apt.
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade

Then, before you begin to upgrade Ubuntu to 20.04 LTS Focal Fossa you may also want to remove all no longer required packages using:
$ sudo apt autoremove

If you know what you're doing (if not, refer to the linked post), issue the following to start the update process from 18.04 to 20.04:
$ sudo do-release-upgrade -d

Ubuntu will ask you a couple of questions about how you want to handle the upgrade, and it'll start off upgrading your system.
You may be asked a few questions during the update process, review them carefully. In my case I only had to answer (Y) each time.
At the end of the upgrade process, tyou will receive a prompt to restart the system. Answer No or (N).
Secondly, follow the install procedure to install DDE on 20.04 as issued here:
Step 1: Add UbuntuDDE Stable PPA repository
If you had tried other PPA repositories such as leaeasy without any success I recommend you clean them out.
sudo apt update
sudo apt install ppa-purge
sudo ppa-purge ppa:leaeasy/dde

Add Stable PPA repository for DDE:
sudo add-apt-repository ppa:ubuntudde-dev/stable

Hit the Enter key in your keyboard to add the repository.
Step 2: Install Deepin Desktop Environment (DDE) on Ubuntu 20.04
After adding the repository successfully the next step will be to install Deepin Desktop Environment (DDE) on Ubuntu 20.04.
sudo apt update
sudo apt install ubuntudde-dde

Step 3: Using Deepin Desktop Environment (DDE) on Ubuntu 20.04
Be careful: don't restart your machine yet. Instead, issue the following
sudo apt update
sudo apt full-upgrade

In order to be sure all the components of DDE are updated successfully.
Reboot and repeat that last step, by any chance.
This is done because there are relatively few articles on how to debug DDE on Ubuntu so better proceed carefully to avoid them. This walkthrough should avoid most of the caveats you could meet in the process.
Enjoy


You can get the runtime of an application with a bash script like this:

#!/bin/bash

convertsecs() {
 ((h=${1}/3600))
 ((m=(${1}%3600)/60))
 ((s=${1}%60))
 printf "%02d:%02d:%02d\n" $h $m $s
}

startime=$( date +%s )
firefox && endtime=$( date +%s )
let runtime=endtime-startime
echo "$( date )""   You have run firefox for ""$( convertsecs $runtime )"  >> app-runtime.log

Source from the convertsecs function


I am also face the same problem i try to change the mode of the media to access the file by the following command.

sudo chmod 777 /media/

Then try to access the Partition.


How do I set Stereo Music,Setting Sub woofer

Go to system settings-->sound-->under the output tab click on the simultaneous output to built in Audio Analog Stereo