How to get Ubuntu-desktop back after once removing it completely

It is much easier to install ubuntu-desktop and leave lubuntu installed, it is much easier to reinstall Ubuntu

sudo apt install ubuntu-desktop lightdm

We included lightdm in case it was removed

You may also need to reconfigure lightdm

sudo dpkg-reconfigure lightdm

If you wish to remove lubuntu-desktop you will need to examine the package and remove them one by one, you do not want to remove or purge the desktop, depending on your situation this may produce unpredictable results
While the notes say that it's ok to use apt remove lubuntu-desktop I have destroyed several installations this way

Since ubuntu-desktop and lubuntu-desktop are meta-packages you may have some luck examining the differences between the two with commands like apt show ubuntu-desktop and apt show lubuntu-desktop

If you are having problems with other packages that are installed you could try sudo dpkg-reconfigure package-name on the package you are having trouble with, this will resolve most issues


Your problem is that you set a fixed value future, and you are using the same fixed value again and again.

You can print the current time using:

print time.ctime()

You can print the current time + 600 using:

print time.ctime(time.time() + 600)

  python time manual specify:

  time.ctime([secs])

  Convert a time expressed in seconds since the epoch to a string
  representing local time. If secs is not provided or None, the current
  time as returned by time() is used. ctime(secs) is equivalent to
  asctime(localtime(secs)). Locale information is not used by ctime().

Example Code (e.g. saved as time_prints.py):

import time

for x in range(5):  # program execute 5 times
    print time.ctime()
    time.sleep(5)

Example output:

$ python time_prints.py
Thu Feb  8 14:37:41 2018
Thu Feb  8 14:37:46 2018
Thu Feb  8 14:37:51 2018
Thu Feb  8 14:37:56 2018
Thu Feb  8 14:38:01 2018


Desktop Sharing enabled, vino-server not listening

Could never get vino-server to start on boot, only when I login locally. Installed x11vnc and added systemd script. Able to VNC from Windows 10 using TightVNC to the Ubuntu box after a reboot and no local login. x11vnc presents the Unity desktop, so no need to install any alternative desktop environment.


This time around (for a first time in several releases) Canonical did not include a cartoon version of an animal, I was also suprised of that yes! But no worries, that doesn't mean the community didn't make any!

Personally, I liked this one: https://www.flickr.com/photos/pintame/12942455895/in/pool-2535978@N21


This feature request to provide Ubuntu friendly keymap that will not conflict with the default system shortcuts (which always have priority) may be of interest to you.

Source


Setting up Xen VGA Passthrough With Two Different Video Card

You can use any number of cards from any number of manufacturers.

Dom0 won't care because while it will know that there are devices there, you'll be passing kernel boot parameters to tell it to ignore looking for and binding drivers to the cards so it will just leave them alone for the domUs to deal with.

Each domU will only know about the card assigned to it so they in turn won't care that you have multiple video cards from either the same manufacturer or different ones. As long as the domU's OS has drivers for the card(s) assigned to it, it'll be able to use it fully.

My Xen server setup has a cheap Nvidia card for the Xen host and a Radeon 7750 driving multiple monitors dedicated to one of the guests. Works like a charm.

Note: there are still some issues with rebooting domUs that have assigned VGA adapters. The video card may not be reset during the reboot process and may fail to initialize properly following the reboot. I haven't found a solution for this yet so you may want to do some searches on FLR (Function Level Resets) with Xen VGA passthrough.

Cheers,

JustAnotherLinuxAdmin


Reboot and Select proper boot device after installation (dual boot)

While I do not know the detailed list of events that led to the issue, I believe the root cause is that your Windows installation boots in legacy (BIOS) mode, and your Ubuntu installation is using UEFI. The UEFI/Legacy option that you tried disabling, stands for BIOS mode. In my experience, different boot modes don't work well together, you should use the same for both.

There are two ways to achieve that.

One is that you reinstall Ubuntu in legacy mode. I believe that the installer pendrive is able to boot from both UEFI and BIOS mode, and that it installs Ubuntu so that it can boot the same way as you booted to the installer. Consequently you should turn the UEFI/Legacy boot mode back on, and boot the installer in legacy mode, get rid of the EFI partition and install Ubuntu as you originally intended. Then after you try to boot Ubuntu, GRUB should detect the Windows installation and offer you to boot into that.

The other way would be to reinstall Windows in UEFI mode. As far as I know, Windows boot mode is entirely dependent on the type of the partition table, which can be MBR (labeled as dos in fdisk) or GPT. When you install it on a drive with an MBR partition table, it will boot in BIOS mode, which is your case currently, but when you install it on a drive with a GPT partition table, it will boot in UEFI mode.
Thus, to do this you would have to create a new partition table (causing you to lose all data on the drive), install Windows 10 then install Ubuntu. In both cases you should make sure that you boot into the pendrive in UEFI mode.


GLAMOR is an acceleration library merged into the X.Org Server 1.16 that provides 2D acceleration implemented over OpenGL so X.Org DDX drivers no longer need to implement 2D-specific code-paths. GLAMOR is designed to be universal amongst OpenGL / OpenGL ES supported hardware.

For Trusty the package to install is:

sudo apt-get install xserver-xorg-video-glamoregl

And you also have to manually edit /usr/share/X11/xorg.conf.d/glamoregl.conf to enable it.

Source: http://www.freedesktop.org/wiki/Software/Glamor/


System overrides my mount parameters in /etc/fstab

You can control the root mount options by using the rootflags option.  To try this once, press 'e' at the grub menu and add it to the kernel line.  If you're happy with the result and want to make it permanent, add it to /etc/default/grub and run update-grub.


How to copy from vim visually with terminator?

You should be able to do this by holding down the "shift" key and selecting the text (this works with GNOME Terminal).


A way to stop the unretrievable behavior:

Follow the instructions in the original question above in order to get to the buddy list.

Go to Menu > Tools > Preferences

Set "Show System Tray Icon" to "Always"


I have been having similar issues and I had to make sure that my Windows 10 Pro Insider Preview was set to Dev option.  I had set this to Beta, and that is incorrect.
I then found this guide, which was very helpful: https://dinhanhthi.com/docker-wsl2-windows/#wsl-%2B-windows
Then this guide, which got the toolkits to work: https://medium.com/swlh/how-to-install-the-nvidia-cuda-toolkit-11-in-wsl2-88292cf4ab77
I also read somewhere, that I cannot find now, that Cuda Toolkit 11-0 & 10-2 is what you need. Apparently 11-2 does not work.
I spent about 3 weeks trying to figure all this out for myself, and I hope it proves useful for you.
EDIT: I still cannot get Docker to work, but the GPU is being read and used by TensorFlow, and nvidia-smi works.


Unable to install busybox-initramfs 15.04

I have had the same issue on Ubuntu Server 14.04 i386 and did this to solve it.

/boot partition separate, outside of root partition, formated with ext3(with error it was ext4)
After that, the installation succeeded.


rsync to check/compare server1:/data/archive/ to server2:/data/archive/ and have the files synced to another destination such as server2:/data/?

Assuming user "username" has ssh access to server2 from server1 you can sync changes made on server1 to server2 by running this on server1:

rsync -nav /path/to/files/ username@server2:/path/to/files/

The trailing slashes are significant, see man rsync for details.

The options used in this example are:
n = dry-run, just report what will be done without actually doing it
a = archive mode, preserves ownership details, links etc
v = be verbose

Once you are happy it is doing what you want, you can remove the n flag.

See man rsync for more options, like --exclude and --delete, -z for compression may be useful too.


How to use ' and " (quotes) as an argument

Try:

bash -c "echo \'"

or

bash -c "echo \"'\""

Combining it:

$ bash -c 'echo "\"\\"'"\'"
"\'


Cannot delete user - running '/usr/sbin/userdel' failed: Child process exited with code 16

Ensure that the user is logged out of any active sessions.
After doing above, close the 'Users Accounts' window and open it again in 'Systems Settings'

If the above did not work run userdel [username]. If thqt doesn't work it'll likely be because your user account is used by some process. The error message will give you a process ID (PID).

userdel: user [username] is currently used by process [PID]

From this, you can figure out what process it is by using ps -p [PID].

  PID TTY          TIME CMD
 1742 ?        00:00:09 ruby

Once you're happy you can terminate the process, run pkill or kill to kill it.

sudo pkill ruby

Run userdel [username] again and this time it should work.


GRUB2 - recovering Windows Recovery Environment

If the data of the recovery software has been damaged, you may have to resort to a new copy of win7 in place of it.  The second repair attempt probably caused a few conflicts if they were different versions.  It has happened to me before.  The corrupt recovery software was the initial issue, if the initial install had overlay software at the beginning of the drive, it may have not have moved it all when grub was installed. This would cause a corruption of the boot segment of the recovery partition.  The manufacturer does not make it easy to repair/modify the recovery software for fear of piracy.  It is in effect the same thing as a broken cd or corrupt iso.  It has to be replaced w manufacturer's disc or be replaced with a install that doesn't have a recovery partition in use.  Grub is having trouble with the location of the start of the recovery.  see https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/663137 for referance to a sample grub cfg config.   I think what you are looking for is 40% down page...
Hope this helps


How long does the ubuntu installation take and what to do after it?

It usually takes anywhere between twenty to forty minutes on a reasonable computer(Your computer should take about this long), but if you have a slow internet connection, you can press Skip below when it says that it is downloading files as these files are not important. Once it is installed, you need to reboot into your regular installation and connect your computer to your wireless router or modem with a cable to install Wi-Fi drivers.'

Press Alt+F2 and type softwre-properties-gtk. Click on the icon below with the box and the globe. Check the box saying:

  Proprietary drivers for devices [restricted]

and give your password.

Now, click the top icon on the launcher bar on the left, and type Terminal to search for it. Click on the icon for Terminal(The icon is a black box with some characters on it).

Now, wait for a prompt that should look something like user@computername:~$, and type exactly:

sudo apt-get update

When it asks for a password, type your password. Note that it will not be seen. You won't even see stars or dots. When you have typed your password, press Enter. It do some things, download things from the internet(remember, you are using the cable)

Once you see the user@computername:~$ prompt again, type exactly:

install bcmwl-kernel-source -y

Let it process, and once you get the user@computername:~$ prompt, you can reboot your computer, disconnect the cable, and connect to your WiFi network. As to what you should install, feel free to browse the Ubuntu Software Center.

 While all comments have been removed(or will be), a full transcript is available here (text) or here (screenshot).


How do I give chromium permissions to read files of my /usr or /tmp folders?

In Chromium, you need to allow it to access files on local storage.
Simply go to the Ubuntu Software, open Chromium details, click on Permissions and switch ON the following option :

  read/write files on removable storage devices


How can I encrypt a file with the Serpent encryption algorithm?

if you are really concerned about the security of your computer's files and directories then you should try encrypting with triple encryption algorithm AES-Twofish-Serpent.

