If you want to use the latest development/staging version of Wine, please make sure to follow the guide in the Official WineHQ Guide for Ubuntu, basically covering:

If you are using a 64-bit Architecture, then enable 32-bit for better compatibility

sudo dpkg --add-architecture i386

Add the Wine Key, Wine Repository & Update Repositories

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

We would add the repository like this (lsb_release -sc will automatically fetch the codename):

sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -sc) main"
sudo apt update

Then install the version of Wine you wish to use:

Based on Wine Development (Stable) (eg: 4.0)

sudo apt install --install-recommends winehq-stable

Based on Wine Development (Testing Stage) (eg: 4.1)

sudo apt install --install-recommends wine-devel winehq-devel

Based on Wine-Staging (Bleeding Edge) (eg: 4.1.1)

sudo apt install --install-recommends wine-staging winehq-staging

Lastly run

WINEARCH=win32 winecfg

in the terminal to make sure it configures Wine correctly (In that order). You will also need to install winetricks (Another configuration package, really helpful for installing Windows components like .NET Framework and other needed libraries). So after this, please do:

sudo apt install winetricks

Video Demostration showing Wine 1.9.X in Action - Wine 1.9.X Performance

1. Differences between Wine Stable, Development & Staging versions

Stable versions offer less bugs with better stability and receive updates every 3-6 months after release.

Development version is the next stable version in development and receives updates every 2 weeks.

Staging version is the same as Development Version but includes all patches and enhancements from Wine-Staging

The decision to stick with the stable version (Even number versions: 1.0, 1.2, 1.4...) or with the unstable versions (Odd number versions: 1.1, 1.3, 1.5...) is up to the user, the main difference is compatibility and performance which are both enhanced in the Development version. You get the latest fixes it offers, and also become a tester that can help in the development cycle.

2. Installing the Recommended Stable Wine version (from PPA)

In the terminal type the following to add the Wine PPA, update repositories, and install latest Wine & Winetricks version:

wget -nc https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key && sudo apt-add-repository -y https://dl.winehq.org/wine-builds/ubuntu/ && sudo apt update && sudo apt install wine-devel winehq-devel winetricks

or you could include the Wine 32-Bit Arch (Better support) and configuring winecfg (This should only be applied to new installations since it will move the existing Wine installation to a folder called winebck):

sudo dpkg --add-architecture i386 && wget -nc https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key && sudo apt-add-repository -y https://dl.winehq.org/wine-builds/ubuntu/ && sudo apt update && sudo apt install wine-devel winehq-devel winetricks && export WINEARCH=win32 && winecfg

3. How to know which components an application needs

To find out what components an app needs, look in the Wine Application Database. It lists if the application is usable, what components it needs and how to install them.

4. How to install additional components, DLLS and Libraries to Wine

To have a working and enhanced Wine environment for your games and apps, I suggest you use winetricks to install additional components which offer better compatibility with games. To have a better working system do the following here is an example for HL/HL2 (Non-Steam. For the Steam Version go here: How can I install Steam? . Know that Half-Life and HL2 are natively supported in Ubuntu):

To play HL/HL2 you need the Wine PPA as mentioned above. After opening winecfg at least once on the terminal, open winetricks by running winetricks --gui then follow this steps:

Select Select the default wineprefix

Select Install a windows DLL or component

Install all that I have marked (and any additional you need). This covers many apps:

Right click the installer for HL/HL2 and select Open with Wine. Both games should work perfectly. This applies to apps in general and depending on the app you will need to install more or less components.

You can also install each component in terminal by adding the name of the component after the winetricks command:

winetricks vcrun2010 - Will install vcrun2010 using winetricks

winetricks xna40 - Will install xna40

5. Troubleshooting a Wine App

Sometimes, when running an App one or several of the following can actions can happen:

Frozen App
Wine opens a Blue window for a moment and then closes it
Nothing appears to happen
Inside the Wine window everything is Black in the start or at some point
DLL, Video card or Component not recognized

For most of this problems there are solutions. Here are the recommended steps for you to start troubleshooting your way into a Wine app:

Always visit the Wine App Site to see what other testers have done to make the App work. For example here is me testing Dead Island: Riptide which I gave it a Bronze since after the selecting the character the whole game went to a Black screen. What I did to test out what was happening was to go to the terminal and run the game from there. In the terminal some of the errors suggested I was missing a vital piece for the game to work. After reading the error output and doing what it suggested (Replacing a corrupted DLL) I could install a component the game needed and the game worked perfectly.
Knowing what the game needs is crucial to getting the game working correctly. Setting the winecfg options and OS environment is only a small part. This is only creating the environment for the app. You need to add other functionality like DirectX, XNA, .NET Framework and more that the app might need in order to work. These are key components for some apps. Without them, even if some apps work correctly, others will not. Making sure you have all of this components gives you a higher chance of complying with what an app needs.
As you can see from my Dead Island test I added several winetricks packages and also installed 3 packages the games comes with (DirectX, Windows Media Format and Microsoft Visual C++ 2010). With this I managed to guarantee that the game would start and be playable.
Some apps are only created for certain Windows versions as seen with Dungeon Keeper. To specify a particular Windows Version for a particular app you can open winecfg navigate to Applications and select Add Application, then search for the applications executable file and click on Open. Now select the application from the list and then change the Windows Version for it. This way, only this application will have an specific version of Windows assigned to it, instead of globally changing the Windows version for all apps.
Changing the Windows version globally can affect apps that were installed with a different Windows version. For example, Installing Terraria in a Windows XP environment and then changing it after playing to Windows 7 will give you one of two errors, one, not finding the saved games and two not running the app.
Running an app to diagnose what the problem can be done through the terminal which is the best way by far to know what the app is doing or needing. The app can tell you information like:

What missing DLL it needs to run (mscore.dll, steam_api.dll)
What missing component it needs to run (XNA, DirectX, .NET...)
If the problem is you are using a 64 Bit environment instead of a 32 Bit
If you need to add a parameter for the app to run

For missing DLLs I suggest using dll-files to download specific DLLs missing that are needed for the APP. Normally you can paste this DLLs inside the game folder or in the Windows/System32 folder (Or both) and that should solve the problem. For missing components use winetricks.
When troubleshooting an App, always run the app in an emulated Desktop Window. Open winecfg go to Graphics and enable Emulate a Virtual Desktop. Then set the resolution for it. This way, if the app freezes, hijacks the keyboard and/or mouse focus, at least you have a way to eliminate the app instead of having it fullscreen where you have few choices:

For freezing scenarios of an app at fullscreen I suggest activating the "Kill X" feature that is found in the Keyboard Layout Window which can save you several seconds of time when trying to get out of a frozen Wine app:

Another technique of getting out of a frozen state is either opening a terminal and type wineserver -k or killing the X server. To do this firs configure it by running sudo dpkg-reconfigure keyboard-configuration and on the last option there that talks about killing X, say "YES". This will enable the CTRL+ALT+BACKSPACE combination.
Remember that if an app needs a minimum or recommended hardware requirement in Windows, it will also need the same on Linux. If the app needs 512 MB of RAM and a 2.0 Ghz CPU, it will need the same on Linux using Wine.
Sometimes you will come across an app in an ISO or any other Image format that you can not manage to open or install. Ubuntu comes with several tools to open this files but the best one I have tried so far is CDEMU which covers several types of images that bring Multi-Sector or Protected format. This is the closest you will get to something similar to DAEMON Tools. Cases like The Sims 3, Simcity 2000 and others can only be opened and installed using this app. More info in Apps capable of mounting/unmounting CD/DVD Images with multi-sector or protected format
For cases where an specific app is not running, showing graphical glitches, black screen or not running with full graphics I actually recommend reading one of the following links that applies to the end user for video support:

Nvidia Users - How do I install the Nvidia drivers?

Hybrid - Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

Ati - What is the correct way to install proprietary ATI Catalyst Video Drivers (fglrx) directly from AMD?

Apart from checking the above, if you have the correct drivers I would also add that you need to check if your video card has OpenGL support. For this I would first install mesa-utils if not yet installed:

sudo apt-get install mesa-utils

to test for OpenGL support. Simply run a check to see if you have OpenGL support:

glxinfo|grep 'direct rendering'

which should say Yes if you do have support. Another alternative would be:

/usr/lib/nux/unity_support_test -p

Lastly, you can run glxgears to give you an idea of how your video card renders and its FPS for the render. Another very important point is to run the application from the terminal as in wine AppName.exe, this way it will show what the problem is.
If the Unity Launcher is not hiding itself when running a Wine app or is moving the app to the right you can do one of 2 things:

Hold the ALT key and click and drag the Wine to the Left
In the appearance option select "Auto-Hide The Launcher" and set the sensitivity to a level you like. This way the launcher will hide when the mouse leaves it's area.

Shader Model 3.0 is not recognized in Wine (Including Steam games)

There are games that require Shader Models and output an error similar to Required OpenGL extension GL_EXT_texture_compression_s3tc. To fix this simply type the following in the terminal:

sudo apt-get install libtxc-dxtn-s2tc0
( note in recent version of Ubuntu libtxc-dxtn-s2tc0 is not longer needed )

Wine has come a LONG way from the days where newer games could not be played. It has gotten to a point where playing in Ubuntu is effortless. Wine has even some support for SM4.0 and DirectX 10/11 on Wine 1.6. If the problem persists it means that either your video card does not support this or you are missing the correct libraries.

Another reason that Wine might not detect Shader Model is because it might be set to Disabled in the Winetricks. Open the Dash and type winetricks. Select your wineprefix then Change Settings. Then look for the glsl=enabled option and select it. This should solve the Shader Model issue. Cases like the game Limbo are solved this way.

6. How do I open multiple Wine apps without them using the same Window (Overlapping)

You can setup multiple Wine windows by adjusting some Wine parameters before starting each individual Wine program. The fastest way is to open the terminal where the executable of the app you want to run exists. Let us assume it is the Wow.exe app. Then simply type the following:

wine explorer /desktop=WOW,1024x768 "Wow.exe" -opengl -console

This would open the Wow.exe executable with a Window titled "WOW", a resolution of 1024x768 for that specific Window and it would apply the parameters -opengl and -console to the Wow executable. Now assuming you have the game installed somewhere else, you would the following change:

