Mount point for data partition during installation

It appears not to be possible to define a custom mount point within the installer. It is designed only to assign system partitions. Thus, just create the partition that you will use for Data, but do not specify a mount point.

Once the system is installed, you can use the utility "Disks" to have your data partition formatted and mounted automatically to a folder of your choice.


no title in the task bar after wake up from pm-suspend on Ubuntu 16.04 running LXDE

Did you update the system? Are you running Unity or GNOME?
Try their Tweak Tools. They solve most problems with launchers.
If that doesn't work, try apt-get update.
Or else Reinstall(last resort!)


I was using an outdated version of Ubuntu SDK.
When I upgraded to Ubuntu 15.04, the SDK ppa was disabled, and I didn't receive further upgrades.

After enabling the PPA again, I had to do a sudo apt-get dist-upgrade:

Unpacking qtcreator-plugin-ubuntu (3.1.1+15.10.20150720-0ubuntu1~0vivid1) over (3.1.1+15.04.20150421-0ubuntu1~0utopic1) ...

Now the validation works.


Guess I will have to live with it. A nice approach is to open the media in a New Tab. That way, it won't open a new Folder, but you will need an extra Tab open of course.


udisks is asking you to specify the filesystem format because it cannot figure it out by itself. The reason it cannot is because you are telling it the wrong device to mount. You don't actually mount disks. You mount partitions (also called volumes). So instead of running

udisks --mount /dev/sdf

Run:

udisks --mount /dev/sdf1

That mounts the first partition on the disk (assuming the disk really is /dev/sdf). It's very rare for a floppy disk to have more than one partition. If it is not partitioned at all, then you can partition it with fdisk and then format it with mkdosfs, both of which must be run as root with sudo (or do both with GParted), but if that is the case, make sure it's the right device, because if it's a different drive with important data on it, you could lose that data.


Removed ubuntu, how do I now reset the MBR of windows 7 WITHOUT a Windows Repair Disk

Restart the computer, select windows from GRUB menu.
Press Enter to select windows, and immediately start pressing the F8 key multiple times until you get different option for booting
Choose the option Repair Your Computer.
Click the Next button.
Enter any authentication details if any
Choose the option Startup Repair from the next window and after the repair finishes,

Now your system will be directly booting to windows


Can Minetest for Ubuntu 19.10 be installed on Ubuntu 18.04?

You can download minetest for Ubuntu 19.10 and libncursesw6, libtinfo6 and libleveldb1d (the only missing dependencies) and it can be installed in 18.04. If it is installed correctly, there are no risks for your computer in running Minetest for Ubuntu 19.10 in 18.04.

Download links to minetest, libncursesw6, libtinfo6 and libleveldb1:

minetest
libncursesw6
libtinfo6
libleveldb1d

Open the terminal, change directories using cd to the directory containing the 4 files that you downloaded, and type:

sudo apt install ./libleveldb1d_1.20-2.1_amd64.deb ./libncursesw6_6.1+20181013-2ubuntu2_amd64.deb ./libtinfo6_6.1+20181013-2ubuntu2_amd64.deb ./minetest_5.0.1+repack-2_amd64.deb


You can get around the one folder restriction by using symbolic links.
Say your music folder is ~/Music and you want to import ~/OtherMusic, you can put a symbolic link for ~/OtherMusic inside the ~/Music folder.

In a terminal: ln -s ~/OtherMusic ~/Music

You might need to restart your music player for it to notice the sym-link.


Files icon disappears from the unity launcher

I had the same issue. I just upgraded from ubuntu 14.04.
Resolved by removing files from the launcher then draging it from the dash to the launcher again


How to create folder shortcut in ubuntu 18.4

You can do it from the command line:

$ ln -s /my/folder /my/link

to enable creating links from file manager, open the preferences dialog,

and under the "Behavior" tab, check the "Show action to create symbolic links" box


Nautilus "open in terminal" extension will not propagate SSH_AUTO_SOCK?

OK, it's a bug. Probably the nautilus issue is launched before the shell that sets up the SSH* variables.
Workaround
(ugly).

open a terminal
kill the file manager: nautilus -q
restart it again: nautilus & disown %%, in background and detached.
close the terminal

Now the new nautilus session in the desktop is descendent from a shell with the  SSH_AUTH_SOCK correctly set up, and the spawned terminal will have it all right.
Until nautilus crashes or die for whatever reason. In that case, repeat.


Could anyone explain me this AWK command please?

It instruct awk to use : as field (aka column) separator for each line in the file /etc/passwd and print the first field ($1) from each line to the standard output. See gnu awk manual for all the details on what awk can do for you.


Rule 1 in chain ufw-before-output has the additional condition of being only for the local interface (lo). The two packets that hit the ufw-user-output chain DROP rule would not have been destined for the local interface. They were also probably new tcp connection syn packets and therefore did not satisfy the RELATED,ESTABLISHED rule.


If you installed Google Earth with the .deb package from the web, you can use the same package with Ubuntu Software Centre to uninstall it. When you open again the package with the Software Centre you have the "uninstall" option instead of "install".

Also, you can use sudo apt-get purge google-earth-stable in terminal.

If you installed Google Earth via Wine, you can use the Wine uninstall app to uninstall it.


How to force hardware acceleration on Ubuntu 16.04 RX460

welcome to the community.

I was going to suggest triple-checking that the graphics card has power. However, you mentioned that the setup works with Windows 10. That indicates to me that the hardware inside the box is set up in a good way.

It is possible that you do not have the driver installed for your graphics card.

Low-hanging fruit: Main menu, Additional Drivers. See if your card shows up there.
Ubuntu has some wiki documentation on installing AMD drivers.
Finally, you might be able to install the driver manually. This would simply consist of downloading a zipped archive, unzipping, and placing in the correct folder (perhaps using sudo access).

I'm sorry to hear about your struggle, though I will admit, I am impressed by your persistence. You definitely have been putting in the blood sweat and tears - good luck!


How do I run a python script whenever a file is created in a directory?

Not a dupe, but in the accepted answer on this question, it is explained how to run a script (or any command) whenever a file is added or created in an arbitrary directory. In your case, the only needed event- trigger is:

-e create

Furthermore, since you are not using the path to the file as an argument, you can skip the --format -section.

The script to run in the background then simply is:

#!/bin/bash
DIR="/var/www/lager-scanner/filer/Nav/FromNav"
inotifywait -m -r -e create "$DIR" | while read f

do
    # you may want to release the monkey after the test :)
    echo monkey
    # <whatever_command_or_script_you_liketorun>
done

Explanation

As explained in the linked question:

-e create

will notice new files created inside the directory.

The options:

-m -r

are to make the command run indefinitely ("monitor") and recursively in the directory.

According to this, using pyinotify is not the best option.

EDIT

In a comment you mention it does not work, and you mention the targeted folder is remote. Although not exactly the same, the issue seems related to this:
the change is not visible to the kernel; it happens entirely remotely.

A (tested) work around is to mount the remote folder locally.


The command 'juju status' can not lookup nodes by name

+1
as a quick and dirty fix - added host to /etc/hosts

Got this: #juju  deploy mysql --show-log --debug

2014-05-29 10:39:53 INFO juju.cmd supercommand.go:297 running juju-1.18.1-trusty-amd64 [gc]
2014-05-29 10:39:53 DEBUG juju api.go:179 no cached API connection settings found
2014-05-29 10:39:53 DEBUG juju.provider.maas environprovider.go:30 opening environment "maas".
2014-05-29 10:39:53 DEBUG juju state.go:75 waiting for DNS name(s) of state server instances [/MAAS/api/1.0/nodes/node-cbc1066-e669-11e3-b5cf-0025900443f2/]
2014-05-29 10:39:53 INFO juju apiclient.go:114 state/api: dialing "wss://100-140.maas:17070/"
2014-05-29 10:39:53 ERROR juju apiclient.go:119 state/api: websocket.Dial wss://100-140.maas:17070/: dial tcp: lookup 100-140.maas: no such host


Running a program as another user without typing a password

According to sudo manual:

    By default, sudo does not modify HOME

It means that when your run sudo -u <dummy user> <command>, HOME is unchanged and point to the invoking user home directory. More precisely, the entire environment remains unchanged, and the command is executed, therefore, in the environment of the user who invoked sudo. Only uid is changed and when command try to write in $HOME it has not right permission.

In order to run command as <dummy user> without being prompt for the password and have the right environment, you should create a simple file:

    sudo visudo -f /etc/sudoers.d/myOverrides

with this directive:

    <user> ALL= NOPASSWD:/bin/su

That allow <user> to run su command as root without being prompt for password (<user> password) and running su as root doesn't require to enter the target user's password (<dummy user> in this case).

   sudo su - <dummy user> -c /path/to/chromium-browser

Another better approach, change /etc/sudoers.d/myOverrides with:

   <user> ALL= (<dummy user>) NOPASSWD:/path/to/chromium-browser

this allow <user> to run /path/to/chromium-browser as <dummy user> without being prompt for password.

   sudo -u <dummy user> -i /path/to/chromium-browser

where -i option, according to sudo manual:

  The -i (simulate initial login) option runs the shell specified in the
  passwd(5) entry of the target user as a login shell.  This means that
  login-specific resource files such as .profile or .login will be read
  by the shell.  If a command is specified, it is passed to the shell
  for execution.  Otherwise, an interactive shell is executed. sudo
  attempts to change to that user’s home directory before running the
  shell.  It also initializes the environment, leaving DISPLAY and TERM
  unchanged, setting HOME, SHELL, USER, LOGNAME, and PATH, as well as
  the contents of /etc/environment on Linux and AIX systems.  All other
  environment variables are removed.


access to websites is not under the control of the operating system. You can block applications, but not websites.

You can access (and block, for that matter) only by the use of "browsers." The one you used to post this question here, yes.

Suppose it's Mozilla Firefox. You can look for extensions that can do the trick for you. I would not go fishing for them, but I used to have an extension that would "blacklist" websites so that they never open.

If you don't use the browser, the website won't open, you understand that, right? So, the trick lies in the browser. Please post a similar question to the support forums of the particular browser(s) you use to access the internet and want to block sites from.


