How to use one recipe to create packages for different ubuntu series (trouble with ./debian/changelog)?

In this context, the distribution field is irrelevant. Look in the official Ubuntu archives. Of course, you'll see that the top changelog entry will have "unstable" as the distribution for many packages. Likewise, all uploads that make it into the updates repository are actually copied over from the proposed repository. So a package in maverick-updates will actually say maverick-proposed in the changelog.

The importance of the distribution field depends on the tools that make use of it. For instance, if you use dput to upload to your PPA with: ~<your_launchpad_id>/<ppa_name>/ubuntu/
the distribution field in the changelog determines for which release the package will be built. But even this can be over-ridden by uploading directly to release you want  with:

~<lp_name>/ppa/ubuntu/<ubuntu_release>

Launchpad's build from branch service uses the ability to copy a package from one PPA series to another. It doesn't actually care what is in the changelog for this. So the way you are currently doing things is correct.


Can I downgrade the kernel on Ubuntu 14.04.2?

Yes, you can switch to 3.13 kernel easily.

Install 3.13 kernel by running

sudo apt-get install linux-generic

Remove all linux-headers and linux-image packages of 3.19 version using synaptic. This will also remove 3.19 meta packages.


How can I display how a website will look in another form factor?

You might be interested in checking free online services like TestSize.com or ViewLike.us, hope it helps!


Using Dualshock 3 controller via USB (no Bluetooth)

If you want to use it via USB, just plug it. It should work out of the box. One problem you will however run into is that every button on the controller is reported as both analog and digital, which confuses a lot of games.

To work around that you can try xboxdrv (support PS3 controller as well, despite the name):

http://pingus.seul.org/~grumbel/xboxdrv/


Why apt-get does not install latest version

The easiest way is to add the PPA for Git release candidates by the "Ubuntu Git Maintainers" team at https://launchpad.net/~git-core/+archive/ubuntu/candidate:

sudo add-apt-repository ppa:git-core/candidate
sudo apt-get update
sudo apt-get upgrade

Note that the "Ubuntu Git Maintainers" team also maintains a PPA for Git stable releases, but since you said you wanted the "latest" version, the PPA for Git release candidates may fit your preference better. In many cases, both PPAs give you the same latest version of Git (2.9.1 as of when this post was written).


I had the same problem and here's what I found. First, the dededit solution did not work for me and, as always, you should try this at your own risk and back up your system before trying. just to be safe! Here's the workaround.

Shrink your HD space, using the Windows disk tool, to whatever size you're giving Ubuntu

Boot into your bios

Change storage (under configuration) to AHCI. It will give you a msg saying that your disk may be deleted but it did not delete anything for me. WINDOWS WILL NOT BOOT UNDER AHCI. THIS IS NORMAL

Insert your bootable usb

Reboot your system from the usb (hold down the f12 key when you power up and choose usb)

Ubuntu will start up and you can run the install. You will get to the part in the installation where it's going to ask if you want to install the full or minimal version of Ubuntu. You choose and hit continue.

THIS IS WHERE YOU SHOULD SEE THE OPTION TO INSTALL UBUNTU ALONGSIDE WINDOWS. IT WILL NOT SHOW UP UNTIL AFTER THE PREVIOUS STEP

Choose yes and it will automatically choose the partition you created before. Finish the install and reboot.

Now you will get a boot menu and you choose Ubuntu and finish the install.

The boot menu will give you an option to enter the bios set up. IF YOU WANT TO RUN WINDOWS AGAIN YOU HAVE TO SWITCH BACK TO BST AND REBOOT.
And that's it!!!! Hope it helps!


Disable automatic execution of apt update after running add-apt-repository on Ubuntu 18.X

Checking the help:

$ add-apt-repository --help
Usage: add-apt-repository <sourceline>
...
Options:
  -h, --help            show this help message and exit
  -m, --massive-debug   Print a lot of debug information to the command line
  -r, --remove          remove repository from sources.list.d directory
  -s, --enable-source   Allow downloading of the source packages from the
                        repository
  -y, --yes             Assume yes to all queries
  -n, --no-update       Do not update package cache after adding
  -u, --update          Update package cache after adding (legacy option)
  -k KEYSERVER, --keyserver=KEYSERVER
                        Legacy option, unused.

So:

sudo add-apt-repository -n ppa:...


Panel notifcation - how can i update gsettings to add 'skype'

Use

gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service']"

Have a look at Unsettings if you want to use a GUI for this.


Can I install Ubuntu on second HDD without grub?

You cannot install Ubuntu without GRUB, because GRUB is the bootloader for Ubuntu. What you can do however, is perform a manual installation and tell it to install GRUB to the HDD instead of to the SSD with Windows. Then you could customize the GRUB configuration to make it automatically boot Ubuntu instead of showing the menu. That would result in very similar behavior to what you want. (Switching OSes by switching the boot device / boot order)


I lost the boot partition, what should I do?

You have to fix two bootloaders:

Windows 7 bootmgr and
GRUB for Ubuntu.

Following are the steps to do so:

Insert your Windows Vista or Windows 7 disk into your DVD player and restart your computer.
The next screen you see should have the Language, Time and Currency and Keyboard boxes.
In the lower left side there are two options: “What to know before installing Windows” and “Repair your computer.”
Click on “Repair your computer”.
Windows will then try to find the installation directory for Vista or Windows 7, depending on what you have.
Next up is a screen with a box called Recovery Options. Click the first option, Startup Repair.
You’ll see a Startup Repair box with the message “Startup Repair is checking your system for problems…”
When it’s done, it will prompt you to reboot. If there is more than one problem it may reboot again to continue repairing.
At this point, you can remove the DVD, reboot and everything should be working.

Now you are done with Windows 7 Boot loader. Time to fix GRUB. Do the Following:

You can install GRUB on your hard disk. You can do this by using bootable Ubuntu CD.

Boot to live cd. When you get UBUNTU Live Desktop. Open terminal and type the following

sudo grub-install /dev/sda
sudo update-grub
quit

You are done now. Reboot the machine.

This will install grub on MBR of your hard disk with dual boot. Try the latest Ubuntu 12.04 LTS.

https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System

You can also use the bootrepair tool to reinstall grub:

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


First enable Universe repository and then update all the repositories by running the below command,

sudo apt-get update

Now install fancontrol package by,

sudo apt-get install fancontrol

Note: Exit out of the root and then run all the above commands.


system monitor shows downloading while lsof -i says nothing downloading

Possible that something's running in the background under a different user? You'll find the output of lsof -i and sudo lsof -i differ dramatically.

I would simply assume that something was running as as different user that System Monitor is showing (based on the raw device throughputs) that non-root lsof doesn't have permission to see.


Switching from side by side Ubuntu to main OS on Lenovo laptop

My low tech method is to memorize those 3 things and just type them in on a new installation. Or write them on a piece of paper and destroy the paper after the new system is up and running.


My pendrive size decreased from 32GB to 2.25MB after booting it with Ubuntu 14.04 LTS

see this video in this link give below to retain the full capacity of the pendrive
https://youtu.be/_TRWUJ1oZHc


I am unable to open or edit my software sources

You could give this terminal command a try:
Under GNOME/Unity

gksudo software-properties-gtk

Under KDE

kdesudo software-properties-kde


After upgrade to 11.04, my laptop randomly turns off the external display

Try Caffeine to keep your monitor on, use these command in Terminal.

sudo add-apt-repository ppa:caffeine-developers/ppa

sudo apt-get update

sudo apt-get install caffeine

Caffeine is used to supress any power saving mode from being turned on; e.g. When you're watching a film and the screen goes into idle mode.

I use Caffeine myself and think it's brilliant.


After suspend/hibernate Fn keys function is inverted ThinkPad X121e

There is this thread but they didn't find a solution either: http://forums.lenovo.com/t5/X-Series-ThinkPad-Laptops/X121e-FN-Standby-Bug/td-p/533431


changing ownership and permissions of /usr/bin/ and /var disables ssh

Playing with the file-system's permissions is a dangerous game if you don't know what you are doing.

That said, by chaning the permissions to 775 from their default 755, you've actually made them more accessable: from rwxr-xr-x to rwxrwxr-x .. or in human terms, you'd allowed the options for users in the group which owns the file to write to it, where as before, only the owner of the file could write to it.

It's more likely that changing the ownership of some files to root:root has done the damage, as some processes need to be started as designated users, reserved by the system.

In the future, I suggest you look at logging your users into a chroot jail, instead of recursively - and blindly - blanket modding your entire file-system.

You have a couple of options now:

sudo apt-get remove --purge the packages which are not working (openssh-server in this case), and then reinstall them.
install the services which aren't working on your server onto you ubuntu desktop and have a look around at the ownership of the files it installs using ls -l. Change them on the server to match (Ouch)
Reinstall the system. (Doh.)

There may be a very fancy way of sorting this out, but I don't know it. Hopefully that's given you some clues/insight anyhow.

Good luck!


If I compile and install my own Python from source and install packages, will it affect the system Python installation?

I take it you're installing packages via pip. Try running pip3 show pip or python3 -m pip show pip. This will show you where the pip package itself is installed This is the same path it puts other packages. To verify, install a harmless package like pycodestyle and check where it got installed using the same process as before.


How do I change changing the default program when plugging in removeable media?

The default application preferences for removable media can all be set by going to System Settings->Removable Media


Is it safe to remove swapfile from /etc/fstab?

If you are not using swap, you can remove it from fstab and delete /swapfile.

There is nothing in this operation that may be called "unsafe".


Why installing packages without updates fails? Are original packages removed from repositories after update is available?

I don't know exactly what you did, but I'd guess that you're correct that your "the disabled update sources" broke everything. (And your software sources should have nothing to do with suspend/sleep... even updating has to be manually initiated, so again once it's finished it shouldn't affect suspend/sleep).
apt relies upon the software sources to know where & what to update/download/install, without proper reliable software sources it's crippled. You could try a sudo apt-get check for some info, but regardless you may need to restore them:

If you destroyed your software sources somehow, you can go to this site http://repogen.simplylinux.ch/ to create a new sources.list file. And/or follow the directions here for more info on backing up the current sources & having them automatically re-created or getting one from the above site.

If you don't want newer versions of packages, then you can just run the currently installed ones, though there could be security holes waiting to be patched, or improved updates waiting too.


Installing a program downloaded as a .tgz

.tgz is an archive like zip or rar.
Right click on the file and select Extract Here.
cd to the extracted folder.
Then type ./configure
To install type make and then make install.
There will be a Read me file with instruction on how to install the file.
However the installation will differ based on the different packages.
So before installing the .tgz files i would strongly advice you to look at the read me file.
But installing software not in the software centre can be tricky and will not always work without some advanced knowledge.