wine explorer /desktop=WOW,1024x768 "/media/cyrex/fun/wow/Wow.exe" -opengl -console

This executes Wow.exe assuming it resides in the folder wow inside a partition called fun in your /media/USER folder. The output should be similar to this when running for example 4 apps:

There is a more easier way to accomplish this. The idea is to create a Desktop shortcut by right clicking on the Desktop and selecting New Document --> Empty Document. This should create an "Untitled Document" file on your desktop. Now open the file and paste in it the following:

[Desktop Entry]
Type=Application

Now save it and rename the file to the application you want to open but at the end add ".desktop". It will turn into an "Executable Windows Icon". Now right click the Icon again and go to Properties --> Permissions --> Activate Allow executing file as program. Now go to the Basic Tab and insert the information you need to execute that wine app. The end result should be something like this:

7. Does having Ubuntu 64 bit influence Wine

Yes, having Ubuntu 64 Bit will also set Wine as 64 bit. This will create several problems for many Windows apps that only work on 32 Bit, for example not being able to install several of the .NET Frameworks since they will only work on the 32-Bit version, which will result in the user not being able to run many Windows applications. To solve this you need to do the following after having succesfully installed the PPA version as I mentioned above. Immediately afer installing the PPA wine package and before opening winecfg open the terminal (Make sure you are at your home folder by typing cd ~) and type the following:

rm -fr ~/.wine
export WINEARCH=win32
export WINEPREFIX="/home/USER/.wine"
winecfg

Change USER with your user account. For example in My case, that line would read export WINEPREFIX="/home/cyrex/.wine"

With this method you have changed the Wine architecture to 32 bit and on the moment you open Winecfg, it will configure all the Windows versions available to 32 Bit.

8. Alternatives to Wine PPA

PlayOnLinux (PoL)

Although you can actually install and configure everything you need with Wine alone and it's complementing apps (winetricks, regedit, explorer) using PoL can save you some trouble and time when installing an application. With PoL you can find a list of apps that you can select and install in it's database:

and by simply selecting to install you achieve the following benefits:

Creating an independent container which holds the app installed, a specific Wine version for the app installed (In some cases, a specific Wine version works better for a specific app than the current Wine version).
Automatically installing any additional DLL and Components the app needs to function correctly.
Adding the appropriate registry keys the app needs
Create an independent way of running multiples apps without them overlapping each other with Windows version changes, regedit changed, specific Wine versions, etc..

Of course, it is important to know that PoL works side by side with Wine and it needs Wine to work correctly (It is based on it). In many cases, an app might not work with PoL but will work with the default Wine configurations I have mentioned in this guide. So if you find the app you want to use in PoL, great. But if you don't find it, remember you always have the alternative to using the default Wine to install and configure the app.

The benefits of installing the app using Wine and installing it using PoL is that with Wine, you can access and execute the App using the DASH, like in the images below:

(Terraria)

(Dead Space & Dead Island)

CodeWeavers CrossOver (CC)

CC is very similar to PoL on how to install and configure apps. The main difference is that CC offers official support. They even have their own CodeWeavers Database which holds more than 10.000+ apps. Not only that but they have a ranking system similar to the one in Wine's AppDB. They have also contributed to the development of Wine some of which you can see in their Support.

DosBox (DB)

DB is to MS-DOS apps as Wine is to Windows apps. With DB you can run MS-DOS apps in your system. Simply install the dosbox package and you are done. Running an app is as simple as going to the folder where the app resides and executing the following:

dosbox ./

This will open the current folder as a drive letter on the DB environment.

You can also mount a folder by doing the following after opening DB:

mount x: /Absolute/Path/To/Folder/Of/App

For example

mount c: /home/cyrex/Desktop/Dune2

Will create the C: Drive letter which contains the Dune2 folder. So if I simply execute dune2.exe I get the following:

9. What are some special parameters and tips I can use with Wine

There are a couple, for example:

COMMANDS

wine --version - Shows the version of wine

wineserver -k - Kills all wine versions for the specific user. This is useful if your Wine app is frozen, took the whole screen and does not let you use Ubuntu, has the mouse or keyboard focused on it and other Wine issues that might appear with some apps.

wine explorer - Will open an explorer similar to the Windows Explorer

wine explorer /desktop=X,Y - Creates a virtual desktop where X is the name of the Desktop Window and Y is the resolution of the Window. For example: wine explorer /desktop=WOW,1024x768 Wow.exe

regedit - Will open the regedit version of Wine similar to the Windows one.

wine uninstaller - Will open the Add & Remove of Wine similar to the one in Windows. Here you will be able not only see which apps you have install and uninstall them, but also be able to install new apps if you wish.

winetricks - Will open the winetricks app to install missing Libraries, DLLS and Components essential for the correct functionality of many Windows apps.

winecfg - Will open the Wine Configuration where you can set Video, Sound and Windows version.

wine ipconfig - Shows you the IP that Wine can see. Similar to ipconfig.

wine netstat - Shows you the IP/Port connections made. Similar to netstat.

wine start - Sets the working directory for the executable. This option helps in cases where the executable only works from the same folder and not from a full path. An example is if you wanted to run a .bat file or simply execute a command from another folder (eg: Parent folder), you would do something like this, assuming we are not in the same folder as MetroLL.exe:

 `wine start /d "C:\\Program Files\\GMT-MAX.ORG\\Metro Last Light" MetroLL.exe`

This would do two things, it will first set the directory to the Metro Last Light folder and then it would run the MetroLL.exe mentioned at the end. This is similar as running the executable from the same folder but it has the advantage of running the app from any other place. The thing to know here is that:

Wine does not like Unix paths, so you need to separate folders with \\ instead of \
You need to use an absolute path. You need to start from C:\\ to make sure the executable will always work as it should.
If the executable is outside the C: drive, then add the corresponding letter. For example, to execute a Windows binary outside of Wine, you would use the Z:\\ letter since Z: normally points to the Linux system's root directory.
If in doubt ask the command for help with the /? parameter, (eg: wine start /?)

export WINEPREFIX - This variable is used to change the Wine Prefix to another location. For example if you wish to merge PoL and Wine (Not recommended since PoL has multiple Prefixes) you can do the following:

   `export WINEPREFIX="/home/USER/.PlayOnLinux/wineprefix/PREFIX"`

Where PREFIX is the one you want to merge with Wine. You would have to run winecfg again.

TIPS

When dealing with a folder tha has spaces (eg: World of Warcraft), you can execute the Wow.exe file by adding the \ symbol in front of every space, this escapes the symbol. The end result would be something like "World\ of\ Warcraft\Wow.exe". If you do not want to add this escape symbols to your line of code, simply double quote the entire link, so it looks like:

wine explorer /desktop=WOW,1024x768 "/media/cyrex/My Partition/World of Warcraft/Wow.exe" -opengl -console

as you can see, there are 2 folders with spaces in them, "My Partition" and "World of Warcraft", but since I quoted the whole string, the need to include escape characters is not needed. If you wished to use the Wine Path (eg: C:/) then all slashes would be a double slash (eg: "C:\Program Files\App").
Parameters that are applied to an app should always be OUTSIDE the quoted strings. Using the example above, we can see -opengl and -console outside the quotes.
When dealing with apps that take hold of you mouse and/or keyboard, you can use wineserver -k to kill the app, or simply opening the App in Windows mode or setting the Windows mode with the wine explorer /desktop parameter will save you from having this mouse/keyboard problems.

10. Stability, Performance and App Support Wine offers to end users

APP SUPPORT

I have tried Wine since 2005 and seen how the developing process in Wine under Ubuntu has been quickly catching up to the latest games.

Before Wine 1.2 came out around 2012, it was difficult to get many apps working on Wine, but after Wine 1.2 came out it was a totally different result. Even more so after 1.4 came out in 2012, 1.6 in 2013 and then 1.8 in 2015. Many cases started to appear where they would work out of the box. Cases like Deep Space 2 which is/was one of the latest games I could play at that moment and which I tested 3 days after it was released. Alice in Wonderland (The new one I mean), The Sims 3, World of Warcraft, Amnesia and others. Even Skyrim could be played. These are games that demand powerful graphics and you can play them with little to no additional setups other than the normal install provided above.

To know what games you can play on Wine I recommend visiting the Wine App Database: http://appdb.winehq.org/ which holds more than 10K+. This includes information about their performance & stability and it helps in knowing if a game is playable.

The Wine App Database also offers a Ranking which determines what games can be played with less issues, if any. When you see this ranks, you have an idea if the App will work or not. Mind that you need to also take into consideration what hardware and Wine version the tester shows on the Wine Database. The rankings are as follow:

Platinum Rank - Means you have an almost 100% chance the app will work out of the box.

Gold Rank - Means you might find yourself doing a little bit of configuring but it will work out at the end.

Silver Rank - Means that the app will run, but might have graphical, sound or control issues.

Bronze Rank - Means the app will not work correctly.

Garbage Rank - Means the app still does not work and probably will not even install. The only way you could make it work would be when Superman starts eating kryptonian cereal in the morning.

For reference, a couple of years ago the amount of Platinum games was less than 50. In 2012 you could find More than 1.5K games out of which almost 200 were in the Latest Titles. Today there are more than 6K+ Games of which 4K+ are Platinum. The more people that participate in testing Wine apps, the better. Main reason I always recommend using the PPA from Wine.

PERFORMANCE

For performance information see Gaming performance difference between Windows and Ubuntu

11. How to Uninstall Wine

Uninstalling Wine can be done in 2 ways depending on your needs. If you only need to "Reset" Wine to the default values, you can simply delete the .wine folder and then create it again by running winecfg. If you have apps on the .wine folder that you wish to backup, now would be a good time before deleting the folder. To delete the folder simply do the following and it will take care of the whole Wine environment:

rm -fr ~/.wine
rm -fr ~/.cache/wine

Now if you want to actually uninstall Wine from Ubuntu, you can do the following, but note that this will NOT delete your .wine or cached folder:

sudo apt purge wine*

This would uninstall every package related to wine, including wine, wine1.9, winehq, winetricks and more. Basically removing anything related to wine.