Public/Private keys are meant for administrators who manage many servers
Imagine you have installed Ubuntu in various family members' computer, who live in different cities. Periodically they call you to fix their computers. You want to remotely connect to these computers and fix them. This is where you may want to use public/private keys. The public keys will go to your various family members' computers. The private key stays safely with you. You can give the public key to anyone without any security risks. If your uncle's computer gets stolen with your public key, you need not worry about it. Just make another copy of your public key and put it in your uncle's new computer.
This is not the model of operation you have in mind. You have 30 users accessing one server. So each will need a separate pair of public and private keys. That is 30 private and 30 public keys.
Public/Private keys are not for normal mail and web services
Public/private key pairs are used in ssh protocol. I don't think they apply for mail and web services. There is a situation where public/private key pair is used in mail. That is for PGP or GPG encryption, where the receiver of the mail can be sure that it came from the sender. Here imagine you are planning a coup against your president. You want to send encrypted emails to your 30 followers. Most importantly your followers must be 100 percent sure that the email is from you and not from someone else trying to foil your plans. You create your private/public pair of keys and give a copy of the public key to your 30 follower. You encrypt your email using the private key. If your email can be decrypted by your followers using your public key, they will be 100 percent sure it came from you. This has nothing to do with how you or your your followers access the mail server. The encryption/ decryption is done in your/followers' computer.
In conclusion...
Unless you are planning to (1) give the 30 users command line access to the server using ssh protocol, or (2) you want all the users to use end-to-end encrypted emails, the public/private key is not for the situation you described.
If you envision (1) or (2) then each user will need to create their own private / public key pair.
For situation (1) all the 30 public keys will need to be stored in the ssh server that each user will have authorization to connect to.
For situation (2) each user will need to create their own private/public key pair. Then each user will need their own private key and the public keys of all the other 29 users to be able to read encrypted emails from the other users in this group.
Hope this helps


E: Malformed entry 52 in list file /etc/apt/sources.list (Component)

Line 52 appears to be this line

deb https://dl.winehq.org/wine-builds/ubuntu/bionic main

It should be

deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main

Run the following command to fix this problem:

sudo sed -i 's|/bionic|/ bionic|g' /etc/apt/sources.list


To remove the line use

sed -i '/SUKsoft:\s*$/d' your_file

Example

% cat foo
SUKsoft:
SUKsoft: App-Conduct_Risk_Comment
SUKsoft: App-Conduct_Risk_R
SUKsoft: App-Conduct_Risk_RW

% sed -i '/SUKsoft:\s*$/d' foo

% cat foo
SUKsoft: App-Conduct_Risk_Comment
SUKsoft: App-Conduct_Risk_R
SUKsoft: App-Conduct_Risk_RW


You are getting a 404  Not Found error message because there isn't a package named php7.0-soap in the ppa:ondrej/php PPA. php7.0-soap is provided by the php7.0 package from ppa:ondrej/php.

Installation in Ubuntu 12.04/14.04/15.10

Open the terminal and type:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0

Installation in Ubuntu 16.04→17.04

SOAP module for PHP (php7.0-soap) is a separate package in the default repositories for Ubuntu 16.04 and later. Open the terminal and type:

sudo apt install php7.0-soap

Installation in Ubuntu 17.10→18.04

Open the terminal and type:

sudo apt install php7.1-soap


Why am I not using the version of java that I choose, and what to do?

If you are manually installing a specific version of Java, at the very least, you will need to add it to your path.  It will look something like this:

PATH=/home/user1/jre1.8.0.60/bin:$PATH
export PATH

Add those two lines to the bottom of your .bashrc file.  This is assuming you unpacked it in your home dir.


How can I test if my ISP is throttling my connection to certain domains?

Check out the Glasnost test. Unfortunately, there's no way to tell for sure 100%, but right now the Glasnost is the best thing out there to detect traffic throttling. Also, there are datum for different ISPs and other valuable resources.


back/forward buttons don't show up in xev (pcmanfm doesn't work)

My bad I didn't have xvkbd installed. I installed it using

sudo apt-get install xvkbd

However, xev of course still has the specified output so an explanation as to its correctness would be valuable.


How to hide/disable unused wifi adapters

The idea is to hide the wifi box from the network menu.
Run the below command to hide it
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "Main.panel.statusArea.aggregateMenu._network._devices.wireless.box.hide()"

to revert back above command replace hide with show
Please note that when ever gnome-shell refreshes, the above command will reset to original state.. The workaround for this is to create a gnome-shell-extension.
for logout and reboots the persistence can be achieved by adding the above command in startup applications list.


Here are the commands that should upgrade your Debian install:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

EDIT: apt-get update would not take care of everything, because all that apt-get update does is pull new package definitions from the remote repositories.


I would change the order of the layouts in the /etc/default/keyboard file, so us is placed first in the list. It can be done from Settings -> Region & Language when you are logged in into a usual session.


The answer's a bit delayed, but still:

The tools karel mentioned above are a local installations of Linux on the android device, though it might be technically incorrect to call them "full" installations.

Both tools install a chrooted environment on the android device which in which the a common desktop Linux distro can be run "on top" of the Android OS.

You could certainly make the case that this is not a "full" installation, as it makes use of the kernel elements of the android OS it runs on top of: that distinction, however, is a very fine one and would not be particularly salient to even most IT professionals.

For both tools, you would end up accessing the Desktop GUI through a VNC: this VNC, however, would be pointed at the Android device itself.  Because the desktop distro will be running in the chrooted environment "on top" of the android OS (which controls the screen), it doesn't have a way a way to access the screen directly.
You're using VNC not because you need to access a screen remotely, but because you need to create a virtual screen.


dual boot ubuntu and windows 7.failed to boot into windows 7

Was your windows 7 system working normaly last time?

If yes, then
try to re-install grub2 into your main HDD (for example /dev/sda)

sudo grub-install /dev/sda

You may wanna check this out https://help.ubuntu.com/community/Grub2/Installing


Can connect to other wireless networks but not my home wireless network

First, reboot you system and see if it becomes normal.
If not so, completely revome your wifi network configurations. After that try to reconnect to it.


Error when trying to virtualize linux 5 in AMD ryzen 3

Fixed with Bios updates. Need to update bios so the ryzen AMD processors can use LINUX 5.


Cannot boot live cd, various errors(sometimes kernel panic, sometimes it goes to busybox)

Burn a new CD, it has been damaged.

Boot again on the CD and choose the "Check the CD for errors" option. I expect a lot errors.


Unable to install application through terminal

deb http://archive.ubuntu.com/ubuntu trusty main restricted c

is invalid. It needs to be

deb http://archive.ubuntu.com/ubuntu trusty main restricted


These are from snap packages. You have several of your packages installed using snap (which happens by default in ubuntu 18.04). This is normal and aside from removing those packages and installing them without snap you can't (or at least shouldn't) do anything against them.

Update: To clarify in regard to your question in comment, these are not exactly partitions but files that contain a filesystem inside and that are mounted to the respective location. That way the package creator can package up a whole application in a single file but the OS using the application can access all the files as it normally would. The concept used here are so called loop mounts.


I can answer my own question. I did a search on HDMI cards and found that, at least for the one I consider desirable, they require more power than my PC can provide. I am withdrawing the question.


Broadcom BCM4312 driver for Ubuntu 14/15?

Insert your Ubuntu instalation media(usually the USB flash drive)
Go to pool>main>d>dkms and copy the .deb file to a New Folder on your Desktop
Then go to pool>restricted>b and copy the .deb file to the same folder as dkms file(previous step)
Open a terminal and using cd command navigate to the New Folder
Run sudo dpkg -i dkms*.deb and sudo dpkg -i bcmwl*.deb and done, your driver should work now or after a reboot.


You can try to black list the MEI driver. In here

/etc/modprobe.d/blacklist.conf

put this

# Make system reboot
blacklist mei

EDIT:
Also try

sudo init 6

or

in /etc/default/grub

set

GRUB_CMDLINE_LINUX_DEFAULT="acpi=noirq quiet splash"

then

sudo update-grub

UPDATE:

reboot -f

OPTIONS -f, --force Does not invoke shutdown(8) and instead performs the actual action you would expect from the name.

or

sudo shutdown -r now


My wifi won't work, and it says Wi-fi is disabled by hardware switch

Try to find physical switch that is related to wifi on/off on Your laptop.


The error you are seeing comes from the PERL
Mail::Mailer
package.  Although Mail::Mailer supports sending e-mail directly with
SMTP (thus, no sendmail binary needed), it defaults to using
sendmail on Linux/UNIX and the only way to change that is through
change of the constructor parameters in the sources.

So, I can see only three options:

Install an MTA that provides command-line sendmail emulation;
package msmtp-mta provides that on top of msmtp; other MTAs
like esmtp and
nullmailer can also do
this.
Provide your own sendmail-emulation script that pipes input to msmtp; you can then direct Mail::Mailer to use that instead of the system-wide sendmail (see the Mail::Mailer doc for details):

export PERL_MAILERS="sendmail:/path/to/my/sendmail/wrapper"

Change the caff sources to create the Mail::Mailer object as:

$mailer = Mail::Mailer->new('smtp', Server => 'smtp.server.example.org');

instead of the default invocation that it is likely using now.


How would I batch rename a lot of files using command-line?

I use this for mass renaming: vidir. It uses more or less the same syntax us vi does!

apt-get install moreutils

Go to the directory with the 160k files

cd dir

Launch vidir

vidir

Next replace all : in the filename with e.g -

: % s/:/-/g

Do the same with other strange characters like ?

: % s/?/-/g

Now save the files, with :w

vidir allows editing of the contents of a directory in a text editor.

http://joeyh.name/code/moreutils/


I had the same problem with COMMLOST with a USB connection. After a lot of research, I found that with a USB connection you should change DEVICE /dev/ttys0 to DEVICE. This forces apcupsd to search everywhere to find the UPS and connect correctly.


it is pretty much easy to get wifi switched off accidentally - "Radio Frequency Kill Switch" is rather hidden below the front edge of the keyboard, it stops Wireless, Bluetooth and/or GSM/UMTS.


HP Spectre x360 does not wake up from suspend correctly after upgrade to 17.10

After a few days without the problem recurring, I confirm the update fixed it. Thanks Ubuntu ;-)


Try:

nordvpn logout && sudo chattr -i -a /var/lib/nordvpn/data/.config.ovpn \
&& sudo chmod ugo+w /var/lib/nordvpn/data/.config.ovpn && nordvpn login \
&& nordvpn connect


I have been unable to use persistent partitions, (casper-rw or home-rw), with SDC or Unetbootin installs of 64bit post 12.04 Ubuntu.

The persistent partitions do work if I make the drive using a grub2/iso install using MultiBootUSB. I understand mkusb also works.

With 16.04 I can not even get the drive to show in gparted to make the casper-rw partition.


Change directory in current terminal with terminal file manager

I know it's not the perfect solution but the tree command might help you with this.


What's the best tool to install deb packages?

The safest way is to use Ubuntu Software Center without adding personal archives to your system. You can also download them yourself: http://packages.ubuntu.com/ and use either Ubuntu Software Center or the command dpkg to install them.
A bit less safe is downloading DEB files yourself from resources you can trust. Personal archives are safe if you install them from launchpad. You can assume those personal archives have been tested and installed and when bogus all kind of alarms to go off.
Very unsafe is to install software from random locations on the web. If a random website offers a way to install software you need to make sure that the website is safe yourself. Installing MySQL by downloading from their site is all fine but installing MySQL from a random other site... I'd be very cautious.