Ubuntu removes old packages at upgrade, so it does the clean install. but you can use apt-get autoremove to remove old packages again. when a version of LTS is out please wait to get it completely stable such as 14.04.2. there are lots of such small bugs which need to get fixed.


When will Ubuntu 20.04 upgrade the kernel version?

The first HWE kernel will ship with Ubuntu 20.04.2, currently no date for that is available (see https://wiki.ubuntu.com/FocalFossa/ReleaseSchedule) but it'll occur after 20.10's release as it'll be 19.10's kernel that gets used.

Ubuntu 20.10 is scheduled to be released 22-October-2020 (https://discourse.ubuntu.com/t/groovy-gorilla-release-schedule/15531) so it'll be after that.


Konsole always stays in foreground and retains focus

It sounds like you have enabled Keep Above others via right click --> more actions on the window border

The image below shows dolphin, but the option is available for all windows.

If this does not help, you could reset your kde profile by running:

mv ~/.kde4 ~/.kde4.old


Differences of: SoftwareCenter history, dpkg-query and /var/log/dpkg.log.*?

Normally, the Ubuntu Software Manager and Synaptic track the package changes in their own log files, but that means that if you don't use these programs all the time the log will be incomplete and you will have problems trying to verify this.

I didn't found in the manual for dpkg-query any clue that it provided the installed date, but dpkg-query -l indeed prints the general status of the packages, version, architecture and description.

So, who is more trustable? Obviously, all the package manager are in last instance frontends to dpkg who is the one that takes the actions of installation, configuration and deletion, and it's log is in /var/log/dpkg.log*. Now lets programmatically answer your questions:

  Am I correctly assuming that the information received is not always the same?

As I said above, yes. The programs are not running at every given time, and shouldn't be, hence they could ever keep track of every package change.

  Can somebody help me out and (a) confirm that there are a difference and (b) maybe point out the differences to me?

Yes, and the differences are above said.

  Most interesting there is also the question if "installation date/time recordings" are only available via the browse /var/log/dpkg.log.* method?

If you have a correctly set clock and used apt-get, obviously both logs, apt-get's and dpkg's, will log the same at the same time, with the same time. If you use apt-get all the time is understandable that you could read either log and have the same information. So, no, installation date and time recordings are available whatever logs you check (unless the logs are set to not print time), but dpkg's will always be more complete.


How to "fix" the size of Windows Button Item in xfce4-panel 4.10.1

Resolved finding a post on another Forum....
"add a separator to the panel just to the left of the items you want to have on the right. Set it to expand and also make it transparent so it isn't seen."


Screen brightness control not working on Lenovo T530

I had a similar problem on my thinkpad W530.  I finally found a solution here:
http://blog.pearce.org.nz/2012/08/enabling-external-monitor-on-lenovo.html

These days X automatically configures itself, so you can't just edit the xorg.conf file, you instead need to add a section to a file in /usr/share/X11/xorg.conf.d/ and X will include that section in the configuration that it automatically generates.
So to get the screen brightness keys working with your Nvidia graphics card, create a file in the xorg.conf.d directory, e.g:

sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf

Paste the following into the file:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K1000M"
    Option         "RegistryDwords" "EnableBrightnessControl=1"
EndSection


On the contrary, 5.4 kernel has something off in the VM system.
In 5.4 kernel series, I can have like 4GB of applications running on my 16GB system at home, do something involving like 5-10GB+ of disk I/O, and eventually I have like 2GB+ swapped out... and a nice big swapin pause if I pull down menus or whatever.  It does seem setting vm.swappiness=1 versus vm.swapiness=100 versus default has little to no effect on 5.4.x kernels.
In pre-5.4 kernels I ran in Ubuntu 18.04, and also with 5.7.x kernel I ran in Ubuntu 18.04 with mainline (Ubuntu mainline kernel installer), if you set vm.swappiness=100 it was still not quite as aggressive with the swap as 5.4 is.  Not that I recommend a value as low as vm.swappiness=1, but in 5.4.x series it seems to still swap pretty heavily, in pre-5.4 and post-5.4 kernels if I ran enough apps it would let applications virtually fill RAM before it swapped, which lead to pretty bad performance due to the tiny amount of RAM left for the disk cache; it did indeed show near-zero swap usage until RAM was pretty full.


Why isn't expr performing arithmetic on real number using in a shell script?

Explanation of errors

The error is the same as if you input:

$ expr 10.5 + 11.8
expr: non-integer argument

Expr is complaining that you gave it non-integers. This is because expr program was not designed for non-integer calculations:

Expr invocation:

  Operands are either integers or strings.

expr was generated as standard error, your terminal just displays it
But when you use pipe |, pipe only transfers  standard out, not standard error
Because bc did not receive anything to work with, it didn't give you any output at all, as you can see when you try sending nothing (except new-line) to bc:

$ echo | bc

The result is bc says nothing. So what you see on your screen with your original command, was still just expr's complaint via standard error.

Recommendation

For decimal calculations, you can use just bc and some means to get input to bc, such as with here-strings:

$ bc <<< '10.5 + 11.8'
22.3

Or, to use variables:

$ a=10.5
$ b=11.8
$ c=$(bc <<< "$a + $b")
$ echo $c
22.3

The $( and ) is a command substitution
<<< string is a here-string syntax, sends the string contents to stdin, which bc receives


I'm not familiar with this driver, but you could force the installation by running:

sudo dpkg --force-architecture -i z600cups_1.0-2_i386.deb

It might still not work, but it's worth a try.


The Apache2 distribution comes with a very easy to use modular configuration.

Copy your 000-default.conf in /etc/apache2/sites-available to a file by then name you will call your virtual site.  Use the configuraton file 000-default.conf as a template.

In this case you have indicated mydomain.com.  You also indicated management.mydomain.com.  You can use both to refer to access the same site.  In these steps I'll use mydomain.com.

You can use any name for the configuration file.  Using a name that includes the name you'll for your virtual host will make it easier to manage your sites if you make a number of them.

Run these steps.  I numbered them to make it easy for you to point out which step, if any, you get stuck or don't understand.  The $ is there to represent the terminal prompt where you type your command.  The command is the text you see after the $ prompt.

1. $ mkdir -p /home/web/mysite/www
2. $ mkdir -p /home/web/mysite/log
3. $ cd /etc/apache2/sites-available
4. $ sudo cp 000-default.conf mydomain.conf
5. $ gksudo gedit mydomain.conf

Change from:

&ltVirtualHost *:80&gt
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

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

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
&lt/VirtualHost&gt

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Change to:

&ltVirtualHost *:80&gt
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerName mydomain.com
    ServerAlias www.mydomain.com
    ServerAlias management.mydomain.com

    ServerAdmin webmaster@localhost

    DocumentRoot /home/web/www
    &ltDirectory /home/web/ubunzeus/www&gt
        Options +FollowSymLinks +ExecCGI +Includes
        # AllowOverride All
        # New directive needed in Apache 2.4.3:
        Require all granted
    &lt/Directory&gt

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog /home/web/mydomain/log/error.log
    CustomLog /home/web/mydomain/log/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
&lt/VirtualHost&gt

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Continue the following commands to activate the changes:

6. $ sudo a2ensite mydomain.conf
7. $ sudo service apache2 restart

With those steps, you can now access your new virtual host by typing the name you have given it into the web browser.

Place your webcontent (your html files) into the directory you created for your virtual host.  In this example it's: /home/web/www.  Your web directory can be placed anywhere on your system.  You just need to configure your virtual host config file with the information.

Anytime you make a change to your Apache2 configuration files be sure to reload it to make the changes become effective.

$ sudo service apache2 restart


Does chown command require login and logout to reflect changes?

No, it does not. Effect of chown command is applied immediately.


I was facing exactly the similar issue. Although the problem is still not fixed, I understood the pattern that is causing the error for me. It is function key combination (Fn-F1 to Fn-F12 that can be used as shortcuts for volume +/- etc.) that is trigering the problem on my ThinkPad E480 with Ubuntu 18.04 and skypeforlinux (current version).

I know it is not a fix, but a workaround to avoid the error.


How can I uninstall haguichi? /var/lib/dpkg/info/haguichi.postrm: glib-compile-schemas: not found

The problem is the missing component libglib2.0-bin which contains the glib-compile-schemas command.

Because haguichi is damaged, apt-get or dpkg tries to remove it every time you want to install or uninstall something and that ends in an error because the libglib2.0-bin is missing and haguichi's uninstaller depends on it.

The following solution worked for me and I hope will do the same for you:

I simply told apt-get to ignore haguichi during any install or uninstall process. Afterwards I installed the missing component and then told apt-get to uninstall haguichi.

Below are the commands I used:

sudo -s
echo haguichi hold | dpkg --set-selections
apt-get install libglib2.0-bin
apt-get remove haguichi
exit

Note: When you execute the command apt-get install libglib2.0-bin a haguichi error will appear at the end but regardless libglib has bin successfully installed.

I did this by using the command I found on here on Unix & Linux SE.


Support / lifetime of OpenJDK 8 in Ubuntu Xenial 16 LTS

According to https://ubuntu.com/blog/announcing-openjdk-11-packages-in-ubuntu-18-04-lts:

  "OpenJDK 8, the former upstream LTS release, is still available and has been moved into the community-supported universe repository. Security updates for OpenJDK 8 will be provided until April 2021 for both Ubuntu 16.04 LTS and 18.04 LTS."

This means that you will be OK until April 2021, but after then you will need to find an alternative source1 for OpenJDK 8 with security patches.

My advice would be to migrate your application to Java 11 before then.

1 - For example, adoptOpenJDK plan to continue supporting Java 8 until "at least May 2026".


Desktop calendar to keep News and Updates

You can use the calendar-indicator - a tool to display your Google Calendar events on the Ubuntu / Unity panel.

You can manage events or add a new calendar all together. It syncs with your google calendar.

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


Unable to connect to wifi on ASUS K401UB laptop

Is the module asus_nb_wmi loaded? Check:

lsmod | grep asus

If so, please try a driver parameter:

sudo -i
echo "options asus_nb_wmi wapf=0" > /etc/modprobe.d/asus.conf
exit

Reboot and see if the Fn+F2 behavior is changed.

If the above does not work, redo it again but replace asus_nb_wmi wapf=0 with asus_nb_wmi wapf=1, and if that does not work, replace it with asus_nb_wmi wapf=4 instead.


Wacom tablet, stylus and eraser dont show up in xinput -list(thinkpad

I use

xsetwacom --list devices

to list my Wacom tablet devices, it works for me. (Cfr. also this blog post of mine about how I set up my Wacom tablet in Ubuntu).


NVIDIA GeForce GT525M with Optimus on Ubuntu 16.04 LTS

This worked for me:
1. Update package lists

sudo apt-get update

Remove nouveau

sudo apt-get remove xserver-xorg-video-nouveau
Install bumblebee, primus and NVidia Drivers

sudo apt-get install bumblebee-nvidia nvidia-384
Blacklist NVidia Drivers in your /etc/modprobe.d/bumblebee.conf i.e add towards the end of file
' # 384
blacklist nvidia-384
blacklist nvidia-384-updates
blacklist nvidia-experimental-384 '
Update bumblebee Config to Point to 384.x Drivers in /etc/bumblebee/bumblebee.conf
....Driver=nvidia
...
LibraryPath=/usr/lib/nvidia-384:/usr/lib32/nvidia-384
...
XorgModulePath=/usr/lib/nvidia-384/xorg,/usr/lib/xorg/modules
...
Select Mesa as your GL Provider

sudo update-alternatives --config i386-linux-gnu_gl_conf
Select /usr/lib/i386-linux-gnu/mesa/ld.so.conf

sudo update-alternatives --config x86_64-linux-gnu_egl_conf
Select /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf

sudo update-alternatives --config x86_64-linux-gnu_gl_conf
Select /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
Reboot

sudo reboot
Disable gpu-manager i.e Add nogpumanager to your /etc/default/grub file
...
GRUB_CMDLINE_LINUX="nogpumanager"
...
Update your grub menu

sudo update-grub
Re-build the bbswitch and nvidia modules.

sudo dpkg-reconfigure bbswitch-dkms
sudo dpkg-reconfigure nvidia-384
Reboot

sudo reboot

Source: http://lenovolinux.blogspot.co.uk/2016/05/bumblebee-on-lenovo-t440p-nvidia-gt.html?m=1


How can I open sublime text 2 with a specified directory in the file viewer panel?

You can pass a file name or directory to the subl command without any extra arguments. For example, to open the current directory in the sidebar, just run:

subl .

To open a specific file, just pass its name:

subl ~/.bashrc

Run subl --help to get a summary of command-line options.


I need helping installing OpenPHT on ubuntu

The only way is use the AppImage version of the latest OpenPHT.

Just download the lastest .AppImage file from here:

https://github.com/DEAKSoftware/OpenPHT-AppImage/releases

Then make it executable and run the AppImage file. Just it!

Works on 14.04 and above!

18.04 works like a charm!


Custom compose key sequences without xim (e.g. in Sublime Text 2)

I know you asked this a year ago, but in case it ever helps someone, here’s what worked for me to enable custom .XCompose additions:

sudo apt-get install uim
export "GTK_IM_MODULE=uim"
(log out and in again)

uim is an input method which respects the compose file additions, but also enables the functionality not available in xim, eg Ctrl+Shift+U to enter a hex Unicode character ID.

This may work for the OP’s situation, if he still needs a solution, I don’t know.


KDE - Dolphin: Open tab in new window instead of new tab

You can go under File Associations and set your favorite application for folder, when choosing Dolphin, you can go in Application properties and add the command line parameter --new-window before the %u

thinking about this, you could have both configure, and have the option to right click -> open with -> dolphin new tab/window

see attached screenshot


I have found the answer, below the link, anyone should use wss.pl script.

https://github.com/brendangregg/wss.

It worked for me.


Make ext3 filesystem with 128 bytes inode size

I assume you want to create an ext3 filesystem (why "MBR").
You probably want an inode size of 128 bytes, not bits, right? The default inode size is 256 bytes.

The command to create filesystems, mke2fs, has an option to specify the inode size.

Use something like this to create a filesystem:

mke2fs -t ext3 -I 128 /dev/sdXX

From man mke2fs:

    -I inode-size
           Specify  the size of each inode in bytes.  The inode-size value must be a power of 2 larger or equal to
           128.  The larger the inode-size the more space the inode table  will  consume,  and  this  reduces  the
           usable  space  in  the  filesystem  and  can also negatively impact performance.  It is not possible to
           change this value after the filesystem is created.


Try booting from USB again. As soon as you get the purple screen with the keyboard icon at the bottom, press ENTER (this is shown at the very beginning before you get the Ubuntu logo).

Now choose your language. At the bottom you see a list of F-keys for extra options. There is a help page with more information on the available option. In your case I would try pressing F6 and selecting nomodeset. Then continue to boot.

This disables kernel mode setting which causes problems with some graphics hardware on install.


The name of the package is microsoft-edge-dev according to this link.
To remove it, enter the command
sudo apt remove microsoft-edge-dev

To remove the settings and configuration files along with the program, enter the command
sudo apt purge microsoft-edge-dev

I don't know if the package is now stable and the suffix -dev has been removed. If the above commands does not work, you can try the following
sudo apt remove microsoft-edge

(you can also use sudo apt purge microsoft-edge instead of remove if you want to remove configuration files)


Why aren't my PPA's showing up in the Ubuntu Software Center?

If this is the same bug that's been around for as long as I can remember then you need to run sudo update-apt-xapian-index -f to get the Software Center to update your added repo's. On further research, there are bug reports for this issue not showing added repo's and also for continuing to display repo's that have been removed. Either way, running this code will work for both. As of 13.04 this issue still persists.


How to install Keil µVision on Ubuntu 18.04

This is working for me.

Download PlayOnLinux.
Download Keil software for Windows from their official website.
Open PlayOnLinux and install Keil µVision using install a non-listed program and choose the Keil executable file. After the installation open Keil µVision.

After that I have experienced two issues:

Could not open file.

Error 56 can't open the file

That was solved by rebuilding the project.
Check the directory and rebuild the
project.
Some issues with memory mapping.

*** Error 65: Access violation at 0x00000004 : No 'write' permission

To solve this problem I created MAP.ini and placed this code inside
MAP.ini saved in /home/usr/Desktop. Then in Keil go to project
options: Ctrl+F7 → Debug → Select the initialization file MAP.ini by
browsing to the specific folder.
Put the code in MAP.ini without "": "MAP C:0x0000, C:0xFFFF read write exec"

NOTE:Make sure your .asm or any other file including MAP.ini has permission read/write for other,group and owner


This would be a virtual machine configuration issue.

While your host OS might be 64 bits you will also have to make sure that your virtual machine is configured to be 64 bits as well.

Virtualization of a 64-bit OS requires certain hardware features. Not all 64-bit CPUs have these features, or have them enabled. See my other answer :

Can't install a 64-bit virtualbox on 64-bit 12.04

The 32-bit version may be suitable, as long as you don't need 64-bit features (like a large amount of RAM per process).


Only desktop wallpaper is showing on booting?

I don't have an actual solution, but a workaround I'm using is patience... I have found that if I wait several minutes after the login screen appears before logging in, it works.
Obviously, if you're not even getting the login prompt, this isn't apropos. Sorry I've got nothing else.


How to delete a Gnome extension that does not have the "delete button"?

The ones where you do not see the option to remove are extensions that are installed system wide, as opposed to these you install from the browser.

Locally installed extensions: Gnome Shell extensions that you install from the Gnome Shell extensions website are installed in your account (actually in the folder ~/.local/share/gnome-shell/extensions). You can remove this extension from the Gnome Shell extensions website by clicking the red-with-white-cross "Delete" button.
System wide installed extensions: Some Gnome Shell extensions are installed system wide (in the folder /usr/share/gnome-shell/extensions) as a .deb package manager, just like any regular application. These cannot be removed by the user from the website. They can only be removed by a user who has administrator privileges, using Software Center, or using a graphical package such as Synaptic, or using the apt remove command in the terminal.

So for example, you could remove the Desktop icons extension with the command
sudo apt remove gnome-shell-extensions-desktop-icons

(note I do not recommend uninstalling this extension: it is part of Ubuntu desktop. Just disable it - the effect is the same, and the extension hardly takes up any space on the disk.)
You can see all available system-wide gnome-shell extensions with the command
apt search gnome-shell-extension

Ubuntu 20.04 users
Starting from Ubuntu 20.04, there is a "dedicated" app for extensions, which functions pretty much the same as the Extensions tab in Gnome Tweak, except you can uninstall locally installed extensions (that feature one day was removed from Gnome Tweaks).

Locally installed extensions (from the website) appear in the top section under "Manually Installed". These extensions can also be uninstalled from within the app.
System wide extensions are listed below, under the "Build-in" section.


In order to narrow down the problem use the traceroute command. This works similarly to ping but tries to measure the time it takes to reach each step (router) between you and the target site.

For example the following shows the output from traceroute from my desktop to google. The three times shown at the right of the line are the times taken to reach each step. You will likely see a big jump between two lines and this will give you a hint where the problem lies. In most cases you will only have control over the first (or maybe 2nd step) if the jump is after that then the problem likely lies with your ISP.

richm@royalcounty:~$ traceroute www.google.com
traceroute to www.google.com (173.194.37.104), 30 hops max, 60 byte packets
 1  192.168.1.253 (192.168.1.253)  0.932 ms  1.821 ms  2.451 ms
 2  192.168.0.1 (192.168.0.1)  18.140 ms  18.375 ms  18.585 ms
 3  lo98.sc-acc-sip-1.as9105.net (212.74.102.14)  49.461 ms  50.571 ms  51.492 ms
 4  10.72.4.66 (10.72.4.66)  53.092 ms  55.379 ms  55.534 ms
 5  10.72.9.217 (10.72.9.217)  56.417 ms  57.158 ms  58.020 ms
 6  xe-8-3-0.bragg001.log.as13285.net (80.40.155.33)  59.461 ms  58.231 ms  58.912 ms
 7  xe-7-3-0.scr001.log.as13285.net (80.40.155.52)  67.517 ms  52.667 ms  53.769 ms
 8  xe-10-2-0-scr010.thn.as13285.net (78.144.1.2)  51.251 ms  48.155 ms xe-11-0-0-scr010.thn.as13285.net (78.144.1.0)  48.980 ms
 9  host-78-144-3-30.as13285.net (78.144.3.30)  58.058 ms  58.216 ms  58.313 ms
10  64.233.175.27 (64.233.175.27)  53.913 ms  54.135 ms  55.319 ms
11  209.85.251.202 (209.85.251.202)  64.648 ms  64.875 ms  65.158 ms
12  lhr14s02-in-f104.1e100.net (173.194.37.104)  59.522 ms  59.695 ms  62.261 ms

I'm not sure if traceroute is installed by default in Ubuntu. If it is not installed then you can install it using

sudo apt-get install traceroute


You cannot use bash completion in another interactive session - you're not interacting with bash at that point.

The default python interpreter provides no autocomplete function, but you can get an improved interpreter like IPython (sudo apt-get install ipython) which provides a range of history and autocomplete functions.

The default R interpreter provides some autocompletion. I'm not sure if you can get a better command line interpreter, but a GUI like RStudio (not in repositories, download deb package from their site) provides better interactivity.


You can manually download it from here: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html  and then install it.


command does not work in script file, but works ok with shell command

'use: unknown option `curldbg

I suspect this line is the result of actually printing this:

fuse: unknown option `curldbg<CR>'

whereas <CR> is the carriage return character, causing the trailing apostrophe to overwrite the beginning of the line.

Make sure that your script contains Unix-style newlines (NL only).

Also note that

. ./script.sh (a.k.a. source ./script.sh),
bash ./script.sh (or any_other_shell ./script.sh),
./script.sh

are three significantly different ways of invoking a script. Normally you should go with the third approach (along with an executable bit on the script). This is also the only one out of these three approaches where the #!/blah shebang line matters.

#!/bin/env sh

If you choose this approach for the shebang line, you need /usr/bin/env instead of /bin/env.


It's possible the device isn't available during the boot process.  You can address your real concern  by having the disk available by adding a script to start it to your /etc/rc.local file... a file which is automatically run after the system comes up.

Just make a script such as /usr/local/bin/mountdrive.sh and add that line to the /etc/rc.local file.

/usr/local/bin/mountdrive.sh:

#!/bin/bash
mount /dev/sdc2

Alternatively, to avoid getting the already mounted  error you could use this in your mountdrive.sh file:

#!/bin/bash
mountpoint -q /big && mount /big

Results of testing your fstab entry:

I attached a USB Seagate 4 Gig Drive and used the exact entry and got success.  After this I modified the entry to use the UUID in case the drive specification changes.  You can get the UUID of your /dev/sda1 partition with:

$ lsblk -o name,mountpoint,label,size,uuid,fstype

This is the modified fstab line that also works:

UUID=2a14ecf1-e4f6-45fb-8cb7-5c5317e3189e /big ext4 rw,nosuid,nodev,relatime,nofail,data=ordered 0 0


Why is ping failing in ubuntu 19.10? (seems related to IPv6)

Find out where the ping package is.It might have a different location. On my Ubuntu 18.04 machine, it is in /bin.
Use type -a ping to locate it. Next, verify that it is there and is owned by root and is permed 755 (or similar)

ls -lsa /bin/ping
sudo chmod 4711 /bin/ping

Verify that the fix worked ls -lsa /bin/ping

ping 2600:3c01::f03c:92ff:fe3b:2efa


Where to get wireless drivers for ubuntu?

Default Wireless drivers should be available.

Make sure Enable/WiFi or Enable/Wireless is checked.

Update:

On the top right corner, click the WiFi icon.
On the drop down menu, look for Enable WiFi/Wireless and verify that it is checked.


The system is running in low-graphics mode after installing

while the system is booting hold shift to get to the grub menu then press E
it should bring up a bunch of text that you can navigate with the arrow keys
find the line that starts with linux
it should look similar to this
        linux /boot/vmlinuz-4.5.0-rc3+ root=UUID=c9932a51-0d6a-4ed0-9098-2daafc9e4500 ro  quiet splash $vt_handoff
after "ro" add "nomodeset"
so the line should now look like this
    linux /boot/vmlinuz-4.5.0-rc3+ root=UUID=c9932a51-0d6a-4ed0-9098-2daafc9e4500 ro nomodeset  quiet splash $vt_handoff
then press F10
it may bring you to the login screen or may let you use TTY.


how to access different sda from terminal in ubuntu?

Create a folder to house your filesystem like so :

sudo mkdir /media/sda2_access

Proceed to mount the filesystem with:

sudo mount /dev/sda2 /media/sda2_access

Now, you can cd into /media/sda2_access to get to your files.


How to set default opening folder for Nautilus file manager?

The file that is shown in unity-dash is not anymore /usr/share/applications/nautilus.desktop but /usr/share/applications/org.gnome.Nautilus.desktop.

Changing the Exec= line in the file itself does not have any effect.
The problem is an entry DBusActivatable=true that makes the system to run nautilus via dbus. So the Exec= line is being ignored. Maybe it is possible to provide nautilus the desired directory through dbus (/usr/share/dbus-1/services/org.gnome.Nautilus.service) but I am not familiar with that system in detail.
For further information look here: https://wiki.gnome.org/HowDoI/DBusApplicationLaunching

A simple solution for me was to hide the gnome/dbus launcher-icon and make the old one visible again. So add the entry NotShowIn=Unity; to /org.gnome.Nautilus.desktop and comment it out in nautilus.desktop. There you can adjust the Exec= line with the desired directory.

(file: org.gnome.Nautilus.desktop)

[Desktop Entry]
NotShowIn=Unity;     # <--------------------------- add this line !
Name=files
Comment=Access and organize files
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window %U
Icon=system-file-manager
Terminal=false
Type=Application
DBusActivatable=true
StartupNotify=true
Categories=GNOME;GTK;Utility;Core;FileManager;
MimeType=inode/directory;application/x-gnome-saved-search;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.14.2
X-GNOME-UsesNotifications=true
Actions=Window;
X-Unity-IconBackgroundColor=#af4853
X-Ubuntu-Gettext-Domain=nautilus

#OnlyShowIn=Unity;    # <---------------- comment out this line !

[Desktop Action Window]
Name=Open a New Window
Exec=nautilus --new-window
#OnlyShowIn=Unity;    # <---------------- comment out this line !

(file nautilus.desktop)

[Desktop Entry]
#NotShowIn=Unity;     # <---------------- comment out this line !
Name=files
Comment=Access and organize files
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window /{DESIRED_DIRECTORY}     # <- adjust !
Icon=system-file-manager
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;Core;FileManager;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.14.2
X-GNOME-UsesNotifications=true
Actions=Window;
X-Unity-IconBackgroundColor=#af4853
X-Ubuntu-Gettext-Domain=nautilus

[Desktop Action Window]
Name=Open a New Window
Exec=nautilus --new-window


Can't see notifications on notifications bar

Reinstall indicator-datetimejust in case you have removed it unknowingly, it is best to run the install command again.

sudo apt-get install indicator-datetime

Next, we are going to reconfigure the date time:

sudo dpkg-reconfigure --frontend noninteractive tzdata

For battery indicator

 sudo apt-get install indicator-power

then

gsettings set org.gnome.settings-daemon.plugins.power active true

This command will restart unity panel and re-showing up the lost indicators

sudo killall unity-panel-service

If the command above has no effect reboot and check


I think, that your boot partition is broken. Try boot from livecd/live usb to fix it.

First, find your harddrive using lsblk command.
Check filsystem for errors.
Then check if your boot partition is not full. It may be necessary to delete some previous versions of kernels or images.

Then mount your root partition and bot partition, bind /sys, /proc, /dev, /rundirectories, chroot to this space and update-grub2.
Reboot.

Something like this:

lsblk

NAME                       MAJ:MIN RM   SIZE RO MOUNTPOINT
sda                          8:0    0 298.1G  0
├─sda1                       8:1    0   500M  0
└─sda2                       8:2    0 297.6G  0
  ├─vg_main-lv_swap (dm-0) 253:0    0   5.8G  0
  ├─vg_main-lv_root (dm-1) 253:1    0    50G  0
  └─vg_main-lv_home (dm-2) 253:2    0 241.8G  0
    └─home (dm-3)          253:3    0 241.8G  0
sr0                         11:0    1  1024M  0

Check boot partition for errors

fsck /dev/sda1

Mount harddrive root partition

mount /dev/dev/vg_main-lv_root /mnt

Or something like this depending yours disk layout

mount /dev/sda2 /mnt

Mount boot

mount /dev/sda1 /mnt/boot

Bind directories

 for x in proc dev sys run ; do
      mount -o bind /${x} /mnt/${x}
 done

Chroot and reinstall grub

  chroot /mnt
  grub-install /dev/sda
  grub-mkconfig -o /boot/grub/grub.cfg
  exit

Cleanup and reboot

cd /
umount /mnt/boot /mnt/sys /mnt/proc /mnt/dev /mnt/run /mnt
reboot


How do I restore GUI buttons and sliders?

Turns out that the gtk theme I was using was no longer being developed and support ended on 16.04. I loaded a current Adapta gtk theme and all of the issues went away. Thank you @heynnema for the suggestion. Pointed me in the right direction :)


Upgraded to Ubuntu 16.04LTS - but no new Software Center

You can easily remove Ubuntu Software Center manually and install Ubuntu Software instead. Press CTRL+ALT+T to open a terminal and execute the following commands:

sudo apt remove software-center
sudo apt install ubuntu-software


The error would suggest that you have encrypted the PEM file and it hence requires a passphrase to be used (and is not getting it). You can use such certs with MongoDB, but you have to decide how you pass in the passphrase - you can do it via the command line, the config file or by being prompted (though that requires an interactive startup of course). Alternatively you can remove the password from the PEM file with a command something like:

openssl rsa -in /etc/ssl/private/example.key -out /etc/ssl/private/example.nocrypt.key

You will be prompted for the passphrase at this point, and then the output file will have no passphrase.


It appears to of fixed itself. I just ran a system update today and it seemed to of worked!

Can't really give a fix for this problem, but I'll have a look through the updates. Might have been a packaging issue?

Thanks devs for the great software! :)


Ubuntu 14.04 doesn't start after installation / live from USB

try to do the following:
- press this key combination simultaneously Ctrl+Alt+F2
- a regular command line screen will appear , type in your username and password as configured during install process
- when the prompt turn to something like user@machine:~$ type this

sudo pkill X

beware that X is uppercase
- then type

sudo startx

if this didn't work comeback here :)


Is Compiz Unity's new flat black/outlined launcher look permanent?

The theme is not final. We don't have design resources yet.

Currently it is just me drawing what I think looks okay without putting a lot of time into it. It could probably use a gradient or two...


Cycle through windows in KDE on Ubuntu 14.04

System settings > Workspace Appearance and Behaviour > Window Behaviour > Task Switcher > Content > Only one window per application

I'm not sure what you mean about the task switcher at the bottom, but you sholuld probably open anoter question for that.


Can I use TLP and CPUFreq at the same time?

CPUfreq is actually built-in with the Linux kernel. This is the tool that manages CPU frequency. You may be thinking of indicator-cpufreq, which adds a function to the panel allowing the user to easily control CPUfreq settings. This is a simple way to change between frequencies or governors. The cpufrequtils package is a dependency of indicator-cpufreq, but is not needed by TLP.

TLP is an optional program that can be installed. It manages many different settings for power consumption. CPU frequency is one of these that it can manage, and it uses CPUfreq in the kernel to do this.

So you already have CPUfreq by default. TLP can help managing power settings, and CPUfreq is one of the many tools it can control. The CPUfreq indicator is another option for managing CPUfreq.

See this explanation for more info about this.

Is there a power saving application similar to Jupiter?


How can do I install any software using ubuntu terminal by knowing their name only

You can search for packages providing a file with
dpkg -S file

and you can search for packages and keywords with.
apt-cache search

Read
man dpkg apt-search


Fresh Ubuntu 12.10 install no desktop or wing bar

After reading all the posts on here and thru google
this is the standard lines I type in my terminal after a new install 12.10 with nvidia cards, seems to work
bruce

sudo apt-get purge nvidia-current nvidia-current-updates nvidia-experimental-304

sudo apt-get purge nvidia-current
sudo apt-get purge nvidia-current-updates

sudo apt-get install linux-source
sudo apt-get install linux-headers-generic
sudo apt-get install nvidia-current-updates

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install nvidia-current

sudo reboot


Ubuntu 18.04.2 LTS, Network is unreachable message when I run #sudo apt-get update

I am not certain why apt doesn't use the environment variables, but I hit this problem myself on a network where I had to use a proxy.

What you need to do it tell apt that you want to use a proxy.  This can be solved by adding a snippet file in /etc/apt/apt.conf.d/

The filename is up to you.
The content of this file must be:

Acquire::http::Proxy "http://proxy-you-need-to-use:8080/";

Obviously, you set between the double quotes what you have set in your environment variable.

After that apt should work just fine.

For a one-liner, this should work:

echo 'Acquire::http::Proxy "http://proxy-you-need-to-use:8080/";' | sudo tee /etc/apt/apt.conf.d/10-proxy-you-need-to-use

Again, obviously, you need to adapt the http://  part to the actual proxy.

Most CLI command are proxy-aware, but not all and it is no requirement as far as I know.


My VPS provider offers only Ubuntu 18.04 minimal, but I need standard -- is there an easy upgrade path?

You don't need to know. That's why you have apt.
Option 1: Install the ubuntu-server package. It will drag in all of the other dependencies.
Option 2: Install the tasksel package, and use it to install ubuntu-server.
If you REALLY want to know what packages you are missing, simply ask apt: apt install --simulate ubuntu-server


An alternative would be to extract the required page with pdftk. E.g to extract page 10 of infile.pdf and save it as outfile.pdf:

pdftk infile.pdf cat 10 output outfile.pdf


I also have dual boot Windows 10 and Ubuntu in my HP (UEFI / EFI) laptop. Are you sure your followed all the ways correctly?
Just boot in to your ubuntu and check for disks application.
It will show all partitions in your hard-disk. If you see no windows partition drives, then you have lost windows, else while ubuntu boots, press the boot key. In Hp ( f9) to choose where to boot ( like in Ubuntu or windows boot manager). Then select windows boot manager.


I fixed the problem.
The issue was that the /opt/java directory had 700 permission. I changed it to 755 and now java -version is working for normal users (without sudo).


How can I print existing ascii-art from a Bash script?

This is the shortest form I was able to produce, that prints exactly that 007 string:

base64 -d <<<"H4sIAJM2MVYAA1NQgAEDIIhHBsgCBmgAU8TAQJsL2SgU41AFiDALYRhUF8I0NAEUCbBZUB7MBGRrUXX
g8DC6CagORwkYtDCDcw3IMwDdOBL1IyRRwpBI7cihTlSYkRRNUHcRnUZgXIQGIlOoOQC/4ufk0gIAAA==" | gunzip


Does the Ubuntu 14.10 ISO file have the option to make a partition?

You totally confuse things. It is your task, not the ISO's, to copy to the proper partiton. Additionally, if you just copy ISO to HDD into partition, you will need a manual and highly non-trivial installation of bootloader to start it. Even if you succeed, you will have a read-only installation, that keeps all files in memory and reverts to pristine condition on every reboot.
What are you trying to achieve?


Auto upgrade failed to 20.04LTS, I deleted old kernels to save space and the latest one, now it thinks I am 20.04 when I'm not, help!

You have to install the corresponding meta-package by:
sudo apt-get update
sudo apt-get install linux-image-generic

and then to be completely sure install all newest dependencies for 20.04 LTS by
sudo apt-get dist-upgrade


tmux - unable to start any gui application

I had a similar error using Tmux under gnome. The thread here: https://bbs.archlinux.org/viewtopic.php?id=167029

Pointed me to https://wiki.archlinux.org/index.php/Tmux#Tips_and_tricks

where adding the following to my ~/.bashrc file before the aliases fixed the problem.

# If not running interactively, do not do anything
[[ $- != *i* ]] && return
[[ -z "$TMUX" ]] && exec tmux


How to get requested librairies of gridwars?

After installing the following package,

sudo apt-get install libc6:i386
sudo apt-get install libxxf86vm1:i386
sudo apt-get install libglu1-mesa:i386
sudo apt-get install libstdc++5:i386

You get

moi@somewhere:/opt/gridwars/gridwars_lin$ ldd gridwars
    linux-gate.so.1 =>  (0xf77b2000)
    libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf765d000)
    libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xf7604000)
    libGLU.so.1 => /usr/lib/i386-linux-gnu/libGLU.so.1 (0xf757c000)
    libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xf7576000)
    libstdc++.so.5 => /usr/lib/i386-linux-gnu/libstdc++.so.5 (0xf74bc000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7479000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf745e000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf72a9000)
    libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf7287000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7282000)
    libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xf726b000)
    libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf7259000)
    libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xf7254000)
    libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xf724d000)
    libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xf724a000)
    libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xf7232000)
    libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xf722d000)
    libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xf721f000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7136000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7119000)
    /lib/ld-linux.so.2 (0xf77b3000)
    libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7115000)
    libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf710e000)

And the game works.


How to tweak Ubuntu running on an old PC?

380MB RAM is pretty low, but should be fine running a lightweight OS.

If you want to stick to an Ubuntu based distro, I recommend Lubuntu. It uses the LXQt desktop environment. Watch out when installing heavy packages; try to find an alternative. Firefox is known to take a lot of memory, if the browser provided with Lubuntu suffices, stick to that one.

I'm using Lubuntu as portable distro on my USB flash drive, and it runs pretty smoothly. Xubuntu (Xfce DE) is a great option as well, but it’s not as light as Lubuntu.


You should (probably) not take your swap off the RAID 1.
It's sometimes less important have swap on a RAID 1, but it's fine, usually helpful, and often necessary. Rarely is there any reason to deliberately put your swap elsewhere, if you're already using a RAID 1.
Swap on RAID 1 May Perform Better
SWAP on RAID 1 can be expected to perform better than a single swap partition outside the RAID, but not as well as two swaps set to the same priority.
Writing to a RAID 1 is sometimes slower than writing to a single disk, since all data must be written to both disks. Often it's not really slower--usually the slowdown will be negligible. If you have a RAID 1 of two disks on the same IDE controller, it will be slower. But when accessing one disk doesn't slow down accesses to the other disk, writing to the RAID 1 will not be significantly slower.
Reading from a RAID 1 is almost always faster than reading from a single disk, since when one disk is occupied by a read, more data can be read from the other disk. Reading from a RAID 1 made up of two drives is often almost twice as fast as reading from a single drive.
I'm not aware of any tests to compare two separate swap partitions to a single swap partition on a RAID 1 (or any other RAID). There's no reason to think a single swap partition would perform as well or better than a swap on a RAID 1. The situation is more complicated if you have two swaps on separate disks:

If the swaps are given different priorities in /etc/fstab, separate pages are swapped to them; the same page is not swapped to both at once. I'd expect two swaps to be faster for accessing unrelated swapped data simultaneously, but slower for accessing a single page.

If the swaps are given the same priority in /etc/fstab, data (even from a single page) will be striped. This is similar to RAID 0 and will most likely perform even better than putting the swap on a RAID 1.
Theoretically if you have a hardware RAID 1, software striping could be less efficient, but unless you have unusual applications where reading from swap is overwhelmingly more common than writing to it, I would expect a non-RAID software striped swap to outperform a swap partition on a RAID 1.
(Since the kernel can stripe swapped data between multiple swap partitions, there's no reason to set up a software RAID 0 just for swap.)

See this section of the Wikipdia article "Standard RAID levels", for more information about RAID 1 performance.
Thanks to gertvdijk for providing critically important information about striped swaps.
You Might Really Need Your Swap on the RAID 1
Whether or not you need your swap on a RAID 1 depends on why you need a RAID 1 in the first place. The data in swap is typically highly volatile and losing it usually doesn't represent a significant loss of assets. However.:

One benefit of RAID (except RAID 0) is that if a drive fails your computer keeps running (just somewhat slower). If you have programs running that have swapped pages to disk (which virtually always is the case if swap is enabled), the drive containing a swap partition (whether or not it's the only swap partition) fails, and it doesn't have a redundant backup, your system will immediately stop working right (and will likely be entirely unusable until rebooted, depending on how the swap was being used). If you're using the machine as a production server or for any other important task, downtime will result.
If you can tolerate total swap failure from a single commonly encountered adverse event (one drive failing), you should ask yourself why you're using RAID 1 at all. You might have a good answer...and you might not. RAID (except RAID 0) safeguards against disk failure, but RAID is not a backup solution. If you change or delete a file on a RAID, or malware infects a system on a RAID, the changes are made immediately everywhere--the RAID will not enable you to recover from that.
If what you need is a backup rather than redundancy, and you don't already have a highly reliable, easily accessible backup, then you should take one of the drives out of RAID completely and use it for backups. (Of course, sometimes it is also necessary to have an off-site backup.)

If you hibernate your computer (i.e., suspend-to-disk), the contents of RAM are copied  to the swap partition. So you can actually lose data by losing your swap partition, if your machine is hibernated when disk failure occurs.


Ubuntu installation on Acer Aspire Cloudbook 11

When you installed Ubuntu in EFI mode with Secure Boot enabled :

The appropriate boot file you have to select is shimx64.efi.

When you installed Ubuntu in EFI mode with Secure Boot disabled :

The appropriate boot file you have to select  is grubx64.efi.


Disable standby on close of laptop only if ethernet it plugged in

Ok, with some info from other answers, you can try this untested method:

From Catch lid close and open events

The script you want to call when the lid opens or closes has to be stored
in /etc/acpi/lid.sh.
Then there has to be created the correct file /etc/acpi/events/lm_lid with the content as follows:

event=button/lid.*
action=/etc/acpi/lid.sh

Reboot your system to let this take effect. Or maybe it is enough to restart your ACPI using

sudo /etc/init.d/acpid restart

From https://unix.stackexchange.com/questions/252002/help-testing-special-file-in-sys-class-net and How can I suspend/hibernate from command line?
the /etc/acpi/lid.sh script will look like this (change yournetworkcardname for your name of your network card. Use ifconfig to find it). You can choose between suspend or hibernate.

#!/bin/bash
if [ "$(head -c1 /sys/class/net/yournetworkcardname/carrier)" -eq 0 ]; then
    systemctl suspend
fi

Test the script with bash -x /etc/acpi/lid.sh and make sure it works. You might have to add the following to run the script as sudo without being prompted with a password, from https://unix.stackexchange.com/questions/18830/how-to-run-a-specific-program-as-root-without-a-password-prompt:

myusername ALL = (root) NOPASSWD: /etc/acpi/lid.sh

Maybe you will also have to call the script in the action with sudo.


Try this:

ssh-copy-id -p 4444 username@remote_host

This will make ssh-copy-id to connect to port 4444 of "remote_host" for transferring and adding the public key to ~/.ssh/authorized_keys of the "remote_host".


I finally got it back to work.
With my Ubuntu laptop and the right commands I was able to flash Ubuntu touch.
I didn't even lost my data.

ubuntu-device-flash touch --device arale --channel ubuntu-touch/stable/meizu.en


Cannot update Logitech Unifying Receiver (version of org.freedesktop.fwupd incorrect: failed predicate [0.9.2 ge 0.8.1])

I've opened an issue with fwupd. You need fwudp 0.9.2 or greater to update. Ubuntu 17.04 ships with 0.8.1. One solution is to use a live USB of a distribution such as Xubuntu 17.10 b1 which has a more recent version in its repositories. Since it is a firmware upgrade you can use the other distro to update the Unifying Receiver and then boot back into your normal system.

get a bootable USB disk with a distro containing a current version (I went with Xubuntu 17.10 b1, which currently has fwupd 0.9.7). Note that you probably want a 64-bit version of the OS - 32-bit fwupd segfaults if device is plugged in.
boot the live distro
plug in the receiver
apt update
apt install fwupd
edit /etc/fwupd/remotes.d/lvfs-testing.conf - change Enabled=false to Enabled=true
fwupdmgr refresh && fwupdmgr update

Source: https://github.com/hughsie/fwupd/issues/253#issuecomment-329755909


Can not install Ubuntu 16.04 or 16.10 on Asus GL 552vx

Rufus and other live usb creators fail to create a bootable USB in many cases. Use dd command instead.
'sudo dd if=/iso of=/dev/sdx bs=4M && sync'
Where /iso is the path where the iso is in your hdd and x is the letter for the usb, as shown in 'lsblk'


A feaw guesses/checks

Make sure you don't have any raid functionality enabled in the bios.
Linux doesn't play well with software raid, nor with intel matrix store ssd cache solution. You need to set your disks in plain sata/AHCI mode with uefi boot.
Make sure your usb stick also boots in uefi, not legacy. If the boot env doesn't see uefi, then it will assume you want a legacy system, which is sometimes broken on newer rigs.
Make sure you make an uefi partition, when you format. If you don't then the system installs fine, and when you reboot, it will not boot.


Bash - Prepend zero to single digit in while loop

Using your script, the following will work.

#!/bin/bash
x=0
ep=1
while [ $x -le 11 ]
do
  ep_padded=$(printf '%02d' $ep)
  echo "Welcome $x times"
  date --date="$x week" +"%Y:%m:%d"
  exiftool -exififd:dateTimeOriginal="$(date --date="$x week" +"%Y:%m:%d") 00" $1$ep_padded*
  x=$(( $x + 1 ))
  ep=$(( $ep + 1 ))
done

You can use the following form to increment your variables too

x=$((++x))
ep=$((++ep))


I suppose you just need to run:

history > filename.txt


Beautiful Soup 4 not working with Python 3.4.0

In all currently supported versions of Ubuntu open the terminal and run:

sudo apt-get install python3-bs4

python3-bs4 is an error-tolerant HTML parser for Python 3. You can see from this that there are two different packages: python-bs4 (for Python 2.x) and python3-bs4 (for Python 3.x), and to prevent you from getting confused there are also two different Integrated Development Environments for Python: IDLE and IDLE 3 to run them in.


Udev may have just recognized them in a different order if there was a change in udev at all. You can control this behavior as well if you look up using udev to name devices. This is also the reason for other distributions such as Fedora switching naming conventions to enp9999s99 naming conventions for devices.


Bind the Ctrl +  keys to firefox in Ubuntu

On Ubuntu Ctrl + Number doesn't work. Instead you have to use Alt + Number

Both Alt keys work. This works on Chrome and Firefox and File Manager... essentially anything with tabs open.

It works in Unity, GNOME and Cinnamon (as you wanted).

  How am I supposed to close tabs
  -–  HackToHell

You can close tabs with Ctrl+W. This also works on windows and Mac (Cmd+W)

  I suppose there is no way to restore it back to good old Ctrl+ ? –  HackToHell

Alt + Number is just as easy as Ctrl + Number (just a matter of getting used to it). I think that Ctrl + Number may be used for other ubuntu things?

The amount you would gain from rebinding it is nowhere near the effort you would put in to change a system wide shortcut key.


After updating Ubuntu 16.04 in Virtualbox, only desktop background is visible

I also run Ubuntu 16.04 in VirtualBox on top of Windows 7 and had the same problem. To me the solution was to "Enable 3D Acceleration" in the Virtual Machine Settings. (I can reproduce the problem still if I disable that setting.)


Does gnome-fallback.desktop require accelerated graphics in 13.10?

It kind of works if I start things manually that gnome-session used to start. Fonts don't seem to be set though.

~/.vnc/xstartup

#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &


Meaning of files under /etc/lightdm/lightdm.conf.d/?

The contents of 10-xubuntu.conf are:

[SeatDefaults]
user-session=xubuntu

In contrast, Ubuntu (that is to say, ubuntu-desktop) usually keeps configuration for LightDM in /usr/share/lightdm/lightdm.conf.d, where you should find a 50-ubuntu.conf:

$ cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
[SeatDefaults]
user-session=ubuntu

If this files exists, and has the same contents, you can go ahead and uninstall xubuntu-default-settings, the package that owns 10-xubuntu.conf:

sudo apt-get purge xubuntu-default-settings

That would be cleaner than deleting or replacing 10-xubuntu.conf.


Correct way to install a custom upstart service

When you initially copy a new conf file into the /etc/init folder you need to call:

initctl reload-configuration

By this your upstart should be properly registered.


To install the driver go to Epson Drivers Site.

Enter the scanner model into the search box and select Linux as OS.

Click on download button at the right of "scanner driver".

Accept the license.

Click on "Package Download Page".

Click on "Download" button for 32- or 64-bit deb package. I assume you have a 64-bit system.

Copy iscan-bundle-1.0.0.x64.deb.tar.gz to your home folder.

Run in terminal:

tar xaf iscan-bundle-1.0.0.x64.deb.tar.gz
cd iscan-bundle-1.0.0.x64.deb
sudo ./install.sh

Try to scan with "Simple Scan".


Installing Ubuntu from USB stick (having Ubuntu already installed)

use the disk image creater or writer on ubuntu os's to make your usb this is what i do all the time. never fails for me.

make sure you check the box saying disk image and find folder and download  which ever os your using to usb, find program that says disks to check to see if the usb is boot-able if not boot-able re-download from internet.

if not use rufus for windows

if all fails search online for usb boot loaders. if this helps your welcome. i have most ubuntu flavors myself on one computer. good luck to you.

(wjandrea)!!!!
Don't change my message  mint/peppermimt editions at's called the usb/disk image creater or writer are called on these two os's. so don't change my messages i run all ubuntu os's plus the all flavour's.if you don't believe me download all editions yourself of ubuntu's. only been modding my pc's and laptop's since I was 12 now 30.


Cannot ssh as root to my virtual machine

Thank your for your answers.

The answer is indeed simple because I seem to have edited ssh-config file instead of sshd-config to enable root login. And after editing the file it seems to solve the issue.

Many thanks for your time

Prakash


How to create cloud service synchronizer + automation tools

You have too wide question to have one magic pill so you should use different tools and scripts that suits for you better.

  Is there a framework for automating tasks on a development environment
  (which involves interacting with cloud services). For example, lets
  say I use rsync and to automate backups and various things using my
  various cloud accounts, how free am I to customize and automate
  everything?

In my case I prefer to use p2p https://syncthing.net/ for backup whole laptop to home pc.

Dropbox for storing documents.

AWS S3 custom-written scripts that make backup of accounting system database and storing (tar + upload).

  For example, lets say I use a password manager like keepassx, can I
  integrate this so rsync can extract things (like usernames/passwords,
  SSH keys, codes, files etc.) that are stored in there? What about
  encryption tools like truecrypt?

I am using keepass on dropbox and sync it between laptop and android phone. In your case you can use synkthing.

  Am I free to run any custom bash script or python script for example
  at any time? Can I use this tool to automate things like vagrant,
  docker, Amazon EC2, Amazon AWS?

In my case I have some .bat files on Windows PC, and Bash and Python on Ubuntu computers and servers.

I think that you can freely use any tool you want. We live in no-ideal world so just automate boring and critical tasks.

  The biggest concern I have is making this too cross platform. I switch
  between Windows and Linux and unfortunately writing batch scripts is a
  pain in the ass with cygwin, so I would much prefer to write scripts
  in a cross platform language. Sorry if this post is loaded with
  questions, I just see how incredibly useful this would be if it works.

in my case different platforms - different tools.

  For web development side of this tool, I need this tool to do things
  like: git pushes and pulls
  backup MySQL databases

Git Bash for windows, Bash scripts that use git for Ubuntu in my case.

  Additionally, I need the tool to be able to help in provisioning VMs.
  So for example, I create a LAMP server VM with vagrant and need to
  transfer my SSH keys tothe Vagrant VM or docker container, the tool
  could get the SSH keys from the secure password manager, then use the
  passwords and instructions to share files between the host and the VM.

I think that is very specific task so just start writing your own scripts and then refactoring many times ))


reboot the machine and while the grub loader menu appers choose it and edit it type e  then choose the kernel and press e to edit and just end of the line put 1 and press B to boot after getting into run level 1 change your password using passwd command


Encrypt each user's home folder individually with ZFS

The second article you refer works superbly!
https://talldanestale.dk/2020/04/06/zfs-and-homedir-encryption/
I have just completed the implementation (with minor adjustments to suite local specifics)
Strongly recommended for the detailed instructions - just read carefully and you'll learn a lot of cool stuff.
Thanks for the pointers.


Install Ubuntu without creating a new user

The USB experience is a give it a go - if you like it you need to have a user for a permanent install.
Fantastic you want to install - so same details  (if you want/appropriate) and off you go for a permanent solution on your machine.
If you are already running Ubuntu then sudo do-release-upgrade after a full update....
YMMV (if this helps a vote would be nice)


Error while trying to install ATI/AMD proprietary drivers (post-release update)

I had the same problem, in my case reinstall command helped. Paste this in terminal:

sudo apt-get install fglrx-updates --reinstall

If it doesn't work uninstall FGLRX:

sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx

Then install driver using terminal:

sudo apt-get install fglrx-updates

If that doesn't work uninstall everything again and try using official script, just follow those commands:

cd /tmp && wget -O amd-driver-installer-12-8-x86.x86_64.zip http://www2.ati.com/drivers/linux/amd-driver-installer-12-8-x86.x86_64.zip
unzip amd-driver-installer-12-8-x86.x86_64.zip
chmod +x amd-driver-installer-8.982-x86.x86_64.run
sudo sh amd-driver-installer-8.982-x86.x86_64.run

Windows will popup and you can start installing drivers. When you finish type:

sudo aticonfig --initial -f

and reboot.

The link is for the ATI 12.8 64bit drivers, to get a newer version replace it with a link provided to you by official AMD site, just select your harware.


Open your terminal. Write the following:

sudo apt-get update
sudo apt-get install libctemplate0 libzip1 python-pysqlite2 mysql-client python-crypto python-paramiko
sudo apt-get install mysql-workbench

Press Enter and write down your password then another Enter. Done


Duplicity - storage location not available, waiting for Google

Well I found the solution myself, I just had to change the location of the backup from the Storage Location in the Backup settings


What to do if system stops running during install?

Be sure your computer is always connected to power, when performing updates or installing systems. Doing CPU heavy stuff, while on battery will drain the battery in no-time.

If the PC dying on you is not the case, then please be more specific in your question. Like explaining exactly what you mean by "stops running".


rsync between two Ubuntu server 16 on mounted samba folders

Have you tried to mount both shares on both servers, then rsync could skip one layer (ssh) and work "locally":

rsync -a /media/2012a/archive1 /media/2012b/archive1

If it still gives same error, it may have problem with CIFS (allows it set timestamp in Linux manner?) or with permissions.


Is it possible to download the updates via torrent?

Possible, maybe, chaotic, very. Please have a look at the debian wiki about this and the possible issues that you will have using BT as a download source for your updates.

There is a reason why when looking in google for "apt torrent good setup" or "working perfect" returns 0 good results will all the keywords.


Grub not working after Windows 8.1 update on Ubuntu 12.04 LTS

I had this problem too. After updating to Win 8.1, installing boot-repair in ubuntu & running it didn't work for me. (But it was working earlier. Also note that I have to use boot-repair disk after every windows update - every month - since updating to windows 8.1. Before that this problem was not there)

Instead create a bootable usb with boot-repair.

Download iso here: boot-repair-disk

Boot into this & select recommended repair. It will solve the problem.


Using sed

Type the following command:

sed '/^$/d' input.txt > output.txt

Using grep

Type the following command:

grep -v '^$' input.txt > output.txt


Error while installing google chrome in ubuntu 14.10

To install Google Chrome, type in terminal

sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb

Instead of google-chrome-stable you can choose from either google-chrome-beta or google-chrome-unstable packages if you want.

If you get new errors after running sudo dpkg -i google-chrome*.deb, run

sudo apt-get install -f
sudo dpkg -i google-chrome*.deb

That will resolve broken dependencies. During the installation a PPA is added to your system so that Google Chrome receives the latest updates whenever you check for system updates with sudo apt-get update.


Ubuntu + Windows 8 pro dual boot - Grub can't find command 'Drive Map'

You could try installing rEFInd, which is an alternative to GRUB that usually handles Windows more reliably. If you're using Ubuntu 12.10 with its default installation settings, you should be able to install the rEFInd Debian package and everything will work correctly, although there may be duplicate menu entries. You can remove these by editing the /boot/efi/EFI/refind/refind.conf file and adjusting the dont_scan_dirs or dont_scan_files options.


Another, very different, approach to the basic problem might be to use the "session buddy" extension. That way if the browser let's you down you can easily use the extension to recover your tabs.


Here are step by step instructions (found here):

First, install unixODBC:

sudo apt-get install unixodbc unixodbc-dev

I also installed the following (perhaps necessary) packages:

sudo apt-get install tdsodbc php5-odbc

Then download, untar, compile, and install FreeTDS (warning, the URL may change):

cd /usr/local

wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar xvfz freetds-stable.tgz
cd freetds-0.82
./configure --enable-msdblib --with-tdsver=8.0 --with-unixodbc=/usr
make
make install
make clean

Attempt a connection over Telnet to your SQL Server instance:

telnet 192.168.0.1 1433

Use the tsql tool to test out the connection:

tsql -S 192.168.0.1 -U devuser

This should prompt you for the password, after which you can hope against hope to see this beautiful sign:

1>

If that worked, I recommend throwing a (coding) party. Next up is some configging. Open the FreeTDS config file.
/usr/local/etc/freetds.conf

Add the following entry to the bottom of the file. We’re setting up a datasource name (DSN) called ‘MSSQL’.

[MSSQL]
host = 192.168.0.1
port = 1433
tds version = 8.0

Now open the ODBC configuration file:
/usr/local/etc/odbcinst.ini

And add the following MSSQL driver entry (FreeTDS) at the end:

[FreeTDS]
Description = FreeTDS driver
Driver = /usr/local/lib/libtdsodbc.so
Setup=/usr/lib/odbc/libtdsS.so
FileUsage = 1
UsageCount = 1

Then, finally, set up the DSN within ODBC in the odbc.ini file here
/usr/local/etc/odbc.ini
By adding this bit to the file:

[MSSQL]
Description = MS SQL Server
Driver = /usr/local/lib/libtdsodbc.so
Server = 192.168.2.3
UID = devuser
PWD = devpass
ReadOnly = No
Port = 1433

Test out the connection using the isql tool:

isql -v MSSQL devuser 'devpass'

If you see “Connected!” you’re golden, congratulations! If not, I’m truly sorry; see below where there are some resources that might help.

Now restart Apache and test it from PHP using ‘MSSQL’ as the DSN. If something doesn’t work, you might try installing any or all of these packages:
mdbtools libmdbodbc libmdbtools mdbtools-gmdb


Given the age of the machine I'd suggest starting with a lighter distribution such as Lubuntu! Go with the LTS version (18.04) and see how it goes!

I'd comment, but don't have privileges to do so yet, but you didn't mention what chipset you are running...

To probe hardware open a terminal (Ctrl+Alt+T) and type sudo lshw.


The problem was memory usage. Apparently clamav-daemon uses about 300MB of memory when all the virus libraries loaded. I'm running on a small VPS with 1GB of RAM and mysql-server-5.6 takes up a big chunk of that. To improve performance I added performance_schema = off to /etc/mysql/my.cnf which reduced memory consumption by about 400MB! (why is this the new default in 5.6.6?!). Anyway, that freed up some memory which allowed clamav-daemon to start without a problem.


Where to download param partition image for Meizu Pro5?

The partition is mostly empty. I have scavenged this info from another meziu pro5 phone.

Hope it will help another poor soul that will mess up the internal flash.

To recreate the partition information run this:

(head -c 320 /dev/zero
echo -e -n "\xCCUactivateStats\x00\xC0\x01\xC5\x04"
head -c 43 /dev/zero
echo -e -n "\xE3"
head -c 4193920 /dev/zero) > test.img

The md5sum of the partition should be: e69ac803431a05cf0b59d23129221861


How to setup a passwordless samba share on KDE?

On the desktop this is as simple as switching on the folder sharing with anonymous access, right click on the folder and click "Sharing Options" it may ask you to install the sharing services, install them:

Once done (and restarted session) then just share the folder with guest access:

On the Ubuntu Server (without graphical desktop) you can follow this guide:

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

Warning! When you enable guest access it does mean the anyone will be able to see your files. This is especially problematic on laptops with wifi networks where you just visit an internet cafe and give your files to your fellow coffee drinkers.


Accidently deleted boot option on Dell laptop

No need to panic. Here is the workaround to get GRUB back.

Go to BIOS settings by pressing F12 when system boots up and Dell logo appears.
Go to General→Boot Sequence. It must look like this

Click on Add Boot option. You will get three fields: Boot Option Name, File System List and File Name

In Boot Option Name, type Ubuntu, Don't touch File System List option and in File Name select the file grubx64.efi which must be in /EFI/Ubuntu/ and then Click on 'OK'.

Note: Don't leave Boot Option Name empty. This will cause Boot name not found error.
This newly created boot option will appear in the end. Select that option with the mouse click and use Arrows beside the list to bring it on top to change boot order.

Click on Apply then Exit
You must be welcomed by a familiar GRUB.

These photos were clicked by mobile phone and I tried my best to get possibly best photos.


Authentication required to install plug-ins and application

I feel awkward coaching you through cracking a password but here is a first attempt:

I presume you must be somehow logging into the system as some user. (When you bought the computer, did they create an account for you? Or did you just start to use an account that they had previously used - that feels wrong, a bit like a second-hand toothbrush)

Assuming you have your own account or you are using one they gave you, there is a chance that it is privileged to execute commands as super-user (sudo command). I suggest you give that a try:

$ whoami
DrSAR
$ sudo passwd   # this will change the root passwd
[sudo] password for DrSAR:       # enter your user password
Enter new UNIX password:         # this is the new root password
Retype new UNIX password:        # try to get it right a second time
passwd: password updated successfully

If you do not have super user privileges, there are other ways to at least overwrite the root password. However, if you acquired the computer rightfully, they should give you the root password.


I just installed, and ran Spiral Knights to test your issue.

How I accomplished it:

Install PlayOnLinux from the software center or their website
In PlayOnLinux click Install -> Games -> Steam.
Then go about installing spiral knights as you would in Windows.

If this still doesn't work then I would suggest trying unity 2d as the issue maybe due to a graphics card driver issue.


Acer Aspire One D270 screen crash at wake up

Permanent activation of "--quirk-dpms-on"

$ sudo pm-suspend --quirk-dpms-on

This solves the problem for me too (thank you for the information).

To permanently activate the solution you have to set it up in /etc/pm/config.d/defaults.

I copied the default config file /usr/lib/pm-utils/defaults by typing:

$ sudo cp /usr/lib/pm-utils/defaults /etc/pm/config.d

After that I added the following line at the corresponding place in the file.

ADD_PARAMETERS="--quirk-dpms-on"

For details see the comments in the file or the manual page of pm-suspend.

have fun ;-)


Flashcam doesn't compile -- videodev.h not found

Looks like its not possible to find videodev.h because it has been replaced with videodev2.h. More info, here

On my machine, I see this

/usr/src$ find . -name videodev*
./linux-headers-3.8.0-19/include/linux/videodev2.h
./linux-headers-3.8.0-19/include/uapi/linux/videodev2.h
./linux-headers-3.8.0-23/include/linux/videodev2.h
./linux-headers-3.8.0-23/include/uapi/linux/videodev2.h
./linux-headers-3.8.0-21/include/linux/videodev2.h
./linux-headers-3.8.0-21/include/uapi/linux/videodev2.h
./linux-headers-3.8.0-22-generic/include/linux/videodev2.h
./linux-headers-3.8.0-23-generic/include/linux/videodev2.h
./linux-headers-3.8.0-21-generic/include/linux/videodev2.h
./linux-headers-3.8.0-22/include/linux/videodev2.h
./linux-headers-3.8.0-22/include/uapi/linux/videodev2.h
./linux-headers-3.8.0-19-generic/include/linux/videodev2.h
/usr/src$


Most of your installed software (not including Subsonic) is provided by configured software sources (also called repositories) from which software is automatically downloaded and installed by the package manager. Running these commands will upgrade all such software to the latest versions provided in your configured software sources:

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

See the apt-get manpage for explanation of specifically what those commands do. (Also accessible on your machine via man apt-get.)

However, Subsonic was not installed in this way. Following these instructions, you manually downloaded the installer package (.deb file) for Subsonic, and installed it by manually invoking the dpkg command with the -i flag. Unlike most software for Ubuntu, Subsonic doesn't have a software source you can set up to provide it, so that's the way you have to install it. To upgrade it to a later version, simply download the newest .deb file (or whatever version you want to upgrade to) and follow those same installation instructions (with the new .deb file).

Since Subsonic is not automatically upgraded with the rest of the software on your system (via apt-get), you'll have to take care to remain current on issues that affect it so that you know when security vulnerabilities are discovered and when they are patched (i.e., when a new version is released to fix the vulnerability). In practice, all network server software of greater than an extremely minimal degree of complexity has multiple security vulnerabilities, which are discovered (and hopefully also fixed) from time to time.

Sometime in the future, you may have the preferable alternative of using a non-official software source (of a kind called a PPA) for Subsonic. You would then receive updates to Subsonic along with updates to the rest of the software on your system (via apt-get). However, currently the Subsonic PPA is empty and does not provide any software.


Where can I setup scrolling speed in Ubuntu 13.04?

If you are using a wireless mouse (specifically a Microsoft one?), a quick and easy work around for insane scrolling speeds which may work is to simply unplug and the reinsert the USB transceiver.   It worked for me at least.  The mouse wheel now scrolls 3 lines rather than 3 pages.

According to the bug logs, the problem is actually a driver issue.  An actual fix seems in the works, but naturally isn't available in older versions.


i686 is a grade of x86 (32-bit) processor, so you cannot use a x86_64 or amd64 ISO/OS.

I get this issue on pentium M, pentium IV/4 machines as they are 32-bit only, but I try and boot a amd64 ISO/OS.

FYI: Some very early pentium M are i586 grade, ie. less capable than later model processors These won't run any modern Ubuntu ISO (but can run Debian).

Most XP machines were amd64/x86_64 capable, but lower-end (esp. older) consumer grade often were x86 only; and NOTE Debian & Ubuntu refer to all x86 ISOs as i386 grade on ISOs, so look for i386 on download (even if the code within is i586/i686 today)

Your issue is you downloaded the amd64 (64-bit x86) ISO (it's named AMD64 as AMD created the compatible x86_64, intel's IA64 was incompatible & failed in the marketplace; so even if you're using an cpu you use amd64 too).

Ubuntu Studio 18.04 was not a LTS or long-term-support release, though you can add an PPA to get extended support, but you didn't provide release details. All recent 20.04 releases were amd64 (no i386 ISOs were produced after 19.04)


Will upgrading Ubuntu remove installed software?

Upgrading will replace your current software with newer versions of that software.
An upgrade can go wrong and if the end result is a reinstall your installed software will get removed.
In theory software could be removed if it is deemed obsolete. Or replaced by something new (open office got replaced by libre office at some point; though the impact of that was minor or close to nothing).
ALWAYS make a backup of your personal files. Not just when you do an upgrade. Every day. And once every so do a restore to test the backup. Prepare for failure.


It's easy, just install libgl1-mesa-dri-experimental package which provides experimental 3d support for nouveau driver.


I am guessing that the root issue is that something is not ready to support CIFS when the CIFS mount is called from the init script, but is by the time you get a login prompt.  You could try to track that down and update your init script order, OR...

If you are not using anything from //192.168.1.2/public until the system is up, then I would suggest changing from a boot-time mount to an automount.  That way it won't be mounted until you actually access it, by which time everything should be up.  The Autofs Ubuntu Community Documentation gives more info on how to set it up.

I actually use autofs for the exact same purpose (but with more drives) on my network at home.


http://appdb.winehq.org/ has an extensive list of games and apps that work with wine. Any games that are listed as platinum or gold for your version are worth trying out.


What do i do to fix this dual boot ?error: out of disc grub rescue>

This can happen when GRUB finds no usable config file. Try restoring GRUB using the Live CD.


How can I manually adjust menu colors in themes?

Well it seems my problem was not with the theme files (as proven by the fact nothing changed when I replaced them with the files from a friend where everything was working normally), but in ~.config/gtk-3.0. Removing this directory solved the issue.

Until shown otherwise I'll assume menu colors can not be adjusted in the theme files. For posterity, please do add an answer regarding manually adjusting menu colors in theme files if you have one (and I'll accept it if it's good).


While chmod 'ing for htdocs. I found daemon user. Who is this?

Yes it it is ok to change. Some configuration files may bring some variables like that, they're just examples. That's it.


Unable to change gnome-terminal default character encoding

Newer versions of Gnome terminal use UTF-8 by default, but if you need to enable other encodings you can do so from Edit -> Preferences -> Encodings.

Or in dconf at the path /org/gnome/terminal/legacy/encodings.  This allows you to change it programatically using gesttings:

gsettings set org.gnome.Terminal.Legacy.Settings encodings "['UTF-8']"


It sounds like a permissions issue if you are able to edit/create files as root but not as your user. If that is the case then you just need to change the file permissions of your sdcard so that your use can edit it. So, open up a terminal and navigate to wherever your sdcard is mounted, for example /mnt/sdcard:

cd /mnt
sudo chown -R $(whoami):$(whoami) sdcard

Also check the file permissions. You probably want them to be 750, at least.

cd /mtn
chmod 750 sdcard

Now you should be able to edit files as your user without switching to root. Regarding not being able to automatically mount the drive, there are a few reason that could be happening. We would need more information to help you with that. Please see this thread.


Change DNS Server given during Ubuntu 18.04 installation

Edit your netplan configuration file and remove the old dns server names and add new ones. Edit the file with sudo nano /etc/netplan/01-netcfg.yaml and yours should be similar to the example below:

network:
    version:2
    renderer: networkd
    ethernets:
         enp0s3:
             dhcp4: true
             nameservers:
                  search: [mydomain, otherdomain]
                  addresses: [10.10.10.1, 1.1.1.1]

The line of interest is the one that says addresses under the settings nameserver. It might also be written like so:

nameservers:
     search:
         - mydomain
         - otherdomain
     addresses:
         - "10.10.10.1"
         - "1.1.1.1"

Change the address there to the one you desire. Make sure to observe the indentations as ther are. Now after thatv save the file and aplly the changes:

sudo netplan --debug apply


How do I reinstall Ubuntu with Command line

If you want to reinstall it, you will have to make an installer disc (or flashdrive) and install it the same way you did originally.

Alternatively you can uninstall all of the packages that you have installed. You can list them with dpkg --get-selections | grep -v deinstall or apt list --installed.

There's also a Python script that you can use, it requires python3-apt.

#!/usr/bin/python3

import apt

cache = apt.cache.Cache()
for package in cache:
    if (package.is_installed and
        package.candidate.priority not in ("required", "important")):
        print(package.name, end=" ")
print()

Source for script.


How to do bonding in ubuntu 12.04 in vmware workstation?

Before applying bonding, need to close network. In my case, following command is used:

sudo stop network-manager

Instead of:

sudo stop networking

After editing in sudo vi /etc/network/interfaces file, need to restart network using:

sudo start network-manager

Or reboot Ubuntu.

Its works fine, but still I don't know why it show:

device not managed


For me it was also a problem, because there was no error. I tried to find and apply many solutions but without success.

The final solution was simple: remove the headphones... Try it.


Could someone please explain to me the difference between gconf, gconf-2 and gconf-editor?

GConf is a configuration database system for storing application
preferences. It supports default or mandatory settings set by the
administrator, and changes to the database are instantly applied to all
running applications.
gconf2 (not gconf-2) is a binary package (I guess that 2 was meant to be used first for GNOME2 and was not change for GNOME3)
GConf-Editor is a tool used for editing the GConf configuration database.

Note that gconf is now obsolete and has been replaced in recent releases by dconf.

Visit  Gconf, Dconf, Gsettings and the relationship between them for further details.


Is Ubuntu also available in Latin language?

No. The Latin language exists in Launchpad, but far too few strings have been translated yet to motivate the creation of Latin language packs.

You may want to join the Decuria latinitatis team and help with the translation into Latin.


Just choose it at log in.  It should be one of your choices along with Lubuntu and Lubuntu netbook.  Once you choose it and log in, it will become the default until you choose something else.  Be prepared for a bare bones system.


Can I unlock Mac folders from a USB stick?

Ubuntu can access HFS+ which Mac uses. If you run:

gksudo nautilus

(I assume Gnome desktop), then you may get write access to the partition(s) and can then retrieve your data. I suggest you make a copy and put it somewhere safe.