Cannot Install or Update Using apt-get with VirtualBox

The reason for the 404 errors was that Ubuntu 14.10 has already reached its end of life. When an Ubuntu releases reaches EOL, its packages are moved from the normal Ubuntu archive morrors to http://old-releases.ubuntu.com/. Hence, when one tries to get the packages from the normal mirrors, they are not found and a 404 error is triggered.

The correct thing to do is to use an Ubuntu release which has not reached EOL, such as 14.04 or 15.10 currently, but if it absolutely necessary to use the EOL releases, one must modify the sources.list file to obtain packages from http://old-releases.ubuntu.com/.


I just had a similar case, and it turns out that the kernel was creating a huge amount of loglines into /var/log/syslog. After I fixed the problem (caused by WPA_supplicant and a wlan0mon left by kismet), the load went away. I would suggest that your solution would only be appropriate if there is no way to fix the root cause, which supposedly is the large amount of error messages from the kernel for syslog


19.10: GNOME fractional scaling, fullscreen video goes bogus

Having same issue on popos 19.10 , it is bug in xrandr fractional scaling , on ubuntu 19.10 fractional scaling is not enabled , so if you set to 200% scale , it will work for you.
Dirty trick is to remove everything .gnome .config in your dir and reboot


login to account reverts to login screen, guest login ok

It works perfectly now. I decided to examine my .profile file again, and I discovered a rogue apostrophe at the end of the last line. I must have grazed the ' button when I input those 2 lines, that I removed later. Delete that and everything is good. Thank you for helping me.

PS. using 11.10


Please note that you are trying to upgrade from 14.04 -which is indeed an LTS version- to 14.10, which is not LTS.

Since 14.04 is still supported, most of your software is up to date to much the same way as if you went to 14.10. So there is no real need to upgrade. Please note, 14.04 will be supported until April 2019, and 14.10 only up to July this year, so you are in fact taking a step backwards.

If this is a production machine, I would strongly recommend staying with 14.04 until the next LTS version rolls along.

On the other hand, if this computer is just for testing and all your personal data is fully backed up, you could consider trying the following:

as root, edit manually the file /etc/apt/sources.list, replacing all occurrences of trusty with utopic.
sudo aptitude update
sudo aptitude safe-upgrade

This procedure has been known to work to upgrade between Debian versions. It will take quite some time and download in excess of 600 MBytes for a base Ubuntu system (more if more software is installed), but if it succeeds will leave you with a Utopic (14.10) system with the same selection of software you currently have installed.

I would not recommend trying to upgrade directly to Vivid (15.04), since the change from upstart to systemd may very well have changed system package dependencies sufficiently to completely mix up the software manager.


Not able to share screen in MS Teams (v 1.4.00.7556) on Ubuntu 21.04 Hirsute Hippo

Have you tried to use xorg instead of Wayland? If not: logout, switch to xorg (click the symbol in the lower right corner of your logon screen) and try again.


For this exists that shell builtin command called compgen which most certainly you did not notice it when you run help -m.

$ compgen -k
if
then
else
elif
fi
case
esac
for
select
while
until
do
done
in
function
time
{
}
!
[[
]]
coproc

See help -m compgen for more info about compgen.


Turns out the problem is the graphic drivers.
Since I'm on ubuntu 14.04 with HD Graphics 4000
I edit the /etc/lsb-release so the system looks like 14.10, so I can get the driver (because HD Graphics 4000 support Ubuntu 14.10 & 15.04). So I'll have to upgrade for real to 15.04 or wait for LTS and bare with this ugly problem.


Ubuntu 14.04 no launcher, no Dash ,unable to work

Try this

dconf reset -f /org/compiz/

then

setsid unity

It should work afterwards


Another possibility is that the menu bar got disabled.
Right-click on the free space next to the "Inbox" tab and select "Menu Bar" if there is no check symbol.


On Ubuntu they are continuous. On other operating systems it might differ.

The kernel allocates PIDs in the range of (RESERVED_PIDS, PID_MAX_DEFAULT). It does so sequentially in each namespace (tasks in different namespaces can have the same IDs). In case the range is exhausted, pid assignment wraps around.