You're using Intel graphics and the current open source driver doesn't have what Halo demands. It works great on AMD and Nvidia hardware. I too have been trying to get Halo to work on my Intel laptop.


Yep, you got it.

Just start it with a #!/bin/bash like you normally would. And make sure you sudo chmod +x /etc/cron.hourly/yourscript because it won't run without execute permissions.


Black screen on Ubuntu install; nomodeset doesn't work

18.04 LTS images use kernel 4.15, but support for the 3200G wasn't added until kernel 5.0.15, or 5.0.0-21.22 in Ubuntu, so you need to install linux-image-generic-hwe-18.04 after you get the installed system booted, or just install from a 18.04.3 or later LTS image. You did not say whether your boot failure was on booting the installer, or booting the freshly installed system. If the former, make sure you are putting "nomodeset" in the correct place in grub. I was able to boot an 18.04 disc on a 3200G (non-A300) that way. If that does not work for you, then there may be additional things your particular motherboard needs in grub, possibly "iommu=soft".


Adding shell access to existing users in zentyal

How to change the bash shell for existing users is explained here


lenovo bluetooth keyboard does not recognize FNLK in ubuntu =(

I had the same problem, following this guide solved the issues:

https://github.com/lentinj/tp-compact-keyboard

The link provides a udev script that will fix your problem, run it with
sudo ./tp-compact-keyboard --fn-lock-enable


Rhythmbox menu to import music is missing

So I found the issues thanks to reinstalling. It seems that there's a plugin installed rhythmbox-plugin-alternative-toolbar, which causes this issue.
Remove rhythmbox-plugin-alternative-toolbar then things worked out for me again. Looks a bit more ugly, but meh.
$ sudo apt-get remove rhythmbox-plugin-alternative-toolbar


shut down linux server and turn on automatically at specific time

First you need to check if you can use the RTC wakealarm to wake your system:

sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
sudo sh -c "echo `date '+%s' -d '+ 3 minutes'` > /sys/class/rtc/rtc0/wakealarm"
cat /sys/class/rtc/rtc0/wakealarm

Now check:

cat /proc/driver/rtc

This should return a list of parameters. Check the alrm_time is 3 minutes into the future and the alrm_date is today.

If it works ok, create a /usr/local/sbin/shutwake script:

#!/bin/bash
sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
sh -c "echo `date '+%s' -d '+ 7 hours'` > /sys/class/rtc/rtc0/wakealarm"
shutdown -h now

Finally edit your user crontab, type crontab -e and add the following line:

0 23 * * * /usr/local/sbin/shutwake


is possible connect the xbox360 controller to ubuntu without reciver?

Answer:

No, you cannot.

Explanation:

The XBox 360 Controller runs on a proprietary 2.4 GHz protocol.  While the Wii and PS3/4 Controllers run on Bluetooth.

There is no way to connect the XBox 360 Controllers to a PC without the use of either a USB cable or the Wireless Gaming Receiver.

Further Reading:

https://en.wikipedia.org/wiki/List_of_Xbox_360_accessories#Wireless_Gaming_Receiver


How do I wipe swap on a fully encrypted disk?

If you don't mind not being able to hibernate then you can just set up encrypted swap and never have to worry about the contents of your swap partition again. Your swap will be encrypted with a key that is randomly generated key on every boot. The key is only held in RAM. Once the power goes, your swap partition will effectively have random garbage that nobody (including you) will be able to decrypt.

The easiest way to enable it is to do:

sudo ecryptfs-setup-swap

See the man page for a little more detail. It is part of the ecryptfs-utils package.


According to this manpage on adduser, it will copy anything present in /etc/skel (or another skeleton directory, if specified) to the newly created home directory. The Ubuntu manpage only mentions files, but I think the functionality might hold for directories as well. So I suggest that you create a Mailbox directory in /etc/skel, along with any necessary subdirectories. According to the answer to When I create a new user, how do I automatically create a .virtualenvs directory in their home directory?, it works for directories as well.


You can install indicator-multiload by
sudo apt-get install indicator-multiload

then configure it to show only network graph and use inside LXPanel.

Other lightweight alternatives may be Conky or GNU Krell Monitors.


Execute:

sudo dpkg --add-architecture i386

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

sudo apt-get update && sudo apt-get install skype

This will resolve all the dependencies and install the package provided in the Canonical Partner repository. More information  in this link.


Zoom Conference (skype type of program) not working

From the documentation:

Installation

dpkg -i ZoomInstaller_i386.deb
sudo apt-get -f install

Should you come across any issues or be using the tar file to install, the following is the list of commands to install required dependencies

Ubuntu 12.04 32-bit

sudo apt-get install libegl1-mesa

Ubuntu 14.04 64-bit

  sudo apt-get install libglib2.0-0:i386 libegl1-mesa:i386 libxcb-shape0:i386 libxcb-shm0:i386 libgl1-mesa-glx:i386 libxi6:i386 libsm6:i386 libfontconfig1:i386 libxrender1:i386 libpulse0:i386 libxcomposite1:i386 libxslt1.1:i386 libgstreamer-plugins-base0.10-0:i386 libssl1.0.0:i386

Source: https://support.zoom.us/hc/en-us/articles/204206269-Getting-Started-on-Linux


How to Install Wifi Driver without Internet

Got it! I was able to download the correct *.deb files from packages.ubuntu.com and dependencies, namely broadcom-sda-dkms, dkms, and libiw-30. I used "sudo dpkg" for each of them after transferring them to the computer manually. After no errors and a couple restarts, now it is working like a charm. Thanks!


Internet connection not working on Foxit Reader (Ubuntu 18.04)

Copying from my other answer, over here:
WiFi connects, but pages don't load
If you haven't already, try this:
sudo service networking stop
sudo service networking start
sudo service networking reload

sudo service network-manager stop
sudo service network-manager start
sudo service network-manager reload

If you have Ethernet (working, that is) Connect to ethernet and:
sudo apt update
sudo apt upgrade
sudo apt autoremove

If you have net-tools installed:
sudo apt remove net-tools
sudo apt install net-tools

If you do not have net-tools installed
sudo apt install net-tools

And, I would reboot after this. Hope this can be useful!
Edit:  It cannot be something related to MTU?
How to change MTU without ifconfig in ubuntu 18.04?
Good luck;
Regards.


Upgrading Ubuntu to version 18.10 on the i386 architecture

Xubuntu and Lubuntu still support 32 bits for the 18.10 release, but not the Ubuntu 18.10 release.  Check your machine specs, it may actually be 64 bit, and you are just running a 32 bit release.  In that case, you cannot upgrade, but will need to backup your files, install the 64 bit version, then restore your files.

Even Xubuntu will be dropping 32 bit support for 19.04 (https://www.phoronix.com/scan.php?page=news_item&px=Xubuntu-No-More-32-bit) leaving Lubuntu as your only 32 bit option for after April 2019.


14.04 missing "/etc/init.d/ufw"? my firewall never auto starts

I also do not have /etc/init.d/ufw and ufw was not auto starting on reboot. But I did this

sudo apt-get install iptables-persistent

On rebooting I checked with

sudo ufw status

It showed active, It always used to show inactive in previous reboots and I used to have to do

sudo ufw enable

I have not installed gufw, I am beginner desktop user, so I have no idea why it worked and whether it will work for you, but it seemed simpler, may be it will help somebody.


You could add this to your ~/.vimrc file:

set number

But if you want that to happen only on files with txt extension:

autocmd BufReadPost *.txt set number

or perhaps better, on any file which Vim detects is a text file:

autocmd FileType text set number


Computer restarts instead of shutting down

maybe try

sudo shutdown -P now

If that works, then the problem is related to the desktop environment that you're using.


Open a command line (using Ctrl+Alt+t) navigate to that folder where all the .deb files are  ( cd ~/Downloads/folder_name) and there do a sudo dpkg -i *openoffice*.deb provide the user password and that should be all.


How do I install an older 2.6.37 Kernel Version?

first the warning
Changing the kernel is not to be taken lightly - you can leave yourself with serious graphics issues and other issues - and even non booting scenarios.
It is wise to disk-image with a good imaging tool such as Clonezilla BEFORE you start.
mainline kernels vs ubuntu stock kernels
The mainline kernels are built using an older toolchain than stock ubuntu kernels.  Its perhaps better to consider downloading ubuntu kernels from specific Ubuntu versions
For example - 2.6.38 for Natty, 2.6.35 for Maverick and 2.6.32 for Lucid.
However, you could look forward to v3.2 that is going to be used in Precise - some have reported good power-management issues with this kernel as well as the latest drivers.
There is a similar question here that will give you some further information: How to downgrade the Kernel on 11.10
Assuming your main issue is power-management, then before you consider changing your kernel - consider installing Jupiter - this is an excellent power-management tool.
installing from the mainline
If you must download from the mainline then the full instructions are on the community wiki. In summary 32bit or 64bit deb packages for headers & generic image together with a common "all" deb package.
All .deb packages can be installed with the same syntax:
sudo dpkg -i [package_name].deb

If you want to use 2.6.37 - then just use the latest 2.6.37.x version.  Note - none of these kernels will be receiving security updates - you will need to patch these yourself.
If you are using proprietary drivers (e.g. nvidia or fglrx) then you will need to reinstall those drivers.  It may be wise to rename your /etc/X11/xorg.conf file first before booting.


Execute script on every start, wakeup and activation!

It works as described in my question. But if your script needs a network connection, you have to wait several seconds before executing the script.


Drop/Undo sudo privileges on .py file which runs inside a program which runs from sudo previleges

Start your Python script inside your programm with

su -c '<your_python_script>' - <your_user_name>

Examples

$ sudo su -
$ whoami
root
$ su -c 'whoami' - aboettger
aboettger

or as script with the name foo

#!/bin/bash
whoami
su -c 'whoami' - aboettger

exit 0

example output

sudo ./foo
root
aboettger


Which LINUX command to be used for 'cut and replace a column' task?

What you request is basically incrementing a counter whenever column 4 changes. The awk command below does exactly that.

$ awk '$4 != last{count++};{$6=count;last=$4};1' input.txt
ATOM 1149 N MET B 1 56.923 131.264 45.113 1.00140.13 N
ATOM 1150 CA MET B 1 58.169 131.437 44.333 1.00140.13 C
ATOM 1151 C MET B 1 58.225 130.444 43.220 1.00140.13 C
ATOM 1152 O MET B 1 58.569 130.785 42.089 1.00140.13 O
ATOM 1153 CB MET B 1 59.401 131.239 45.231 1.00140.13 C
ATOM 1154 CG MET B 1 59.536 129.826 45.799 1.00140.13 C
ATOM 1155 SD MET B 1 58.315 129.397 47.077 1.00140.13 S
ATOM 1156 CE MET B 1 59.098 130.370 48.397 1.00140.13 C
ATOM 1157 N SER B 2 57.860 129.183 43.517 1.00 86.33 N
ATOM 1158 CA SER B 2 57.898 128.164 42.517 1.00 86.33 C
ATOM 1159 C SER B 2 56.887 128.522 41.486 1.00 86.33 C
ATOM 1160 O SER B 2 55.901 129.195 41.780 1.00 86.33 O
ATOM 1161 CB SER B 2 57.559 126.761 43.047 1.00 86.33 C
ATOM 1162 OG SER B 2 56.212 126.721 43.495 1.00 86.33 O
ATOM 1163 N ALA B 3 57.122 128.084 40.237 1.00 45.56 N
ATOM 1164 CA ALA B 3 56.217 128.412 39.183 1.00 45.56 C
ATOM 1165 C ALA B 3 55.730 127.143 38.568 1.00 45.56 C
ATOM 1166 O ALA B 3 56.393 126.109 38.624 1.00 45.56 O
ATOM 1167 CB ALA B 3 56.865 129.235 38.059 1.00 45.56 C

Theory of operation

Each awk command can be structured in this way:

awk '/Condition/ {code block to run on condition};'

If condition is missing, code block runs for any line, regardless of its contents. In this example, we check whether the $4 field (column) has changed ( $4 != last , reads as field 4 not equals to the variable last  ). If condition is true (which will be each time it changes and on the first line, when last isn't set yet), we increment the count variable.

The next code block {$6=count;last=$4} will run regardless of what line we're on. We just assign contents of count variable to field 6, and record what we saw in field 4.  The count variable will come into existence once the script encounters first line of the text and will be created when command evaluates $4 != last part. last, on the other hand, will come to existence when code evaluates {$6=count;last=$4} part.

Finally 1 at the end is simply a trick to make condition to always evaluate to "true" and print. Just a shorthand instead of {print} block.

To save  the result to a file, use > shell operator to redirect output in shell. For example

awk '$4 != last{count++};{$6=count;last=$4};1' input.txt > output.txt


what is the best casper-rw / live-rw format and why

File system for the casper-rw file or partition
The ext4 file system is more advanced than the previous ext2 and ext3 file systems. It is the standard file system used in many linux distros, and is well debugged and polished.
ext4 and ext3 have journaling, which helps a lot, when there are problems with the file system, and the file system must be repaired. But journaling causes additional write operations to the drive, and if it is USB pendrive or memory card, it can cause excessive wear of the memory cells. You can turn off journaling.

ext2 works well without tweaks in a USB pendrive or memory card, but I would recommend ext4 with journaling turned off.

In an SSD or HDD I suggest that you use ext4 with journaling turned on (which is the default).
Please notice that the casper-rw partition need not be in the same drive as the persistent live operating system. This works with all Ubuntu versions, when booting via grub, and I have read (but not tested yet) that the newest version of syslinux can manage it too.

I suggest the same choice of file system for casper-rw files and partitions.

File system for the home-rw file or partition
If you create a home-rw file or partition, the standard advice is to use the same file system and tweaks as for the casper-rw partition. But there is an alternative, that makes it available to Windows.
I am experimenting with the UDF file system for home-rw. It works well with Ubuntu persistent live systems, and when the [USB pen]drive is plugged into a computer running Windows, it will be mounted with read/write permissions, so that files can be transferred easily between the Ubuntu persistent live system and Windows.
Installed system in an external drive
If you want an up to date system with full flexibility concerning what to install, you should use an installed system, installed into an external drive like it were installed into an internal drive. Such a system can be portable between computers too, but not as portable as a persistent live system.
Links
Some claim on the internet that persistence reduces lifespan of the USB stick. Is this true?
help.ubuntu.com/community/Installation/UEFI-and-BIOS#Final_system_tweaks
help.ubuntu.com/community/mkusb/persistent#Partitions
Experimenting with the UDF file system for home-rw
Boot Ubuntu from external drive


Partial answer... work in progress...
I still need the terminal output of:
sudo blkid
sudo cat /etc/fstab
sudo fdisk -l
sudo lsblk

*screenshot of gparted /dev/sda

To check the file system on your Ubuntu partitions...

boot to the GRUB menu

choose Advanced Options

choose Recovery mode

choose Root access

at the # prompt, type sudo fsck -f /dev/sda5

repeat the fsck command if there were errors

at the # prompt, type sudo fsck -f /dev/sda6

repeat the fsck command if there were errors

type reboot


"grub rescue>" Can't get past this message in spite of EVERYTHING! There must be a way?

Web-E, thanks for your help, appreciate you coming back to check afterwards. The irony is, I understand exactly what you are saying and agree 100% but.... Within the BIOS, you can alter the order that things boot in and I'd already made sure that the HD was LAST, i.e. after everything else in boot order.  In fact, so paranoid was I that this was the issue, I did it three times (!) before posting on here, but that didn't make any difference at all. I have no idea why, because it should do shouldn't it?

Anyway, the answer was this section on the Grub2/Troubleshooting page (link above).  This maybe useful for others with a similar problem possibly.

Extended Fix:

The following commands should set the root and prefix paths and load the kernel and initrd image. With this information, GRUB 2 does not need a configuration file and should be able to boot the system if the only problem was a corrupted or missing menu.

Press ENTER after completing each line. Some entries will not provide feedback. This is normal.

If a "file not found" or similar error message is displayed while running these commands, ensure you are using the correct X,Y values and the correct paths are set.

set root=(hdX,Y)

Confirm the correct X,Y values and press ENTER.

Example: If the Ubuntu system is on sda5, enter: set root=(hd0,5)

linux /vmlinuz root=/dev/sdXY ro

Example: linux /vmlinuz root=/dev/sda5 ro

If the vmlinuz symlink does not exist, use the full path to the kernel in /boot

Example: linux /boot/vmlinuz-3.2.0-14-generic root=/dev/sda1 ro

If successful, after ENTER there will be a slight delay and no messages.

Wubi users only - substitute these commands in Steps 1 and 2:

set root=(loop0)
linux /vmlinuz root=/dev/sdXY loop=/ubuntu/disks/root.disk ro
initrd /initrd.img

Selects the latest initrd image.

If the vmlinuz symlink does not exist, use the full path to the initrd image in /boot

If successful, after ENTER there will be a slight delay and no messages.

boot

Boot to the latest kernel on the selected partition.


Removing characters (digits) after the first dash (-) from the end of a fileName

I think this shoud do it:

for f in *.mp3; do
  echo "Moving $f to ${f%-[0-9]*}.mp3"
  # below the action commented
  # mv "$f" "${f%-[0-9]*}.mp3"
done

Output:

moving songName(1973)-artistName-12345.mp3 to songName(1973)-artistName.mp3
moving songName-artistName-12345.mp3 to songName-artistName.mp3
moving songName-artistName12d-12345.mp3 to songName-artistName12d.mp3


If you can ping from one subnet to another, there's no problem in your routing table. Probably packets from local networks are being sent to Internet unmodified. The problem is that private network addresses are not routable through Internet.

Private network addresses must be NAT'ed before sent to Internet. Try running:

sudo iptables -t nat -A POSTROUTING -o p1p1 -j MASQUERADE


uninstall xampp on ubuntu using terminal command

As stated in this post:

To Uninstall Xampp, use
sudo -i
cd /opt/lampp
./uninstall

But I think you may simplify by just typing:
sudo /opt/lampp/uninstall


What is the PATH environment variable and how do I add to it?

Partial duplicate: How to add a directory to the PATH?

PATH is an enviroment variable. It basically tells your machine where to search for programs, so when you run your picc program you can just do this:

picc

instead of

/usr/hitech/picc/9.82/bin/picc

To add a directory to your $PATH, follow either one of the options below.

Method 1

Edit ~/.profile:

gedit ~/.profile

find the following line:

PATH="$HOME/bin:$PATH"

and change it to:

PATH="$HOME/bin:$PATH:/usr/hitech/picc/9.82/bin"

Method 2

Run the command below in the terminal:

export PATH=$PATH:/usr/hitech/picc/9.82/bin


Can't get IP via DHCP in 19.04, but able to get if I use Windows

Well I seem to have found a solution. As described in the comments, examining the DHCP discovery packets with Wireshark for both Windows and Ubuntu indeed revealed a difference. Windows was sending some DHCP options different from those in Ubuntu, in particular option 60, vendor-class-identifier.

I then modified /etc/dhcp/dhclient.conf so that my Ubuntu DHCP packets resemble the ones from Windows. It wasn't initially working, but then running dhclient manually with the -v -cf options (-cf allows to read the configuration file as an argument) showed that there was a syntax error in the dhclient.conf that I had modified due to a missing semicolon.

So far things are going smoothly, I can now see leases being granted and renewed in /var/lib/dhcp/dhclient.leases. Thanks to chili555 for taking so much time to help me!


I lost track of this account, I just logged in and saw that this question has received a fair number of views.

I've since been using TinyMediaManager for handling TV Shows and Movies.

Hints for TMM:

TV episodes can get messy if the filenames aren't standardized. It can be set to handle a number of different season/episode formats. Season 1 Episode 3 could be S01E03, x103, or whatever else you can think of. After having TMM mistake resolutions like "1920x1080" in the filename for Season 1 Episode 8. I decided to stick with the S01E03 format and only scrape that format. In case you have a collection of episodes that aren't already in this format, I use pyRenamer to rename the files into that format (which takes some getting used to, an understanding of regular expressions is helpful).
DVD order vs aired order, some shows will order their episodes differently on DVD vs how they were originally aired. TMM has an option to use one or the other, but you will need to know which order the episodes are in prior to scraping/renaming. Episodes can end up with the wrong names/metadata but the episode order will remain the same. If you scrape the episodes the wrong way, you can just change this setting and rescrape.

MusicBrainz Picard for music. This program can be somewhat painful and it took a significant amount of time for me to update the metadata on my music library.

Hints for MBP:

Most albums by lesser known bands, and even some by major artists, won't show up in the MusicBrainz database, if you are willing to put in the effort you can add them to the database yourself.
Some albums will match with albums with a similar name by a different artist. Some of these incorrect matches boggle the mind by how far off they are. When you're looking up albums I suggest batching one artist at a time so that when these false matches occur it will be obvious by the artist name.
I  often have trouble getting/maintaining a good connection to the db from the Picard app (not sure if they expect me to have a better connection than I do, or if their servers are a little overwhelmed). Often it will tell me that an album wasn't found but really it just gave up looking for it. Looking up the album multiple times often solves the problem. If it still doesn't find it, you can look up the album in a browser and add it to Picard from there. If you can't find it via the MB website, it probably hasn't been added yet (sometimes it's just hard to find).
There are often many versions of each album (different releases in different countries, remasters, etc), you'll need to figure out which one you have (often your album will be identical to several versions).
Album information (including alternate versions) often fails to download with or without any error message so you may end up refreshing the album info in Picard, or using the browser again to find the right version.
When you open your browser from one of the Picard context menus (right click -> open release in browser) you will be able to search the database for your album, once you find it there will be a "tagger" button that will allow you to import the album information to Picard directly. If you just open a browser and navigate to the website, the "tagger" button won't be there.

The initial process of updating my music library was very painful, I did it occasionally over several months, a few dozen or so albums at a time. After getting through that, updating meta on new music as I add it is fairly quick and easy.

Neither of these programs are perfect but after some getting used to, they get the job done.

Note: both of these programs would normally be used to keep track of your entire library. I use them just for getting meta/renaming before I move the file into my library. I keep a directory for media that is to be updated and one for files that have just been updated (with sub-folders for TV/Movies/Music). I load media into the programs from the to be updated and use their renamers to have the files transferred into the updated directory. After which I will check to make sure nothing went wrong (only happens if I've made a mistake) in the renaming and use an rsync script to move the files into their final destinations.


Turn Perl's autosplit on. It splits the lines into the array @F (on whitespace), so $F[0] contains the first column.

ps -ejH | perl -a -E 'if (/bash/) {say $F[0]; last;}'

You can also get rid of the grep and head commands because grepping is a thing Perl can do quite good.

The head can be replaced with a call to last which breaks the implicit while(<>){...} loop imposed by the -a switch. On older Perls (before v5.20) you might also need the -n switch but nowadays -a implies -n.

Although I love Perl, I'd do this particular one with awk:

ps -ejH | awk '/bash/ {print $1; exit}'


How to set priority for Sound Output Devices in Gnome

I don't know how you would set priority, but there is a way to shut off the S/PDIF. Open Pulse Audio Volume Control and turn off S/PDIF. It should disappear from the Volume Settings list. (found here - https://askubuntu.com/a/1186737/150363)

As for the headphones bit, you may still have to manually choose them, but when you unplug (if you followed the above), it should go back to HDMI.


Xfce application finder one Enter keystroke

This does not appear to be possible since the Launch button is not enabled until your choice is highlighted by clicking on it.

But there is a workaround that's pretty close to what you want: two quick taps of Enter instead of one.

When there is only one choice left (or when your choice is at the top of the list), the first Enter will highlight your choice and the second will launch it.


after upgrade to 13.10 gnome-terminal is black with no decoration or text. How to fix?

EDIT: After fiddling around a lot, I found the solution!

Install Mir as suggested at https://askubuntu.com/a/363488/230195!

=== Original Post ===

I've got the same problem since today though I have absolutely no idea what could've broken my system like that.

Changing the Profile Preferences doesn't seem to change anything, the window still isn't visible. Moreover it seems like it's not only a problem in gnome-terminal... when launching byobu the window will also stay transparent.

I also noticed that when logging into Unity instead of Gnome on my system, the notifications (e.g. WiFi connect) are entirely black, as well as terminals spawned via Ctrl + Alt + T. The application launcher and indicator bar are also not present.


Window menus stick under window name. How to fix this?

I fixed the menus.
I uninstalled indicator-appmenu and reinstalled it with

sudo apt-get install indicator-appmenu

It seemed to have been missing some dependencies.


Analog sticks not working, qtsixa+PCSX combination

some older games doesn't support the analog stick on Playstation One
Therefore was the Analog Button on original PSX1 Controllers

But you can have a workaround for this

Configure the Device to act as mouse/keyboard input in qtsixa using 2H4U profile is great)
disable joystick input

in this config the analog stick is keyboard up/left/down/right

start PCSX go to Configure PAD set it to none
set DPAD directions to the analog stick settings

quit PCSX

go to qtsixa, enable joystick AND mouse/keyboard

open PCSX
configure PAD set it to Playstation Controller

NOW the analog stick sends also the keyboard controls to the DPAD config
by that config you are able to control any non analog PSX Game by the analog stick

TRICKY, isn't it


ubuntu 12.04 with windows 8 dual boot not booting

The error message refers to /efi/Microsoft/Boot/grub64.efi (I presume there was a efi after the dot there, although your message didn't say so.) This implies that shim is installed in /efi/Microsoft/Boot, presumably as bootmgfw.efi, and is being launched; however, your Boot Repair output shows no evidence of grubx64.efi being present there, as it must be. (Shim is hard-coded to launch grubx64.efi from the same directory in which it resides.)

This suggests an easy solution: Copy grubx64.efi from /efi/ubuntu to /efi/Microsoft/boot. You'll need to use an emergency disc and mount /dev/sda2 somewhere convenient to do this copy, of course.


Features missing after updating to 14.04, how to get them back?

System settings come back after reinstalling this:

sudo apt-get install ubuntu-desktop

Sound is also back after

sudo apt-get install pavucontrol

then running

pavucontrol

and pointing it to the right device.


Mounting Ubuntu ISO on USB failed and now USB doesn't work

Cooler heads should prevail... reboot your computer, and the USB port will probably be fine. Prove it by plugging in a DIFFERENT USB device.

My experience is that building a USB flash drive is very unreliable, no matter how it's done. Burn your .ISO to a DVD, and then boot the DVD to install Ubuntu. It'll work fine.

While you're in Ubuntu, trying formatting the suspect USB flash drive, and it too, will probably work fine.


Validity Fingerprint Scanner VFS491 not working

I use fingerprint-gui on my Thinkpad, but I don't know if it will work for you. Here's the Launchpad page: https://launchpad.net/~fingerprint/+archive/ubuntu/fingerprint-gui


14.04:dpkg error processing package droidcam (--configure):

I don't know where that package is from, but I'm guessing you have added some sort of PPA. It seems this package is broken, so I would recommend removing it and finding some other way to install it.

$ apt-get purge droidcam

That should let you use apt again.


You could probably use a case statement for this one. Let's say we create a script called stage.sh, then it could be something like this:

#!/bin/bash
case $1 in
        1) echo "stage 1" ;;
        2) echo "stage 2" ;;
        3) echo "stage 3" ;;
        *) echo "unknown stage" ;;
esac

What it does is that it takes the first input ($1) when called from the command line and matches it with the case statement. Here, running ./stage.sh 1 would display stage 1, and ./stage.sh 5 would display unknown stage since there is no case match (so it will resort to the *) option).