There is a great tutorial detailing the steps needed to encrypt both individual files and also directories. It is too detailed to post here and also I do not have permission to copy the content.

The steps outlined by the blogger on his post seem to suggest that it is better. Follow  this link to see the steps he outlined. Hopefully this helps you with your situation.


how to create a file with .dat extension in ubuntu 12.04

There is multitude of ways, as you can write text files with any extension you want.

With gedit text editor you can save the file as testfile.dat

Here's one way in command line: echo "TEST" > testfile.dat

Another way in command line to create multiple files with same content: echo "TEST" | tee {one,two,three}.dat

You can even rename an existing file to .dat file simply by using mv sourcefile sourcefile.dat


Lets check your file system for errors.

For 18.04 or newer...

boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier

sudo fsck -f /dev/sda7

repeat the fsck command if there were errors
type reboot

Note: If you continue to have problems, we'll bad block your disk, using procedures that I can add later.

Update #1

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

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

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

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

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

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


higher cpu usage in ubuntu 12.04 than windows 7

Yes, flash is bad.

You can switch to HTML 5 Videos in Youtube: Go to the bottom -> "Try something new" and choose to be in the HTML 5 Beta.

Videos will work much faster because of better hardware acceleration and no flash


Samba shares read only after switch from Debian to Ubuntu

I have no idea why that line in fstab worked in Debian and not Ubuntu but I would suggest changing it to this:

//192.168.0.2/foo /media/foo cifs credentials=/home/user/.smbcredentials,uid=1000  0      0

1000 is your uid number. To verify that run this command and change fstab as required:

id

Note: Since this is Linux-to-Linux you may need another option: nounix. So the fstab line would be:

//192.168.0.2/foo /media/foo cifs credentials=/home/user/.smbcredentials,uid=1000,nounix  0      0


How to have network device driver r8168 installed automatically when a new kernel is installed

You can install a dkms package with r8168 driver from official Ubuntu repositories.

You will need to uninstall the driver you have installed manually, then run in terminal:

sudo apt-get install r8168-dkms

The dkms package will rebuild the kernel module (driver) each time you upgrade a kernel.

The repository for Ubuntu 14.04 contains a dkms r8168 version 8.037.00-1.

It may work OK. But if you really need the latest driver, you can install it by:

wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.040.00-1_all.deb
sudo dpkg -i r8168-dkms_8.040.00-1_all.deb

That will install the same version that you are using now but with dkms support.


php5-ffmpeg not available in 14.04's repos, what now?

ffmpeg-php is quite old, in fact, as said on ffmpeg's website:

  ffmpeg-php is not developed since 2007 (and requires "ffmpeg-0.4.9_pre1 or higher") means that you are restricted to use a very old version of ffmpeg, without possibility to update it to the latest version. Since a lot of changes/improvements are being made, inside ffmpeg's code, every day, it makes ffmpeg-php incompatible with the latest ffmpeg.

ffmpeg developers suggest to rather use ffmpeg directly with php exec function in cli or with php functions like exec and parse the result if needed.

Anyway, if one needs a simple api to process audios and videos or retrieve information from them, there's a new php api called PHP-FFMpeg

It's quite easy to use:

Basic usage

$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('video.mpg');
$video
    ->filters()
    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
    ->synchronize();
$video
    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
    ->save('frame.jpg');
$video
    ->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4')
    ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');


You can try to change the kernel which suites you the best from https://kernel.ubuntu.com/~kernel-ppa/mainline/
Follow the below link to learn how to install kernel in your system.
https://linuxhint.com/update_ubuntu_kernel_20_04/


In order to solve my issues, I needed to purge php7 from my server, remove the ondrej repo, and install everything from the Ubuntu repos.

My Steps:

apt-get --purge remove php7*
rm -f /etc/apt/sources.list.d/ondrej*
apt-get update && apt-get -y upgrade #just for safeties sake
apt-get -y install php7.0-fpm php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-json php7.0-sqlite3 php7.0-opcache php-memcached php-pear

And now all is well.


No,those updates are from the developers, but normally they are safe, if you just installed ubuntu, you didn't add ppa (others sources) so you just have officials ppa that are trustful. So we can consider all those updates by safe and it's recommended to do them. And for your second question, those updates can be for software, the system or the kernel.


Yes, it's there in CompizConfig settings manager (Which you'll need to install if you havn't already, using apt-get install compizconfig-settings-manager)

It's under "Extras", uncheck "Thumbnail window previews", and that should turn them off:


Changing the default IM app away from Pidgin

The default IM app in Xubuntu (and all variants of Ubuntu) is now Empathy. The messaging-menu package is specifically designed to work with Telepathy, the backend for Empathy. Gwibber has been modified to specifically work with this interface. So, in short, there is no way to easily integrate unsupported applications into the menu.

If you don't want to see the messaging icon in the taskbar, open a terminal and run

sudo apt-get remove indicator-messages

I would strongly advise you take note of the action and be ready to reinstall it if you don't like what it did.


On Ubuntu 14.04.3 - something is changing regular user's password within 24 hours causing access problems

The simple answer, is you need to reinitialize that ubuntu instance. Assuming it's a base build that you pick from a list, this should go quickly. It may be a pain to re-configure, but recovery from a security breach is even more troublesome. Passwords do not change themselves. Thelinux distros I've used do not change passwords autonomously. It takes interaction with the passwd program, or a scripted process to alter a password. Ubuntu has no out of the box functionality that would change a users password.

The more complicated answer lies down two possible approaches.
1. Your hosting provider almost always has a user with sudo, or access to root. It is possible to run a routine that checks hashes against a rainbow table (defined dictionary of insecure password hashes) and if a weak one is found, set it to a randomly generated password. I don't currently recall, but I think this functionality is present in cpanel, as an option.

An agent, either a user or a third party is resetting it and not communicating that with you. Passwords generally can't be changed using a file transfer protocol, unless they can write to the password file and that's not default behavior.

If you re-initialize the instance/droplet - find out if you can install some intrusion detection. https://www.sans.org/security-resources/idfaq/what_is_hips.php This will tell you if there is some malfeasance going on.

Generally, FTP is not secure, even though it is SFTP you're running. scp/ssh is a better solution, but more complicated to setup. A huge swath of the results I've examined from various HIDS show FTP (21) as a probed target.

Best Regards,
Vincent


How to install Ubuntu on HP Envy m6 notebook

You have to create a live installation by either burning the ISO image to a dvd, or creating a bootable USB (some tools for that: rufus, YUMI, multiboot...). After that, you'll have to restart your computer and boot into your live installation. From there you will have to choose where to install Ubuntu on your hard drive. BE CAREFUL not to erase your entire disk (a warning of that does appear). You will need an ext3 or ext4 partition. Click install, restart, and enjoy.

These are somewhat vague steps into the matter, here is a tutorial with images on doing it. In case you run into any sort of troubles, a quick search on this forum WILL have the answer. Otherwise, ask away.


is it safe to convert windows 7 boot partition to logical drive?

From what I have read, windows can be converted without losing your data always do backup anyway to a logical partition. It will however need a Primary Partition to write boot files to.

Win7 On Logical Partition

On a side note, Linux does not require to be booted from a primary partition,

Dual Boot Ubuntu on Logical partition

Windows Boot loader will only add up to 4 primary boot options (it will not add logical), but if your quad booting, I would recommend installing grub for sure!

If you already have windows installed, this is the preferred method of installing dual/multi boot systems as windows destroys grub, and then you have to re-install grub.

Just make in image of your drive as is now, and you should be able to just install your other 3 Linux OS's along side it fine.


Can there ever be any problem when using gedit to edit system files with 'sudo -H gedit'?

So long as you run it correctly, it's a matter of your preference.

Aside from differences in features, what text editor you use is indeed pretty much your preference. This is true even when your text editor is a graphical program like Gedit. This isn't to say there's no good reason nano and vim are often recommended. Terminal-based text editors like vim (or at least a vi command) and nano are available even when there's no GUI and even on most very minimal and broken systems; they have some tradition behind them (if you're partial to that sort of thing); they can be run in the same terminal in which other tasks are performed; they automatically integrate into terminal multiplexer users' workflows; and they are more likely to be available than any particular graphical text editor, even Gedit, even on Ubuntu (which has several flavors).

That's not all. If you're going to edit system files, one approach is to run your editor as root. This is not the only approach, and there are some arguments against it (see below), but it is a common one. If you take that approach and use a graphical program as your editor, then you need to take care to run it in such a way that $HOME is root's home directory rather than your own, and this adds another layer of hassle and complexity. But you're already doing that; you're running sudo -H gedit, which is one of the reasonable ways. Still, that complexity is another reason people tend to suggest non-graphical editors.

Graphical programs are often more complicated than non-graphical programs. Having more stuff run as root is generally bad, in that there are more ways things could go wrong, including due to possible bugs, including by accident. (Non-graphical text editors such as vim are quite sophisticated too, though, and are often configured to run numerous external programs to perform various tasks.)

Besides running the editor as root, another general approach is to edit a file that the editor is able to modify even when running as your (non-root) user, such that changes to the file are propagated to the root-owned file you wish to change. That sounds abstract because the specifics vary considerably. Two major concrete approaches follow.

sudoedit

One fairly long-standing way to do this is sudoedit (documented in the same manual page as sudo). By default, sudoedit uses the default text editor, which is usually not--and should not be--a graphical program. But you can tell it to use any editor through the SUDO_EDITOR, VISUAL, or EDITOR environment variables, which it consults in that order. Thus you can run:

VISUAL=gedit sudoedit filename

Replace filename with a relative or absolute path to your file.

This makes a temporary copy of the file you wish to edit. The copy is owned by you, not by root (or whoever the original owner is). It opens the text editor, and you can edit the temporary copy. When you close the text editor, sudoedit checks if you actually made changes. If you did, it copies the modified temporary copy back to the original.

While sudoedit works with graphical editors, it's also useful for terminal-based editors. In both cases, the text editor runs as you, so it has your configuration, and other actions you perform in it other than the modifications made to that file are performed by you, which affords a bit of protection against some kinds of mistakes.

You can set one of those environment variables persistently if you like. SUDO_EDITOR is perhaps the best since it's used for fewer other things. However, if you set it to gedit, keep in mind that commands like sudoedit filename won't work when no GUI is available, as is often (albeit not always) the case in a virtual console or via SSH.

The GVFS admin backend

Another newer way to do this, is to open the file through its GVFS admin:// path rather than its traditional Unix-style path. Thanks go to pomsky for teaching me about this. Just as there are GVFS paths for editing files that are, in other respects, not in a convenient place to be edited--for example because they are on a remote machine you're connected to through SSH--GVFS supports admin:// paths for editing files you don't own.

This is conceptually similar to sudoedit in that you run your editor as yourself and the file the editor sees is something it is allowed to edit. Attempting to open the file requires you to authenticate; this is not a magical way to circumvent usual security restrictions.

gedit admin:///path/to/filename