( https://stackoverflow.com/questions/3446727/how-does-linux-determine-the-next-pid )

Mind though ...

Kernel scheduling can fork a process so it might appear to skip numbers.
A PID will disappear when that task ends.
PIDs are not re-used until PID_MAX_DEFAULT is reached.
A reserverd PID is skipped.

Some topics on stackoverflow:

https://stackoverflow.com/questions/822797/about-the-pid-of-the-process

In the comments is a command to test the assigment of PIDs:

for i in {1..20}; do sh -c 'echo $$'; done


I need to run a script that might break `apt-get` database. What should I backup?

After some digging,i found out that apt-get database is managed by dpkg

From man dpkg

   /etc/dpkg/dpkg.cfg
          Configuration file with default options.

   /var/log/dpkg.log
          Default log file (see /etc/dpkg/dpkg.cfg(5) and option --log).

   The other files listed below are in their default directories, see option --admindir to see how to
   change locations of these files.

   /var/lib/dpkg/available
          List of available packages.

   /var/lib/dpkg/status
          Statuses  of  available packages. This file contains information about whether a package is
          marked for removing or not, whether it is installed or not, etc.  See  section  INFORMATION
          ABOUT PACKAGES for more info.

          The  status  file is backed up daily in /var/backups. It can be useful if it's lost or cor‐
          rupted due to filesystems troubles.

Also from The Debian FAQ,it says

  It is important to understand that the higher level package management
  tools such as aptitude or synaptic rely on apt which, itself, relies
  on dpkg to manage the packages in the system.

So if dpkg puts its own database in /var/lib/dpkg/status, that means apt-get database and all other package mangers maintained by dpkg will also be in /var/lib/dpkg/status.So simply by backing up /var/lib/dpkg/status (of which dpkg already puts its backups in /var/backups/) will solve your worries of screwing up with apt-get.


How to create a service in ubuntu then access to it by url?

I believe that the guide you linked here does something different than what you want to do. In order to run php, you need apache and php installed and configured, have a look here:

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

then you can start apache by running

sudo systemctl start apache2

(maybe you need top run php too)
then open the browser and go to

http://localhost/myproject/myscript.php

to see your php running


Deluge torrent downloads disorganized/reset after 12.10 upgrade

I have a dual boot system so I have NTFS partitions. This is where I keep my downloaded torrents. I noticed that the mount points of those partitions have changed in 12.10! The path now contains the user name.

Old path: /media/volume
New path: /media/username/volume

Deluge keeps looking for the torrents in the old folder, but obviously can't find them, and tells you an error. The error message also can be found, it is on the 'Files' tab:

Status: Permission denied: /media/volume/...

So it's rather a Unity/Ubuntu/GTK error than a Deluge one.

I also experience difficulties with setting the download locations or using the 'Move Storage' option in Deluge. I noticed it succeeds if in the file selection dialog I click the directory name only once (not changing to it by double-clicking, only selecting it by single-click).

Manually re-adding a torrent as explained above fixes the path problems.


In a new installation of Ubuntu 18.04 there is no need for either home or swap partitions and creating them is a waste of disk space. One ext4 partition for everything is all you need. This answer would also have helped you in Nov. 5, 2017 because starting in new installations of Ubuntu 17.04, the Ubuntu installer creates a swap file instead of a swap partition by default, so a single partition is all you need. The recommended size of this single partition is 25GB or larger, and the default format of this partition is ext4.
SSDs are currently so cheap that it makes sense to buy a >=256GB SSD and install Ubuntu in a single partition on the SSD. If the Ubuntu installation requires an additional 500MB EFI System Partition, then the Ubuntu installer will create one if it doesn't already exist.


Why isn't my second HDMI alsa_output being detected at start-up?

Here's a work-around for this:

Go to Sound Settings and change the sound to HDMI / DisplayPort 2. Then close the settings window and run the following command:

pacmd dump | grep set-card-profile

Copy the output of the command above and paste it at the bottom of the /etc/pulse/default.pa file (open it as root with a text editor, e.g.: "gksu /etc/pulse/default.pa")


How do I set PYTHONASYNCIODEBUG value in pipenv python?

in a shell

export PYTHONASYNCIODEBUG=1

Yes?

Perhaps you are wondering how to do this only when in a pipenv environment from a shell?
Assuming a bash shell, detect when in a pipenv environment by checking PIPENV_ACTIVE

if [ "${PIPENV_ACTIVE+x}" == '1' ]; then
    export PYTHONASYNCIODEBUG=1
fi

.env file

A different approach is to use a .env file.  Create such a file in your project directory with contents

PYTHONASYNCIODEBUG=1


To fix your Network Connections problem, I think you need to do this:

gksu gedit /etc/network/interfaces
and delete the

auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

section, which will give control of the connection back to network manager.

Regarding the original problem:

What happens when you run ping -n 74.125.127.106? Are the times between pings similar to ping google.com or is ping google.com significantly slower between pings even though the times for the ping is the nearly the same as ping -n 74.125.127.106? If there is a difference, then it's most likely a DNS problem. If it is a DNS problem, you could edit your connection in network manager. Go to the IPv4 tab and pick "Automatic (DHCP) Addresses Only". Now, add "4.2.2.2 4.2.2.3" in the DNS server field and click Save. Reconnect and see if that fixes it.


Wifi unavailable after installing Ubuntu 20.04 on laptop

In your wireless_info, we still see that the wireless is hard(ware) blocked. We also see a likely cause.
Please try:
sudo modprobe -r ideapad_laptop

Does your wireless come to life?
If you wish to make it permanent, blacklist the module so that it never loads at all:
sudo -i
echo "blacklist ideapad_laptop"  >> /etc/modprobe.d/blacklist.conf
exit

Further details: ideapad_laptop module makes iwlwifi stop working


You should enable virtualization in your BIOS (when you boot your computer press F2 or DEL usually).

This will allow VMWare, or any other virtualization program (Virtualbox, KVM, XEN, ...) to access your processor directly.
Make sure your CPU actually supports virtualization.
I have an atom, and those do not support virtualization for example.
On the other hand I have an AMD bulldozer, and those support virtualization, but by default it's disabled in the bios.


When I turn on my computer, I'm stuck on this: [open for photo]

This was fixed by reinstalling Ubuntu 19.04. After reinstalling, Ubuntu automatically recognized and installed the proper/correct Nvidia drivers, unlike the first time I had installed Ubuntu 19.04.


aptitude search cannot display origin nor sources nor architecture of installed packages

Looking at the changelog from my 18.04 box, I can see:

aptitude (0.7.5-1) unstable; urgency=low

  * New upstream release. Please see /usr/share/aptitude/NEWS for a change
    log with more details.

    - New features:
<snip>
      * Add format strings for Source (%E), Architecture (%e) and
        Origin (%O) (Closes: #248561, #604982, #760608)
<snip>

The version of aptitude in 16.04 appears to be 0.7.4, predating these additions.
So it looks like your aptitude search -F '%p %e' ... command is (rather unsportingly) simply bailing when it gets a format specifier that it doesn't understand.


The Ubuntu installer allows you to choose from several different languages, Norwegian is one of them. The same goes for keyboard layouts, so typing with Norwegian keys is no problem either.

The installer will also offer to install Ubuntu in addition to any existing OS like your Windows.

As for your last question, Ubuntu comes with a package management system, so you most likely won't have to download any programs manually. Instead, you can just tell the Software Center (or any other package management tool of your choice) to do the downloading and installing for you.


How can I backup Installed firefox add-ons and restore

Go to home directory and enable the option in Nautilus to show hidden files.(Ctrl + H)

You will see a folder called .mozilla, which you may back up to external media or copy to another location.

If you ever need to restore from this backup, just copy this directory back to the home folder under the same name. You may need to use Ctrl + H to see it, though.


Installing Ubuntu alongside with Windows

You need not worry about "pre-partitioning". Ubuntu installer has a partitioning manager that will make everything clear.

Its default is not to "delete windows". In fact, you'd have to go way out of your way to accomplish this.

There are pre-preemptive steps you must take Windows-side though to ensure Ubuntu may actually boot.

Contrary to any other OS, Windows will attempt to keep the drive in a read state on hibernate (and shutdown/restart which in latest Windows 10 also defer to fake-hibernate).

So if you follow Windows's own procedure for adding a dual boot, Windows should do the necessary to disable its own rigging of the hard drives on that particular reboot which will ensure that Ubuntu won't write itself to the disk, then fail to obtain the rights to write its own loader which will result in no dual-boot after the installation, just Windows, and you feeling like the Ubuntu installer didn't do anything.

So, assuming you're under Windows 10:

make sure your Ubuntu live USB key is inserted.
open up a CMD
type powercfg -h off

Go to Settings -> Update and Security:

Recovery -> (Advanced startup) Restart now:

This will reboot to this:

You'll then be able to select your Ubuntu key and if you follow its instructions, everything should go according to plan.

This is one of the easy screens you'll be faced with (this one allows you to do the partitioning work, with a simple slider that stops sliding at used space in your Windows partition, so no risks to be had (similarly; the minimum partition size for ubuntu will prevent the slider from reducing the ubuntu partition under 10GB):

If, on the other hand, you get this screen :

then, follow this video tutorial :

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

in the above screenshot, select the line that has "/windows" and click the "change" button, this will open up a modal in which you may reduce the amount of bytes allocates to your windows (not to worry it will refuse a number below used space on that partition) you'll have to try different numbers if you don't want to bother converting bytes to GB and don't worry, so long as you don't click on "install now" and subsequently confirm applying changes, nothing you mess around with in this screen will apply, so you can go back and start again as many times as you wish until you are sure you've set it up the way you want and then at long last you may click on "install now".

I personally recommend having a single partition with mountpoint / for your entire ubuntu in ext4 formatting (of absolute minimum 27GB) (max 100GB),
one EFI partition of 650mb, (I'm guessing you have an uefi motherboard, (post 2015 motherboard))
and no SWAP partition.


Is there a way to see the text of tty7 without shutting down Xorg?

I presume you want to see the X server logs for your GUI under VT7 (Ctrl+Alt+F7). In other words, the text that gets printed if you were to do a text boot, login and type "startx" (before the script hands over to your DE).

If this is the case, you can simply open your Xserver logs:

less /var/log/Xorg.0.log

For boot logs that would appear prior to the console login & X greeter, check:

less /var/log/boot.log

The greeter creates its own logs. If you're using lightdm (the default greeter), then you'll find them all under:

/var/log/lightdm/


Try this:
sudo modprobe loop

sudo mount -o loop -t iso9660 ./my-file.iso /mnt/iso

Or install acetoneiso,  is a free and open-source virtual drive software to mount and manage image files. Its goals are to be simple, intuitive and stable.


Upgrading to Ubuntu 10.10 says it's still a Development Release?

update-manager -d is the command to upgrade to development trunk versions of Ubuntu.

However, I think I recall Ubuntu updates the repositories to notify about the new release a few days after the release is live so that when people are prompted to upgrade, the bandwidth use spike from the day 1 enthusiasts has been fully absorbed. By using that route, you should still end up with a copy of "blessed" Ubuntu 10.10.

That said, even if it was marked as a development version, it wouldn't be any different. Go ahead, make your day!


This issue was resolved with the update to Ubuntu 19.10.Pretty sure llvmpipe is just not compatible with Ubuntu 18.04.


Kubuntu 17.04 How to do fully automatic update with discover?

There is few answers for that. On below link you have few.
https://help.ubuntu.com/community/AutomaticSecurityUpdates

I prefer aptitude&cron method. It was worked on my distribution 17.04 and on actual 17.10. If you will get a problem, please feel free.


How do I fix ssh issues with my ubuntu server?

There are two main SSH packages, one for client and the second one for server.

You're looking for openssh-server package.

sudo apt install openssh-server

Once it's installed your can check its status with:

systemctl status sshd

Always remember to secure your OpenSSH Server:

OpenSSH security and hardening

Top 20 OpenSSH Server Best Security Practices


I run into this issue almost every time I set up a new box.

Run sudo apt update before you install the packages.


Error while starting cmus "Home directory not accessible: Permission denied"

The instructions use sudo apt.. to install cmus, but I think its an error in teh document to use sudo (which elevates privileges) to run it.

Just use cmus to use cmus.


"Settings" option not appearing. After upgrading Ubuntu 20.04 LTS from 18.04 LTS

Try re-installing gnome-control-center:

sudo apt-get update
sudo apt-get install --reinstall gnome-control-center

Then, the commands for opening Settings/Display Settings would be, respectively:

gnome-control-center

gnome-control-center display

There you are.  Hope it helps!


Does Libre Office have an equivalent of OneNote, or is there another alternative?

Libre Office Start page.
This doesn't exist in Microsoft office. From here you can:

Launch any of the 6 Office programs (create a new document)
Open a recent file, from the grid of recent files.
Open any file on your computer, from the Open File button
Edit your templates
Access Help and the Extensions webpage.

Libre Office Writer.
Libre Office Writer is the equivalent of MS Word. It has all of the basic functions, like Font, Text size, Alignment, and drawing functions, like Rectangles, Circles and various shapes, like Stars, Call outs (Speech Bubbles) and Arrows.
It can be launched with the command libreoffice --writer (Creates a new document), searching the dash for Writer, or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Writer window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. and the formatting tool bar - Font + Size, Colour etc.
In the bottom, there is the Shapes tool bar with the Arrows etc.

Libre Office Calc.
Libre Office Calc is the equivalent of MS Excel. It has all of the basic functions, like Font, Text size, Alignment, and some more advanced ones, like Formula insertion, Charts, Cell Colouring and Conditional Formatting.
It can be launched with the command libreoffice --calc (Creates a new document), searching the dash for Calc (Often Calculator is the first result), or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Calc window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. and the formatting tool bar - Font + Size, Colour etc.
At the bottom is the Find search bar. This can be focused with the standard Ctrl+F short cut.

Libre Office Impress.
Libre Office Impress is the equivalent of MS Power Point. It has all of the basic functions, like Font, Text size, Alignment, and others exclusive to Impress, like Custom Animation, different Slide views and default text boxes for tiles that come with the templates.
It can be launched with the command libreoffice --impress (Creates a new document), searching the dash for Impress, or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Draw window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. and the formatting tool bar. In Impress, it is a bit different, it has the colour and line settings for shapes you make. This changes to text when you are typing
At the bottom is the Shapes tool bar. It has all the shapes that Writer has, but also some extras, like certain freehand shapes, more like Draw (below).
Along the side are the tools exclusive to Impress, like Custom Animation, Master Slides and Slide Transitions.

Libre Office Draw.
Libre Office Draw is the equivalent of MS Publisher, a program that doesn't come in the basic MS Office package. It has all of the basic functions, like Font, Text size, Alignment, and others exclusive to Draw, like freehand drawing and better shape manipulation.
It can be launched with the command libreoffice --draw (Creates a new document), searching the dash for Draw, or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Draw window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. and the formatting tool bar. In Draw, it is a bit different, it has the colour and line settings for shapes you make, as text is less often used.
At the bottom is the Shapes tool bar. It has all the shapes that Writer has, but also some extras, like certain freehand shapes.

Libre Office Math.
Libre Office Math has no equivilent to an MS product. It is very different to all the others, it hasn't got the font tools.
It can be launched with the command libreoffice --math (Creates a new document), searching the dash for Math, or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Math window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. but in the standard bar there are unique tools like zoom and special greek symbols.
At the botom is not a tool bar, that is where you enter the formula. The point of math is to present your formula in a professional way, instead of trying to get / and + alligned, and formulas over each other.
As an example it converts this:
{π} over { 2 } = sum from { { i = 0 } } to { infinity } { k!} over { (2k +1)!! }

into this:

Libre Office Base.
Libre Office Base is the equivalent of MS Access. It is a very specialised tool, and is designed completely around creating databases.
It can be launched with the command libreoffice --base (Creates a new document), searching the dash for Base, or clicking its icon on the launcher.
Here is the icon, and a cropped screenshot of the Base window.
As you can see, in the top bar is the standard tool bars, File, Edit etc. however in this view most features are disables, as this is the navigation window, with links to the base wizard.
In the bottom, there is a status bar with details about what you are working on (not included in screenshot).

Keyboard short cuts.
Ctrl+C - Copy
Ctrl+X - Cut
Ctrl+V - Paste
Ctrl+Z - Undo
Ctrl+Y / Ctrl+Shift+Z - Redo
Ctrl+P - Print
Ctrl+A - Select All
F7 - Spell Check (Check spelling as you type is an option, which I think is enabled by default.)
Ctrl+S - Save
Ctrl+Shift+S - Save as
A list of general keyboard short cuts. Here are the specific ones for Writer and Calc.

Compatibility
Compatability with other document types is fairly good. MS Office is not as good at decoding .odt documents, but Libre Office is quite good at saving in that format. Some features (especially formatting of tables, for me) are a bit hit and miss. If compatibility is key, I suggest using the built in export feature to export it to a .pdf. Normally however, just saving as a .doc or .docx is enough for windowsers to access it.
They do use different methods to create the same thing, which is why you get issues.
The Wiki.
Most of this came from my memory and experiences. The wiki is

Less bias.
More reputable.
Has more info, and the info is more accurate.

so I would suggest you have a look in it for information I have (accidentally or purposefully) left out.

So essentially, no there is no alternative to One Note built in - you're going to need to look outside of Libre Office for this.


Adding two single Cluster Controller to a MaaS Region Controller

I've resolved that upgraded MaaS with its own last release and following this procedure.

- On Region Controller run:

  $: cat /var/lib/maas/secret

copy the key

- On Cluster Controller run:

  $: sudo dpkg-reconfigure maas-cluster-controller

and adding the key copied from Region Controller, then after few second we'll see the new Cluster Controller on MaaS UI.

s

then on UI


Use English for installation, but user language in installed Ubuntu

If the translation into a language is not complete, especially if it's not complete with respect to the GUIs of the most important applications, selecting that language as the display language will result in a mix of the language in question and English. Translations are mostly done by volunteers, and if you have an interest in improving the situation for your language, please let your translation team know.

The problem you describe has nothing to do with which language you select at installation. The display language can be changed at any time via Language Support.

As regards the translation of the Ubuntu User Guide in 14.04, as you asked specifically about in another question (which I consider to be a duplicate of this question), you can see how large percentage of the strings are translated for respective language at this page.


The repo for the "server for Pakistan" is outdated where I report it?

The repositories of Ubuntu are owned by third parties and hence it is their responsibility to update the servers on time.

As the server you are using is not always updated, you should consider using other servers. The main server works very well in the Indian subcontinent. Otherwise you may use the Nayatel pvt. ltd server which is located in Pakistan.

There would be no use of reporting this as a bug on launchpad, as it is not a bug. You may contact the repo owner if you wish.


Please explain the parameters 'noexpose' and 'cycle' in xset

OK I believe the exposed arguments are related to whether or not windows and there contents are displayed behind the screen saver (this will be relevant to certain screen savers that draw on the screen and the like). So it is in short if your desktop is exposed or not. This is a educated guess, the terminology used is strange I think.

I do how ever understand this xset s N N as you referenced it, works as follows,

xset s 60 10

Will set the screen saver to come on after 60 seconds of in activity as represented by the variable 60, and the 10 will force the background image (your desktop if you use xset s expose) to change every 10 (mins or seconds). This is refrenced as s [Length[Period]] in the manual (length of inactivity and period between refreshing)

Some other interesting commands were s blank / s noblank These are responsible for if you want the screen to fade to black instead of a screensaver.

xset s blank

preinstalled
To enable this or

xset s default

To set factory defaults

For you if you want it as off as you can do this, one at a time

sudo -i

xset default

xset s noexpose

xset s noblank

xset s off


Cannot access security panel from anydesk

This worked for me: Setting the password using the command line
https://support.anydesk.com/Command_Line_Interface

echo mynewpassword | sudo anydesk --set-password


Here is a tutorial to install Sonos on ubuntu using Wine, PlayonLinux and Samba (for the music library).

Install the Sonos Controller

The first thing to do is to install Wine and PlayonLinux so your computer can use Windows software. Open a terminal (ctrl+alt+t) and copy/paste the following line by line.

sudo apt-get install wine
sudo apt-get install playonlinux

Then download the latest version of the Sonos Controller for Windows.

Start PlayonLinux and click on "install a program". A new window opens. Select "Install a non listed program" (at the bottom). If it is the first time you use PlayonLinux you may not have this option. Then close the window and re-open it.

Select "install in a new virtual drive". Name the drive however you want (but "sonos" seems a logical choice). Untick the boxes that may be ticked and choose "32-bit installation". Browse to the sonos controller you downloaded and click "next".

The installer starts. Install the software (leave everything as it is) but DO NOT run the application after setup. At the end of the installation PlayonLinux proposes you to create shortcuts. Create one for the sonos.exe file. You now have a Sonos launcher on your desktop. You can change its icon to a Sonos icon and drag it to the launcher.

Sonos is now listed in PlayonLinux. Right click on it and select "configure wine". In "application" make sure "Windows XP" is selected.

In PlayonLinux select "Sonos" and click on "configure" (on the right side of the window). A window opens. Go to "install components", look for "dotnet40" and install it.

Start the application. Click "next" and then choose "don't configure windows firewall". Your Sonos controller is now installed and ready to work.

Make the Sonos Controller fullscreen

If double clicking on the menu bar of the Sonos controller works for you, skip this part of the tutorial.

If double clicking on the menu bar freezes your controller follow these steps to make your controller fullscreen.

Make sure Sonos is not working. Open PlayonLinux, right click on Sonos and select "configure wine". Go to the "graphics" tab and select "emulate a virtual desktop". Increase the resolution to 1000x800. Close Wine.

Start Sonos. The application will start in a virtual desktop. It is ugly but we will get rid of it. Double click on the menu bar to make Sonos fullscreen in the virtual desktop. Close Sonos.

Go back to PlayonLinux, right click, "configure wine". Untick "emulate a virtual desktop". Close Wine and PlayonLinux. Start Sonos. It should be fullscreen.

If your controller is still not fullscreen, repeat the operation but increase the resolution of the virtual desktop to its maximum (similar to your own resolution).

Access the music library

To access your music library is a bit more complicated but still doable. To do so we will use Samba and create a network share.

The first thing to do is to install Samba.

sudo apt-get update
sudo apt-get install samba

Create a username and a password for Samba (they can be different or similar to your usual username and password). In the following line replace username by the username of your choice.

sudo smbpasswd -a username

You will then be asked to create a password.

For the following I suppose the folder you wish to share and to set as your music library is your music folder (/home/username/Music). If not change as needed.

Edit the samba configuration file

sudo gedit /etc/samba/smb.conf

Once the file is open add at the very end

[Folder Name]
path = /home/username/Music
valid users = username
read only = n

Name the folder whatever you want. Change the path to set it with your username. The username in "valid users" should be the username you set earlier for samba. Save the changes and close gedit.

You now need to restart samba

sudo service smbd restart

Your music folder is ready to be shared.

Start Sonos. Click on "manage" and open "music library settings". Click "add" and choose "on a networked device such as a network attached storage (NAS) drive".

Write the path this way:

//computer's name/folder name

So if my computer is called "Poulpe" and I named my folder "Music" in the samba configuration file, my network will be:

//Poulpe/Music

Sonos asks you a username and a password. Give the one you set at the beggining in samba.

You Sonos is now working, fullscreen, and you can access your music library.

Thanks

It would have been impossible for me to use Sonos on my computer, and to write this tutorial, without this article on Michael's blog, this tutorial on help.ubuntu and a few posts on the sonos support forum from a guy named Keith.

English in not my mother tongue. If there is mistakes or if something could be better explained please tell me, I'd be thankful.


Why do I have to detect displays for my 2nd display each time I resume from suspend?

I had a similar problem with an older nvidia card.  For me this was fixed by configuring my screens in nvidia-settings-manager instead of ARandR.


By definition xterm is a terminal emulator for the X Window System. Since Ubuntu by default relies on X11 graphical server for any graphics - that's why xterm comes with Ubuntu. Now, unless you manually change it, both default terminal and xterm should run your bash shell, which is what actually interprets commands. Without shell, terminal emulator is basically not going to work.

xterm actually is the original terminal emulator and many modern emulators strive to emulate its functionality and extend it.


Apache 2.4.7 in 14.04.1 (server) htacces problem 500 error

Thanks for your reply and sorry for my late response.

I couldn't find AllowOverride none in the configuration. However, your suggestion made me try to following by reversing the code from 'none' into 'all':

< Directory "/webhosting/mywebsite/" >
AllowOverride all
< /Directory >

And this works fine!

Kind regards,
Kevinx


Can I save some time from typing "optirun"?

Yes, you can install the program alacarte, from where you can edit the execute commands for your program links (those you usually access programs with if you start them through your Desktop Environment).

So, if you want a game, let's say teeworlds, to always use your high performance graphics mode, you open alacarte, go to Games, then on teeworld. Then you click on "edit" and set the command from teeworlds to optirun teeworlds. Now teeworlds will use the high performance graphics mode whenever you start it through the dash, the Unity Launcher, the gnome-shell, e.g. but not if you execute teeworlds from the terminal or the command prompt (Alt+F2)


install new splash screen and look and feel theme on KDE 5

The splash screen QML is stored in /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreen.qml. You can either modify the backgroundPath or the image at that location. Note that it might get overwritten by updates, though.

There is lots of good information on SDDM here. There are a few Look-And-Feel packs on the KDE Store, and you can try looking online for others. They should come with install instructions, otherwise just try copying files into ~/.local/share/plasma/look-and-feel/.


Installing ubuntu 12.04 as windows application

Copy both wubi.exe and the dexktop.iso to the same folder on your windows system and launch wubi from there

Source: https://wiki.ubuntu.com/WubiGuide#How_do_I_install_Wubi_on_a_machine_with_no_Internet_connection.3F


Prevent clock from advancing to a system time after Ubuntu Server build time

Try disabling the systemd-timesyncd service:

sudo systemctl disable systemd-timesyncd

You can check if the service is running using:

sudo service systemd-timesyncd status

You can stop the service manually (one time) using:

sudo service systemd-timesyncd stop


Shutting down ALL services (server backup)

Don't rely on the dependence system, because it may change in future updates.
The correct procedure to follow is to change runlevel and go in Single User Mode with an init sequence (official MAN link). The system will terminate the services in the correct order for you.
Open a virtual terminal (CTRL+ALT+Fn) and gain root privileges with su or sudo su (last preferred). After you are root ("#"), execute:
telinit 1

OR
telinit S

You can also use init directly if telinit fails.
This procedure will terminate any "extra" service to prevent excessive disk access and leave you as the only active user, what you need.
An alternative, longer, procedure is to reboot your system and access the Single User Mode from GRUB with the apposite menu option called Recovery (the Recovery Single User Mode will mount the filesystems with the read only flags enabled, do you'll need to remount them later).
After you've done the maintenance or the backup, execute telinit 3 to go back to multi user mode; all registered multi user daemons will be restarted.

Please comment down here if you have more questions and don't forget to press the left UP arrow if I'm of any help.
Have a nice day.


Ctrl+` key is meant for switching windows of the same application (just like AltTab but only for multiple windows of specific type of application that is currently in focus).

It is set within Compiz settings. In particular , you can install compizconfig-settings-manager and unset that shortcut. It is under Unity Plugin -> Switcher , the entry Key to flip through windows in the Switcher. It is normally unset , hence defaults to Ctrl+`， thus you should assign it to something else.

The fact that it is normally un-set is also the reason why you don't see it in dconf settings. You can , however assign it manually. For instance, here is my example:

dconf write /org/compiz/profiles/unity/plugins/unityshell/alt-tab-next-window  "'<Shift><Control>asciitilde'"


It seems that Sony tried to make this an impossible task, there's no guarantee you'll succeed. Your best change is possibly the Linux Minidisc project, you can install the software from the command line (press Ctrl+Alt+T and enter your login password when required):

sudo apt-get install qhimdtransfer minidisc-utils

For older NetMD versions you might need gnetmd. There is a guide on how to use it, but unfortunately the tool is no longer online.


Openstack install fails because of wrongly specified ubuntu version

If you are running MAAS i found in my case that i had to run ephemeral image as 14.04 and deploy image as 16.04. So under images, download both 14.04LTS and 16.04LTS. Under settings make sure commissioning section says 14.04LTS and Deploy sections is set to 16.04LTS.


15.04 Unity accessing application menu with keyboard

It never fails for me to find the answer right after I post...

Terminal was the only app I really use the keyboard menu access. It seems all other apps work OK for keyboard access (alt-). The terminal's default changed during the upgrade and the fix is to go to terminal's first "Terminal" menu on the left (there are 2 Terminal menus) and in preferences, check the box for "Enable mnemonics (such as Alt-F to open the file menu".


Basically you have a lot of sources that don't have proper keys anymore .. you will need to either remove these  sources or get new keys for them.

Go to Start--settings--Software & Updates and click on the Other Software tab

then find the things on that list that say there is no key or 404 not found and uncheck them ... once done close the window and it will ask you to reload ... it should reload without errors .. if there are still errors .. you may need to remove more sources


Bluetooth setting not working properly in cinnamon

sudo apt-get install blueberry

It says that when you add the Cinnamon repository.

I have just done this and successfully connected.


Can you set more than one property when pushing a Pagestack?

Yes, you can pass multiple properties. Just use:

pageStack.push(pageId, {prop1: "value1", prop2: "value2"})

Here's a working example:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    id: root
    width: units.gu(50)
    height: units.gu(50)

    PageStack {
        id: pageStack

        Component.onCompleted: {
            push(home, {labelText: "You can pass multiple properties.",
                        title: "Example",
                        fSize: "large"})
        }

        Page {
            id: home
            property var labelText: ""
            property var fSize: ""

            Label {
                anchors.centerIn: parent
                text: home.labelText
                fontSize: home.fSize
            }
        }
    }
}


iPod classic 4th gen (A1059) not recognized by Ubuntu 16.10

I just tried the command sudo fsck.vfat -a -l -v /dev/sdc2 and it seemed to mount when I put the CF card into the computer. When I later plugged the entire iPod in and ran the same command, this confirmed that it worked.

I thought I'd have to type it in every time, but I don't. Anyways, whoever wants to actually do this can now.


gcc … -llua looks for a file called liblua.so if you're linking dynamically (the default) or liblua.a if you're linking statically.

You can look for the package(s) containing a file by a certain name with apt-file . You can also make this search online on packages.ubuntu.com (“Search the contents of package”, be sure to select your distribution and architecture). But…

$ apt-file search liblua.so
$

What's going on is that Ubuntu ships multiple versions of the Lua libraries, and they aren't binary compatible, i.e. you need to select the one you want at build time.

$ apt-file --regexp search '/liblua.*\.so$'
<lots of hits>

As of natty, the preferred version of Lua is 5.1, with 5.0 and 4.0 also available. The corresponding lua libraries for linking are liblua5.1.so, liblua50.so and liblua40.so (you can list the files in a package with dpkg -L liblua5.1-0-dev or apt-file list liblua5.1-0-dev). So you need to change your linking command to -llua5.1 (or -llua50 or -llua40 if you need a binary that's compatible with older systems).


You most likely have a note in your default note directory that has a wrong format and tomboy is crashing when it tries to process it.

By default, on Ubuntu, your tomboy note directory is located at:

~/.local/share/tomboy

Since you already have a backup of your notes, move the notes to a temporary directory such as:

$ mkdir ~/.local/share/tomboy.store
$ mv ~/.local/share/tomboy/* ~/.local/share/tomboy.store/

After this, you will have verification that tomboy is crashing because it's having a problem with an ill formated note.  It shouldn't crash now, but should open up with no notes.

Now systematically move note from the store directory to the real directory.  When you move the problem note tomboy will start to crash again.  When you learn the problem note, you can  eliminate that note and have a working tomboy.

You can copy your notes back 10 at a tome (or any number) by:

$ mv `ls ~/.local/share/tomboy.store/*note | head -10` ~/.local/share/tomboy/

You may have to quit tomboy and restart it between blocks to see if it still crashes, or to help verify where the culprit note lies.

By the way, tomboy's notes are identified by the *.note extension.

  Also, please note.  There is a bug with in Tomboy in that it will be confused with the timestamp of the note if you don't quit tomboy
  between the moves (or copying of notes).  It will change the timestamp
  of the note to the current time if you don't quit.  Quiting then
  bringing in the new notes will preserve the correct timestamp.


Launch Terminal and run the following command

gsettings set org.gnome.desktop.wm.preferences button-layout close,minimize,maximize:minimize,maximize,close

This should work with GNOME desktop environment and its cousins.

For Budgie desktop environment run the following instead

gsettings set com.solus-project.budgie-wm button-layout close,minimize,maximize:minimize,maximize,close


Try running sudo update-grub from a terminal in Ubuntu. That should add Windows to the GRUB menu.


Just updated to 12.10, now it's asking for a partial upgrade

Open a terminal and run the following command:

lsb_release -a

If you see 12.04 as the version, it means that the previous upgrade failed, and you should probably continue upgrading.
However, if you see 12.10, you should not need to upgrade but I would recommend continuing as there might be some issue in the previous upgrade.


How can I increase the Ubuntu partition for dual boot with Vista

Short answer...
No, you don't want to manipulate Vista files from Ubuntu. And no, you don't want to delete these files from Vista either.
Make good backups first, as these procedures can loose or corrupt data. You've been warned.
To be able to shrink your Vista partition, you'll need to turn off page file in Vista, reboot, then defrag, then shrink the NTFS C: partition, then re-enable the page file.
Then boot to a Ubuntu Live DVD/USB and use gparted to swapoff, then manipulate your EXT4 and swap partitions, then swapon, to get the increased space for Ubuntu.


What is the current status for Ubuntu 19 LTS?

LTS Releases are published every two years in April, and it is released on even years (e.g. 2016 → 2018 → 2020).

19.04 is currently latest stable version of Ubuntu, as it was released on 2019, so it do not receive long term support as opposed of 18.04.

The future upgrade path to 19.04 would be: 19.04 → 19.10 → 20.04, with 20.04 being LTS releases once again.

For more details https://www.ubuntu.com/about/release-cycle


Know whether the shell script contains syntax error without running the script

bash -n scriptname

Although, this will check syntax, not command availability. (will not warn if script uses a command that is not installed yet)


All my Acers refuse to install any kind of ubuntu

I fixed it with some help of the user ravery.
I ran this script (I did a reboot into DVD after install, then ran this):

mount /dev/sda1 /mnt

for dir in /dev /dev/pts /proc /sys /run; do
    mount --bind $dir /mnt$dir
done

chroot /mnt

update-grub

grub-install /dev/sda

exit

shutdown -h now

Credits:

Internet - for dir command

ravery - mount /dev/sda1 /mnt AFTER the for dir command

Me - everything else


How do I change the login screen in Ubuntu 16.04+?

You said:

  The "custom" background shows for a split second and then fades to the Ubuntu one.

The greeter by default load the selected user background if it is available. A fade transition used to change between backgrounds of users including greeter default (for guest user). I think that the question should: How to stop lightdm greeter from loading the user background?

Be aware of two distinct greeters, default is unity-greeter. I noticed that some answer here in AU, don't mention this and mix up between them.

Using lightdm-gtk-greeter

GUI tool

Install the settings tool

sudo apt install lightdm-gtk-greeter-settings

Run it

pkexec lightdm-gtk-greeter-settings

In Appearance tab: Select the image
On same tab: Unckeck User user wallpaper if available
Save & Close

CLI tools

Open lightdm greeter settings file

sudo nano /etc/lightdm/lightdm-gtk-greeter.conf

Change it this way

[greeter]
background = /usr/share/backgrounds/Spring_by_Peter_Apas.jpg
user-background = false

Ctrl+o to save it then Ctrl+x to exit.

Using unity-greeter (default)

Same answer by Serg, I have tested it in a fresh VBox Ubuntu 16.04.

Change the background of the login screen

$ sudo nano /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override

[com.canonical.unity-greeter]
draw-user-backgrounds=false
background='/usr/share/backgrounds/Spring_by_Peter_Apas.jpg'

$ sudo glib-compile-schemas /usr/share/glib-2.0/schemas
$ sudo service lightdm restart

Some debug hints:

Purge lightdm-gtk-greeter settings

sudo apt purge lightdm-gtk-greeter lightdm-gtk-greeter-settings

Or you may want just disabling it temporary

sudo mv /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.disabled

To enable it back

sudo mv /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf.disabled /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf

Restarting the lightdm is needed

sudo systemctl restart lightdm

Reinstall unity-greeter to remove any change in /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml

sudo apt install --reinstall unity-greeter

Check if there any other dconf override file that take priority

grep -rn -e "com.canonical.unity-greeter" -e "background=" -e "draw-user-backgrounds=" /usr/share/glib-2.0/schemas/


This is happening because the bold text color matches the background color: just change the bold text color to something different from black in the Terminal profile's settings.


Backup does not work on Ubuntu 16.10 and 16.04

This is a known bug: https://bugs.launchpad.net/deja-dup/+bug/1641423

Duplicity is not installed. Executing

sudo apt-get install duplicity

will fix that.


Need to fix admin group but can't get into recovery mode with grub_timeout=0

Hold down the left Shift key before your system boots to Ubuntu and it should bring you to the grub menu.

After you get to Recovery Mode with root access, you need to mount the drive in Read / Write to make any changes.

mount -o remount,rw /

then you can check was groups the user is part of:

groups username

then to add the user to group sudo

usermod -a -G sudo username

to add the user to the adm group

usermod -a -G adm username

Hope this helps.


How to generate an xorg.config on Ubuntu 16.04.1

You could install the NVIDIA linux driver from the nvidia webpage which will ask you to generate the xorg.conf during installation. To do that:

Determine your card:

$ lspci -vnn | grep VGA

and check for your card details. On my system i get the following output running the above command:

$ 03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK110GL [Quadro K6000] [10de:103a] (rev a1) (prog-if 00 [VGA controller])

So you see im using a Quadro K6000.
Head over to NVIDIA Drivers entry page and search the proper driver for your card:

Click search and download the driver to your desktop.

The do the following to install the driver:

switch to console mode: Alt+Ctrl+F1
kill x server: sudo service lightdm stop
switch to desktop: cd ~/Desktop
make the downloaded driver executable: sudo chmod a+x
NVIDIA-Linux-x86_64-367.44.run
install it with sudo rights: sudo ./NVIDIA-Linux-x86_64-367.44.run

During the installation answer YES when you get asked if the installer should generate the xorg.conf file.

If you already have the nvidia packages installed from the repositories user Terrance comment is fine


If I were you I'll try to install the 13.10 deb package by hand, dependencies of libqjson0 are exactly the same for 0.7.1-6 (Ubuntu 12.04) and 0.8.1-2 (Ubuntu 13.10).

For amd64 arch, I'd download the following deb files:

http://packages.ubuntu.com/fr/saucy/amd64/libqjson-dev/download
http://packages.ubuntu.com/fr/saucy/amd64/libqjson0/download

and then run in the folder where you downloaded the deb files:

sudo dpkg -i libqjson0_0.8.1-2_amd64.deb libqjson-dev_0.8.1-2_amd64.deb


How to let a VirtualBox guest (running Windows) access the Internet?

Setting Up NAT

NAT is not an option for Adapter Type. Rather, it's an option for Attached to.

Click where it currently says Bridged Adapter and you should be able to select NAT.

By the way, the reason changing it to NAT sometimes helps is not specific to Windows guests. Rather, if your physical (host) PC is on a LAN, Bridged Adapter (as well as NAT) usually works fine. If your physical PC has a network connection for just one computer--as is often the case if it's plugged directly into a cable/DSL/ISDN modem that only has one Ethernet port on it--then there is no local network to bridge to, so then you must use NAT.

If you use Bridged Adapter and your host machine is on a physical LAN, your guest machine will automatically be able to see and be seen by computers on the LAN. If you use NAT on a LAN, the guest machine will be able to see the other computers on the LAN but the other computers on the LAN (besides the virtualization host) will not be able to see it.

If you're interested in more details, see these articles on network bridging and network address translation.

If that works, great. Otherwise...

Check the Guest's Network Configuration

In the virtual machine, open the Network Connections configuration (from the Control Panel or in Start Menu > Settings). Unless you've manually configured multiple interfaces for the guest machines in VirtualBox (or have actual network adapters attached to it with USB forwarding), you'll see just one, and unless you've changed its name, it will be called Local Area Connection (perhaps with a number after it).

Right-click on that and click Properties.

Under The connection uses the following items, click Internet Protocol (TCP/IP) and click Properties.

Make sure the configuration is correct.

For Bridged Connections

If you kept the VM's network adapter bridged in VirtualBox, rather than switching it to NAT, then it is as if there is a layer 2 network switch connecting three devices:

The virtual machine.
The physical host machine.
Whatever the physical host machine is connected to (on the particular host network adapter that was bridged). For example, if your computer is plugged into a router, it's like the switch is plugged into the router. If it's connected wirelessly to an access point, it's like the switch is a wireless bridge.

So, your VM is "networkologically" equivalent to your host machine. Whatever settings it has (except its IP address of course), your virtual machine should have.

For NAT Connections

If you selected NAT for Attached to in VirtualBox, then it's like your real computer is acting like a small home/office router. Your host machine runs a DHCP server that is accessible only to VirtualBox virtual machines, and the guest gets all its network configuration information from it.

The VirtualBox DHCP server will provide both an IP address and DNS information to the guest, so both of these two options should be selected:

Obtain an IP address automatically
Obtain DNS server address automatically

This is the key.

This is the particular problem, for the system in this question. If this is the only problem with the configuration, then fixing this should solve the matter entirely.

You have manual settings, rather than DHCP.

That can work, but the manual settings would need to be correct, and you'd also want to make sure the IP was not in the range of IP addresses that your router assigns from (or there could be a collision with another device on the network).

In this case, the manual settings are not correct at all, because:

The host machine's IP address on the network interface through which it provides an Internet connection to the guest is not the same as its IP address on the physical network. Even if your computer's IP address is 192.168.1.1 "in real life," the guest cannot access it that way.

More likely, if you set it up this way yourself, you may have been thinking that you should put your real-life home/office router's IP address (which is often 192.168.1.1) in as the default gateway and the primary DNS server.

But the guest cannot directly access the physical NAT router on your desk (or wherever), because any data transmitted between the VM and the real router must go through the VM's router, and the VM's router is your computer (accessed through that special virtual network interface).
Since the default gateway is wrong, no routing occurs and the VM cannot access any physical network devices outside your computer.
Since the VM's IP address is outside the correct range (which is usually 10.2.2.*) and the subnet mask is 255.255.255.0, it cannot access the correct range. (The subnet mask is correct, but together with the IP it identifies the wrong subnet.)
The DNS server must also be fixed or no hosts can be accessed through their domain names (like askubuntu.com).

If for some reason you need to use a "static IP," i.e., not use DHCP, then you'll have to get the correct information from VirtualBox and input it. Please let me know if you need help with that (I can expand this to include instructions).

Assuming DHCP is okay with you, you can solve the problem by making your Internet Protocol (TCP/IP Properties), General tab settings look like the screenshot above.

Still No Internet Connection? Time to Troubleshoot

It may help to gather some more information from the guest side. In the virtualized Windows XP system that is mysteriously not connecting to the Internet, install the VirtualBox guest additions (by clicking Devices > Install Guest Additions; see the manual for more information). Reboot, and see if you can connect to the Internet. If you cannot, you've still accomplished something useful, because now you can copy and paste between the guest and host clipboards.

So open the Command Prompt in Windows. One way to do that is to run:

  Start > Run... > cmd.exe

Now run this command to get information about the Windows guest system's network interfaces and connections.

ipconfig /all

Then copy all the text in the command prompt to the clipboard. This functionality is accessible in the contextual menu raised by right-clicking anywhere inside the command prompt window. You can then edit your question on your Ubuntu host system where you have a working Internet connection, and paste it in.

More generally, for people other than the asker of this question:

You can then paste it into applications in your Ubuntu host system, permitting you to refer to it when your Windows VM is suspended/off. You can provide it to whoever is trying to help you. You can include it in your own question here on Ask Ubuntu

(However, if your network problem is in the virtual installation, rather than the virtual hardware or the VirtualBox software--for example, if your VM accessed the Internet fine until you installed some Windows software other than the guest additions--then your problem would likely be considered off- topic for Ask Ubuntu. It would likely be on-topic for Super User though.)


Error In installing ubuntu open Cv on ubuntu server raspberry pi 3b+

The Answer is very simple opencv is not supported on python 3.7 so you need to build it from scratch , you guys might wanna look at my other post :

OpenCv Building Process from Scratch


For those who might have similar problem in the future, the right click on touchpad for Xfce is three fingers tap (not two fingers tap, it is used as middle click). It works on my Dell Vostro 5480. I found this combination accidentally while I was trying other Display Manager.


AFAIK, there is no way to "reset" Ubuntu. You can't even do that on Windows 7 unless there is an OEM-provided recovery partition...

Just burn the latest ISO to a DVD and reinstall.

Easiest way, plus you'll get 16.04's new features :)


error when installing rmagic gem on Ubuntu 12.04 for Ruby on Rails

It is working now and RMagick recognizes where ImageMagick is located after I compiled and installed the latest version of ImageMagick from the main website. I followed the instructions: http://www.imagemagick.org/script/install-source.php?ImageMagick=9s6tlikqbn5eb0u0spg5o38sa4#unix


Problem with "bypassing" occur because of default route on VPN box. Which is needed and cannot be deleted and ip forwarding is still enabled. Ip forwarding work based on interface, not ip address

Your VPN box is on ip 192.168.10.14 and you can add insert ufw rule witch will be triggered when tunnel is down.

Add in /etc/network/if-down.d/ some script to cut access from clients to your VPN box

Example:

sudo nano /etc/network/if-down.d/scriptdown

and put content

# Check for specific interface if desired
[ "$IFACE" != "tun1" ] || exit 0
# cat access from client
sudo ufw insert 1 deny in on eth0 from 192.168.10.0/24 to 192.186.10.14

give scriptdown privilege

chmod 755 /etc/network/if-down.d/scriptdown

if-down.d will trigger script called scriptdown when tun1 go down and will deny traffic from 192.168.10.0/24 to 192.168.10.14

You need script to delete this rule when tun1 is up

Add in /etc/network/if-up.d/ script to allow access from clients to your VPN box

sudo nano /etc/network/if-up.d/scriptup

and put content

# Check for specific interface if desired
[ "$IFACE" != "tun1" ] || exit 0
# cat access from client
sudo ufw delete 1

give scriptup privilege

chmod 755 /etc/network/if-down.d/scriptup

if-up.d will trigger script called scriptup when tun1 go up and will allow traffic from 192.168.10.0/24 to 192.168.10.14

Try.


Incomplete answer...
Your question doesn't give us much data to work on, so lets check the file system first...
Step #1
Lets first check your file system for errors.
To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


Cannot echo "hello" > x.txt even with sudo?

The redirection is done by the shell before sudo is even started. So either make sure the redirection happens in a shell with the right permissions

sudo bash -c 'echo "hello" > f.txt'

or use tee

echo "hello" | sudo tee f.txt  # add -a for append (>>)


This repository provides AMD Catalyst Lagacy 13.1 (fglrx 8.97.100.7) drivers for Radeon HD 2xxx - 4xxx for Ubuntu:
12.04 Precise Pangolin
12.10 Quantal Quetzal
13.04 Raring Ringtail

If you are using Ubuntu 12.04.2 make sure you got linux-headers-generic-lts-quantal package installed.

If you are using Ubuntu 13.04 the driver might not work very well with Unity. If that the case please consider resetting Unity configuration to default or use other DE.

To use Catalyst Legacy 13.1 you need to do following commands:

sudo add-apt-repository ppa:makson96/fglrx

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install fglrx-legacy

And restart your computer.

Credit for answer goes to Tomasz Makarewicz
Original post: https://launchpad.net/~makson96/+archive/fglrx


The instructions in help.gnome.org are not very clear. Apparently, keyfiles like /etc/dconf/db/local.d/00-devices-blacklist, which has

  [com.canonical.unity.devices]
  blacklist=['01D3FDBD88BEAC80-OS', '8045-6F4E-PEN']

create new entries in dconf, hence the entry com.canonical.unity.devices.

I removed the file, rebooted and everything was solved.


They have gotten rid of the apt it is now snap install certbot --classic


How do I create a deb package for a single python script?

What follows is a basic example of how a source package for a python script might look. While most of the packaging tutorials are a bit complex, they can really help if you hit a problem. That said, I first learned the basics of Debian packaging by simply looking at Debian packages. apt-get source something similar and learn by example.

Here's your basic source package layout:

my-script/
    -- myScript
    -- debian/
        -- changelog
        -- copyright
        -- compat
        -- rules
        -- control
        -- install

Run dch --create in the directory to create a properly formatted debian/changelog entry.

debian/copyright should look like:

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: myScript
Upstream-Contact: Name, <email@address>

Files: *
Copyright: 2011, Name, <email@address>
License: (GPL-2+ | LGPL-2 | GPL-3 | whatever)
 Full text of licence.
 .
 Unless there is a it can be found in /usr/share/common-licenses

debian/compat can just be: 7

debian/rules:

#!/usr/bin/make -f

%:
    dh $@ --with python2

Note that there must be "tab" before dh $@ --with python2, not spaces.

debian/control:

Source: my-script
Section: python
Priority: optional
Maintainer: Name, <email@address>
Build-Depends: debhelper (>= 7),
               python (>= 2.6.6-3~)
Standards-Version: 3.9.2
X-Python-Version: >= 2.6

Package: my-script
Architecture: all
Section: python
Depends: python-appindicator, ${misc:Depends}, ${python:Depends}
Description: short description
 A long description goes here.
 .
 It can contain multiple paragraphs

debian/install:

myScript usr/bin/

This file indicates which file will be installed into which folder.

Now build it with debuild --no-tgz-check

This will create a functional deb package. Lintian is going to throw a few warnings regarding the lack of an orig.tar.gz, but unless you plan on creating a proper upstream project that makes tarball releases you'll probably just want to ignore that for now.


How do I re-install Zeitgeist Datahub in the Startup Application Preferences

You can check if it is still installed by:

dpkg -s zeitgeist-datahub

If it is not, you can reinstall it simply by:

sudo apt-get install zeitgeist-datahub


Can I accelerate mouse sensetivity over the standard maximum?

I'm not really sure what the range of the mouse acceleration sliders are, but you can easily change this manually by using xset.

Try something like xset m 100 5, that makes it go very fast for me.

The syntax of the command is:

xset m <pixels to move when going fast> <pixels threshold before moving fast>

To make the changes stick, put them in your ~/.xinitrc


Ubuntu 19.10 gdb nearly unusable long delay

I also observed a delay in running some applications on Ubuntu 19.10.
Related questions:
Some applications on Ubuntu 19.10 very slow to start, Filezilla start after 25 seconds delay

Try to run your program from a console using dbus-launch --exit-with-session and see if the delay still exists. You can also check what stops the program from running with strace.


How to Install and enable VNC server on Ubuntu 15.10

If you do not have vino install it from the terminal by using sudo apt-get install vino and then following the prompts. After you've installed it, you will probably want to reboot. You can start it without rebooting (I believe) but I do not recall how and Google isn't being very helpful.

When you reboot, again, open the terminal and enter vino-preferences and it should open up a GUI interface where you can change your settings. One of the settings that I prefer is to enable the icon all the time. It's then easier to access it.


How to modify dock transparency in gnome?

To change the launcher transparency, find this section in the CSS file:

/* DASHBOARD */
#dash {
font-size: 9pt;
color: #eeeeec;
background-color: rgba(30,30,30,0.4);
padding: 4px 0;
border: 0px solid rgba(128, 128, 128, 0.4);
border-left: 0px;
border-radius: 0px 8px 8px 0px; }

Change the background-color field to whatever you want. I used the RGBA format, so that transparency would work. The format of what I used is:

rgba(RED 0-255, GREEN 0-255, BLUE 0-255, OPACITY 0.0-1.0)

If the opacity is 1.0 it will be completely opaque.

EDITS:

To make the borders on the shutdown dialog buttons rounded, you need to add this somewhere in the CSS file (it doesn't really matter, but if you want organization, put it under the /* Restart */ header):

.end-session-dialog .modal-dialog-button,
.end-session-dialog .modal-dialog-linked-button {
    border-radius: 8px;
    width: 30px;
    height: 10px; }

Change the width and height sections to what you think looks good.


Forgotten user password for Ubuntu 12.04

Boot the LiveCD and mount the root partition of your main system, enter the chroot session and use the passwd command to set the new password. Exit chroot, unmount the root partition and reboot. :)


How to SCP a file from Mac -> Ubuntu VirtualBox?

Put network settings from NAT to bridged adapter in Virtualbox settings for that machine. Then your virtual machine will be in local network with your host machine. It will probably get the IP from modem if DHCP is enabled, then scp to that machine.
You also need to have ssh-server installed on Ubuntu machine:
sudo apt-get install openssh-server
That should work:
scp file host:/some/directory


Remove files not required under lost+found directory

cd is an internal command of your shell and can't be used with sudo

Use

sudo -i

to get a root shell. There you can use cd.


How to prevent Ubuntu installer from connecting to Canonical

It sounds like you already are preventing it, if it's unable to connect. If you want the connection to fail faster, then fix your router/proxy/whatever to drop the connection immediately, rather than waiting for the lengthy TCP timeout to occur. If you wish to have your firewall disallow external access, it should be dropping/closing any connection requests to non-internal addresses.

That IP is one of the round-robin addresses for the archive.ubuntu.com main archive server. The installer connects to it, to check for security updates, once network has been determined to be available.


open lock file /var/lib/dpkg/lock - open (21: Is a directory)

Try this command in terminal to find what is running

ps -e | grep -e apt -e adept | grep -v grep

If that doesn’t print anything, type the following in terminal to remove the lock

sudo rm -rf /var/lib/dpkg/lock
sudo rm -rf /var/cache/apt/archives/lock

Also

If you try

ps aux | grep apt

that will catch processes containing the word apt, at least. If you see an apt-get process or an aptitude process that looks stuck, you can try

sudo  kill processnumber

and if that doesn't work try

sudo kill -9 processnumber

This should kill the process and may remove the lock. Killing an apt or aptitude process is harmless unless it is actually in the middle of package installation.


How to run GUI application without monitor

Question is unclear because you say you need X11, but maybe you just need program to keep running after you log out.

If your program needs X11, Xvrb is a program that 'fakes' presence of X11 server. We use that to run firefox in scripts in systems that do not have  X11.

On other hand, if program quits when you log out, there are many fixes. A program like screen can create terminal sessions that run when you log out. If you tell us more about about problem program,  we might help.


After sudo passwd -e [user] , then I login getting an “Authentication token manipulation” error

A way to fix this issue is to remount filesystem and then to check permissions of /etc/shadow file.

$ mount -rw -o remount /
# or
$ mount -o remount,rw /

Check the write permission of /etc/shadow file.

$ ls -l /etc/shadow
-rw-r----- 1 root shadow 1025 Feb  11 22:11 /etc/shadow

That's OK, now passwd will work well.

$ sudo passwd USERNAME


Ubuntu 12.04 not Locking Encrypted Hard Drive on Log Out

This is WAD (Works As Designed), Ubuntu does not unmount disks on logout apart from the encrypted home directory or the private directory (if in use).

You can unmount them by using the eject button on Nautilus or by using the umount command in the terminal, followed by the path the disk was mounted on (you may need to use sudo).


cairo-dock (fallback) won't run at start-up (ubuntu 16.04)

I had the same problem and fixed it by creating a new cairo-dock-starter item in startup.

I named it Cairo Dock and the command for the startup is

cairo-dock -c

you can find the description here:

http://glx-dock.org/ww_page.php?p=Execute%20cairo-dock%20at%20startup&lang=en

I hope it will work in your system as well! :)