Recently I have posted the compass to the store. However, to use it You have to install the open store. It breaks the app armor by reading device file...

https://open.uappexplorer.com/app/compass.kwek


Ubuntu Update Manager is showing an error message

This means that there is something wrong with line 57 in your sources file. We need to fix that.

First, open up a terminal. To do so, hit Ctrl+Alt+T. In the prompt, type the following

gksu gedit /etc/apt/sources.list

Enter your password when prompted. This command opens up the file sources.list in a text editor so we can edit it.

You need to go down to line 57. You don't have to count the lines, you can look at the bottom right corner where you can see Ln 1, Col 1. So go to line 57. Let's say it looks something like this:

deb http://extras.ubuntu.com/ubuntu main

You need to change it to look like this:

deb http://extras.ubuntu.com/ubuntu raring main

Notice the difference between them? The difference is the word raring. However, this word corresponds to the Ubuntu version you are running. So for example, if your Ubuntu version is Ubuntu 12.10, the word should be quantal. To know which word you're supposed to put, look at the other lines in the file, you'll find the word in all the other lines. Once you add the word in, hit Ctrl+S to save the file, and close the window.

Now go to the update manager and check if the problem is solved or not.


Such an upgrade shouldn't damage the Linux installation (but I don't guarantee that), but it will almost certainly set the Windows boot loader as the default. This will necessitate restoring GRUB (or whatever you're using as a boot manager) as the default boot program. You can do this in Windows via the bcfg command, in Linux with the efibootmgr utility, or in various other ways.


Help with vlc and video capture device error

stk1160 capture device with vlc. Paste into a command line:

vlc v4l2:///dev/video0


Yes, you can - but I sincerely can't recommend you to do that.

First of all, it would take a great amount of time to upgrade through all of those version. I could risk to say about 1 hour each.

Also many people suffer from bugs (mainly with configuration files and strange behaviors) when they upgrade from the Software Updater. This amount of upgrades could (and probably will) lead you to a few annoying bugs.

So I'll recommend you to do a fresh install. Go to http://www.ubuntu.com/download , grab the ISO from the version you want and replace your old Ubuntu version with the new one. Remember to backup all of your important files.

Doing a fresh install will take you a lot less time and you'll avoid headaches.

Finally, Wily Werewolf (15.10) is a regular release and will reach its end of life in July this year. So you might consider waiting for Xenial Xerus' (16.04) release, in April, to upgrade, since it's a Long Term Support version.


Is it possible to mount windows drive in Ubuntu and make it writeable?

I am not sure but try to give the file privileges
I mean  sudo chmod +x "File name or path to it"


Desktop larger than screen when HDMI plugged to GPU on 4k Samsung TV

Your TV is overscanning. Unfortunately this is the default setting in most brands, to account for cheap boxes from cable TV providers.

Solution:

ALWAYS set Ubuntu for the TVs native resolution and then change the mode in the TV itself. The settings is either in the settings menu, in a dedicated key in the remote control or both. Check your user's manual.


My Acer Apsire S5 prints the same warning every time I boot Debian Buster.  I don't use TPM at home, so I disabled TPM in the BIOS to get rid of the warning.

To disable TPM in InsydeH20 BIOS:

Enter BIOS setup (press F2 during POST).  On the Security page, set a password for Supervisor to unlock TPM state.  Toggle TPM off.

Then clear the password Supervisor, select Set Supervisor Password, enter the current password, then press Enter twice to leave the new password blank.

Save and exit.


how to know which version of the compiler used to install a program from source among all versions of the that compiler

GCC writes a .comment section containing version info in the compiled object file.

You can try to dump .comment section from the binary to find the version string.

Use objdump and add --section to specify section name.

For example, if your compiled a program named foo in the source dir, you can run the following commands to get GCC's version info:

$ objdump -s --section .comment foo

sizeof:     file format elf32-i386

Contents of section .comment:
 0000 4743433a 20285562 756e7475 2f4c696e  GCC: (Ubuntu/Lin
 0010 61726f20 342e362e 332d3175 62756e74  aro 4.6.3-1ubunt
 0020 75352920 342e362e 3300               u5) 4.6.3.

Then you know it's compiled with gcc 4.6.3.


Is Emerald Theme Manager available for Ubuntu 14.04

Yes it is. Open a terminal (Ctrl+Alt+T) and run:

sudo apt-add-repository ppa:noobslab/themes

sudo apt-get update

sudo apt-get install emerald

Done.

How to activate and use Emerald look here


Docker entrypoint will not prompt for my input

Running ssh-agent bash will start a new bash with the environment variables set. But since you don't provide any input, the bash exits, together with the ssh-agent and then in the original bash, there is again no connection to your ssh-agent. With a diagram of processes how they are called:

bash
 '- ssh-agent bash
   '- bash < no input, exits cleanly
 '- ssh-add ...

What you want to do instead is to invoke ssh-agent the intended way:

ENTRYPOINT eval `ssh-agent` \
       && ssh-add directory/id_rsa


Error when updating my new Ubuntu 12.04 LTS laptop

This could be worth a try and it is probably best to try before allowing the laptop to shutdown/reboot

Start by shutting down the update manager then open a terminal with ctrl-alt-t or searching for it in the dash.

Then run:

sudo killall dpkg

sudo dpkg --configure -a

Then try again with

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


One rsync cronjob runs, but doesn't copy files

Stop the MySQL server before you start the backup

sudo service mysql stop

And you have a permission problem

  rsync: opendir "/var/lib/mysql" failed: Permission denied (13)

therefore use the crontab of your root:

sudo crontab -e

I would prefer a backup with mysqldump. Thus, the service must be neither stopped nor restarted.

mysqldump -u root -p --all-databases > /media/stan/Seagate\ Expansion\ Drive/backups/

Or taken from the comments (@NormanBird) below, with gzip

mysqldump -u root -pmypass --all-databases | gzip > /media/stan/Seagate\ Expansion\ Drive/backups/mysql/mysqlbak-$(date "+\%Y-\%m-\%d_\%H:\%M:\%S").sql.gz


Can I customize the bottom help lines in Nano Editor?

The shortcuts are hard coded so they cannot be changed without modifying the source code. You can find some of them spread throughout the global.c file.
If you want to hide the shortcuts you can start nano with the nano -x flag or add set nohelp to your ~/.nanorc file.


How can i configure Tor with bridge and privoxy to proxy entire system

First of all you need to open terminal and install Tor:

sudo apt-get install tor

Then check that the tor is install successfully or not by:

service tor status

If the server was not run then run by:

service tor start

After runing tor you can see the log of the tor by

journalctl -exft Tor

Then you must search for below line in log

  Bootstrapped 100%: Done

If you can not find this line in you log, then its means that your tor doesn't run and you should configure Bridge for your tor. for configure tor bridge at first install obfs4proxy by:

sudo apt install obfs4proxy

then you should get the bridge line. for get the bridge line go to https://bridges.torproject.org/
and get your bridge line.

After getting your bridge line you should open torrc with command:

sudo vim  /etc/tor/torrc

then add the following code to end of torrc file

UseBridges 1
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
Bridge obfs4 89.163.181.170:443 A0D27B876F1DD14A15C223F48BD9CD4A6BC4517E cert=nOm4+38yOIZ+91ux/vMUOZjUv6pocGtPkZ1QUXumE03Y8akJmrdCwXzxvQVqVPLMlwQrXA iat-mode=0
Bridge obfs4 50.39.226.171:47368 93BBD8F80D5F5A8A55829A3168278327BABC14D7 cert=e7kfc/GAUTzv6OEu/a9zQnzGQu9dzhs4jZSmKCXYCaOVZUf5vci2KKilPzR6pUKiiO9hNA iat-mode=0
Bridge obfs4 79.199.47.29:9002 6BF05636116C654B65C3F546414739D164D857F1 cert=KmcvY9E6kf6P9ve9gZl0dg0s4bPV4Ik8u25wuJM0p9XXwC+cCxvI8/2jQhjL1qDFFqt9VQ iat-mode=0

Make sure that you used your own bridges. after setting your bridge restart your tor service and check the log by:

sudo service tor restart

journalctl -exft Tor

If you want to proxy entire system such as browser, http, https and etc then privoxy done it for you. install privoxy

sudo apt-get install privoxy

go to privoxy configuration file

sudo vim /etc/privoxy/config

remove the comment of line

forward-socks5t / 127.0.0.1:9050 .

save the file and restart privoxy.

service privoxy restart.

for proxy http or https traffics in terminal use these command.

export http_proxy="http://127.0.0.1:8118"
export https_proxy="https://127.0.0.1:8118"

or if you use the desktop version of ubuntu you can set the proxy in Network configuration like the image below.


sync two folders on two separate ext HDD

I use rsync  for tasks like that:

rsync -a "/path/to/hdd1/dir-a" "/path/to/hdd2/dir-b"

You can add a cron job to schedule the task, I recommend redirecting rsync’s output to a log file. E.g. to run it every 10 minutes and save the output in ~/logs/rsync.log:

*/10 * * * * rsync -a "/path/to/hdd1/dir-a" "/path/to/hdd2/dir-b" >~/logs/rsync.log

If you prefer a GUI you can use grsync :

When you configured it to your needs, press Alt+R to display the correspondent command line.


The option 'transform_symlinks' does not work anymore, you need 'follow_symlinks' instead.


Launcher missing after installing nVidia driver

Try to type Alt + F2, search for "Software sources" go to "Additional drivers" tab and select driver for your nVidia.
Restart computer and may work.
Worked for me.


Ubuntu 18.04.2 install python2.7, unmet dependency

you just have to uninstall already installed python2 packages with this :

sudo apt purge libpython2*

Then install python2 :

sudo apt install python


Can I run Ubuntu Live from a USB flash-drive without destroying the data on it?

A live usb is like carrying a portable operating system. You can plug in , do your task. All your changes are saved (but not in live cd as cd is read only memory).But following this will damage the usb very quickly as running an OS uses large number of read and write.

You can setup your computer to duel boot with windows. In this way you can choose either operating system when your computer boots up. Once you are in one OS, you have to reboot to go to other OS. You can't change OS without rebooting.

There are two way to install ubuntu with windows xp.

Safest Way

Install using wubi installer. In this way ubuntu will be installed as a program in windows and you can easily remove it if require. (But remember you have to Reboot when changing OS)

The other way
Defragment your C: drive.

Boot using usb or cd. Choose to install ubuntu alongside windows. Ubuntu will shrink windows partition and install ubuntu. This is bit complex task and removal is not easy.

Also You can install ubuntu in virtualbox, in this way you have to start windows, run virtual box and use ubuntu inside it. It generally require system with good processing power.


Error, then black screen after wubi 11.10

Well, I don't know if this is going to solve your problem, but if I face this situation, my first shot is to:

Fully de-install Wubi,
Turn off Windows completely (pull it out from power source for at least 10 seconds, in your case take off the battery too for at least 30 seconds),
reboot,
re-install Wubi from zero.

My first try with Wubi failed too; with other hardware configuration. A good search in Google usually finds a good solution for this situation too.


Where is rotatelogs on Ubuntu 16.04? (Upgrade Apache 2.2 to Apache 2.4)

To find the path of an executable, use which.

which rotatelogs on a default Apache installation version 2.4.18 on Ubuntu Server 16.04 gives /usr/bin/rotatelogs.


I have searched for all locations containing mime type associations and finally found the solution:

$ nano ~/.config/mimeapps.list

application/pdf was correctly set but image/pdf was set to ImageMagick. Edit it to your own preferences (evince.desktop in my case).

Checking if the PDF file is of application or image type was one of the first things I did (and it was application/pdf), so I suspect this is a bug.


Thank you all for the feedback.

After a few more hours of hacking I concluded that the problem is the graphics card not being properly configured: It wasn't recognized until yesterday's update where I have seen a new Nvida_connect driver.

Now if I lspci I see the card as a GTX 555 card while the one on my laptop is a newer GT635M. If I play around with the /etc/X11/ config files the display gets messed up.

The heating problem is probably due to a bad initialization of the GPU.
My conclusion is that I should wait for NVidia to release the proper drivers and the problem will be solved. The other issue still open now, unrelated to this question though, is how Ubuntu 12.04 is handling dual video carded laptops. I'll try and play with that too and post another question later on.


WiFi is disconnecting intermittently on ACER E5-573G with a Linux platform

@heynnema
Thank you very much heynnema, but I have already fix the issue.
I have modified this answers "No Wifi on Acer Aspire E5 573 on any Linux Platform" and "https://esc.sh/blog/wifi-issue-on-acer-laptops-running-linux-qualcomm-atheros-device-0042/" and it work for the moment. I didn't want to try before because I don't understand very well what the different files are for, but I've taken a risk and it seems that work.

My solution:

git clone https://github.com/kvalo/ath10k-firmware.git
sudo cp -r ath10k-firmware/QCA9377 /lib/firmware/ath10k/
sudo mv /lib/firmware/ath10k/QCA9377/hw1.0/CNSS.TF.1.0/firmware-5.bin_CNSS.TF.1.0-00267-QCATFSWPZ-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin

and again heynnema thank you very much for help me answering the question.


If you want to know the exact debconf option that is causing user interaction then add DEBCONF_DEBUG=5 to the kernel boot parameters.  This will cause debconf to print much more detail about the current settings of each variable and about its progress through each package's installation scripts.  The debconf logs will be in the installer syslog file and printed on the Alt-F4 terminal.
When the installer stops to prompt you, hit Alt-F4 (use Alt-F1 to get back to the main installer terminal) and the missing setting should be printed at the bottom of the screen and look something like
debconf: --> GET partman-partitioning/default_label

If I had to guess, you might be missing a label option.  My preseed includes these
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman-partitioning/default_label string gpt

Links

https://wiki.ubuntu.com/Kernel/KernelBootParameters
https://sfxpt.wordpress.com/2013/06/09/get-the-debianubuntu-ready-and-customized-the-way-you-like-in-10-minutes/
https://mraw.org/blog/2012/12/23/d-i_hacking_recipe_3/


What is the relationship between NGINX and ICECAST?

Nothing at all.  However...

Both NGINX and ICECAST operate on their own ports and are completely independent services.

If, however, you want to run them on the same port (usually port 80), then you will need to configure NGINX to act as a proxy for ICECAST.


This are typical symptoms of:

Bad spinning drive, bad sectors
Or
Using swap memory, so all the system slows down. Maybe you're using way more memory than you physically have and the system is using swap.

You can open a terminal and monitor the memory consumption with:
htop

Or
top

Or
free -h

Also check the swappiness. The default value of 60 is not appropriate in my opinion and you can change it to 10 probably:
sysctl vm.swappiness

Check the logs with grep -i "kill" I guess you'll see your system killing processes when it exhausts the RAM and swap.


Ubuntu 17.10 won't allow me to remote access my desktop via TeamViewer

At present Teamviewer does not support Wayland:

  At the moment, our developers are working on a Linux Native version for Linux but there's no release date or information about features included. I will forward your suggestion to support Wayland our product management team.

Until this was resolved we should switch back to Xorg:

How do you switch from Wayland back to Xorg in Ubuntu 17.10?


The most recent version of Ubuntu supported by the PPA is disco, not focal.
A solution is to go in the folder /etc/apt/sources.list.d and open the file called something similar to stacer.list

Inside the file, replace the string:

deb http://ppa.launchpad.net/oguzhaninan/stacer/ubuntu focal main

with

deb http://ppa.launchpad.net/oguzhaninan/stacer/ubuntu disco main

(in other words, replace focal with disco)


How to specify what network to connect to automatically?

If you are using Gnome's NetworkManager, it should be easy.

Click the arrow next to y's network in the Wireless part of Network settings:

Then select Settings...

Then look under the General tab, and untick:


sudo apt-get update

won't update your system in any way, it will just make sure the system is aware of the most recent versions of packages in the ubuntu repositories. You should always use this command before any upgrade commands.

sudo apt-get upgrade

will install the newest versions of packages possible without changing your system.

sudo apt-get dist-upgrade

will update packages and handle their dependencies, which could make some parts of your system stop working, though normally only if you've configured it in an unusual way. This command will also do point release upgrades, that is 12.04.5 to 12.04.6 (if it exists)

The command to change to a newer release is:

sudo do-release-upgrade

Be careful with all of these commands, as soon as you use sudo, you're operating like the root user, so can damage your system if you type a command wrongly!


Moved logs to ram (tmpfs) and now got this problem

It's just trying to update the manpage databases (used for apropos etc). These aren't very important, you can ignore them / disable the cronjob.

The contents of /var/cache should always be safe to delete.


How do I automatically install tex packages in Kile?

This one is a little tricky,  If you had done sudo apt install kile --install-suggests you would have installed a great deal more packages, and through many of the 'suggested' packages you would have arrived at 'texlive-latex-extra' which includes the file 'arydshln.sty'

I'm generally not a fan of 'install-suggests' as sometimes it installs far more software than I want.

For example sudo apt install kile on my system will install 197 packages, loading 131 MB of archives

sudo apt install kile --install-suggests will install 1641 packages, pulling 4,352 MB of archives.

In this specific case, I believe that you would be best served by

sudo apt install texlive-xetex

This will pull in the package containing 'arydshln.sty', and about 20 others some of which apparently are wanted in your specific application.

Further information and investigation

You can look at the packages suggested for installation using the command

apt show kile

and at https://packages.ubuntu.com/ you can search for the packages mentioned to see what they require as well.  I used this webpage to search for the file 'arydshln.sty' to find what package it was contained in, and apt-cache rdepends texlive-xetex-extra to find eventually, the chain that led to one of the suggested packages for 'kile'


How to only install updates from a specific repository?

You can specify a release with -t option. As an example, I have added the following repository to /etc/apt/sources.list to install Iceweasel latest release:

deb http://mozilla.debian.net/ squeeze-backports iceweasel-release

As you know there is a same package iceweasel in the official Debian repository. If I want install Iceweasel from this specific release I run:

apt-get install -t squeeze-backports iceweasel

from apt-get manual page:

-t, --target-release, --default-release
           This option controls the default input to the policy engine, it creates a default pin at priority 990 using the specified
           release string. This overrides the general settings in /etc/apt/preferences. Specifically pinned packages are not affected by
           the value of this option. In short, this option lets you have simple control over which distribution packages will be retrieved
           from. Some common examples might be -t '2.1*', -t unstable or -t sid. Configuration Item: APT::Default-Release; see also the
           apt_preferences(5) manual page.

I think this is a better solution.

UPDATE: As @SuB mentioned in the comment, "-t specifies release not repository name. There is no repository name in Ubuntu (unlike RedHat based linux such as RHEL,Fedora,CentOS, ...)".


Installation of Ubuntu 13.10 desktop from ISO file

You must write the ISO to USB or CD/DVD as an ISO image using special tools like UNetBootIn or Brasero respectively (not just like your are saving a file); ISO image must have boot record

then insert your usb or cd into the machine
reboot the machine
quickly access your BIOS with hotkey on your keyboard (mine is Delete) some machines is different (you must first know what that is)

you can always restart your machine and hit hotkey to access bios before boot
you must find the boot selection in your BIOS

(select cdrom if you have CD)
(select USB to boot is USB iso)

with your cd or usb in your machine at restart the installation should begin by itself, be patient for this, the screen might go blank or black for a minute
when install is complete, the program will say to restart machine

do not take out your disk or usb
upon restart - access again your BIOS
change boot to HDD (hard drive you have installed OS on)
let machine boot up from HD with new installation

you can repeat these tasks if you need to

Practice makes perfect!!! Good Luck.


Have a look at the following screenshot. You can set the active item in the General tab in Glade.

http://i.imgur.com/9FgfX.png

If this doesn't work, you can use Gtk.ComboBoxText.set_active(int) in your code.


Why doesn't Android recognize the WiFi hotspot created via Ubuntu?

First of all you should make sure, that your wifi adapter supports infrastructure hotspots. If you used connectify on your windows system and it worked, skip this step.

open terminal and type: sudo lshw | less

find -network section and make sure that driver is ath5k or ath9k, this solution will only work for those drivers, but should fit the needs for the most laptop users.

We now need to install 2 additional tools to make out hotspot, 1st one is hostapd(hotspot server), 2nd one is dnsmasq(dns dhcp server)

in terminal type: sudo apt-get install hostapd dnsmasq

stop those services if started already, and prevent them from starting on system start up.

in terminal type:
sudo service hostapd stop
sudo service dnsmasq stop
sudo update-rc.d hostapd disable
sudo update-rc.d dnsmasq disable

Now we need to set up config files.
in terminal type: sudo gedit /etc/dnsmasq.conf
or sudo kate /etc/dnsmasq.conf if you use kde

add those lines to the config file
Code:

 # Bind to only one interface
 bind-interfaces
 # Choose interface for binding
 interface=wlan0
 # Specify range of IP addresses for DHCP leasses
 dhcp-range=192.168.150.2,192.168.150.10

hostapd config

in terminal type: sudo gedit /etc/hostapd.conf

and add those lines

Code:

 # Define interface
 interface=wlan0
 # Select driver
 driver=nl80211
 # Set access point name
 ssid=myhotspot
 # Set access point harware mode to 802.11g
 hw_mode=g
 # Set WIFI channel (can be easily changed)
 channel=6
 # Enable WPA2 only (1 for WPA, 2 for WPA2, 3 for WPA + WPA2)
 wpa=2
 wpa_passphrase=mypassword

You can change ssid name and password for anything you want here. Current config will create hotspot named myhotspot with mypassword password.

Now create anywhere you want a file named start.sh
edit it with any text editor like this:

Code:

 #!/bin/bash
 # Start
 # Configure IP address for WLAN
 sudo ifconfig wlan0 192.168.150.1
 # Start DHCP/DNS server
 sudo service dnsmasq restart
 # Enable routing
 sudo sysctl net.ipv4.ip_forward=1
 # Enable NAT
 sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
 # Run access point daemon
 sudo hostapd /etc/hostapd.conf
 # Stop
 # Disable NAT
 sudo iptables -D POSTROUTING -t nat -o ppp0 -j MASQUERADE
 # Disable routing
 sudo sysctl net.ipv4.ip_forward=0
 # Disable DHCP/DNS server
 sudo service dnsmasq stop
 sudo service hostapd stop

You will probably need to change ppp0 in this to eth0 (or any other number which refers to your wired connection.

Last step. Now you can start your hotspot by starting our script. just run it using sudo sh
for me it looks like this sudo sh /home/ogyct/Desktop/start.sh because I have it on my desktop

Source: http://www.youtube.com/watch?v=U59PymP-K6Y


Try:

locale-gen id_ID.UTF-8

However, some PPA might not be installed unless LC_ALL=C sets, e.g. PPA for PHP.


You can try Boot Repair. It may be helpful to you.

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


Problems getting bidirectional ssh working between Ubuntu 14 and Ubuntu 18

I found the issue. It was related to the home directories as I thought.

The issue is: the users home directory group must be the same as the owner. I had changed it to enable the users to rsync to each other's directories. That is a no no for openssh's sshd.

Here is the error message I got in /var/log/auth.log:

Authentication refused: bad ownership or modes for directory /wtecData/sjprod


Ubuntu 14.04 launcher transparency doesn't work, possible driver issue

I ended up upgrading from 14.04 LTS to the currently newest 15.10. This solved my problem, now everything's working fine.


Setting password in Ubuntu snappy with ARTIK10 board

When you create an account on the Ubuntu site, you should have added an SSH key public. That ssh key is now on your ARTIK 10. You should be able to login using ssh if your ip addresses are valid, and you have the corressponding ssh private key on the machine you are trying to ssh from


Can't install pulseaudio - broken packages

The 1:12.2-5~bionic1 version of libpulse0 is not from official repositories. You probably installed it from somewhere else.

I suggest downgrading the version using Synaptic.

Select the package and then use "Package" menu to set the correct 1:12.2-0ubuntu4 version.


How can I execute a script on screen change?

Assuming the change in resolution is both causing the error and the trigger to run your script, periodicalloy checking the resolution and run your script if it changes should do the job:
#!/usr/bin/env python3
import subprocess
import time

command = "</path/to/script_to_run>"

def get_res():
    # get resolution
    xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

res1 = get_res()
while True:
    time.sleep(5)
    res2 = get_res()
    if res2 != res1:
        subprocess.Popen(["/bin/bash", "-c", command])
    res1 = res2

It checks the current resolution every five seconds and runs the script, as set in the head section, if there is a resolution change.
How to use

Copy the script into an empty file, save it as check_resolution.py

In the head section, set the path to your script to restart synergy

Test-run it by running it in a terminal window with the command:
 python3 /path/to/check_resolution.py

if all works fine, add it to your startup applications.

Note
The command as a startup application probably needs a small break to make sure the desktop is fully loaded when the script starts. The command to add to Startup Applications would then be:
/bin/bash -c "sleep 15&&python3 /path/to/check_resolution.py

Add to Startup Applications: Dash > Startup Applications > Add, add the command.

Edit
Just to be complete:
If for some reason, you'd prefer a bash version of the script:
#!/bin/bash

function get_res {
    echo $(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}')
}

res1=$(get_res)

while true; do
  sleep 5
  res2=$(get_res)
  if [ "$res1" != "$res2" ]; then
      <command_to_run>
  fi
  res1=$res2
done

The use is pretty much the same except the language extension:
check_resolution.sh

and the command to run it:
/bin/bash /path/to/check_resolution.sh

and replace <command_to_run> by the command to restart synergy or the path to your script.


That file is provided by the libqt5multimedia5 package.

Enable the Universe repository
sudo apt install libqt5multimedia5
Then try your install again.


Since brackets have special meaning in grep's regular expression syntax, you either need to escape them

grep '\[abc\]' file

or specify plain string matching using -F or --fixed-strings

grep -F '[abc]' file

See man grep

-F, --fixed-strings
       Interpret PATTERN as a list of fixed strings (instead of regular
       expressions), separated by newlines,  any  of  which  is  to  be
       matched.


PSQL - password authentication failed for user "postgres"

I finally found the answer here. The issue was that I was missing the ~/.pgpass file. So I created one with access permission 600 (this is important) and added the following lines:

localhost:*:*:postgres:postgres
127.0.0.1:*:*:postgres:postgres

After a restart of postgresql all was well :)


Install script as service running under speciffied user

I think you're looking for upstart. Look specifically at the setuid command.


Can't launch PhpStorm from unity only from a terminal

Remove desktop shortcut for PhpStorm:
rm ~/.local/share/applications/jetbrains-phpstorm.desktop
Run PhpStorm from console and from its menu, choose Tools -> Create Desktop Entry
Log out from your ubuntu session
Log in to new session
Unity Launcher will be correct now and will work

This has to be done each upgrade since each PhpStorm version is usually unpacked to folder named like PhpStorm-143.1184.87 and that changes with every version, but the desktop entry update is not part of the PhpStorm update (since PhpStorm update usually means just unpacking new release to another folder)

Another way of doing this is of course pointing this desktop link to /usr/local/bin/phpstorm, but then again you still have to use Tools -> Create Command Line Launcher with every update (which you WILL do if you are console user, anyways ;) )