There, /path/to/filename must be an absolute path to the file, starting with /. So there are three / characters after admin:.

Encodings and other stuff theoretically affected by editor configuration

The encoding of a file is not really affected by whether or not the editor you use is graphical. Some editors, like vim, even can operate either graphically (the gvim command) or non-graphically (the vim command). The simple answer to your question about encodings is that you don't have to worry about that. That's close enough to the truth that you really don't have to read the rest of this answer.

In current (and past) Ubuntu releases, commands like sudo nano and sudo vim run those editors as root but have $HOME still set to your home directory. This means the editors will, by default, use your configuration rather than root's configuration. If there's something in your configuration of those editors (or in a program they run to do some of their work, like git) about encodings or line endings, it will be followed. With sudo -H editor, that won't happen.

Some people use bare sudo (i.e., without -i or -H) to editors because they want that. But really, you should think twice about this. Not only can you achieve that goal more cleanly with a method like sudoedit, there are other disadvantages of commands like sudo nano and sudo vim:

If your editor configuration causes something to be run, that gets run as root. For sophisticated editors like vim, this can cause quite a bit of nontrivial code to run as root. As mentioned above, having less code run as root is generally good and this is one of the arguments against running graphical editors as root.

If your vim configuration has numerous plugins--for example, to perform static analysis on source code as you type it--and root's doesn't, less stuff runs as root with sudo -H vim filename than sudo vim filename. (Even less runs as root with VISUAL=vim sudoedit filename, but your plugins still work!) This is separate from whether or not your editor is graphical.
If your editor configuration is broken and keeps you from editing files easily, then fixing that may be even more of a hassle, since it applies to root, too. This is merely a hassle, not a difficult problem to solve.
Commands like sudo vim have a bit of the same problem as the (ill-advised!) command sudo gedit.  If you run an editor like vim as root but without resetting $HOME (as sudo -H and sudo -i would do), and it creates configuration files for itself, those configuration files will reside in your home directory but they will be owned by root, and your configuration may be somewhat broken when you later run the editor as yourself.

Well, this sure sounds a lot like that problem! The reason it's less of a big deal than with graphical applications is that the editor usually still starts, the error messages are usually easier to understand, you can usually figure out what specific files are affected much more easily, and the breakage is typically confined to that one program. (Graphical programs use configuration files in more places.) Furthermore, unlike with graphical editors, users who only casually use a text editor and don't deliberately change its configuration are fairly unlikely to experience this problem.

Again, you can use your own user account's editor configuration while avoiding permissions problems by using sudoedit or, from the desktop, starting the editor normally but accessing the file through an admin:// path.

Finally, note that the above-mentioned behavior of sudo when -H or -i is passed is actually planned to change in a future release of Ubuntu (as it already has, years ago, in most Unix-like operating systems that use sudo). The behavior has already changed in Ubuntu 19.10, which is the development release as of this writing.


Should I upgrade Ubuntu from 16.04 LTS to 18.04 LTS on Asus X205TA

It's safe now to upgrade from Ubuntu 16.04 to Ubuntu 18.04 from the terminal. I don't think Ubuntu 18.04's performance is going to be that different from 16.04. I don't expect that there would be any issues with the ASUS EeeBook X205TA's wireless adaptor as a result of upgrading to 18.04.
The most important advantage of the upgrade is that Ubuntu 18.04 Extended Security Maintenance (ESM) support lifespan extends Ubuntu 18.04 support from 5 years to 10 years. That means that you won't have to upgrade from Ubuntu 18.04 to a newer release until 2028.
Extended Security Maintenance (ESM) is free for personal use on up to 3 machines (some limitations apply). All you need is an Ubuntu One account.


I had to do a manual repository change after installing Ubuntu 12.10.
Took me a while to arrive at this solution.
  You will need to find the sources.list file on your system. Having found it,
open a terminal and enter this command  $ sudo gedit .../sources.list.
  You will be prompted for your password - enter that and gedit will open the file. Once the file is open you will want to change 'us.archive.ubuntu.com'
to 'old-releases.ubuntu.com'. Change all instances in the file. Once satisfied
that this is correctly done, save the file and close gedit. Should be no need
to restart system, just try the 'sudo apt-get update' and see if this behaves
correctly. Hope this helps.


Shortcut keys for commands in Gnome Terminal

bash aliases
You can set an alias for a command which is probably closest to what you're looking for , if I understand what you want.

Otherwise, something like Tmux might be what you're looking for.


MIDI keyboard recognized on lsusb, but doesn't work

Linux does not (yet) support this device; you have to build your own kernel. You do not need to make any configuration changes, but instead edit the file sound/usb/quirks-table.h, and add the following entry anywhere:

{
    USB_DEVICE(0x1235, 0x001e),
    .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
        .ifnum = 0,
        .type = QUIRK_MIDI_RAW_BYTES
    }
},


Ubuntu Server Apache2 SSL virtual host not working

The solution was to first make sure the apache2.conf includes the sites-enabled folder and not the sites-available folder.

Then, you need to create an additional symbolic link in your sites-enabled folder that links to the ssl default file you created in the sites-available folder. Finally restart the apache2 service and you should be good to go.


How to view Windows desktops over network?

If you wish to control the remote machine along with remote user, like a remote assistance session in windows, the best solution for me was using teamviewer


Use find (How can I use find command more efficiently?).

find /home/ -ipath */logs/access.log.gz

That should find all the files you're interested in, and print them. You could plug that into your script, but it's probably easier to let  find do all the hard work.

find /home/ -ipath */logs/access.log.gz -execdir mv "{}" "old/`date +\%G-\%m-\%d`-access.log.gz" \;

The features of find we're using here are:

-ipath matches patterns in the found filenames. You could also use -name if you knew for sure there's only one access.log.gz file in each subpath (-name access.log.gz).
-execdir executes the given command on each found file, from the subdirectory containing the matched file. This is equivalent to doing cd to where each file is and then running the command there. In this case it saves a lot of path manipulation logic. The found file is substituted for {}. Notice also that "old" is given as a relative path (as you said that old/ exists in logs/)


convert pdf to png and starts with numeral 1

Try

convert -scene 1 -density 150  1.primer.pdf  -quality 100 output.png


Answer copied from comments:

Because bitcoin mining is now done by dedicated hardware named ASIC miners,  the difficulty is now too high for a normal PC CPU + GPU to make it profitable considering power consumption and other things.

See http://en.bitcoin.it/wiki/Non-specialized_hardware_comparison for further info.


Win 7 boot loop after Ubuntu 14.10 install (UEFI)

Judging from your grub.cfg file, it looks like you should be seeing three entries for Windows:

Windows UEFI bootmgfw.efi
Windows Boot UEFI loader
Windows Boot Manager (on /dev/sdc1)

Please clarify which of those you've tried, and what the result is for each of them. In some cases, one option will work but others won't, in which case the appropriate thing to do is to ignore the non-functional options, or perhaps take steps to hide them. If you don't see all three of those options, then either I'm mis-reading your grub.cfg file or your GRUB is reading another grub.cfg than the one shown in your Boot Repair output. In the latter case, you might want to track down the file that's actually being read.

If none of those entries is working, then something is badly damaged. My recommendation in this case is to begin by undoing whatever Boot Repair has done. Re-launch the program and select the Advanced option to restore backup boot files. This should restore the original Windows boot files -- but given that you've already run Windows' own repair tools, it's unclear if this will help. If you needed to run Boot Repair to get Ubuntu working, then this may break Ubuntu's boot; but then you can work forward in a way that won't damage your Windows boot.

If at this point either Windows or Ubuntu doesn't boot, try the USB flash drive or CD-R version of my rEFInd boot manager. If it can boot both Windows and Ubuntu, install it via the PPA or Debian package, which should bypass GRUB entirely. If rEFInd itself launches but doesn't help you boot Windows, then at least you can be pretty sure that it's not a GRUB quirk, but that your Windows boot files are messed up. In this case, I suggest you look for a solution on a Windows forum. Although it was clearly something about the Ubuntu installation or Boot Repair that damaged the Windows files, repairing that damage will have to be done from Windows. (An exception is if you made a backup of your ESP before installing Ubuntu, in which case you can restore that, or at least its EFI/Microsoft directory tree, to fix the problem.)


When youre at the login screen there should be a little round icon above where you enter your password. If you click on it there should be a little menu. Find "unity" select it and then login.


iptables: how to present "not equal to/match" when use -m u32 function

The -m u32 portion of the command line specifies the module. The --u32 portion specifies the actual expression. So, the syntax you are looking for is:

iptables -A INPUT -p tcp --dport 1000 -m u32 ! --u32 "xxxxxxxxxxx=0x11" -j REJECT

See also the iptables-extensions man pages, excerpt below:

 u32
       U32 tests whether quantities of up to 4 bytes extracted from a
       packet have specified values. The specification of what to
       extract is general enough to find data at given offsets from
       tcp headers or payloads.

       [!] --u32 tests
              The argument amounts to a program in a small language described below.


I also ran into this issue. What fixed it for me was running pip uninstall pip and then python2.7 -m easy_install pip==8.1.2 again.


To make a tool bar visible after clicking a button you should call the toolbar's show method after the button is clicked:

self.toolbar = self.builder.get_object("nameOfToolbar")
self.toolbar.show()

Also make sure under common settings for toolbar in glade are set "No show all" is set to yes, and "Visible" is set to no.


Trouble sharing storage partition win10/ ubuntu15.05

You might start Ubuntu without properly shutdown the windows. If you are restarting and switch to windows to Ubuntu cause problem . similarly hibernate also like that so better if you try to switch to Ubuntu, then let the PC shutdown and give a little time then start with Ubuntu. Because file system of Windows is NTFS in Ubuntu its different so your operating system may confuse this student transformations.


Collecting and mixing sound input from different microphones

so basically I figured this out myself after a lot of digging on the internet. This is the best answer I found, in another forum, at http://www.pclinuxos.com/forum/index.php/topic,119695.msg905379.html#msg905379

Basically, you will need first to add a fake channel, a "null sink", where the inputs will be collected. We will call it "inputs" and we will create it using this command:

pactl load-module module-null-sink sink_name=inputs

After that, you will need to create as many virtual channels you need for the devices you need to connect, linking that to the "inputs" channel you created before. So please repeat this command for any input you want to mix (and add one if you want to mix also the input of your laptop):

pactl load-module module-loopback sink=inputs

Now you will have to connect this new "loopback" channels to the device you intend to record from. You can do this using "pavucontrol" (install it if missing), open the "Recording" tab, select "Virtual Streams" from the bottom selector and then make sure you connect a different input to each different loopback.

At this point it's just a matter of using your input in your application for recording, and you're all set! Please remember to setup also the output as described in my original question :)

I am happy to receive any better answer too, as this procedure (even if it can be automated) it's still too much error prone and does not automatically includes new devices added later (you will have to setup a new channel and add them again).


Unable to connect to internet on hyper v Ubuntu 14.04