error downloading libsane-dev message reads:

The previously installed libsane-dev package seems to be broken.

Try re-installing the package. Use

  sudo apt purge libsane-dev

to uinstall the package.

and re-install using

  sudo apt-get install libsane-dev.


Should I remove very old information from the Ubuntu/community wiki?

Jorge did a talk (I guess it was more of an almost-four-minute-long battle cry) about deleting harmful, old content from the Wiki. It makes a lot of sense in some situations.

But I'd personally use it in moderation. If something is just old, it might still apply. If it's just potentially harmful, perhaps improving it with a few warnings might be a better step. I think to qualify for deletion you need to be in the area where its modern-day appeal is really very limited.

You can follow these instructions if you feel something needs to be removed:

What team do I need to talk to about deleting a page on help.ubuntu.com?


Can i allocated more then 30gb to Ubuntu Wubi?

No. WUBI is a system to let you taste Ubuntu and the 30Gb limit is there due to various issues (stability being one).

Alternatives:

install Ubuntu side by side.
install Ubuntu and use Windows in a VirtualBox.
use Ubuntu in a Virtualbox.


Problems with installing Calibre on Ubuntu 16.04

It is recommended to install from binaries rather than Ubuntu's apt repository. Please follow instructions there and if you have further problems please update.


Upstart service never starts or stops completely

there are a number of oddities in your upstart job that have me scratching my head.

1) emit isn't a program that I know of, so unless you've added it to the system path, that is probaly causing errors. Did you mean 'echo' ? That may not be helpfull either, since it will go to the system console which may not be visible.

2) Assuming the 'emit' stanza works, you say 'expect fork' but then actually fork twice. Once for the 'script', and then again when the teamspeak script forks to background itself.

3) you "su" to run the script, but start-stop-daemon is actually simpler for most cases:

With 11.10, you don't need to do the chdir in script, not sure if that was added after whatever version of upstart you have. Check man 5 init for the word chdir

start on runlevel [2345]
stop on runlevel [^2345]

respawn

chdir /home/danizmax/teamspeak-server
expect fork

exec start-stop-daemon --start --user danizmax --group danizmax --exec /home/danizmax/teamspeak3-server_linux-x86/ts3server_startscript.sh -- start

Also, errors will likely be reported in /var/log/syslog . You can increase the error level quite a bit by running

initctl log-priority info

man initctl for more log levels.


Ubuntu 18.04.3: after entering login password - Desktop is blank; Even after reinstall

I manually executed gnome-shell from terminal and the issue was resolved!


Using Thunderbird to connect (to Yahoo for example) the connection hangs up and it goes no where