I've read a lot of articles about this issues, and many claim to share the internet connection of the wifi adapter to solve the issue. This did not work in my case. What did work for me, and it should answer your question:

Created an internal virtual switch under Hyper-V.

Open "Hyper V Manager"
Select "Virtual Switch Manager"
Under New Virtual Switch, select "Internal"
Select "Create Virtual Switch"

Shutdown the Ubuntu VM
Add a legacy adapter with the internal virtual switch that was just created in step 1.
Open "Network and Sharing Center"
Select "Change Adapter Settings".
Select your Wifi Adapter and the Virtual Switch you just made, right click menu option "Create Bridge"
Start the Ubuntu VM
Login to Ubuntu
Wait a minute, the connection should connect...


7zip

7zip is only a tool for command line. Functionality for using 7zip as a compression is added to the "archive manager" desktop tool.

Top right shows '7z' as a compression option when 7zip is installed ...

Mate power manager

As you can read in any of the manual pages:

  mate-power-manager is the backend program of the MATE power management infrastructure providing a complete and integrated solution to power management under the MATE desktop environment.

and it also points to mate-power-preferences.

  mate-power-preferences is the gui program for the mate power management infrastructure

So you also need that one.


Shared folder settings do not persist in Ubuntu 12.04 guest on VMWare Player/Windows

VMware Player should give you an option to set Shared Folders to Always Enabled instead of Enabled until next power-off or suspend (which is the problem you seem to have). If you don't see such an option, just add this line to the .vmx file for your Virtual Machine:

isolation.tools.hgfs.disable = "FALSE"

If that line already exists, set it to "FALSE".

The VMX file contains the configuration for a virtual machine. If you don't know where that is, open terminal, and type sudo updatedb; sudo locate .vmx to get the location of the VMX file you want, and then type gksudo gedit "path-to-vmx-file.vmx".

Alternately, instead of open-vm-tools, try the latest official VMware Tools for Linux guests on VMWare player, available here and here.

Note that VMWare Tools now include an experimental feature to automatically rebuild modules when a new/different kernel is detected:

!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present.  By selecting yes,
you will be enabling this experimental feature.  You can always disable this
feature by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?


Open a terminal and enter the command top -o RES. You'll get an overview of the running processes sorted by their resident memory usage.


How to use second HDD as program installation drive path

I would advice against it and keep the OS on 1 drive. And on the SSD to have the fast boot.

If you want to use a 2nd drive you need to mount the directories onto partitions on that disk.

Software is installed into a lot of directories since software is placed into directories intended for that part of the software. /bin/, /usr/, /lib/, /var/ and more directories will contain parts of an installation. And you will need partitions for each of them where you need to make sure you create plenty of room so the partition can not fill up. Each directory will have overhead decreasing the space you can use for your own files. See this answer on U&L where it is explained how you so this with symlinks or binding (that is a bit high level though).

In the end you will see you probably are going to copy -everything- over to that 2nd disk.

I myself would put the / on the SSD and if you want a separate /home/. And use the 2Tb as a data partition.  This is what I have:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        46G  5,9G   38G  14% /
/dev/sda1        47M  3,5M   43M   8% /boot/efi
/dev/sda5        34G  540M   32G   2% /home
/dev/sdb1       917G   69G  802G   8% /discworld

(I remove the tmp's).

My /home/ is empty. I use users-dirs.dirs to point my directories to /discworld/:

$ ls -l /discworld/
total 72
drwxr-xr-x 6 rinzwind rinzwind 12288 mrt 18 23:07 Desktop
drwxr-xr-x 2 rinzwind rinzwind  4096 mrt  2 19:21 Documents
drwxr-xr-x 3 rinzwind rinzwind  4096 mrt 14 11:46 Downloads
drwxr-xr-x 2 rinzwind rinzwind  4096 jun  7  2015 Music
drwxr-xr-x 4 rinzwind rinzwind  4096 mrt 18 23:47 Pictures
drwxr-xr-x 2 rinzwind rinzwind  4096 jun  7  2015 Public
drwxrwxr-x 3 rinzwind rinzwind  4096 mrt  5 16:04 steam
drwxr-xr-x 2 rinzwind rinzwind  4096 jun  7  2015 Templates
-rw------- 1 rinzwind rinzwind   672 nov  8 20:15 backup.user-dirs.dirs
drwxr-xr-x 2 rinzwind rinzwind  4096 jun  7  2015 Videos

$ more .config/user-dirs.dirs
XDG_DESKTOP_DIR="/discworld/Desktop"
XDG_DOWNLOAD_DIR="/discworld/Downloads"
XDG_TEMPLATES_DIR="/discworld/Templates"
XDG_PUBLICSHARE_DIR="/discworld/Public"
XDG_DOCUMENTS_DIR="/discworld/Documents"
XDG_MUSIC_DIR="/discworld/Music"
XDG_PICTURES_DIR="/discworld/Pictures"
XDG_VIDEOS_DIR="/discworld/Videos"

And I have a spare SSD so if it ever fails I can be up and running in 15 minutes (with an SSD that is what it takes to install).

And there is a move in the Linux world to create a base system that has a read only and a writable part. When that is possible your idea will be possible. You put all the read only stuff on the SSD and the system will remount it writable to do updates and then mount it as read-only for using it.


Ubuntu 13.10 no top right bar buttons (power, network, calender)

I had a similar problem to this not long ago and fixed it with this command:

sudo restart lightdm

You'll be logged out and once you log back in if lightdm was the problem, your applets should be there again.

Hope this helps.


Slow scrolling through open tabs in Firefox

Apparently it is a bug. There has been recent activity, so hopefully it is resolved soon.

As a work-around I'm using mousewheel.default.delta_multiplier_y = 500 in about:config. The drawback is that this also affects general page scrolling, which is now way too fast.

For more infos see this reddit discussion.


Yes, server and client software are different software installations.

Having both active at the same time can be an issue. The client likely needs to use a dynamic port and the server needs to use a fixed port as to avoid conflicts. And you want to use a different node for each

OpenVPN always binds to port 1194 with both server and client mode.
The option in openvpn would be --dev-node {node} for the node.


How to add new screen dimension for xrandr selection?

The problem is caused by my KVM (TRENDnet TR-409K) switch that doesn't properly forward DDC/EDID information when the screen is connected to the PC and absolutly nothing when the screen is not connected.

As a consequence the Intel driver is unable to determin the screen caracteristics. I thus have to add the nomodeset boot option which disables the KMS system and thus screen resolution change with xrandr also. But at least the Intel driver is able to boot when the screen is connected and provides a max resolution of 1280x1024. When it is not, the Intel driver gives up and the VESA driver is started with a max resolution of 1024x768.

When I boot with the display directly connected to the PC (KVM removed) the Intel driver gets all the information it requires and I get many more display mode.

The KVM I used, which is cheap, is thus not good enough. A good KVM caches the EDID information provided by the display so that a PC connected to the KVM can obtain it even if the display is not connected to the PC. Such smarter KVM for desktop usage are more expensive of course.

BTW, I see the same display resolution problem when I boot my Windows 7 computer with the display not connected. When the screen is connected when it boots I get the correct 1280x1024 resolution, and when not connected when it boots, I get a max resolution of  1024x768. Now I understood why.

I ordered I new KVM switch (Belkin SOHO kvm switch) which is "smarter" and is said to cache the DDC/EDID information. I'll update this response with feedback as soon as possible.


Wireless (WPA2) keeps asking for password

I am not sure it's the same problem as I faced earlier.

I verified all the credentials and still I was getting the password prompt. Issue was with Authentication (encryption type). I changed that and it started working.

But as you said it's working in other OS, so it may be because of some bug. However I never faced this issue in 13.10.


Missing icon after executing shell script to install program

Okay, I think I finally solved this problem.
Here is the link to the answer that helped me. I used an online svg to png file converter and the icons work perfectly now :)


Login screen hesitates and login issues with another user after 12.10 upgrade

Install unity and reboot you computer/laptop. Then click on the footprint next to you user name. It should come up with Ubuntu 2D etc. Click Ubuntu 2D( because ubuntu2D is better). It should work.


Realtek RTL8723be doesn't have good reception

With Ubuntu 16.04 and later, go to Parameter settings as nothing needs to be downloaded

Progress from Larry Finger from here

If you installed rtlwifi-new-dkms from Pilot6's PPA, it will need to be removed with sudo apt-get remove rtlwifi-new-dkms
Reboot, then

sudo apt-get install git build-essential
git clone https://github.com/lwfinger/rtlwifi_new
cd rtlwifi_new
make
sudo make install

Reboot and then

Parameter Setting
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=1

Test wireless, if no change then
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=2

Test wireless again, one or the other should result in better reception

When you find that one works better than the other
echo "options rtl8723be ant_sel=X" | sudo tee /etc/modprobe.d/rtlbtcoex.conf
Where X is 1 or 2- whatever resulted in better performance, in the case of Swapnil Sharma it would be
echo "options rtl8723be ant_sel=1" | sudo tee /etc/modprobe.d/rtlbtcoex.conf
Then the parameter will be remembered following a restart


I actually ended up giving up on this issue, and just reinstalling as I couldn't find a fix. Good luck to anyone else dealing with this.


Ownership/permission problem with automounting exfat drive

Automount exfat with user permissions

When specifying the auto option, the devices gets automatically mounted at boot time with root-permissions. The Proper options for exfat are described in the mount.exfat manpage. Change the /etc/fstab entry to:

/dev/sdb1 /media/maria/Lexfat exfat defaults,uid=1000,gid=1000 0 0

The defaults options (rw, suid, dev, exec, auto, nouser, and async) are good enough in most cases. The proper uid and gid can be obtained by

$ id yourusername
uid=1000(yourusername) gid=1000(yourusername) groups=1000(yourusername),4(adm),24(cdrom),...

chown in exfat

Regarding the chown problems and errors: exfat does not support user permissions. So using chown on a file inside exfat will always fail:

$ sudo chown root:root /media/maria/Lexfat/test.txt
chown: changing ownership of ‘test.txt’: Function not implemented

rsync into exfat

The problem with time-stamps and permissions are the same as the ownership issue: exfat does not support it. But rsync will still work, just don't use the -a option.

$ rsync -r /from/here /media/maria/Lexfat


Graphical system broken after AMD->Nvidia upgrade. How to re-install all graphical components?

This answer is more for completeness at this point;
use the OEM driver available from:
http://www.geforce.com/drivers

You will need to run the driver install script from a root terminal, and kill all the X related processes before running it. You may also need to chmod +x the script.

It is also note worthy, that the OEM driver recompiles the kernel. If you upgrade your kernel, (as in normal kernel updates) you will need to rerun the OEM driver script.


What is the physical path of google drive on Ubuntu 18.04

First you need to figure out which UID the current user is assigned to.

loginctl list-sessions will show you something like

    SESSION  UID USER   SEAT  TTY
                    1 1001 name seat0 tty2
1 sessions listed.