Since Verizon purchased Yahoo, and since your ISP is probably AT&T, the Yahoo mail servers have been changed to AT&T servers.

For POP, use...

inbound.att.net
995, SSL

outbound.att.net
465, SSL, req auth

For IMAP, use...

imap.mail.att.net
993, SSL

smtp.mail.att.net
465/587, SSL, req auth


How to install gcc-4.6 (4.6.3-1ubuntu5) Source Package

Ubuntu is not like the Windows operating system you are used to. Old habits are hard to break but the sooner the better. You're gonna have to scrap the whole mentality of downloading an .exe from whoever and installing whatever to your system. That's one of the many reasons windows has so much malware (although, Netbeans Java and Virtualbox etc are better off downloading from oracle IMO).

One of the advantages of running a linux operating system is that most programs ("packages") are installed through a package manager. This is similar to the "app-store" or "google-apps" and even more like "homebrew" if you are familiar with OSX.

You don't need to download the source of the source package to install a package (program) using Ubuntu. All you need to do is type sudo apt-get followed by the package name. To install gcc-4.6 and build essential open a terminal and type the following commands:

sudo apt-get update
sudo apt-get install gcc-4.6 build-essential

If you see no errors, the package is installed. If you need to see if any gcc packages are installed, you can type the following command in an open terminal:

dpkg -l | grep gcc

The output will list every package installed containing the letters gcc in the name. No output = no packages installed.

Also,

dpkg -l

Will list all installed packages.

To search for available packages related to "netbeans" you can type the following command:

apt search netbeans

To narrow the results, type this command instead:

apt search netbeans | grep netbeans

Another search example:

apt search c++ | grep compiler

Finally, you can install a GUI frontend (synaptic package manager) to help you search for and install packages by typing the following command:

sudo apt-get install synaptic

Search for synaptic package manager amongst your installed apps or open a terminal and type the following command:

sudo synaptic


I'm not sure what is your desktop problem, but you can use this solution to get rid of this issue, run below command in terminal:

xrandr

It's tell you what resolutions your monitor supports.

Then create a bash script (e.g "restore_resolution.sh") with this lines of codes:
(put your resolution after xrandr -s)

#!/bin/bash
case "$1" in
    thaw|resume)
        xrandr -s PUT_YOUR_RESOLUTION_HERE
        ;;
    *)
        ;;
esac
exit $?

move the file to this path:

/etc/pm/sleep.d/

and make sure it can be execute:

sudo chmod +x /etc/pm/sleep.d/restore_resolution.sh

it should fix your problem, after resume this script will be run and fixs your resolution.


Why does Wubi installation fail with "Error: 'None Type' object has no attribute 'get_info'"?

Don't mount the image file, just put wubi.exe and the iso in same folder and then try, Don't mount it through any software


Syncing files is the same as copying them to an external device (such as your phone). Your problem is that all the media players and syncing software (Rhythmbox, Banshee, Clementine) can only copy your files to your phone (either you have them there or not) because they are on the external hard drive. I think that the software is not compatible with syncing files from one external device to another. That's why it copies your files only. Rhythmbox displays the error more detailed since it's (kind of) more advanced and it needs the files on your computer to perform the syncing process.

If you encounter any issues, feel free to inform me.


apt and apt-get upgrading different packages

From man apt:

   upgrade (apt-get(8))
       upgrade is used to install available upgrades of all packages
       currently installed on the system from the sources configured via
       sources.list(5). New packages will be installed if required to
       statisfy dependencies, but existing packages will never be removed.
       If an upgrade for a package requires the remove of an installed
       package the upgrade for this package isn't performed.

So, for dependencies to be satisfied, apt is going to install the new applications.  Where apt-get states that under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed.  The applications that are being held back by apt-get you would run it as a dist-upgrade instead of upgrade as you would do with just the apt application.

From man apt-get:

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

And the descriptions of both:

   apt provides a high-level commandline interface for the package
   management system. It is intended as an end user interface and enables
   some options better suited for interactive usage by default compared to
   more specialized APT tools like apt-get(8) and apt-cache(8).

   apt-get is the command-line tool for handling packages, and may be
   considered the user's "back-end" to other tools using the APT library.
   Several "front-end" interfaces exist, such as aptitude(8), synaptic(8)
   and wajig(1).

Hope this helps!


Live USB for Ubuntu 13.10 does't recognize Windows 8 OS

Choose something else option,select the partition you want to install ubuntu.Please dont select any windows partition.Then format the selected partition to ext4 filesystem,and choose the install option.It will take you to the installation progress
window.


You could try passing some options to the installer and seeing if this gets you a display.

See here:

https://help.ubuntu.com/community/BootOptions#Ubuntu_CD_Advanced_Welcome_Page_Options

Look at the "F6" options. You can in particular try noapic and nomodeset, they may help on your system.

Alternatively, you could try the "alternate" installer, it has a better chance of working if the problem with your system is display-related. Be warned, however, that the alternate installer is text-based and is a bit more difficult to use than the standard installation. Get the alternate CD here:

http://www.ubuntu.com/download/ubuntu/alternative-download

choose ubuntu-11.10-alternate-i386 (or amd64, depending on whether your system supports 64-bit or not).


I have used the following alias and it worked well.

alias g+++="g++ -lSDL -lSDLmain -lSDL_image -lGL -lGLU"

The first does not work.


Are you trying to use pulseaudio? If so, I believe this card works best with alsa+jack. Try disabling pulseaudio, and using a jack application.


Linux KVM: Make Mapped/Shared Folder Permissions RW for Host and Guest

I found a the way to solve this in this related post though I'm guessing a more elegant solution exists. If you are running your vm from the command line, you simply add the fmode and dmode options to the command. For example: --filesystem "/path/to/share","sharename",mode=mapped,fmode='0777',dmode='0777'. This would make the directory world-writeable.
If you are using libvirt xml or virt-manager, you can delete your existing shared folder and add this xml right before the end of <domain>. Note that you may have to adjust some of these parameters, I don't know what they all do.
   <qemu:commandline>
        <qemu:arg value="-fsdev"/>
        <qemu:arg value="local,security_model=mapped,id=fsdev-fs0,path=/path/to/share,fmode=0777,dmode=0777"/>
        <qemu:arg value="-device"/>
        <qemu:arg value="virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=sharename,bus=pci.1,addr=0x0"/>
      </qemu:commandline>

If you are on Ubuntu like me, you will also need to edit your /etc/apparmor.d/abstractions/libvirt-qemu and add the line /path/to/share/{,**} rw, to the end of it. This grants ALL guests access to this path.


If you want to use Perl regex syntax you need -P switch with grep. Check out previously asked guestion here Is grep syntax different from regex?


How to configure Internet/Network connection

I think I saw a rather extensive HowTo on that on the UBUNTU forums. Go check there.

Ubuntu HowTo Forum

Regards, Josh


How to upgrade to a specific version of PHP?

Then you'll most likely have to build from source. Head to http://php.net, download the sources and build your PHP version.


Windows XP won't load boot menu to load Ubuntu from USB stick

It has nothing to do with Windows XP.
Check if you have enabled boot menu option in your bios, then restart your computer and press F12 (or other combination - it's manufacturer dependent) to get the boot menu, where you can select booting from Live USB stick.


Downgrading to kernel version 4.2.0-35-generic helped.


Changing machine's IP address after deploy phase for MaaS

on action, set it "mark broken", change ip, then "mark fixed", hopefully it fix the problem!