Now you know the UID you need to know where your google-drive is mounted to.

Google drive is getting mounted using gvfs with:
gio mount google-drive://YOURUSERNAME@gmail.com/
to:

  /run/user/UID/gvfs/google-drive:host=gmail.com,user=YOURUSERNAME

So, if your UID is 1000 - the path would be: /run/user/1000, if your UID is 1001 - the path would be: /run/user/1001, and so on.

Just like:

  /run/user/1001/gvfs/google-drive:host=gmail.com,user=YOURUSERNAME

YOURUSERNAME is the prefix you are using to login to google.


Here we shall take ssh as the service for routing. Use mangle table of iptable for modifying the ssh packets.

sudo iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK --set-mark 0x1

We are marking all packets with destination port 22 as 0x1 .

Now save and restart iptables.

sudo service iptables save
sudo service iptables restart

Next, create a new IP route table in /etc/iproute2/rt_tables by just giving an entry

100 sshtable

Write rule for ssh packets.

ip rule add fwmark 0x1 lookup sshtable

Add route at new table sshtable. All other traffic will go through the
default gateway, which can be seen by ip route show command.

We copy all entries except default gateway entry from main table.

sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table sshtable $ROUTE; done

Add default gateway entry for ssh packets to table sshtable

sudo ip route add default gw 192.168.50.254 table sshtable

Use ip route show table sshtable to show all routes at sshtable.

Try.


The sh version of echo does not support options.

Change your script to be run with Bash like so:

#!/bin/bash
screen -S Run -X stuff 'stop'"$(echo -ne '\015')"

Alternatively, just put a literal newline in the string instead of relying on echo:

#!/bin/sh
screen -S Run -X stuff 'stop
'


Ubuntu 20.04: JBL Jump microphone not detected

Can you try to switch A2DP Sink to HSP/HFP
My JBL mic works if I do this. So I switch back to A2DP Sink if I will listen to music.
I'm using Ubuntu 18.04


ubuntu system partition is running out of space after empty my trash, is it normal?

Please check this link

This might be helpful to you.

You can use lsof command to check the deleted file is linked with any process or not.

and then kill that process so it will immediately release the space.


Ubuntu 16.04.2 - Chrome hardware acceleration disabled

The question is not about Ubuntu.

You can enable hardware acceleration by going to chrome://flags and choosing "Override software rendering list".

But you may get some glitches.


It appears as if something is wrong with the script that you downloaded. I just tried it and it worked fine.

Run gedit ./msfinstall from the terminal (this is assuming you are still in the directory from where you ran the original command) to open the script for editing.

Delete everything there and paste this instead:

#!/bin/sh

print_pgp_key() {
  cat <<-EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQINBFDAy/0BEAC8I5bw5gLQqHKx5JCacYcXFL6AZowl3qIOTxo5yfBl8CepNpWY
OOERvIUJb17WehhhbWOo9WjpBalDXBRtI1NvfArewOT8fLm7BdhYe8U45moBfkYi
xFtNrPw3pdIltHQISrB8PufhliN8obQuq0rcxYV8NblvYo4gIGNjBfO1QGvBNmp7
kBtjlAuZguScZmUTdPOwfv8fqN52X9tCv1ahQk1hg8XG9YwW0vXb5z93jkLXBb5b
sRCnou4m9IV6vOv2HVNRyMKT7uht3z4FqflP9NkySl4daCdZgmXbf169vvLdwLrC
lVymwAbwvuyILZv4JW1w0Kx8nWiTuK5A886882i83lxnkh1vC9jInva4/5hTrbRw
XJb7qOyh7sxa5GOfgq1NwVfLkrvVCMystrPu18sF1ORfg1UTFcz86RYdxpmoZvk7
EeABiLCQDZKOf0fV3U9CxLj8gXPjPY1Lu6udZUN6NG1ALJjsPkGnbpQEqEJlKNAG
+rF+tp73TrG0PW8C/THL7fN93ET3wn5tfNu86Liui9wd8ZLuPJNEYeE6eyPAgXJ4
p69Yb4ou5um5jWnzaVameECBZvtc4HOhy3nTEiVMDcKv/o8XxKOCLpjW1RSDirKl
ZRIsJYPx2yuJSVMCsN5Sghp5+OCsQ+On4OFWxCskemvy97ftkv/fwUI7mQARAQAB
tCJNZXRhc3Bsb2l0IDxtZXRhc3Bsb2l0QHJhcGlkNy5jb20+iQI9BBMBCgAnAhsD
BQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJUHKARBQkHHjsGAAoJEM37X6UgB7lU
yhQP/jZgR7+kPN6l0fPhPUewSTK/Rf8O8NiSKETpYli2lpPF1uWU7J88TskcTyLQ
HbDBuWIwjQvdk6dhXLc1hX/KkUkmqD3QHnGSxa0C8cJfLfqsZsTWs17o2zQdvVye
CwbWKfSfBPUkPMlnhDGe3gPlab/cWkkEqVT7fM1Ql2vyeLrs1fLcWw2sRrT4zC3I
qsDrzwyIYropJaYv2yGdoyzIV0Ssp8jJsTX5AxQ71VLenzjq1SB0AjIYUf9+YIEb
5AW0PgXzhXBD2iybqR+WUU1SxzHJZ+slr+jHdL4rwgUgSdfibL5qQnCF1aOKuyr2
r6gDdF1EyY1Wr29cTLVwTjyjIMxQ2vM3lLfbSrIofni7iTh41JPpWuubOcouTaig
tvKtM10z+XY0H+R/z8ZYRT0tOtO6USd2ke1YRfunu1nIr7eGub6uLOwsLY5RI42J
h8v8V7qHbFg3fLUH77I47DFSAf+F1Ii4xdB8iL1qehxb0Bhx62c6O7pZ56c8Oet5
70COlt915DiJCFZwYhdIgHwUvJ3eYfDo7M5J4nctAfUaMjzLGjkTCgeSxra8ZVBn
91skpvW18YYgRPbWapt2uYy3/4r54eVRmzGwZJYLny0ojrrVGAWVVLYRIVF/qVg0
wtNDxh9omp9YT/1mZEIEBbvFAryWz96fRj3JSzuGMp85/22HuQINBFDAy/0BEAC5
Ayq56LCeXqzf6LdlomjPNioSN9Cevi2VC/bJ4rgNWtenH6EH8F05xaXHePDuNWk9
gTadI6Row6OPa0QvMgex4wndZTPsEUZv3dBLf+JQYMnGmut40LRvhivYDfrH+C5I
g4CWJF19sBDopb2cPc1NlS0xoTlAfnu70T9i6ZwOJ0pL1BjSr2lnBfpP43sj9qO3
aK17pn134xgQGIlgheoQ4svF0+Rtq7jAw5Vmn6JXhklXrgdKJ4o6s0VOQWjfiGzC
Mxli0T+sr4WJpjtdtdCBmQRd/4CS0dzmlJvNgFeRIOBbJcwVYr+ttIQ7lbBKHkZ3
trjf6ohLWI0iyVmJ+ba7QKUJJP9YvjiunP5arU/gskPyEuvROfnyWJAGJAoByQXX
CZg10hysnGqww4oT0j7jdd9ZIMrf8GSxPaFennh+Wsva7raPTWBCzY5hla2cmcgG
EaOnbjf2clAW3MyGmllQpBGIDtOK8GppE8DnVhhM49uIDTHF2AikMltjqwzd6HV9
39VA77Imal/PKNHyOWEAdmIRgYwHx+cEjzJAQSQkd0G3PSfJLBaf/0Vo1nBav8q9
VjgqhEFaNTzEj5Hqn6ldwKUul4Vb+AoSiz5Z1du32ul1CtcozUJTcWJL9ebZ8YbS
qy7Ol4slSW3ukNaG6tBTqQYb9liIdvdQUG6oJhmzbwARAQABiQIlBBgBCgAPAhsM
BQJUHKArBQkHHjspAAoJEM37X6UgB7lUwUYQAJVIz99lourvKms5skr8fFygDPkR
vAL3DYVCIk/aZllFpaxJuA3Eud6taATl6g6k13HCV1ANQG1Kcfx4e8Ab2U8fw0xJ
c5STt+gWGq40KeqGI9ydZpvnxmqVKaaJwt7gUanyRN/gkHhGQCqCc6Lzn594O8Eh
b9229SJQRjB9F4AefM96ixihp0HcxoSv4phRmK6n6IO3i6QYn51DhyAyDXCQMHog
q5p19N2Tp7eq7wsaEjoBw+/OwcJ3KnFC+oZ8dF6R92ZjhrH9/NBFiAqVayRqqCuy
xuybiHIxkMk7tkEf3Aq8bbCcJDJKlToW2FZX0trkz/EBZ2BRFvCdt5pk3ojLm0n6
xwdBnD/QRMRElr+0/B4F4Ro/Lm0G1yObCn0sAumjJEUnfHN4EJ0sV2tUjgSBtOZj
s4tvN3MWJvz9uxA44JLni1FDpJXZcECk9qD83wUMXMFHPqUazFtGbcvdo7z3ZCJe
iju13vQAzEod7KtkaI19S6URh+1yGvZIn1JLcXwSaz7rPDmJQuLdPux2FCZtA868
7XEL1teJIjhRCxcCcPj6M8DWIJClcv11vUsb5FpZITvN6ijt9wlwCkSvCPJLoww8
Z9BOtYKSq6RJeMRnp6cryuYs1kK3wBey+UUscdxsyP7Qf5cO5mgFYxCfhZp8GkvK
lX5PgGasG3u3kHBl
=t69L
-----END PGP PUBLIC KEY BLOCK-----
EOF
}

install_deb() {
  LIST_FILE=/etc/apt/sources.list.d/metasploit-framework.list
  PREF_FILE=/etc/apt/preferences.d/pin-metasploit.pref
  if [ ! -f $LIST_FILE ]; then
    echo -n "Adding metasploit-framework to your repository list.."
    echo "deb $DOWNLOAD_URI/apt lucid main" > $LIST_FILE
    print_pgp_key | apt-key add -
  fi
  if [ ! -f $PREF_FILE ]; then
    mkdir -p /etc/apt/preferences.d/
    cat > $PREF_FILE <<EOF
Package: metasploit*
Pin: origin downloads.metasploit.com
Pin-Priority: 1000
EOF
  fi
  echo -n "Updating package cache.."
  apt-get update > /dev/null
  echo "OK"
  echo "Checking for and installing update.."
  apt-get install -y --force-yes metasploit-framework
}

install_rpm() {
  echo "Checking for and installing update.."
  REPO_FILE=/etc/yum.repos.d/metasploit-framework.repo
  GPG_KEY_FILE=/etc/pki/rpm-gpg/RPM-GPG-KEY-Metasploit
  if [ ! -f $REPO_FILE ]; then
    echo -n "Adding metasploit-framework to your repository list.."

    cat > /etc/yum.repos.d/metasploit-framework.repo <<EOF
[metasploit]
name=Metasploit
baseurl=$DOWNLOAD_URI/rpm
gpgcheck=1
gpgkey=file://$GPG_KEY_FILE
enabled=1
EOF
    print_pgp_key > ${GPG_KEY_FILE}
  fi
  yum install -y metasploit-framework
}

install_pkg()
{
  (
    cd ~/Downloads

    echo "Downloading package..."
    curl -O "$DOWNLOAD_URI/osx/metasploitframework-latest.pkg"

    echo "Checking signature..."

    if pkgutil --check-signature metasploitframework-latest.pkg; then
      echo "Installing package..."
      installer -pkg metasploitframework-latest.pkg -target /
    fi

    echo "Cleaning up..."
    rm -fv metasploitframework-latest.pkg
  )
}

DOWNLOAD_URI=http://downloads.metasploit.com/data/releases/metasploit-framework
PKGTYPE=unknown
ID=`id -u`

if [ -f /etc/redhat-release ] ; then
  PKGTYPE=rpm
else
  if uname -sv | grep 'Darwin' > /dev/null; then
    PKGTYPE=pkg
  else
    PKGTYPE=deb
  fi
fi

if [ "$ID" -ne 0 ]; then
  if ! hash sudo 2>/dev/null; then
    echo "This script must be executed as the 'root' user or with sudo"
    exit 1
  else
    echo "Switching to root user to update the package"
    sudo -E $0 $@
    exit 0
  fi
fi

case $PKGTYPE in
  deb)
    install_deb
    ;;
  rpm)
    install_rpm
    ;;
  *)
    install_pkg
esac

Save the file, then run ./msfinstall again.


Run sudo from your account, and from the kids account run with normal privileges.

BleachBit on Linux uses sudo for shared items such as apt,  system logs, and localizations.


How to set all locale settings in Ubuntu

You can set locale manually using update-locale:

sudo update-locale LANG=de_DE.UTF-8 LC_MESSAGES=POSIX

Read the man page for more information.

Alternatively, you can manually change your system's locale entries by modifying the file /etc/default/locale.

For example on a German system, to prevent system messages from being translated, you may use:

LANG=de_DE.UTF-8
LC_MESSAGES=POSIX

Note: changes take effect only after a fresh login.

Source: https://help.ubuntu.com/community/Locale


I've discovered through trial and error that though probably greater than 80% of PCs are Linux compatible, a disturbing percentage simply are not.  This is why when asked for advice I always advise putting a PC through its paces either with an Ubuntu boot CD/DVD, or alternately a Ubuntu boot flash drive.  I prefer the latter for reasons explained in my bio here.

In any case though I'm not saying your computer simply will not work with Ubuntu, there may be a fix, you should accept the possibility that either it isn't compatible or that the solution may be prohibitively complicated.

Please update your query with a few stats about the computer, particularly the brand and model number so that others can attempt to determine if it is one of the troubled ones.


Why can't I change my volume keybindings?

You can change keybindings with a .xmodmap file in your home directory.
First you gotta open a terminal type xev and then the press desired keys (keys you want the behaviour of and keys you want this behaviour to have). Xev will record the keybindings giving you keycodes and names of commands. Then you go to you home directory and create a new file called .xmodmap. In there you have to arrange everything as the following example:

keycode 110 = Home (key you want to give = the desired command)

With this you can easyly swap or change keybindings. After that you have to log out and back in and choose the created .xmodmap to be used.

In the end it looks like this:

keycode key1 = function key2

keycode key2 = function Key1


Forget the IP use ssh user_name@host_name.local to connect to the machine named host_name. It will solve your IP changing problem.
MacUser2525:~$ alias pi
alias pi='ssh zeus@buster-raspi.local'
MacUser2525:~$ pi
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Feb 18 01:31:30 2021 from fe80::1003:5492:80fa:2bc5%eth0
zeus@buster-raspi:~$


Not able to boot 16.04 LTS in dual boot with window 7 UEFI mode

I have win7 at side Ubuntu 16.04

If you want to,too. You should first install ubuntu, then install windows.

And now your ubuntu boot is damaged by win boot but it has nice tools that name of is boot-repair-disk

After installing windows, then by boot-repair-disk go to Ubuntu and repair its boots.

  No need to internet and easy to use

:)

Source : https://sourceforge.net/projects/boot-repair-cd/ (Write on cd or flash boot)

Size : about 700 mp


How to install rar (no installation candidate)?

rar is provided in the multiverse component, so you must enable that repository. To do this, open up the Software Sources window in any of three ways:

Press Alt+F2 and run software-properties-gtk. (Use software-properties-kde instead if this is a Kubuntu system.)
Open the Software Updater (or Update Manager, in older releases) and click Settings... at the lower-left corner of the window.
Open the Software Center and go to Edit > Software Sources....

In the Ubuntu Software tab of the Software Sources window, under **Downloadable from the Internet*, one of the checkboxes is:

Software restricted by copyright or legal issues (multiverse)

Check that box. You may be prompted for your password, to make the change. After you've done so and the box has a check in it, click Close to close the Software Sources window. Now try installing again.

(If it still doesn't work and you're installing from the Terminal with apt-get, try running apt-get update then attempting the installation again.)

How to find software with "no installation candidate"?

To find out why you might not have been able to install rar, the first thing I did was to go to packages.ubuntu.com and search for it.

Searching for rar in all supported releases (can also search one specific release).

The results revealed it to be in the multiverse component.


To show the desktop the command:

wmctrl -k on

To turn it off use

wmctrl -k off


Zoiper5 error executing process on ubuntu

You got the following error message (1st Error):

  Failed to load ~/Zoiper5/swiftshader/libGLESv2.so: ~/Zoiper5/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory

In Ubuntu 17.10 and later the libGLESv2.so.2 file is provided by the libgles2 package and it is installed at /usr/lib/x86_64-linux-gnu/libGLESv2.so.2. libgles2 can be installed from the default Ubuntu repositories in Ubuntu 17.10 and later with the following commands:

sudo apt update
sudo apt install libgles2

Create a symbolic link at ~/Zoiper5/swiftshader/libGLESv2.so which references to file /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.

sudo ln -s /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 ~/Zoiper5/swiftshader/libGLESv2.so

Check that you have the version of Zoiper5 installed the gave the 1st Error, so that you won't get an error message that the system can't find ~/Zoiper5/swiftshader/libGLESv2.so.


Running the Ubuntu Kernel and OS on custom processor

To have any chance of getting this ported you first need GCC to be able to produce the object code for your target CPU, the kernel was written using GCC and we also assume that GCC is used to build a lot of the user space applications too.

You then also need to write the architecture specific parts in the kernel for your CPU and platform.  If you have based your CPU on existing MIPS designs then this makes life a little bit easier, for example the virtual memory management handling may already exist for your target CPU if you are lucky, however you may need to write this from scratch if it is a new design.

If you are writing your own compiler then you need to make it support all the GCC specific extensions which the kernel supports, and there are quite a few.  It is most probably easier to port GCC than write your own from scratch.

Porting the kernel is the first step, but for a new CPU you need to think about how you will design the way user space does system calls into the kernel and you will need to write a system call hander for the kernel and also the user space C library system call shims too.  You will find that there is a tremendous amount of effort required just to get to the point where you are able to get the user space first process init running.  You will then need to cross compile all the core libraries and utilities just to get a basic system booting.  It's non-trivial.  The first step is to be able to build tools like busybox that give you a minimally set of Linux tools to be able to get a shell running with a minimal set of tools to interact with the system.

Back in the days of the 2.2 kernel I ported Linux and busybox to a new architecture (a VLIW media processor) as part of a research project (which got canned) and it took about a year to get to the point where I could boot the kernel, run init and start up busybox on a serial TTY. And this was not counting the effort to get a stable toolchain.  Just be warned, it can take some effort.


How to customize the lock screen in Lubuntu 20.04 LTS?

Lubuntu 20.04 uses xscreensaver to provide screen locking.

But the lock screen that comes up after pressing Ctrl+Alt+Del is very poor in aesthetics.

(On my Lubuntu 20.04, Ctrl+Alt+Del launches the task manager.)
Anyway, the screen in question looks probably like this:

I'm assuming "very poor in aesthetics" refers to the "flaming computer" image on the left. For the rest, see, for example, fossfreedom's answer.
It appears, based on some digging around in Change the XScreenSaver icon and Taking the ugly out of Xscreensaver that ① the image maybe coded into the application itself and ② the creator of the image is supposed to have written the following:
/* XScreenSaver Logo designed by Angela Goodman <*****@******.***>
 */

/* If you are looking in here because you're trying to figure out how to
   change the logo that xscreensaver displays on the splash screen and
   password dialog, please don't.  The logo is xscreensaver's identity.
   You wouldn't alter the name or copyright notice on a program that
   you didn't write; please don't alter its logo either.
 */

By the way, in Lubuntu 20.04's /usr/share/pixmaps there's xscreensaver.xpm but modifying that file doesn't help lending credence to the opinion that the image is built into the code itself.
The creator of xscreensaver itself is of the opinion that xscreensaver's screen locking is vastly superior to alternatives: see XScreenSaver FAQ for details. That said, a simple alternative would be i3lock together with xautolock


Back up the config file before making a change;

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.back

and then edit vsftpd.conf (with vi or nano)

nano /etc/vsftpd.conf

Then make the following change

pam_service_name=ftp

Save your change and restart the ftp server (if you use nano hit CTRL+O & enter to save then CTRL+X to exit)

sudo service vsftpd restart


I have found that installing the cuda driver without opengl helps, provided you only want the GPU for compute. This is done by adding either --no-opengl-libs (or --no-opengl-files) during the run file install.


What software exists for learning the English language in Ubuntu?

Anki is a great software for learning all kinds of stuff. There also is an Android version, so you can learn your stuff when you're waiting somewhere but still type in or choose from premade decks what you want to learn on your computer because it has a sync feature.


Meaning of linux-modules*.dep on kernel-ppa

Okay so I run mainline Kernels and just hit this snag.

First off, if you do this regularly, I highly recommend using this script Ubuntu Mainline Kernel Updater. These changes actually broke the script, but I have an open PR that fixes it and you can pull from my repo. This will automatically install new kernels and has an assortment of flags to grab the one you want.

Second, this is stemming from an effort to, as far as I can tell, rebrand security. Previously if you wanted a signed kernel from Canonical you grabbed the linux-signed-image package. Now they want kernels signed by default, so stable kernels are just linux-image (signed) and intermediate kernels are linux-image-unsigned. Because Canonical doesn't guarantee they are stable, they are not signed. Modules are also separated but I'm not sure why yet. I haven't found anything in the Kernel Team archives, but admittedly I haven't looked that deeply yet. For now, it seems the changes are mostly cosmetic as far as we are concerned, but I still feel ignorant as the wider implications.

My Similar Ask Ubuntu Thread (one the of Ubuntu Kernel has a brief response).

TLDR

Download all four and run dpkg -i *.deb. It's the new workflow as far as I can tell.


how to restore bookmarks folder in ubuntu 12.04 LTS from google chrome

You can only restore what you have backed up. Did you create a backup in any way? Chrome stores its configuration in ~/.config/google-chrome if you restore this folder your bookmarks should be back.

If you are lucky you find the file ~/.config/google-chrome/Default/Bookmarks.bak still containing your folder. Move this file to a safe location, stop your browser, move it back to ~/.config/google-chrome/Default/Bookmarks start your browser and keep your fingers crossed.

If you do not have a backup, see https://help.ubuntu.com/community/DataRecovery


Your iptables rule is correct. With that rule, you are basically telling iptables to accept any incoming TCP connections to destination port 80 (http) on your VPS. Technically, this rule isn't necessary since your INPUT chain policy is set to ACCEPT, which accepts any packet that traverses that chain.

Your Nmap scan reveals that the port is closed. The reason for this is your VPS is responding to the Nmap scan with some sort of "port not available" error, resulting in the closed port status. If iptables were dropping the packets, you would see filtered as the port status.

Try running netstat -anp | grep :80 on your VPS. If the output is empty, then you do not have a web server listening on TCP port 80. If you're running Apache2 as your web server, the command output should look similar to this:

tcp6       0      0 :::80                   :::*                    LISTEN      1970/apache2


Cannot use apt-get anymore because of one specific package

One command which will possibly fix the problem is

sudo apt-get --fix-broken install

Other options which can be combined with this are --ignore-missing or --fix-missing

Also try this command:

sudo dpkg --configure -a

For any help on commands and options, please see man dpkg and man apt-get.

A very detailed answer with many more options  to come out of deadlock can be found here.

Specific to Libre Office, I faced a problem and what helped me was individual purging of packages using dpkg --purge as described here


I noticed several peculiarities in your Boot Info Script output:

The Boot Info Script output indicates that the Windows boot loader is installed in the MBR of the disk; but this is normally only the case for BIOS-mode installs of Windows, which also necessarily use MBR rather than GPT. Your disk, though, uses GPT.
The disk seems to have an ESP (/dev/sda2), but that ESP contains no EFI-mode Windows boot loader -- or at least, the Boot Info Script hasn't identified one.
Your Windows C: partition seems to be /dev/sda1, whereas your ESP is /dev/sda2. This is legal, but unusual. It indicates manual partitioning of some sort rather than a stock installation as done by the Windows installer or by an OEM setup.

Based on this evidence, my hypothesis is that you took a BIOS-mode Windows installation, converted the disk to GPT, and installed Linux. If I'm right, then this explains all the peculiarities I've identified, and it also explains why Windows won't boot: It's configured for BIOS-mode booting, which is now impossible, and it lacks an EFI-mode boot loader. The good news is that you can fix these problems. The bad news is that it will be a bit of a pain to do so.

You can consult this page for instructions on converting Windows to boot in EFI mode. Note, however, that those instructions include a lot of steps related to installing the DUET package, which you don't need if your firmware is based on EFI. (DUET is a software-loaded EFI for BIOS-based computers.) Basically, you need to pay attention to steps 3.5 through 3.7 on that page.

Alternatively, you can wipe the disk clean and re-install both Windows and Linux. This is likely to be the easier way to proceed, but you'll lose any OS customizations you may have created.


RAW exports wrong (Photivo, Rawtherapee)

It does not actually export wrong, it exports OK. You can see that when you open the exported image in Web browser or Shotwell or GIMP or whatever. As far as I know, only the "Image viewer" has this display problem. No idea why.


Ubuntu Server 12.04 connected to internet via adsl router with cable eth0. How can i share this connection

If I understand correctly, you want to use the server as a router. This is kinda complex, but not impossible. depends on how dedicated you are. in order for this to work, your server will need a second network card. bridge eth0 to eth1: https://help.ubuntu.com/community/NetworkConnectionBridge

you will need then a WAP (wireless access point), http://www.newegg.com/Product/Product.aspx?Item=N82E16833122013

configure your wap with setting from your router, and use eth1 to plug it in. you now have a wap plugged into eth1, which is bridged to eth0.

there is much more that will be involved with configuring, but this is the basic model.

good luck!


How can i have Fedora like system-config-*, system-config-network-tui in Ubuntu 11.04?

There is no TUI interfase in debian-like systems for system configuration (except for package configuration).

You have to edit config files. Most of them are very well commented. You can learn a lot just by reading them. Also, you can do much more. GUI interfaces are usually limited only to most popular options.

Assuming, you need to tweak SSH server and you don't know the config file location, you can find it via:

apropos -s 5 ssh to list man pages from section 5 (config files) related to ssh
dpkg -l | grep ssh list packages related to ssh, and then when you know the package:
dpkg -L openssh-server | grep conf find config files in that package
or you can locate conf | grep ssh

Once you know the config file, make backup, read it, learn and play with it.

Have fun.


Unable to fix unmet dependencies problem (after SDK installation via .sh)

It seems you are running 14.04, but the page only says the SDK install script has been tested on 16.04. It is probably not compatible with 14.04 (it seems to install a version of libicu52 that depends on a version of libstdc++6 which is higher than the one in 14.04).

The only solution I see is to install it on a 16.04 system.


Is there any driver available for Radeon XPRESS 200(M)?

I dont think FGLRX will work. I think it will not even show on the restricted drivers section either. In my humble opinion, stick with the open source drivers. It will work without problem. But you can overclock or downclock your card using Rovclock app on software center. I already had one Express 200M and i used rovclock to gain a few more frames on some old games.
(Use Rovclock with caution to not burn your graphics card)
Edit: you dont need to install nothing in order to use the open source driver. it comes preinstalled on your ubuntu installation!

Regards.


i cant identify the model number of my nvidia card

Please try running the following command in terminal:

sudo lshw -C display

It should return information about your graphics details.


how to transfer installed programs to other pc

It's not impossible, but it is a lot of work. However, it sounds like you want to keep the applications settings so that you don't have to reconfigure things. Good news! Unlike Windows, settings are not connected to the application. All settings are stored in your home directory, so if you copy it to another computer and reinstall the software, it'll be exactly as it was on the other computer.

Transferring a specific applications settings is also very easy. New software will usually store their settings in ~/.config/application_name/, it's data in ~/.local/share/application_name/ and cache in ~/.cache/application_name. Unfortunately, not all applications follow that convention yet. The old convention was to store it directly in your home directory, such as ~/.appname.


How to fix apt-get "unmet dependecies" errors?

This line seems significant:
trying to overwrite shared '/usr/share/doc/libpng12-0/changelog.Debian.gz'
An older post (What is changelog.Debian.gz file during packaging?) suggests that you can safely remove changelog.Debian.gz (and you can certainly back it up with sudo cp /usr/share/doc/libpng12-0/changelog.Debian.gz ~/Desktop/changelog.Debian.gz)
So in this case I would start by removing the changelog, and then updating.
Usually, when I'm getting errors with apt or apt-get I also just run sudo apt-get clean to do some basic tidying.


Keyboard layout ignored after upgrade to 20.04

I've got a similar problem as well, but for portugue brazil layout that just got completely wrong layout after a system update yesterday. My solution is quite simple, just overwrite the "br" file in the path "/usr/share/X11/xkb/symbols/" with an ubuntu 18.04 "br" file. You can give a look below and see the differences I've found between them.

Hope it can help

22c22
20.04 <     key <AD03> { [            e,              E,        degree,          degree ] };
---
18.04 >     key <AD03> { [            e,              E,      EuroSign,        EuroSign ] };

44c44
20.04 < 000};
---
18.04 > };

161c161
20.04 <     key <AC10> { [            s,               S,               ssharp,            U1E9E ] };
---
18.04 >     key <AC10> { [            s,               S,               ssharp,           ssharp ] };

237c237
20.04 <     key <AC08> { [            s,               S,               ssharp,            U1E9E ] };
---
18.04 > "does not exist"


How to set up Micromax 353G wireless modem in 12.10?

First open terminal and run the following command:

lsusb

The out put will look something like this.

Noter here the device ID for your modem. For my case it is 1c9e:9605 from OMEGA TECHNOLOGY.
Now create a configuration file with above vendor and product id using following command:

sudo gedit /etc/usb_modeswitch.d/1c9e:9605

And add the following line:

DefaultVendor = 0x1c9e
DefaultProduct = 0x9605
TargetVendor = 0x1c9e
TargetProduct = 0x9605
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"

Save and exit to terminal. Now Run the following command:

modprobe usbserial vendor=0x1c9e product=0x9605
usb_modeswitch -c /etc/usb_modeswitch.d/1c9e\:9605

If commands run without any error, you should see your connection int the network indicator (Just click on it and see name of your mobile broad band is enlisted). You can click on the name and it will connect.
Now if you want a permanent solution of the above problem, so that you don't want to run the above commands in every session you can add the bellow mention lines the /etc/rc.local file. So the command will be automatically execute at the startup.

sleep 10
 modprobe usbserial vendor=0x1c9e product=0x9605
 usb_modeswitch -c /etc/usb_modeswitch.d/1c9e\:9605
 sleep 20
 nmcli nm wwan on
 sleep 10
 nmcli con up id "your connection name here"

Hope this will solve your problem.


Ubuntu 16.04 Login Issue after installing Nvidia Driver

Solved it! I have two HDMI outputs (one from the motherboard and one from the graphics card). I was using the one from the motherboard and after switching to the one from the graphics card everything worked perfectly.


New software can't be installed: Dependency Problems

Try these commands

sudo apt-get clean
sudo apt-get update
sudo apt-get install -f
sudo dpkg -a --configure
sudo apt-get dist-upgrade


saving gnuplot figure without displaying the plot

gnuplot has a set output command that I use to save a copy of my plot:

#!/bin/bash
# Run this script after synching the Palm with $HOME/Visor/.last

# Weight - extract my weight data fron the Visor, clean it
# up, and feed it to gnuplot

target=$HOME/Visor/var/Weight
visorhome="$HOME/Visor"
gnuplotdata="${target}.pltdata"
gnuplotout="${target}.ps"

# ... data prep omitted - data to plot is in $gnuplotdata

gnuplot <<EOF
set title "Weight and running average, in kilograms, for Walt Sullivan"
set timefmt "%y/%m/%d"
set xdata time
set format x "%y/%m/%d"
plot "$gnuplotdata" using 1:2 with linespoints, "" using 1:3 with linespoints;
pause 10 "Plot will close in 10 seconds, see $gnuplotout"
set terminal postscript enhanced color landscape
set output "$gnuplotout"
replot
EOF

exit 0

To learn more, type:

$ gnuplot
gnuplot> help set output
 By default, screens are displayed to the standard output. The `set output`
 command redirects the display to the specified file or device.
...


i would say you that just avoid two option and install ubuntu alongside windows 7,sometimes it shows these types of error messages so no need to worry.one better way to use any other os other then windows you can use vmware or virtual box.


Disproportional horizontal mouse speed with two monitors

I'm facing this issue as well in Ubuntu 11.10.

Try installing gpointing-device-settings:

sudo apt-get install gpointing-device-settings

Maybe it'll work for you by changing the mouse speed for horizontal scrolling.


Do not run as root

While you could simply activate the password for the root user (with passwd), do not do that. It's a very bad practice from a security point of view. Instead, you should handle permissions properly.

Run a file manager as root

You can start Nautilus with sudo privileges in the usual way:

sudo nautilus

Then you can copy the files that you need to move (I assume under /var/www). You can also open a file in a text editor, but keep in mind that the editor is going to run with elevated privileges as well. Do not run untrusted programs in this setting.

When you are done moving the files, you'll probably want to recursively fix the owner to www-data and its group:

sudo chown -R www-data:www-data /var/www/*


Your theme/icon pack doesn't know where those icons are.  Easiest way to fix it is to just specify which icon to use.

I added a .icons and .themes folder to my home dir and dropped icons in there.

If you don't want to change the icons set you can go to the one you want to change and edit it directly in /user/share/icons/<setname>


How can I check my computer manufacturer

sudo lshw -html > /tmp/info.html

and then open that html inside a browser with ...

firefox /tmp/info.html

Example from my machine:


Installing Ubuntu 16.04 - Out of Range issue (in Skylake)

News: I was able to run from the live-pendrive and install by using the nomodeset param. I learned how here:
Trying to install Ubuntu 14.04, monitor says mode unsupported/out of range

Bsically, pressing the "e" key in the grub menu and adding that string after the words "quiet splash".


I was able to run Cisco Packet Tracer 7.1 on Ubuntu 16.04 by doing the following:

1-Cisco Packet Tracer 7.1 requires an older version of a package not present on Ubuntu 16.04 so you need to get it by typing

wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-3ubuntu0.7_amd64.deb

2- To install the package you just downloaded type

sudo dpkg -i libicu52_52.1-3ubuntu0.7_amd64.deb

3- Verify proper installation using this commands

sudo updatedb; locate libicui18n

Check for the following packages to be installed:

/usr/lib/x86_64-linux-gnu/libicui18n.so.52
/usr/lib/x86_64-linux-gnu/libicui18n.so.52.1

Those are the packages needed by Cisco Packet Tracer to work properly.

Now you can type packettracer on terminal and the program should start.


Can I download videos from a YouTube search query using youtube-dl?

There is a built-in search option for youtube-dl. Old way:

youtube-dl "gvsearch1:how to create android app in app studio"

The argument is: gvsearchX, where gvsearch means use google and X is the number of results you want to download. So the above will search for "how to create android app in app studio" and download the first result.

(Update!) Seems like ytsearch (youtube search) is the better approach now:

youtube-dl "ytsearch1:how to create android app in app studio"


Just installed ubuntu on an acer latop and now the touchpad wont work. How do i fix this?

When booting get into the BIOS settings (F2) and set touchpad mode on "basic" instead of "advanced" (it's in a different part of the BIOS settings depending on the laptop, as far as I know). Then go to "exit" and choose "exit and save changes". Then get into Ubuntu (the touchpad will now work but not perfectly) and install the package "xserver-xorg-input-synaptics" (from a package manager or from the terminal with sudo apt install xserver-xorg-input-synaptics). After that, the touchpad will work perfectly on Ubuntu.

If you have dual boot, you will have to set it on "advanced" again in order to have it work perfectly on Windows, and on "basic" in order to have it work at all on Ubuntu. The package "xserver-xorg-input-synaptics" will give you on Ubuntu all the advanced functions that the "advanced" mode gives you on Windows (two fingers etc.)


If I'm not wrong, you can browser content of network disk "out-of-the-box" in Ubuntu, e.g., via samba [CTRL+L in nautilus and put in address bar
smb://hostname (or IP)]. The same can be obtained with afp, sshfs.

If you want to use it as backup I recommend some of the "supported" programs. See https://help.ubuntu.com/community/BackupYourSystem


kdenlive is more like a video editor which supports lots of audio/video/images formats, including mpg, flv, ogg, jpg, mp3, avi, wav, etc.

It is more like Sony Vegas in Windows and it allows you to merge between file formats/sources, this way you can put an image with transparency over a running video, change original audio and include effects, transitions, pan, zoom, crop, and other video effects. Color correction is also supported and it works project based, which allows you to create full scenes in a project and insert projects in a final project without rendering.

Some screenshots of my desktop are provided here to illustrate what you want to do: I am placing a png with transparency image over a video, zooming and positioning over the video.

Here we can see the media tracks, a video and a png image.

In this screenshot I am using pan and zoom plugin in order to resize and position the png over the video.

And we are using the composition video transition all over the png image's duration in order to place it over the video.

BTW: Pan and Zoom and other interesting plugins/video effects supports automation, which is useful for your desired "to put images on my hand (in the video) and have them fly all over the video"

A video editor is what I suggest you for this task, any of them are fine but if you are used to Movie Maker, Sony Vegas, Adobe Premiere, and these kind of software, you will feel comfortable when using kdenlive.

Good luck!


Chromium is kept under ~/.cache/chromium/Default/Cache.

Firefox is kept under ~/.mozilla/firefox/*.default/Cache.

You can navigate to those using Nautilus and selecting View > Show Hidden Files (or press crtl+h on a Nautilus window).

For Ubuntu 11: Make sure to be in the "Home" folder first then continue with the above folder navigation.


Cannot install nvidia driver on brand new ubuntu installation

I confirm I had exactly the same issue on fresh install of 18.04.2.
Solution here helped me.

My starting conditions:

After a fresh install, I had standard 390 drivers installed
Then I added this 3rd party PPA
Update to any higher version of drivers failed, with the same set of errors as yours.

Solution from the above link:

    sudo apt-get remove --purge nvidia-*
    sudo ubuntu-drivers autoinstall

The solution resulted in fully functional auto-install of latest 415.27 drivers.


One note - if you wait a month, you can get 18.04

It's possible to boot the .iso and install from a hard drive but
it's probably easier to use a USB.  I've only managed to do it the
first way on systems with more than one physical drive, and I had to
edit some grub configuration files to do it.
You are offered options when you do the install.
Here is what the options screen looks like on a preliminary version of 18.04:

Note that as @user68186 mentioned in a comment, there is an option to "upgrade" while keeping your files and your programs "where possible".  I personally haven't used this option.

You can use aptik to back up the list of your installed
programs and reinstall them.
Make sure you have solid, tested backups of your data.


This is a known bug. I couldn't Find a proper solution but i did find a work around.

Deleting partially downloaded

Open terminal Alt + Ctrl +T
cd /var/lib/update-notifier/package-data-downloads/partial
sudo rm *
If this dosent work you can try the workaround

skiping  hash sum check
This is not a solution but a workaround this is not recommened as it skips the hash sum check.

 TMP=`mktemp -d`
cd $TMP
grep Url: /usr/share/package-data-downloads/ttf-mscorefonts-installer | awk '{print $2}' | xargs -n 1 wget
sudo /usr/lib/msttcorefonts/update-ms-fonts $TMP/*
cd -
rm -rf $TMP

Source


How to configure dmenu to launch an application with arguments?

i3 on Ubuntu by default uses the dmenu_run script to provide a dmenu with all executables in your PATH, so no, you cannot launch an application directly without typing out the parameters each time (see remarks).

Option 1

You can create a wrapper script for spotify. This is a script with a line that provides the command with parameters. You could create a script named "spot", that looks like:

#!/bin/bash
spotify --force-device-scale-factor=1.5

Make the script executable and put it in a folder that is listed in your $PATH. Launching "spot" will launch spotify with the desired parameters.

Option 2

A more elegant solution would be to replace the dmenu_run script with the i3-dmenu-desktop script. i3-dmenu-desktop is an i3 specific script that creates a menu based on the available .desktop files on your system. It is thus mainly targeted towards graphical programs, which actually makes more sense for an application menu and looks better.

This change can be done in your i3 config file: in the hotkey definition for dmenu (Super+Shift+d in a standard i3 installation on Ubuntu), replace dmenu_run by i3-dmenu-desktop.

Then the solution is easy - and also elegant: find and open the .desktop file for spotify, find the "Exec=" line and add the parameters to the command listed on that line. You can find the .desktop file for spotify with the following command:

find / -name '*.desktop' -exec grep -H 'spotify' {} \; 2>/dev/null

Remark

It is possible in dmenu to run your application with arguments. Typing the full command in dmenu and add the parameters, then press Shift+Enter.
One could think bash aliases could come tho the rescue here. However, that would not work, because the dmenu_run script is populated by executable files on your system, and does not include aliases/


I was having a very similar issue and for some reason what worked for me was putting all my custom compose key settings at the top of the original file all the way over in /usr/share/X11/locale/en_US.UTF-8/Compose and then making a hardlink to it called .XCompose in the home directory instead of writing my own .XCompose in the home directory from scratch.
It worked for me, maybe it'll work for you.


Create a fresh install my friend.
Its always recommended to instead of an major LTS upgrades as some files remain residuals.

Its great you have windows7 running alternatively hence to start your startup USB installation from there.

Most importantly backup your data, I'm pretty much synced with Dropbox 24/7.


I accidentally clicked on zero brightness

If you are in problem same as mine follow the steps -

If you did not pressed the power button Yet.

Search for Two sun look like symbols in your PC, laptop, here blank (Not filled with color ) is for increasing the brightness and filled is for decreasing the brightness Look like this in Separate Keyboard  and looks like this in the Laptop Laptop Keyboard
Now Press the Super (windows or command) key with these keys to increase brightness press the super + Not filled Sun key

If you pressed the power button and computer is Lock now .

Search For a Bright FlashLight and Turn it on and place it on the edge of the screen and unlock your computer.
And then press super and Sun Look like (blank key with ) the Super Key

Once you changed the Brighness from slider in the Right hand side it will immediately changed in the settings of your OS so dont mess up with this thing


Is it possible to have an "Always on top" feature in (L)ubuntu?

Problem solved!

  Right-click the Window Decoration (Upper Window Border) => Layer => Always
  on top

Credit goes to "drooly" at the LXDE forums


What do the square brackets mean in an ubuntu terminal command's synopsis?

What do the square brackets mean?

Square brackets in a command synopsis mean optionality (i.e. whatever is listed inside of them is optional / not required in order to run the command).

  I used to think they just meant an argument or flag was optional, but [path...] and [expression] can't both be optional for find, right...?

They can; running find without [path...] and [expression] just prints the list of folders / files in the current working directory's hierarchy without any condition.

The [<expr>] construct along with other symbols / constructs commonly used in command synopses (e.g. |, alternation, and {<expr>}, repetition) are the same used to define formal languages in Extended Backus-Naur Form (EBNF), so EBNF's syntax is a a good reference to understand / remember what symbols / constructs in command synopses mean.