Secure Shell isn't propery loading .bashrc

Normally, .bashrc is only sourced for interactive shells, but many linux distributions decide to build bash with a special option to also source it for non-interactive shells if a SSH_something variable is in the environment. However, it doesn't switch the shell to interactive mode when doing this, so the following case command near the top of the default .bashrc:

case $- in
    *i*) ;;
      *) return;;
esac

Finds that the shell is not interactive, so it returns.

If you put the PATH assignment above that block, it should work. Just make sure whatever you put above that block does not output anything, as that will break scp and rsync.


dpkg crashing while trying to install a package

The problem is that the script responsible for setting up the package(either the preinst or the postinst) has a command that causes a kernel panic, or just a kernel oops. Therefore, we must clean out the bad package to keep it from trying to run through dpkg and cause a crash again. To to so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below, one by one.

sudo rm /var/lib/apt/lists/lock

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

sudo rm -rf /var/lib/dpkg/updates/*

sudo rm -rf /var/lib/apt/lists

sudo rm /var/cache/apt/*.bin

sudo mkdir /var/lib/apt/lists

sudo mkdir /var/lib/apt/lists/partial

LANG=C;sudo apt-get clean

LANG=C;sudo apt-get autoclean

LANG=C;sudo apt-get --purge autoremove

LANG=C;sudo apt-get update

sudo dpkg --configure -a

(The above commands are complements of ObsessiveFOSS)

Once you do that, and all is OK, then proceed with the instructions below on how to install your package.

To install RRDTool, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.  To make sure you have all the required dependencies.

sudo apt-get install libpango1.0-dev libxml2-dev

sudo apt-get install librrds-perl rrdtool

Or you can install it from the Ubuntu Software Center, by clicking below:

If the installation fails again, perform the repair steps listed above and file a bug against the package, stating that either the preinst or the postinst seems to cause a kernel panic.


Is there a way to mirror directory changes in Terminator?

Ok. If I understand correctly, you basically have a Terminator window in a split view, where the one buffer is a Bash shell and the other is a Python interpreter. Now, whenever you type a command like cd Pictures/ in the Bash buffer, you want to automatically send the command os.chdir("Pictures/") to the Python buffer, so that it changes directories simultaneously with your Bash shell. Kind of like in this image:

...where the os.chdir command in the Python buffer should be entered automatically when you type a cd command in the Bash buffer. Right? If yes, here's a...

Solution

Step 1: Assign the two buffers to the same group

Terminator supports groups of windows. We'll assign those two buffers to the same group, in order to later use Terminator's feature of broadcasting commands to windows in the same group. In this example I will assign both buffers to a group named Tau (actual name doesn't matter, but make sure it's the same for both buffers).

Step 2: Define keyboard shortcuts to switch group broadcasting on and off

By default Terminator does not have keyboard shortcuts for these, but we need them now, so we'll define them via Terminator's Preferences menu. I used Ctrl+Insert to switch group broadcasting on, and Ctrl+Delete to switch it off. You can pick any other keyboard shortcuts you like, though you will have to adapt Step 3 appropriately.

Now, you can press Ctrl+Insert, and whatever you type in the one buffer will appear in the other buffer. By typing Ctrl+Delete you deactivate that behavior again.

If the Python interpreter understood a command such as cd Pictures/, to change a directory in both buffers, all you would have to do now would be something like Ctrl+Insertcd Pictures/Ctrl+Delete, to broadcast the command as is. But the normal Python interpreter does not understand this cd command. You could use IPython, which does understand it, instead of the pure Python interpreter. However I assume that (1) you want the pure Python interpreter and (2) you don't want having to remember pressing these key combinations before and after each cd command. So, let's head to Step 3.

Step 3: Translate and send the cd command automatically to the Python buffer

We will re-alias Bash's builtin cd command to do a little more before actually changing the working directory in the current shell. Namely, whenever a user types cd somewhere,

We translate the command to Python
We use xdotool to simulate pressing Ctrl+Insert
We use xdotool to simulate typing the translated command
We use xdotool to simulate pressing Return
We use xdotool to simulate pressing Ctrl+Delete

In this way, the translated command will be sent to the Python buffer. If you don't have it, install xdotool:

sudo apt-get install xdotool

The script that we want as an alias for cd will look something like this:

function cd_to_pybuf {
  xdotool type "#"
  xdotool key Ctrl+Insert
  xdotool type "os.chdir(\"$1\")"
  xdotool key Return
  xdotool key Ctrl+Delete
  cd "$1"
}
cd_to_pybuf

Explanation: When we alias cd to the above script, then whenever we type cd somewhere, Bash translates that to OURSCRIPT somewhere. Since our script ends with the function call cd_to_pybuf, it will actually call the function cd_to_pybuf with somewhere as argument (available as $1 within the function; note that bash expansion would not work here, so we can't use something like !* to get at the arguments of the original command, and $BASH_COMMAND is problematic too). This function performs exactly the steps enumerated above. On a sidenote, we also simulate typing # before we simulate pressing Ctrl+Insert, because whatever we type after that will appear in both buffers, and Bash does not understand the os.chdir command, so with that # sign we make it into a comment for Bash. After the xdotool stuff, we also perform the actual cd command in the Bash buffer.

So now, we re-alias cd to that script, and test it:

It works! That os.chdir("..") command in the Python buffer was typed automatically. I didn't do it. All I did was type cd .. in the Bash buffer. You can see that the command #os.chdir("..") was also automatically typed into the Bash buffer, but since it's a comment it had no real effect.

To make this change permanent, put that alias into ~/.bashrc, i.e., in your ~/.bashrc add the line:

alias cd='function cd_to_pybuf { xdotool type "#"; xdotool key Ctrl+Insert; xdotool type "os.chdir(\"$1\")"; xdotool key Return; xdotool key Ctrl+Delete; cd "$1"; }; cd_to_pybuf'

And voilà! That was it.

Bonus: an alias for pwd

Sometimes you may want to check what the current working directory is in both buffers at once. We can use the very same technique as for cd, and re-alias pwd. The following command will do the trick, and you can also put it into your ~/.bashrc if you like:

alias pwd='function pwd_to_pybuf { xdotool type "#"; xdotool key Ctrl+Insert; xdotool type "os.getcwd()"; xdotool key Return; xdotool key Ctrl+Delete; pwd; }; pwd_to_pybuf'

What you will have to remember

For this to work in the future, whenever you open up a split view with a Bash and a Python buffer, you will have to do two things:

Assign both buffers to the same group in Terminator
import os in your Python buffer

That's all.

Troubleshooting

This is not perfect. There are some minor problems:

It's a little ugly that this #os.chdir thingy gets printed to the Bash buffer also. It's really cosmetic, but you might consider doing something different, e.g., after you simulated typing the command and before simulating pressing Return, deactivate broadcasting temporarily and remove that command (e.g., simulate a lot of backspaces, or the sequence Ctrl+A, Ctrl+K) from the Bash buffer or whatever.
Some special arguments to cd will not work. Things like cd - (change to $OLDPWD), cd ~ (change to $HOME), or cd (without arguments, also change to $HOME). Here also, the script could be improved to account for such special cases (check if $1 is special, and translate appropriately). Such things should be a piece of cake from here, though.
Optional parameters to cd, such as, e.g., cd -P somewhere, will not work because the translation would be os.chdir("-P") here. You could use $@ instead of $1 to look at all arguments, and then do the appropriate thing.

Hope I could help :) It was an interesting challenge!


Ubuntu 18.4 libQt5Core.so.5: cannot open shared object file: No such file or directory

For me, the libqt5gui5 package was already installed. I tried reinstalling like in the other answer, but still got the error:

...
ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory

I found a similar problem at https://github.com/dnschneid/crouton/wiki/Fix-error-while-loading-shared-libraries:-libQt5Core.so.5

  The kernel needs to be at least 3.15 for a very real but (to me) esoteric reason: "Qt 5.10 uses the renameat2 system call which is only available since kernel 3.15". If you want to read a very long thread, look here:

  https://bbs.archlinux.org/viewtopic.php?id=232682

  ...

sudo strip --remove-section=.note.ABI-tag /usr/lib64/libQt5Core.so.5

  The above command "strips out" a piece of code which is looking in the kernel for something not there, and allows the module to load.

I'm actually running Debian testing (bullseye) 3.12-1-amd64. The path to my library is /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 so the command in my case is

strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

After that, I was able to get the app (Electrum) working


Trying to install Burg Bootloader. /boot/burg/burg.cfg missing

Copy your locale folder from /boot/grub/ into /boot/burg/.
That did the trick for me!


How to get Ubuntu version number on the Wallpaper?

Anotherpossibility would be conky (http://conky.sourceforge.net/) which lets you place all kinds of information on your desktop. The only problem is that it is configurable only via editing a config file by hand, but displaying static text only is pretty easy.


just two steps:

1.edit the /etc/passwd file ,replace priyank to Alex ,then save
2.edit the /etc/shadow file ,replace priyank to Alex,then save

reboot and enjoy it


How to run a script without closing the terminal?

Put $SHELL at the end of your script:

A small flaw: since gnome-terminal isn't running the bash as it's shell, it will regard it as an application and display a warning about it when you try to close the terminal:

There is still a process running in this terminal
Closing the terminal will kill it.

I've found no nice way to hide this warning. If you want, you can disable it entirely by running:

gconftool --set /apps/gnome-terminal/global/confirm_window_close --type boolean false

This doesn't happen if you're using xterm instead of gnome-terminal; should it bother you.


Setting primary Internet connection and network on notebook

maybe you can fix it using the Terminal:
https://help.ubuntu.com/10.04/serverguide/network-configuration.html

Sharing may work with the Network Manager:
https://jeremy.visser.name/2009/03/simple-internet-connection-sharing-with-networkmanager/

greez, Tommy


You could use a simple upstart script like this (adapted from Fedora's tor-upstart package):

start on runlevel [345] and starting local
stop  on runlevel [!345]

limit nofile 4096 4096

respawn
exec /usr/bin/tor --runasdaemon 0 --quiet

Just save that in /etc/init/tor.conf and run sudo start tor. It should then start on the next boot. if it doesn't, it'll log to /var/log/upstart/tor.log


How can i Point to the Oracle JDK in my Ubuntu.

Put the following lines in your ~/.bashrc file.

  export JAVA_HOME=<path/to/java>

<path/to/java> will be something like /usr/java/jdk1.5.0_07/bin/java depending on which version you've installed.

You can also set the default java to use by running the below command and selecting the desired options from the list:

  sudo update-alternatives --config java


How can I detach a tab from my main chrome window (into a new window)?

Use Tab To Window extension of chrome. it will provide you several shortcuts to manage your tabs.

For example, use Alt+Shift+X to move the active tab to a new window.

The shortcuts are customisable.


You likely need to install the extension https://github.com/spin83/multi-monitors-add-on to get top panel on additional monitors, then you should be able to add a clock (or other components as you wish) onto the new panel on the second screen.


DNS behavior during OpenVPN connection improved immediately when I followed a suggestion on ubuntuforums:

Open /etc/NetworkManager/NetworkManager.conf in an editor with root rights.
Delete (or comment out with a hash #) the line that reads dns=dnsmasq
Restart NetworkManager via sudo service NetworkManager restart


Bash reads .profile* when run as an interactive login shell. When a command is given for execution, or when running a script, it is non-interactive unless you give the -i option, and non-login unless you give the -l option, etc. Neither of this is usually possible when executing commands via SSH.

Bash does read .bashrc when run non-interactively by SSH. However, the default .bashrc includes a check for interactive use:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

So effectively, no variable set in .profile or .bashrc is available when you do ssh foo some-command. You can put the variables in .bashrc before the check for interactive execution. For example:

$ head ~/.bashrc
echo foo
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
$ ssh localhost env
foo
LC_MEASUREMENT=en_GB.UTF-8
SSH_CONNECTION=127.0.0.1 46916 127.0.0.1 22
LC_PAPER=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LANG=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
XDG_SESSION_ID=155
USER=muru
...

The echo foo was executed. If I had export foo=bar, then foo would have showed up in the env output.

* with suitable caveats about the presence of files like .bash_profile, etc.


How to prevent cleaner from hanging my lock screen in Ubuntu 16.04

Seems like your cleaner has successfully managed to emulate a cat.

https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1538615

There was a bug in unity-greeter in 14.04 and up to 16.04, which caused the lock screen to become unresponsive when there has been excessive keyboard input for some time (figuratively and literally a "cat on the keyboard").

It should be fixed since unity-greeter version 16.04.2-0ubuntu1 though by implementing a character limit. Please check your installed version with

apt policy unity-greeter

and make sure your system is fully updated with

sudo apt update ; sudo apt upgrade


How can I tidy up the mess that is my Python installations?

I would personally leave Ubuntu's Python alone.
Use virtualenv (with --no-site-packages) for development.

It all feels pretty weird and a little stressful when you begin but seriously, not bumping into system conflicts and or having your entire Python stack break when you do a release upgrade... It's a million times nicer.

Some people go for one virtualenv per project. I like to keep mine together because it forces me to maintain old code. I can't let Django 1.1 projects exist because they aren't compatible with my Django 1.5 environment.

The obvious exception to any of this is developing for Ubuntu ... but then you really need to rely on Ubuntu-shipped packages (or include libraries in your package).


If your new computer came pre-installed with Windows 8, there are a few BIOS level settings that prevent you from booting off your USB device or any other media (CD/DVD) other then your Windows 8 install, all by default.

Secure Boot: [Enabled] (http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot)
OS Mode Selection: [UEFI OS] (http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Compatibility_Support_Module)

I Disabled Secure Boot and for (2) look for "CSM" or "Legacy" Boot support.


broke during upgrade; what command do I use?

Try the following

#fix any broken packages
sudo apt-get -f install

#cleanup any unnecessary packages
sudo apt-get autoremove

#kick off the upgrade, if available
sudo do-release-upgrade


The default gnome-terminal doesn't support splitting,it only allows using tabs. What you want is either Terminator , byobu,or screen.

In the first case, Terminator is a standalone terminal emulator.

Byobu and screen are terminal multiplexers , which are basically apps that run inside terminal emulator.

Any of these can be installed via sudo apt-get install <app-name>


How do I configure a minimal desktop environment?

If you wish to keep your Desktop so "Minimal" in order to focus in productivity or something, keeping graphical items away from your desktop but preserving Desktop functionality thus saving resources which can be efficiently used for productivity, maybe what you need is a Lightweight Desktop Environment. Preferably a hybrid one.

They can be, anyway, too austere for a graphic desktop user, but pretty useful for focusing in productivity without losing the fancy things of Ubuntu.

I suggest you to try i3 Desktop Environment, this will not harm anything in your Ubuntu System but will add a new Desktop Environment which can be chosen from the list of available Desktop Environments at the login screen (a small circle beside your user name). To install type sudo apt-get install i3 in a terminal, hit ENTER, provide your user password and wait for the install to finish, then log out in order to go to the Login screen and choose the proper i3 DE from the list.

IMPORTANT! Please read carefully the i3 User's Guide before attempting to start a session. Once in, you must know what to do. If you are in problems to return to a normal Desktop Environment or the Login Screen remember that you can always hit Ctrl+Alt+1 and go to the first virtual terminal in order to login and type killall5 so your current i3 session will be closed and you'll be returned to the Login Screen.

You can improve your experience by reading enough in order to make certain software or services to auto-start or use docks or search elements like Synapse, graphic user interfaces will work without problems, you can view pictures, play movies, music, etc. and you can even split your monitor so that you can arrange your current programs as you wish. See the next screenshots:

I have heard of some other lightweight desktop environments, such as Enlightment, which is fancier than i3 indeed. But you can get used to i3 too quick because of its simplicity to show your work well arranged in the same screen. Multiple Virtual Desktops are allowed so that you can "jump" from a work area to the other with ease and this won't consume your computer's resources as a full graphic DE does.

Good luck!


Xonotic has built-in gamepad support, no need to use a separate app like qjoypad.

To configure Xonotic for gamepad support you need to use the in-game console (there's no settings UI for it) by pressing Shift+Esc. From there you can set cvars to configure your gamepad bindings. The relevant cvars start with joy_:

https://xonotic.org/tools/cacs/#0a/0/joy

Other users have repoted that the default bindings are broken on Linux, try this:

joy_enable 1
joy_axisforward 1
joy_axispitch 4
joy_axisside 0
joy_axisup -1
joy_axisyaw 3

https://gitlab.com/xonotic/xonotic-data.pk3dir/issues/1947

If the bindings above aren't correct it's probably because your F310 doesn't use the same axis indices. joy_axispitch 4 should be the Y axis on the right thumbstick, but depending on your gamepad axis 4 might be a trigger axis or might not be mapped at all. You can use jstest /dev/input/js0 to see which inputs correspond to which axes. I think the bindings above are correct for an F310 in "X" mode.


samsung laptop brightness issue? can,t change brightness on my laptop

Read this thread that I have posted
Cannot change brightness setting using function buttons or using the brightness control bar on HP laptop

Here is the gist of it

Test-
Restart your system, and when you get to the grub menu, select your distribution (Ubuntu 13.04), dont press enter, but press e (to edit).

This would bring up your menu entry for editing.

Append to the line with starts with linux (and looks like linux /boot/linux3.9. ............ (at the end of this line, leave a space and add) acpi_backlight=vendor

so that it will look like
 linux   /boot/vmlinuz-310-x86_64 root=UUID=3161dd63-38c0-44bc-bc1e-34b692209b0b ro acpi_backlight=vendor

After this press F10 to boot.

Now try changing the brightness. It works for me.

Now we have to make it permanent

To do that we need to edit the Grub configuration file-

In a terminal type

sudo gedit /etc/default/grub

This would open the Grub configuration file.
In this file we have to edit the line

GRUB_CMDLINE_LINUX=""

to

GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

After that save the file and run (type in the terminal)

sudo update-grub

to update the Grub configuration file.


What is Cockpit and how do I install it?

What is Cockpit?

The Cockpit Project is a Project started by Linux developers to provide a clean and crisp web interface for several Linux distros, to help with server administrative tasks.

This project is to provide users - experienced or not - a GUI, meant to aid them in better managing their Linux servers.

There is no extra layer between Linux and Cockpit. Cockpit directly talks to the Linux components. Everything you are viewing in Cockpit, is a live view of the server.

How  do I install cockpit?

Installing Cockpit is as easy as running apt install cockpit on Ubuntu versions  17.04 and or newer.

Due note that you might need to enable the cockpit systemd service.

You can do that like so:

systemctl start cockpit
systemctl enable cockpit
systemctl status cockpit

Cockpit relies heavily on systemd components to work properly. Therefore none systemd distros are not supported.

Cockpit has new releases roughly twice a month, meaning the cockpit packages available on Ubuntu, will be outdated. No worries though, you can install the latest and greatest, by installing Cockpit, and plugins, via the bionic backports, like so: apt install cockpit/bionic-backports.

To install every cockpit package, in one go, you can use the following one liner:

apt-cache search cockpit | grep '^cockpit' | awk '{print $1}' | while read -r cockpit; do apt install $cockpit/bionic-backports ;done

This will list all the packages from the Ubuntu repos, put them in a while loop, and asks you, per package, if you want to install the specified Cockpit/Cockpit plugin.

There is a complementary blog post per a new Cockpit release, screenshots and all:

Blog posts — Cockpit Project

If you have a firewall enabled, you have to whitelist port 9090. Use the appropriate firewall software to to do this. If you have firewalld, here is how you do that:

firewall-cmd --add-service=cockpit --permanent

after that, execute firewall-cmd --reload. Now port 9090 is whitelisted for access.

If you are on your Linux Desktop, you can browse the following URL: http://localhost:9090/, to access the Cockpit login page. If you are on a server, you can access Cockpit, by typing in the IP address and or hostname of the server, and appending :9090 at the end of the URL. And then voila, the Cockpit login page.

This is the Cockpit login page. It uses the /etc/passwd and /etc/shadow file for the user credentials. Use the credentials of one of the Linux users to login.

After login you see the /system page, which is an overview of your server. From here, you can browse and click around on what you want to do on your Linux system. Most of this is self explanatory, you will need to have some technical know-how to keep you from mucking up your server, though.

The Cockpit dashboard plugin allows you to add other Linux servers - with Cockpit - to a server with the cockpit-dashboard plugin installed. There in you can click on any of the servers and manage them from there.

Removal

To remove Cockpit and all of its plugins and dependencies, I use the following:

 apt remove cockpit cockpit-* --purge --autoremove

This will purge cockpit and its plugins, including its dependencies, completely from your system.

Due note that the likes of Docker will also be purge from your system including docker images. Be aware of what you are doing. At all times.

Security

Cockpit is an alternative Linux session. Meaning it's another session to Linux, opened. Similar to the likes of SSH, X11 and VT logins.

An SSH user can also login to the Cockpit interface, if you log in as a normal user, all of the components that Cockpit is loading, is loaded using that user's specific permissions. Same as when you log in with SSH, if you don't have the rights to view the /home/otheruser/test/ directory, or excecute halt Cockpit can't either. So, rest assure, that they would need to execute some pretty nifty Linux Kong Fu to break the Linux system.

For a more in depth blog posts about Cockpit security, please go to the cockpit website and visit the "Is cockpit Secure Post?"

Reference

The Cockpit Project
Running Cockpit
Is Cockpit Secure
Cockpit, the advanced admin interface for Linux servers and desktops - EuroBytes

I am the author of this blogpost


I figured it out

Create svnwrapper.sh (vi svnwrapper.sh)
#!/bin/sh
#set the umask so files are group-writable
umask 002
#call the 'real' svnserve, also passing in the default repo location
exec /usr/local/bin/svnserve "$@" -r /

save it in user dir
e.g. /var/services/homes/my_user  - this is on synolgy NAS

chmod 755 svnwrapper.sh

cd /usr/bin

ln -s /var/services/homes/my_user/svnwrapper.sh svnserve

create .bashrc (vi .bashrc) in /var/services/homes/my_user and chmod 755 .bashrc
content of .bashrc is
#!/bin/sh
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:$PATH"

Note the exec /usr/local/bin/svnserve "$@" -r / in svnwrapper, this will allow you to use full path in the repo on client, replace the last / with the path from where you want to start your repos.


How to install WIFI-adapter TP-Link AC1300 archer T3U in Ubuntu 20.04 LTS

To reset "Airplane mode", Find the hardware switch, or a Fn key combination. Carefully read the keycaps, and the symbols along the keyboard frame just above the keys.


How do I create an icon for a script or software that is available to every user whether new or existing

To create an icon representation of an application to be e.g shown in the Dash, or on the Desktop we need to define a <name_of_app>.desktop file that may have the following content:

[Desktop Entry]
Type=Application
Exec=</path/to/executable [--options]> # commands to run
Icon=</path/to/icon> # optional path to the icon
Terminal=false # set 'true' for terminal applications
OnlyShowIn=GNOME;XFCE;KDE;Unity; # optionally defines where the icon is shown

We may want to place this file in the user's HOME in ~/.local/share/applications (recommended), or for a system wide access for all users in /usr/share/applications. It is important to give the full path to the executable (or script) or to the application's icon here.

We can put this desktop file in the appropriate directory at the time we installed the external application but of course we could also do this later (e.g. during a SSH session).

See also: Desktop Entry Specification


Error while installing printer in Kubuntu 14.04

I had this problem on Mint 14.04 KDE. It turned out that the actual cups package wasn't installed. I solved it by typing:

sudo apt-get install cups


defining which user untar and make the programs for files

Maybe you can put this at the end of your script?

read -p "$USER"


Adding the "-v" parameter to the "ssh" client will give you visible output as to what is going on in the SSH handshake. This will help you identify where it is stalling. One common option to disable on the server is the following in "/etc/ssh/sshd_config"

GSSAPIAuthentication no


How to install AMD graphics divers on hybrid system with intel onboard graphic card?

i recommend you read this article. https://help.ubuntu.com/community/BinaryDriverHowto/AMD
 or How to Install AMD ATI Radeon Graphics HD 6770M


Same thing happened to me because of the UEFI installation. I solved it with reinstalling Linux with deleting it's partition and creating another one to install it with forcing the UEFI installation.

If  you had encountered  this message box   while installing you can try this method I wrote down below.

Firstly, you need a bootable - Linux installed USB drive.(I'm assuming you have it.)
Then after booting your PC you need to install GParted from : http://gparted.org/download.php (select the correct Linux Distribution)

After that, you can delete the partition you used to install Linux. Then reboot your PC and install Linux again with forcing the UEFI installation.


HELP! I accidentaly moved many folders from root directories!

If you didn't mess with permissions before, there should not be many directories in /*/* that a nonprivileged user may move. I suppose that you moved only your own /proc/* directories, perhaps /var/tmp or /tmp, too.

/lib, /opt and other directories cannot be moved with your userID.


12.04 Installer is not recognizing current OS

You can try creating partition for Ubuntu manually and then using that partition for installing Ubuntu.

After installation if GRUB doesn't show Window 7 as option.

Try this:

Boot in Window 7 installtion Disk.
Choose Repair Use command prompt
Use following commands:

Bootrec.exe/FixBoot

Bootrec.exe/fixMbr


wicd doesn't connect to my iPhone USB personel hotspot

Open the Wicd interface and press the arrow on the right.
Then hit "Preferences."
Under "Wired interface" put eth1 and wicd will be able to connect.

Also you do not really need wicd for hardwired interfaces, just use dhclient to get an ip address:

$ sudo dhclient -v eth1


Error while loading shared libraries: cannot open shared object file: No such file or directory

You need to install the missing library (in a terminal, ctrl-alt-t to start one):

sudo apt-get install libgconf-2-4

That should fix your problem.  Shared libraries are needed by the executable, and are brought into the running process at load time.  You can see what shared libraries are needed by an executable with the ldd command

ldd nw


Ubuntu fails to boot with kernel 5.4, ic2 timeout error

BIOS
In terminal, do sudo dmidecode -s bios-version to determine your current BIOS version, and then go to the laptop manufacturer's web site to see if there's a newer BIOS available.
Note: Have good backups before updating the BIOS.
Nvidia
You have Nvidia version 440.100. There's a newer Nvidia driver available for Nvidia RTX 2060.
Either open Software & Updates and see if driver 450.57 is available there, or go to https://www.nvidia.com/en-us/geforce/drivers/ to download that version there.
Direct download at https://www.nvidia.com/en-us/drivers/results/162107/
Note: Have good backups before updating the Nvidia driver.
Update #1:

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


Ubuntu installer doesn't detect my USB drive

That's to be expected. If you were allowed to do that, then the installer would overwrite itself, and then you'd get a kernel panic and/or an I/O error.

Besides, doing a full install to a USB drive isn't a good idea anyway.


Runnning subpackages of python-3.4 astropy-0.3 library on ubuntu 14.04

From the terminal run:

sudo apt-get install python3-astropy

Now to check if it is working open IDLE3 and run the following commands in IDLE3:

import astropy
from astropy.cosmology import WMAP9 as cosmo
dir(astropy)

The expected output of dir(astropy) is:

['ConfigurationItem', 'UNICODE_OUTPUT', '__builtins__', '__cached__', '__doc__', '__file__', '__githash__', '__loader__', '__minimum_numpy_version__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_check_numpy', '_get_test_runner', '_init_log', '_initialize_astropy', '_teardown_log', 'config', 'constants', 'coordinates', 'cosmology', 'cython_version', 'extern', 'find_api_page', 'io', 'log', 'logger', 'logging', 'online_docs_root', 'table', 'test', 'time', 'units', 'utils', 'version', 'version_helpers', 'wcs']

The above output shows that the built-in functions of astropy that you mentioned in your question: cosmology, time and units have all been successfully imported.

The following Python code1 is a simple test to check if the cosmology and units built-in functions of astropy are working correctly. From IDLE3 run the following commands:

from astropy.cosmology import WMAP9 as cosmo
H0 = cosmo.H(0)
H0.value, H0.unit

The expected output is:

(69.32, Unit("km / (Mpc s)"))

1Source: Cosmological Calculations (astropy.cosmology)


14.04 Dual LAN Same Network One port unusable

Because of how the network stack is implemented in linux, you can't have more interfaces in one server configured to same sub-net.

What you could do is bonding - also called port trunking, link aggregation or IEEE 802.3ad (search for: ubuntu network bonding), but that requires that your switch supports that.


TL;DR: I think the best approach here is a full re-installation.

The upgrade path from 10.10 to a more recent release, 14.04 (Long Term Support) or 15.10 (latest), if even still possible, would go as follows:

10.10 → 11.04 → 11.10 → 12.04 LTS → 14.04 LTS ( → 14.10 → 15.04 → 15.10 (latest release))

So as you can see, you would have to perform 4 subsequent release upgrades to get to the latest LTS release, and another 3 more to get to the latest release. In each of these upgrade processes, something could break. (And I'm currently ignoring the fact that this will take a long time.)

Also, you may run into performance issues. Ubuntu 10.10 is the last release to ship with the GNOME 2 desktop by default, since 11.04 Canonical shipped Ubuntu with its new Unity desktop, which is a hell lot more demanding on memory and CPU, although I don't know whether it will actually install Unity during a release-upgrade.

So a full reinstallation would be the way to go, if you want to keep using Ubuntu. An explanation on how this is done would be way to exhaustive for this answer, but you can find a very detailed guide here.

As already mentioned, the default Unity desktop may be too demanding for older hardware, but you are free to try ;) You can even boot Ubuntu directly from a DVD or USB, as described in the Installation guide. If it doesn't work well, you may want to have a look at Ubuntu flavors with more lightweight desktops, such as Xubuntu (with Xfce) or Lubuntu (with LXDE).


You can set maximum and minimum frequencies  by setting /sys/devices/system/cpu/cpu**N**/cpufreq/scaling_min_freq and /sys/devices/system/cpu/cpu**N**/cpufreq/scaling_max_freq

Details are described in this document: https://software.intel.com/sites/default/files/comment/1716807/how-to-change-frequency-on-linux-pub.txt

Edit:
You can reach the same using cpufreq-set in cpufrequtils package: https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq-set.html


Live USB boots to black screen after grub menu on lg ultra book

I managed to solve this problem, what I did is converting my disk from GPT to MBR using "EASEUS Partition Master" Software, and then booting any linux version worked perfectly


usbmon is located in the extras (linux-image-extra-3.13.0-24-generic) packages.

You can locate files in packages using:

http://packages.ubuntu.com/search?suite=trusty&arch=any&mode=filename&searchon=contents&keywords=usbmon)


Banshee does not appear on the panel when iconified;

This sounds like a bug, and you may wish to report it to the Banshee team.

  Banshee bindings with my [play/pause][stop][pre][next] buttons is not consistent. (Sometimes it controls Banshee and some other times it doesn't).

If other media players are open, they may steal the functionality of your media keys. For example, media keys have no effect in Banshee if Totem (Movie Player) is open.


Extract several zip files, each in a new folder with the same name, via Ubuntu terminal

You should be able to use unzip's -d option to set an alternate directory for the archive contents.
unzip -d a a.zip
unzip -d b b.zip

and so on. Within a find expression, you should be able to derive the name for the directory from the name of the zipfile using shell parameter expansion e.g.
find . -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \;

Test it first by adding an echo i.e.
find . -name '*.zip' -exec sh -c 'echo unzip -d "${1%.*}" "$1"' _ {} \;

or something like
while read -rd $'\0' f; do
  unzip -d "${f%.*}" "$f"
done < <(find . -name '*.zip' -print0)


Why I get  If I try insert Estonian flag emoji  by unicode codepoint?

I got it, for emoji flag I need to insert same codepoint twice like

Ctr+Shift+Alt+U1f1eaEnter

Ctr+Shift+Alt+U1f1eaEnter


Resize 2 Btrfs partition behind luks encryption

Ok,
After a good night of sleep, I finale understood that i was idiot.
If like me you are stuck with this.
The step are :
First your mount everything (cf the guide)
Then you shrink the filesystem,
then you shrink the lvm volume,
then you resize the other lvm volume,
finaly the other filesystem.

Thx


timestamp_timeout in Ubuntu doesn't work

Even though this is an old question for an old Ubuntu version, this fixed it for me:
Define timestamp_type=tty as well.
Defaults        timestamp_timeout=600,timestamp_type=tty

Note: when editing this file, make sure you run visudo and not edit the file directly. sudo visudo will open the editor on /etc/sudoers, and let you save. If any syntax errors are found, it will ask you if you want to fix it or revert to the original, but won't let you save any invalid syntax.
If you modify /etc/sudoers manually and mess it up, you'll be left with no sudo privileges and would have to fix it by booting into recovery, dropping to shell and modifying it back.
Reference


How to start & enable crontab in ubuntu 16

4 ways to check status of cron service in Ubuntu:

ps -ef | grep cron

systemctl status cron.service

service cron status

/etc/init.d/cron status


After I installed python3.7.1, the input method stops working. What's the matter?

Although the reasons remain unclear, I manage to fix it. I simply restored python-related executable in /usr/bin/ to the state before the installation took effect. In other words, back to the default 3.6 settings. I was attempted to reinstall the system python but stopped because the things apt remove will clear were all critical things and doing that would destroy the desktop GUI entirely. Now I learn that changing system python is definitely a bad idea. Something like pyenv will help.


You can use Screenlets clock widget  to show time with different time zone.
In the image I am using two clocks with 2 different time zone.

First you need to install screenlets. Install it using sudo apt-get install screenlets.
Now Open Screenlets manager and add two clock on the desktop.

Now Right click on the Clock present on your desktop and goto  properties -> options -> clocks and set the Time Zone.
Repeat it for other clock.

.


You can open a text file with that encoding this way:

gedit --encoding=WINDOWS-1250 myFile.txt

If you wish gEdit to use this encoding by default you can change the way it starts in the Main Menu application (search for it with the Lens). Then go to:

Applications > Accessories > Text Editor

and click "Properties". In the "Command" text box insert the following:

  gedit --encoding=WINDOWS-1250 %U

and then click "Close" and "Close" again.


Can't set the resolution (resolution smaller than expected)

Well , I finally fixed the issue by completely removing ubuntu 9.10 and installing ubuntu 10.10 from scratch and I didn't install Nvidia driver . Ubuntu  10 recognized my best resolution itself and everything worked fine .


ASUS Xonar U3 causing problems with Ubuntu MATE 15.10

I can't recommend any cards but Google search ("usb sound card linux") shows that there are some options, like http://www.amazon.com/external-Adapter-Windows-Microphone-SD-CM-UAUD/dp/B001MSS6CS/ref=pd_bxgy_147_img_2/185-9476135-4341564?ie=UTF8&refRID=0HX1QV14NM1AF364MY5G


Ubuntu crashes after logging in and opening some applications

Incomplete answer... edits forthcoming...

So what did we learn here today? When having system problems, don't panic, don't make so many changes that the system no longer boots. Don't do updates. Don't install new applications. Don't try and upgrade to a newer OS.

re: "Now it is not even booting to Ubuntu . It shows only some commands after selecting Ubuntu in the boot menu".

take a picture of the "commands" and edit them into your question, or post it at imgur.com

We'll start with checking your file system, and then your HDD/SSD.
fsck

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

SMART

open the Disks application
go to the "hamburger" icon and select SMART Data & Tests
view the SMART Data
take screenshot(s) of the scrollable data window
edit the screenshot(s) into your question, or post them at imgur.com


It will depend on where your logfiles are coming from. There is no standard 'SIP Protocol logfile'.

If you need to trace SIP calls, my first recommendation would be Wireshark. This is a network trace tool that can trace pretty much any IP protocol you can think of. It has a lot of SIP features, including producing the kind of ladder diagrams you want (Go to the Telephony->VOIP calls menu item). It can also play back audio.

It is available for most Operating Systems.

When debugging SIP calls it is worth realising that your problem may be at a different level - IP may be firewalled, the TCP (or UDP) socket may not be open, the DNS queries might not be working. All of these can be diagnosed from a Wireshark trace.

Wireshark can also read files saved by other programs, such as the Linux tcpdump program. I often take traces on SIP servers using tcpdump, and then debug them on my laptop.


Cannot Get Windows Shares To Work Via Samba On Ubuntu Server 18.04.1 And New Drive; Cannot Change Owner

A fat32 partition will mount by default with owner=group=root and permissions of 755 (drwxr-xr-x).

To alter permissions you cannot use chown or chmod because Fat32 has no Linux permissions bits to set. You need to make these changes when you mount which is the opposite of what you do with a Linux filesystem.

This:

/dev/sdc1 /mnt/FilesDrive1 auto defaults 0 2

Becomes this if you want to change ownership:

/dev/sdc1 /mnt/FilesDrive1 auto defaults,uid=dwayne,gid=dwayne 0 2

Or you can change permissions so that it is available to everyone:

/dev/sdc1 /mnt/FilesDrive1 auto defaults,umask=000 0 2

Or a combination of both.


How do I enable low graphics mode (llvmpipe rendering) in Unity?

There is an environment variable you can set, UNITY_LOW_GFX_MODE
Running
UNITY_LOW_GFX_MODE=1 unity

should replace your existing session with the "low graphics mode" desktop.
If for some reason you want to make it permanent

For your user:
Add the line
  export UNITY_LOW_GFX_MODE=1

to the file ~/.xprofile (create one, if it doesn't exist).

Or globally:
Create a file /etc/X11/Xsession.d/99force-llvm and add above line (requires root permissions, see this answer about how to create a file as root).
You can set this globally in one step by running the following line inside a terminal:
  echo "export UNITY_LOW_GFX_MODE=1" | sudo tee /etc/X11/Xsession.d/99force-llvm


Use the following link to read the installation instructions directly from Dockers documentation.

https://docs.docker.com/compose/install/

It looks like you are missing a few of the dependencies and it looks like you have to check your path or create a symbolic link to get the docker-compose command to work. The following lines are directly from the documentation

Note: If the command docker-compose fails after installation, check your path. You can also create a symbolic link to /usr/bin or any other directory in your path.

For example:

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Also, you should be installing "docker-ce" and not the outdated "docker" package with apt.

Use this link to find the instructions on how to install the correct docker-ce package

https://docs.docker.com/install/linux/docker-ce/ubuntu/


bash is a command interpreter, a shell, a program with an interface that interprets the commands that you put into it.
When you call bash from bash, you simply start a new shell 'inside' the original shell. When you exit from this second shell, you return to the original shell. You can exit from each shell with the exit command.


Ubuntu 12.04 network printing through Windows Samba server

I just tried setting up a printer in Ubuntu 12.04 in a similar situation.  I want to access printers on a Windows server in a domain.  Wasn't working - they were being held for authentication too.  My local username on the Ubuntu box is not the same as my Active Directory domain username.  (I may be Samba not perfectly set up.)
Best solution so far for me:

Choose Add new printer in Printing, click open 'Network Printers', select 'Windows Printer via SAMBA'
Click 'Browse' to browse for printer (it prompts for authentication to access Windows server with printer)
Select the correct printer or enter URI.
URI for new printer in New Printer dialog is now 'smb://servername/printername'
Select 'Set authentication details now'
Enter details as 'domain\username' and password (if I click 'verify' now it says printer is not accessible, but I clicked Forward anyway.)
Select driver
Print test page

Success!

If I chose 'Prompt user if authentication is required' instead of 'Set authentication details now', then the "verify" button reports that the printer is accessible.  (This is one of the first things I tried.)  But the jobs get held for authentication.
I deleted that printer and tried the steps above, ignoring the verify button, and things now seem to work.  Perhaps the Verify button doesn't handle usernames of 'domain\username' format, or perhaps I need to have the correct domain name set in my Samba settings in smb.conf.


This may work -- I recently helped my neighbor with a similar problem.  Although this could be a software issue, it may indeed be a hardware solution that solves your problem.  Look for a switch on the actual card and set it to the off/unlocked position, then reinsert it and you should be able to write to it as it will no longer be write protected (locked).
Regardless of brand, look at this example which clearly explains what I just briefly summarized:
memory-card-is-write-protected


Run Boot-Repair, update it, and click Recommended Repair.
Note the URL that will appear. Reboot and check if your problem is solved. Indicate the URL if any problem.


How to install Xen Project on Ubuntu Server 18.04.3 LTS?

The pertinent section relating to /etc/network/interfaces looks like this:

auto lo eth0 xenbr0
iface lo inet loopback

iface xenbr0 inet dhcp
    bridge_ports eth0

iface eth0 inet manual

Which in Netplan's /etc/netplan/config.yaml  would look something like:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
  bridges:
    xenbr0:
      dhcp4: yes
      interfaces:
        - eth0

Bear in mind that your interface names will probably have changed to match the newer, more consistent, naming scheme, so eth0 will probably more likely be enxNNNNN or enoN or some such.

Then you do the usual sudo netplan generate to check, and sudo netplan apply when you're sure it's correct.


Is there a 100% working Spotify program for 19.04?

Are you using Spotify's own client?

Create /etc/apt/sources.list.d/spotify.list  with:

sudo -H gedit /etc/apt/sources.list.d/spotify.list

and put the following into the file:

deb http://repository.spotify.com stable non-free #Spotify

Then run Software Updater and install their client.


How to get an Intersil ISL3887 wireless adaptor working

Your device is supported by the driver p54usb which requires firmware. Please open a terminal and do:

sudo apt-get install linux-firmware-nonfree
sudo modprobe -r p54usb && sudo modprobe p54usb

Your device should now be working.


http://www.tldp.org/LDP/abs/html/exitcodes.html -> code 127 means 'Command not found'. It is the value exited of previous command (of course, when the value is other than 0, 0 means success).


/etc/apt/sources.list is goobered, err, I mean, has an invalid entry.

If you open a terminal window then do
nano /etc/apt/sources.list
go to the 57th line and put a leading # at the beginning of that lines, then save the edited file, the problem will go away.

You may, should you wish, edit your question and include the entire sources.list file or just line 57 and the line above and below it to show us where the error might be.


Cannot run multiple instances of a program in parallel on ubuntu in a virtualbox

This sounds like VirtualBox bug 20320 https://www.virtualbox.org/ticket/20320 which is supposed to be fixed in VBox version 6.1.22.  Upgrade both host and the Guest Additions, since it's a shared folders problem.


What does a beginner need to know before switching to Ubuntu?

Before installing Ubuntu:

Most proprietary games by big companies do not work on Ubuntu, although many of them work just fine with PlayOnLinux and Wine. So if you are a gamer, check for compatibility of the games you play and if they don't work consider a dual boot system with Windows.
Some proprietary software (for example Photoshop) may not work properly on Ubuntu. So if you are dependent on very special software which is only available for Windows, consider setting up an Ubuntu virtual machine (for example VirtualBox) and test things there using Wine. Wine provides a Windows environment in Linux, so you can install and run Windows programs in Ubuntu itself.

Testing/Trying things in a virtual machine first is a good idea in general. For example, if you want a more complex partition (with encryption and stuff).
For using Ubuntu (and GNU/Linux in general) you sometimes need a lot of discipline and will need to read about things. Some tasks are not very easily done. But we are here for you. The Ubuntu community is very active and helpful. Just be patient and provide as much information about your problem as possible.

After installing Ubuntu:

Installing Programs on Ubuntu  is different from Windows. It uses a package management system. Packages can be programs but also libraries and other stuff. The package manager makes sure that all the software works well together. And that is not all - if you install a program that needs, for example, Java, the package management system knows that and installs Java automatically. Packages are in repositories. Most Linux distributions have their own repositories and that includes Ubuntu. You can find the software in these repositories in the Ubuntu Software Centre.
Ubuntu should set up all you need by itself. Maybe you need to install additional drivers but Ubuntu will usually tell you if you do. Ubuntu should recognize your WLAN and will ask you to log in (or just plug in your network cable).
Well, that is all for getting started. Now feel free to explore the community. Ubuntu has all the programs you basically need pre-installed (instant messenger, browser, mail client, word processing, media player, ...).


Laptop cpu not maintaining turbo boost for more than a second on Ubuntu 20.04

Laptops are more prone to cooling issues than regular systems... Could it be that your CPU is throttled because it gets too warm? If that is the case, the output of dmesg will report this. You can check the current temperature using the sensors command (from the lm-sensors package).
What is the cpu frequency governor you are currently using? You can check (and set) this with the utilities from the cpufrequtils package. Try cpufreq-info | grep 'may decide which'. But, pointing at the cpu frequency governor is a long shot; my system is using the 'powersave' governor, and I see my CPU at max speeds for long periods of time.


I installed Xubuntu 20.04 LTS on two seemingly identical Compaq CQ60 laptops, and it worked flawlessly on one of them.  The second laptop had a flickering screen problem right away.  I tried reinstalling, changing the resolution and refresh rate, using the Nvidia third party driver (even worse), installing gnome desktop, changing to Wayland vs Xorg, and nothing worked.  Once my screen started flickering, I usually had to reboot.
The last thing I tried appears to have fixed the problem… Assuming these AMD Sempron laptops with 3GB of memory are very low on resources, I turned off the compositor by navigating to Settings Manager, Windows Manager Tweaks and unchecking Enable Display Compositing.  So far, a week later, I have had no further problems.


Why I can not login after set the path envrionment variable

/etc/environment is not executed as a script but read as a configuration file, so no shell expansion is available, thus variables can't be read.

If you wan't to use variables, resort to use session-wide variables in ~/.pam_environment.

Reference

Environment Variables on the Ubuntu help community


Scanner on Brother 420CN does not appear in Simple Scan

You should try the brscan2 models driver located here. It has scanner installation instructions here. If this works for you, we can update the installation steps on this question.


Is it feasible to install and play games in steam while steam is in Wine (PlayOnLinux)

i already know a single virtual drive for steam CAN both install and run more than one game. when i installed skyrim POL gave me 2 buttons on the main screen, one labled skyrim(steam) or something and the other just skyrim, which ran the game. the other opened steam, which i used to install and run rift, as well as install final fantasy 7, but i dont think i ever got it running, for lack of trying. i have a feeling it will probably end up being easier to have different POL entries for each game, cause theyre each gonna need their own different tweaks in order for them to run optimially, let alone properly or even at all. granted every system and setup is unique, so ymmv

i know this post is almost a year old, but if its as high as the third result of a google search, i think its worth answering. sorry dont yet know what the ubuntu community protocol on such things. but im running 12.04 so pretty sure this is still valid info for future searches


I deleted my whole ubuntu system with sudo rm *, and my home folder is encrypted with ecryptfs

I recovered a lot of .eCryptfs files (88 670) using Photorec. Now I have an error when trying to mount them with ecryptfs (see here: https://askubuntu.com/questions/636764/ecryptfs-mount-wrong-fs-type-bad-option-bad-superblock)

Ecryptfs

First, it's important to underestand how ecryptfs works. The keypoint is that it is a file-system level encryption.  It means that the encryption is contained in each file header, and so what we are trying te recover are the crypted files. Decrypting them will come after the recovery.

eCryptfs has 2 default mode in Ubuntu.

One is crypting just the /home/user/Private folder,
Second is crypting the whole /home/user directory.

Here is how it works: The crypted files are stored in /home/user/.Private for case 1 and in /home/.ecryptfs/user/.Private for case 2 (/home/user/.Private is then symlinked to /home/.ecryptfs/user/.Private for case 2).

Because most user's password is less than 10 chars, ecryptfs use its own 32 chars passphrase to encrypt/decrypt the files and the path to the files. This passphrase is stored salted/hashed into a file called the wrapped-passphrase (located in .ecryptfs, the one next to the .Private folder). When the user log-in, it will mount the lower directory (.Private, the crypted one) on the upper directory (the target, Private in case 1, /home/user in case 2). And when the user log-out, it is unmounted.

In case one day you need to mount your ecryptfs crypted folder from a liveUSB or from another computer, it is recommended that you save (in advance) the ecryptfs passphrase (as just using your account password is not always an option to mount the folders).

Mount image on loop0

Just after the cash, the first thing your did is creating a dd image of your disk. Now we boot on a liveUSB we will mount this dd image (stored in media/victor/externalDisk in my case). First need to check for the starting block of the Linux LVM partition (501758):

#fdisk -l media/victor/externalDisk/ss9backup.img
Disk /media/victor/blackWD/ss9backup.img: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00026d62

                              Device Boot      Start         End      Blocks   Id  System
/media/victor/externalDisk/ubuntu14.10.img1   *        2048      499711      248832   83  Linux
/media/victor/externalDisk/ubuntu14.10.img2          501758   250068991   124783617    5  Extended
/media/victor/externalDisk/ubuntu14.10.img5          501760   250068991   124783616   8e  Linux LVM

Now I can mount the partition on the loop device, by specifying the [offset] = starting block [501750] x block size [512].

losetup -o 256901120 /dev/loop0 /externalDisk/ubuntu14.10.img

where 256901120 is the offset.

Then display the result with pvs:

#pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/loop0 ubuntu-vg lvm2 a--  119,00g    0

then activate with:

#vgchange -a y ubuntu-vg
2 logical volume(s) in volume group "ubuntu-vg" now active

and finally mount (read-only) the root partition (just to have a look inside to see what is left, but the recovery tools won't use this mount) with:

mount -o ro /dev/ubuntu-vg/root /mnt/Ubuntu14.10/

Once there, I can start working on my image as if it was a device (/dev/ubuntu-vg/root) as most recovering program ask a device to recover from as an input.

Recovering tools

I tried three recovering program, Extundelete, ext4magic and Photorec. This last one recovered the most .eCryptfs files

Photorec

Here are the instructions to get started with photorec (credits to @Germar)

wget http://www.cgsecurity.org/testdisk-7.0.linux26-x86_64.tar.bz2
tar xvjf testdisk-7.0.linux26-x86_64.tar.bz2
cd testdisk-7.0
sudo ./photorec-static /d /home/victor/Downloads/recovery_folder /dev/ubuntu-vg/root

see below:

Extundelete

Extundelete was not as good as Photorec, but you can give it a try. On your liveUSB booted Ubuntu, make sure that you have activated the universe repositories, and then run:

apt-get install extundelete

then cd into a folder where you have plenty of space (recovered files will be copied there), and run this command (where /dev/ubuntu-vg-root is the partition you want recover files from, should not be mounted, or read only at most !!!) :

extundelete /dev/ubuntu-vg/root --restore-all --after `date -d 'Aug 16 02:35' +%s`

You can try to restrict the program to recover from a specific folder (--restore-directory) or restrict to files deleted after a specific date (--after), see all the command options.

After the program finish, look for recovered files with ECRYPTFS_FNEK_ENCRYPTED.XXXXX in the name. The more you have, the happier you are.

You can read this guy and this article who both had similar problem.

I personnaly didn't find many encrypted files, and all of have a very small size.

Decrypt the recovered files

Refer to this thread to help me tackle this last problem: https://askubuntu.com/questions/636764/ecryptfs-mount-wrong-fs-type-bad-option-bad-superblock

This is a wiki answer, please improve it!


How to change keyboard layout on Bootup?

I had similar issue wit a cached keyboard kmap.gz.
My solution was:

load Ubuntu live from USB: I loaded Ubuntu 19, but 18.04 will work too
start Ubuntu disks
you will see the encrypted disk.
select it
in the settings menu, there is an option to change the key
click it
you will be asked for the current password and for type two times the new password

That's all.   Reboot and use the new password.

Advice: use a digits combination always in a view to avoid such issues.


Since automatic update on ubuntu 13.04, problem loading NVIDIA kernel module

I finally found the issue. For developpement purpose I had to link gcc into gcc-4.4.
So to resolve my issue I had to link gcc to my latest: gcc-4.7.
Next basic procedure to reinstall driver works.


Keyboard layout switching behavior isn't right

After messing around a bit, I realized the difference between keyboard layout and keyboard input methods. I removed the Hebrew keyboard layout, thus removing the layout indicator from the panel. I installed m17n for Ibus, and that gave me the option to select a Hebrew input method. I changed the activation of Ibus to Shift+Alt, and disabled having the same input for all applications.

It works exactly as
I want it now. It's unfortunate that I had to do all this research to get such a simple function to work properly. The keyboard layout switcher should be fixed to behave according to the preferences. It will solve a lot of problems. Thank you, Srinivas, for putting me in the right direction. :)


Change font size of top bar in Ubuntu 20.04

follow this post to bring the default yaru shell theme to local
https://askubuntu.com/a/1231311/739431

and then edit the required content as you wish like below;

/* Top Bar */
#panel {
  background-color: rgba(0,0,0,0.4);
  font-weight: bold;
  height: 1.86em;
  font-feature-settings: "tnum";
  font-family: Arial, Helvetica, sans-serif; /* added this line */
  font-size: 22px; } /* added this line */


If you want to it might be worth it to file a bug report against libahci but it seems to be a minor issue. The message (lines 919 and 724) is failing to "disable FIS reception" and from Intel AHCI handling (5.2.4):

  If the FIS reception failed, non-fatal error handling is performed


After apt-get autoremove: Missing Operating System

Method 1: Per Super Grub Disk

You can start Super Grub Disk via USB

Methode 2:

First you need a Live-CD/USB.
Start the Live-CD and open a new terminal. First mount the Ubuntu-System (boot-partition):

sudo mount /dev/sda2 /mnt

Here an example for sda2.

Now install GRUB

sudo grub-install --root-directory=/mnt /dev/sda


Does Process Priority have Defined classes..?

Each process influences kernel's scheduling by its nice value. These values are from a range of -20 (high priority) to +19 (low) priority, with 0 being (default), so regarding function's template and your first question, the answer is no they are not tool specific.

Linux uses the same priorities for every process. However if you invoke getpriority() system call you will get different values (from 1 to 40), this is done on purpose to avoid returning negative values.

There is a very good book you may refer to: Michael Kerrisk's "The Linux Programming Interface", published at 2010.

References:
Kernel's scheduler's nice design


How can I override a file from packages?

Use dpkg-divert to have the installation of the file write somewhere else instead:

dpkg-divert --divert /path/to/targetfile.diverted /path/to/targetfile


In Ubuntu 13.10.....Screen showing Black ,after login credentials...please reply

In the login screen press ctrl+alt+F1 to enter into virtual console,login with your username and password,then run the below commands on it,

sudo service lightdm restart


Have you tried this:

How can I remove Amazon search results from the dash or disable the feature?

sudo apt-get remove unity-lens-shopping


Compiling a C++ program - "the program gcc can be found in the following packages"

sudo apt-get install build-essential

Enter this command in a terminal window to open the gedit text editor.

gedit progcpp.cpp

To compile the program enter the command given below in a terminal window.

g++ progcpp.cpp -o progcpp

Enter the command given below to run the program.

./progcpp


The missing errmsg.sys should be there.

It's a binary file, from mysql-server-core-5.5 on my system.

Try reinstalling that one?


Lost panel transparency and gain 2 more workspaces after installing tight vnc server

Enabling compositing in window manager tweaks solved the problem.


How to access my root folder with admin access?

Graphical apps should not run with sudo due to the risk of messing with the permissions in the userspace.

gksu used to be the way to go but now the preferred way is sudo -H. According to man sudo,

-H, --set-home
             Request that the security policy set the HOME environment
             variable to the home directory specified by the target user's
             password database entry.  Depending on the policy, this may
             be the default behavior.

The command you're looking for is sudo -H nautilus


I'm on Ubuntu 12.04 and had trouble restoring a backup with either Deja-Dup or Duplicity.
After two days of research and trial and error I would recommend the following steps (jump to Step 4 if you want a quick restore solution but bear in mind that the problems will be back withtout Steps 1-3):

Step 1:
Try to restore your backup via Terminal with Duplicity.

If Deja Dup gives errors, open Terminal and try

duplicity --gio file:///media/backup /tmp/restore

Be sure to use file:/// because Duplicity expects a URL.
That didn't work? Check if Duplicity has got a problem by running a test script from Launchpad, found here: https://bugs.launchpad.net/duplicity/+bug/1252484. Direct Link: https://bugs.launchpad.net/duplicity/+bug/1252484/comments/10.

Step 2: Fix Duplicity error(s) by upgrading to proposed version if necessary:

Enable Proposed Repository here: Applications→Ubuntu Software Center→Edit→Software Sources→Updates. Do NOT update your system now because proposed repo is beta!
Upgrade Duplicity only with these commands (replace /precise with your Ubuntu version name). More info at https://wiki.ubuntu.com/Testing/EnableProposed:

sudo apt-get update
sudo apt-get install duplicity/precise-proposed

Disable proposed repository!
Reboot and run test script again. Error should be gone!

Step 3: Check for other errors in Duplicity.

Run Duplicity again in verbose mode (you will probably still get errors):

duplicity -v9 --gio file:///media/backup /tmp/restore

Check for the following error at the start of your terminal output:

Import of duplicity.backends.sshbackend Failed: No module named paramiko

If you find that error install another package (Found here: http://www.rubenortiz.es/2012/12/11/ubuntu-no-module-named-paramiko/):

apt-get install  python-paramiko

Step 4: Find and fix Deja Dup problem.

Run duplicity in terminal again:

duplicity -v9 --gio file:///media/backup /tmp/restore

You will still have the AssertionError & the log tells you that some parts of your backup will be skipped because the are not accepted by duplicity.
Navigate into your backup folder.
Locate files that are named similar to this: duplicity-full-signatures.20130523T142126Z.sigtar.gz.
Move all except one of these files out of the backup folder to a safe place.
Try Duplicity command again. It should work now.
If it doesn't work yet, try out with different sig-files.
Try Deja Dup again. It should work now.

In the unfixed version Duplicity creates duplicate signature-files that lead to broken restore. I don't know which of the signature-files have to be preserved so trial an error! Info found here: https://bugs.launchpad.net/ubuntu/+source/duplicity/+bug/633101
and here: https://bugs.launchpad.net/duplicity/+bug/703142.

Sidenote: I wasn't able to upgrade Deja Dup to recent stable version. It just stayed on v22, so maybe there is a problem, too.


I created my own udev rule. Create file: /etc/udev/rules.d/usb-power.rules.
Use lsusb for idVendor and idProduct.

Try this rule:

ACTION=="add", ATTR{idVendor}=="0cf3", ATTR{idProduct}=="3004", RUN="/bin/sh -c 'echo 0 >/sys/\$devpath/authorized'"


How to install AMDGPU-PRO drivers in 16.10?

Try this:

Edit amdgpu-pro-install in amdgpu-pro-driver folder.
Modify line number 67 with this:

echo ${dir}${etc}${dir}${sourceparts}/amdgpu-pro.list

Save it.
Try to install again

In my case it has worked, the driver was installed but only on kernel 4.4, not in the new 4.8. Can someone confirm this?


Will this sudo rule allow a user to update the system and nothing more?

This command will restrict the user from using aptitude for anything but updating the repository cache and performing a safe upgrade of the system.

ricardo ALL=(root) /usr/bin/aptitude update, /usr/bin/aptitude safe-upgrade

A similar command will allow the user to perform a full upgrade, but nothing more:

ricardo ALL=(root) /usr/bin/aptitude update, /usr/bin/aptitude full-upgrade

Per aptitude's documentation (10.04), safe-upgrade:

  Upgrades installed packages to their most recent version. Installed
             packages will not be removed unless they are unused

In contrast, full-upgrade:

  Upgrades installed packages to their most recent version, removing
             or installing packages as necessary. This command is less
             conservative than safe-upgrade and thus more likely to perform
             unwanted actions. However, it is capable of upgrading packages that
             safe-upgrade cannot upgrade.

Use your best judgement for which the user should be allowed to run. If you're unsure, use the first rule, which only allows safe-upgrade.

Note that if you want to allow a user to install packages (which greatly reduces any benefit to security, but hypothetically), you need to include a * after the aptitude command, i.e.

ricardo ALL=(root) /usr/bin/aptitude update, /usr/bin/aptitude safe-upgrade, /usr/bin/aptitude install *

Otherwise, you will receive an error message that user ricardo is not allowed to run the command /usr/bin/aptitude install <package_name>.


Slow file copy from flash drives (phone, camera)

I believe this is related to the Ubuntu mtp issues. I suggest you google for "Ubuntu mtp problems"... you'll find a lot of information and suggestions on how to "fix" it. Or maybe you should try a newer ubuntu version... I believe it's already fixed (you can always try a live CD before installing).

PS: Since I'm not really giving you the solution, I was going to post this as a comment, rather than an answer, but I still don't have the reputation for comments. Sorry.

EDIT: I just confirmed mtp is working correctly in Ubuntu 13.10.


Well, you skipped the important part in those instructions: "navigate to where you put the starcraft installer, and..."

When you put in a CD, Ubuntu mounts it in a sub-directory of /media/, so first you need to navigate there:

cd /media
ls

the last command will print a list of directories which correspond to your mounted devices. Identify which one correspond to you CD (cdrom would be my guess), then

cd cdrom
ls

then, if you see starcraft_installer.exe in the output, you can proceed with the instructions.


Question about manual partitioning for Dual boot system

I say that 8 GB of swap would be enough.

I recommend reading this post: askubuntu.com/questions/49109/i-have-16gb-ram-do-i-need-32gb-swap.

Yes, GRUB will recognize a windows partition and add it to the boot menu. If it doesn't you can edit grub and add Windows to it. Read this post.


Is there any way to record a video or take a screenshot when I am in GRUB on a real (non VM) computer?

No.

You need an application to run on the system before you can do that, but before you can have apps running, you need to boot the OS. Being at the grub/boot-loader means you haven't booted an OS yet, so you can't run any applications, and so on.

You'll need to get your cell phone camera out.


Why is Ubuntu more secure than Windows or Mac OS X?

Windows has had a single-user ethos for a very long time. Even with the invention of NT and a role/privilege system, default installs would plonk users as king of the hill. Their account (and, more importantly, anything running as their account) could do anything to any file without a check.

This is huge because any application, any exploit in an application could run as Administrator.

It's only since Vista where that's trying to be reversed and tightened with things like UAC...
Source access is a double-edged sword. Open source enthusiasts usually tout security but it does also let people right into the system. They don't have to report anything they find, they could just write exploits for the hole.

Thankfully, most people do report any flaws they find. Even better is they sometimes include patches that can be immediately tested and distributed.

The turnaround for patching security holes does seem shorter than closed source software.
There are just fewer of us.

Sounds bleak but there are fewer people using one particular open source application. It's hard to justify writing an exploit, trojan, worm, etc when you could write one for Windows in the same time and catch a lot more people.

But we can't be complacent. There's no reason why a trojan or worm can't work in Linux. A malicious app running as a limited user can still do a whole load of damage. And the real flaw in all of this is the users.

Users are idiots who can be convinced to do almost anything if you dress it up with enough pomp or make it look like they're going to get something worthwhile from the process.

Read: Linux isn't invulnerable. Don't say it is. (Disclaimer: my post, my blog)


HDMI sound not working after upgrading to 20.04

Reboot should not be necessary if you just need to reinitialize pulse, just do a:

killall pulseaudio; rm -rf ~/.config/pulse/* ; rm -rf ~/.pulse*

and you should be good as well.


Install Windows 10 on Dell XPS 13 Developer Edition (Ubuntu)

Would it be best to run it through a virtual machine?

That would be my method: keep windows sandboxed and make backups of your VMs. Those backups as easy to make and easy to automate. Plus a copy of the VM and you have 2 Windows.

When you run into problems (cryptolocker, virus, etc) just restore a clean backup.

256Gb is a SSD I would assume? If not... try to replace it with an SSD.


marble-touch offline map viewer fails to start

Marble Touch shouldn't be packaged on the Desktop - the target device for this application is the Nokia N9 cellphone :-) .
Please use Marble or Marble-Qt instead - on the terminal it should be accessible either via "marble" (KDE version) or "marble-qt" (Qt-Only version without KDE dependencies).


I cannot access to folders/files only in the desktop with click

Have you tried having a look to your permissions?
Try opening the terminal and typing chmod 770 /home/*your username*/Desktop
I hope it helps!


Is there key infrastructure allows one running as sudo remotely without prompting password?

It doesn't have key infrastructure for this. You can use sudoer instead.

Create a file in /etc/sudoers.d with

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

add a line begin with your account

ubuntuman ALL=(root) NOPASSWD: ALL

save the file

use it with caution


Is it safe to kill the "gnome-system-monitor" process from inside the system monitor?

It's safe to do. The only thing that happens is that the program disappears from the screen because it's no longer running. You can easily start it again if you want to.

To address a likely concern, the system monitor isn't part of the operating system. It merely asks the operating system for information about running processes so that it can display them. It can also ask the operating system to do things to processes like killing them and so on.

Because it's not part of the operating system, no other programs are relying on it, and so it has no effects on other running processes when it's killed. Since it's a non-system process, it's just like killing any other non-system process.


Need to try to install a specific package version -- however apt-cache madison, apt-cache policy only seem to list the latest version

Unless you have the specific package version's .deb file downloaded, you can only get what's available in the Ubuntu Repositories (or third party repos or PPAs configured on your system), and usually they only keep the Latest Copy of the package available in the Ubuntu repository itself at any given time.
This is the rmadison output for rdiff-backup in all current releases:
$ rmadison -u ubuntu rdiff-backup
 rdiff-backup | 1.2.8-7 | precise/universe | source, amd64, armel, armhf, i386, powerpc
 rdiff-backup | 1.2.8-7 | trusty/universe  | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 rdiff-backup | 1.2.8-7 | xenial/universe  | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 rdiff-backup | 1.2.8-7 | bionic/universe  | source, amd64, arm64, armhf, i386, ppc64el, s390x
 rdiff-backup | 2.0.0-1 | focal/universe   | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
 rdiff-backup | 2.0.5-1 | groovy/universe  | source, amd64, arm64, armhf, ppc64el, riscv64, s390x

Therefore, if you are using any release before 20.04, you are stuck with either Nothing (because EOL) or 1.2.8-7.  Any release after and including 20.04, you're stuck with 2.0.0 or later.
If you want another version, you'll have to go digging elsewhere because older versions would be ancient, and any OLDER version than 1.2.8-7 (while you can go hunting to TRY and find the .deb for it in older pages and such, or try and compile the older versions yourselves, both of which are nasty options because you're going into 'untrusted sources' to get older versions.
Unless you explicitly need the older versions than 1.2.8-7, you should stick with the version of the package in the repos for your specific release, and not try and install a specific other version - which apt can't do if there are no other versions available in your repository sources for your codenamed release (Bionic for 18.04, Focal for 20.04, for example) (Oh, and there isn't another version available for any of the releases at this time per rmadison, except for the ones it lists per-codename.).
Also, keep in mind that 1.2.8-7 is version 1.2.8 but with package level revisions.  ALSO keep in mind that at the time of 1.2.8 it had not migrated to Python 3 support - as a result, 1.2.8 may not function on newer versions of Ubuntu because of Python 2 package deprecation and drops in Debian which trickled down to Ubuntu 20.04 and later.


Splitting all files in a folder with pdftk

The issue seems to be that pdftk burst defaults to naming its output files as pg_0001.pdf, pg_0002.pdf and so on regardless of the input file name.

Exactly why that causes errors is not clear - possibly it starts to process the next file before the previous output file(s) have been closed. In any case, overwriting files is obviously not desirable in this case - so the solution is to change the output on a per-file basis.

According to the pdftk manual page:

                    To name these pages yourself, supply a
printf-styled format string via the output section.  For
example, if you want pages named: page_01.pdf, page_02.pdf,
etc., pass output page_%02d.pdf to pdftk.

so for example you could do

for file in *.pdf; do pdftk "$file" burst output "${file%.pdf}-%02d.pdf"; done

which for inputs fileA.pdf, fileB.pdf will result in output files fileA-01.pdf, fileA-02.pdf, ... fileB-nm.pdf (removing and re-adding the .pdf extension after the numeric suffix).

If you really want ad.pdf --> ad.pdf_01 that would be "${file}_%02d".


syntax highlighting not working in gedit

You have to use correct file-path:
mkdir -p ~/.local/share/gtksourceview-2.0/language-specs/
cp asm-intel.lang ~/.local/share/gtksourceview-2.0/language-specs/

mkdir -p ~/.local/share/gtksourceview-3.0/language-specs/
cp asm-intel.lang ~/.local/share/gtksourceview-3.0/language-specs/


Installing the most recent version of the Z shell

You might be interested in zsh-beta, it is the Ubuntu repositories (Universe). The advantage is ease of updates. The downside, there may be a bit of a delay (in this case zsh-4.3.14 is not yet in the Ubuntu repositories).

sudo apt-get install zsh-beta

I did not find any more recent version in any ppa.

The other option is to compile zsh yourself.

Install build-essential

sudo apt-get install build-essential

Download and extract the source code. The documentation in the README and INSTALL is most detailed.

cd ~/zsh-3.3.14

# list options
./configure --help

./configure --prefix=/usr/local

make

sudo make install

Your new zsh should be in /usr/local/bin/zsh

If it is working, you can add it to /etc/shells:

command -v zsh | sudo tee -a /etc/shells

and then use chsh to set your shell:

sudo chsh -s "$(command -v zsh)" "${USER}"

Log out and log in from your user to see the changes. Typing echo $SHELL in your terminal should now yield /usr/local/bin/zsh.


Is Ubuntu Touch compatible with my Tablet?

For a short answer, no.

Unfortunately, your tablet does not match the spec requirements for Ubuntu for Tablets.

It does, however, match the specs for Ubuntu for Smartphones.

So, in theory, you could run Ubuntu for Smart Phones and tweak the Unity 8 shell to run on the tablets resolution.

To answer your questions, at the current time, there are no Ubuntu Touch ports to the tablet you are asking about. Should you want to get Ubuntu to run on your tablet, you can find documentation on the Official Porting Guide. Should you want to get Ubuntu Touch to run on it, you will need to take some steps.

You will need to upgrade your computer to at the very least, Ubuntu 12.04 LTS. Click on the link to download it.
You will need to install the Ubuntu SDK. Click on the link for information on how to install it.
You will need to refer to the Official Porting Guide to begin the port.
You need to see if CyanogenMod 10.1 runs on your device. Click on the link to see see a list of supported devices. Click on this link to see a list of unofficial ports to your tablet. If you check, at the time of posting this article, there are no ports for the Smart AK888-13 Dual Core Android 9.7" Tablet
Now that you have confirmed that your device does not run CyanogenMod 10.1, you will have to port it to your device. Click on this link to find out how to do it.
Once you have done that, you can continue to follow the Official Porting Guide
While porting Ubuntu Touch to your tablet, you will need to modify the code to fit your screens resolution, so it will look like a huge phone.

As you can see, this is a little complicated. Should you get stuck, you can ask the brilliant people at the xdaDevelopers forum for help, or as the Ubuntu Touch Wiki says

Getting in touch

If you got lost somewhere, you found a bug or need some help, we're happy to help you. Ubuntu Touch is put together by a community of many, who are eager to work together on this.

Simply:

join us on IRC in #ubuntu-touch on irc.freenode.net and/or
join our mailing list by

joining the ubuntu-phone team on Launchpad and
enabling the team mailing list at  https://launchpad.net/~/+editemails

Check often on the Ubuntu touch wiki page for the official list of devices that run Ubuntu Touch and the Ubuntu Phone mailing list for any discussion on the device that you have asked about.

Hope this helped.


How does apt-get purge work? Why it couldn't remove broken package in one pass?

This and many other packages have problems to be removed after a problem during the installation. My solution, if a script fails, look into the folder /var/lib/dpkg/info/. There are four types of scripts

package_name.preinst – pre-installation script
package_name.postinst – post-installation script
package_name.prerm – pre-removal script
package_name.postrm – post-removal script

Look into the scripts: It is usually very easy to find the problem immediately. Often it is just a service that can not be started or stopped. Or as in your case, an unloaded module. If you want to only remove the package, remove the offending code and start deleting again.

At very problematic cases Sometimes the only way to delete the entire script down to the line exit 0, currently e.g. nginx :(

And as @kos says, remove the line set -e. But I've never tested.

And start a petition for more robust scripts =)

Some examples

How can I remove a dpkg broken by the Brother MFC-8840 deb driver?

AVG Error (reinstall ubuntu)

Failing to install doc-base


I have been using Kernel 4.11-rc1 for a week, and 4.11-rc2 for a few hours. They have been fine, so far.
I mainly use them on my test 16.04 server, but I did briefly try 4.11-rc1 on a 16.04 desktop VM guest on that same server host.

Note that development kernels are not supported here on askubuntu.com, and this might get put on hold.

Over on ubuntuforums.org, under the development sub-forum, we always have a thread going about the newest RC (Release Candidate) kernels. Yes, someone commented on that thread that power management for NVME is finally available.


Failed to download packages while updating 12.04

This is usually a sign that you need to update your package list (sudo apt-get update). Repos clean out their old packages so if you don't update before doing things, you'll end up trying to download old packages.

In this instance, Thunderbird is now version 15.


There currently is no way to close windows from the overview.

I would look into putting in a feature request if you want this function added.


Certificate Warning, Is it important? What to do?

Log it self saying you already have a SSL certificate there.

So even its downloaded due to its already there its not replacing existing one.

Goto location /etc/ssl/certs and verify its already there or not.


ubuntu 18.04 - dlink dwa171 (revC) shows as a memory stick

The whitebatman2 version of the correct driver 8821cu, doesn't explicitly cover your 2001:331d device. However, there is a method to install the driver. From the terminal:

sudo apt update
sudo apt install build-essential git dkms
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh

It builds successfully, albeit with a few possibly harmless warnings, on my 5.0.0-23 system

Next, do:

sudo modprobe 8821cu

Your wireless should now be working.


How can I replace my distro without affecting my Windows-partition?

Okay I've done this several times because any time I upgrade I like to start from scratch.

When you boot up the LiveCD (.ISO) file always click try, that way you know it works and can mess around during the install process. When you are in the trial you must open disk utility and delete everything except the Windows Partition (NTFS) or if you have a backup partition, Don't worry when you install Grub will be installed and it will sort the boot out.Then you can install to the empty space you created. You may have to "swapoff" the active partitions such as the Linux ones (Ext 4.).

Additionally you can simply install alongside and then erase the old partition, the one you don't want any longer although I would recommend the first one as I have done it and you may have some issue with Grub in the second one.

The latter method can also be done in the "something else option."


alsa.opensrc.org has a short section which describes a scenario similar to this problem.

If you have more that one sound cards which use the same modules, you may want to define the card order. This can be done by specifying index and ID options to the module being loaded. For example,
options snd-usb-audio index=1,2 vid=0x0ccd,0x0d8c pid=0x0028,0x000c
This will define 2 usb sound cards, the first one at index=1, vid=0x0ccd and pid=0x0028; the second one at index=2, vid=0x0d8c and pid=0x000c. The vid and pid here were discovered using lsusb.

Neither soundcard is a USB device, so you can't get hold of the module fields with lsusb, however that same article suggests using modinfo to get a list of parameters for that module:
modinfo -p snd_hda_intel
index:Index value for Intel HD audio interface. (array of int)
id:ID string for Intel HD audio interface. (array of charp)
enable:Enable Intel HD audio interface. (array of bool)
model:Use the given board model. (array of charp)
position_fix:DMA pointer read method.(-1 = system default, 0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO). (array of int)
bdl_pos_adj:BDL position adjustment offset. (array of int)
probe_mask:Bitmask to probe codecs (default = -1). (array of int)
probe_only:Only probing and no codec initialization. (array of int)
jackpoll_ms:Ms between polling for jack events (default = 0, using unsol events only) (array of int)
single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
enable_msi:Enable Message Signaled Interrupt (MSI) (bint)
patch:Patch file for Intel HD audio interface. (array of charp)
beep_mode:Select HDA Beep registration mode (0=off, 1=on) (default=1). (array of bool)
power_save:Automatic power-saving timeout (in second, 0 = disable). (xint)
power_save_controller:Reset controller in power save mode. (bool)
align_buffer_size:Force buffer and period sizes to be multiple of 128   bytes. (bint)
snoop:Enable/disable snooping (bint)

The man pages for modinfo show using a -F flag with a field name to print a field value. I tried modinfo -F id snd_hda_intel but it produced no output.
/proc/asound/ has folders for both cards (under card0 and card1). These folders in turn had id files. A quick cat /proc/asound/card0/id resulted in HDMI, likewise for card1 it was PCH.
As a bit of a blind attempt, I added the following lines to /etc/modprobe.d/alsa-base.conf
# fix ordering of HDMI and PCH soundcards on Chromebook
options snd_hda_intel index=0,1 id=PCH,HDMI

This answer was the originally the end of the question, but after a system restart, this change to alsa-base.conf had fixed the problem.


Ubuntu is stuck after I enter the sda_3 crypt while booting up

First things first: get the data copied to another drive. You'll want to boot into a live USB and mount your partition, then copy that data off. Here's a thread to start: Mounting encrypted LUKS partition from Live CD

I don't know anything about the command you ran and how to recover from it, but after messing up multiple encrypted installations with modifications, I've learned it's often faster just to reinstall than fall down the rabbit hole. I run a very slim set of programs, with most of my important stuff in the cloud or home server, so that may just be my personal preference.


Ubuntu Gnome 14.04: stop upgrading old kernel

You need to remove meta packages.

sudo apt-get remove linux-image-generic linux-headers-generic

You installed new 3.16 meta packages linux-image-generic-lts-utopic and linux-headers-generic-lts-utopic that will upgrade 3.16.


Opening a .jar .desktop file duplicates the icon on the favorite bar

I believe adding StartupWMClass to your *.desktop file should solve your problem...

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=GelAnalyzer
Comment=GelAnalyzer
Path=/softwares/GelAnalyzer2010a/
Exec=java -jar GelAnalyzer.jar
Icon=/usr/share/icons/gel.png
Terminal=false
StartupWMClass=Main

(It's important to have the correct value for StartupWMClass; see comments below).


Lan Driver for Gigabyte g41m combo driver

I had the same problem with me. G41M combo motherboard. I am running ubuntu 12.04 32 bit.
Simplest solution I have found is.

Download compat wireless drivers from here.
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.8-1.tar.bz2
Extract the archive to some location.
Open your terminal and go into above extracted location.
Run sudo make . It will copy all required drivers for e.g atl1e atl1c etc.

Done! Check if your internet is working now.
Cheers!


Cannot run an executable file although it's right there

It's not complaining about the file not being there, it's complaining about the C shell interpreter not being available on your system: you need to install one of the available csh implementations - for example, either

sudo apt-get install tcsh

for the TENEX C Shell ("an enhanced version of Berkeley csh") or

sudo apt-get install csh

for a re-implementation of the original BSD C shell.


How to make Ubuntu 16.04 LTS remember the WiFi password through a shutdown then later restart?

Check that the connection is remembered with a password through the Edit Connections from the network tray symbol dropdown.

Jump into edit the connection and on the General tab automatic connection should be checked. If that's fine, check that there actually is a password remembered in the Wifi-Security tab.

I feel like there may be more significant issues to your problem though, such as the router failing to authenticate your connection, but this is the first thing to check.


Cannot update/get any packages. gedit not installed

From the terminal type:

sudo nano /etc/apt/sources.list

The instructions for using nano editor are always found at the bottom of every page. The only two nano keyboard shortcuts that you need to know are for WriteOut and Exit. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.

You could also use vim instead of nano, but nano is easier to use.


In Window Manager Tweaks (xfwm4-tweaks-settings), in the 'Compositor' tab (also called 'Effects' in my native language), there is a slider controlling opacity of inactive windows. Set it to 100%, or at least >0%.


How could you disable apps from other users

To restrict access to administrator only,

sudo chmod o-x /path/to/executable

To restrict access to group, first create a group,

sudo groupadd myapps

Then change group ownership of the executable,

sudo chown :myapps /path/to/executable

Then finally, add your favorite users to this group,

sudo gpasswd -a <user-name> myapps

Please note that this procedure handles a normal situation where apps are installed from package manager in default location (/usr/local/bin or /usr/bin) and are owned by administrator (root:root).


OpenSSH server requires login on local account prior to allowing remote connections

The reason I was getting that error was because my home folder was encrypted, and thus the ~/.ssh/authorized_keys file was inaccessible. I followed the steps listed here and here. The only thing that wasn't mentioned, was that if you decide to use this method, you still need to type in the user password for the machine on each login. For me, that's not a problem, but for some people who have strong passwords (ie. > 16 characters with no easy way to remember them), this may pose an issue, and using the method described here may work better.


Unrar fails when accents are present in filenames

Running unrar x /path/to/file . will decompress the files with no encoding errors.

Apparently the issue is caused by the Archive Manager. (I'd really like to be able to use Archive Manager and the GUI, so if someone has a better answer I'll gladly accept it!)


As Inforcer25 said in the comments, you don't need to add the PPA.

Unless you want the newest betas, there is no point.

So, fire up your terminal (ctrl+alt+t) and run:

sudo apt-get update
sudo apt-get install wine


Open a terminal with Ctrl + Alt +T then run this command:

cd ~/Desktop
sudo chmod +x sublime_text.desktop

Change Desktop to whatever your desktop is called in your language.
chmod is a command line command to change permissions, +x make it executable
or instead you can run:

cd ~/Desktop
sudo chown yourusername sublime_text.desktop

chown is command line command to change file owner


firetray in thunderbird not working properly

There's a bug in 0.5.6.1. Install older version of the addon 0.5.1
https://addons.mozilla.org/en-US/thunderbird/addon/firetray/versions/
and unset the with_appindicator in the config editor


Probably the closest you are going to get is to use the sponge utility from the moreutils package

DESCRIPTION
       sponge reads standard input and writes it out to the specified file.
       Unlike a shell redirect, sponge soaks up all its input before writing
       the output file. This allows constructing pipelines that read from and
       write to the same file.

So

paste -d ' ' 1.csv status.csv | sponge 1.csv

If you are asking this as a follow-on to your previous question comparison of the two tables line by line, then you could eliminate the intermediate status.csv file for example by doing

paste 1.csv 2.csv | awk '{print $1, $2, $2 == $4 ? "true" : "false"}' | sponge 1.csv


Failed to connect socket to '/var/run/libvirt/libvirt-sock'

Have you installed kvm? To install libivrt and kvm try running below
 sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system virtinst bridge-utils

 sudo systemctl enable libvirtd
 sudo systemctl start libvirtd

I noticed in your output missing ebtables. You can install them by running:
 sudo  apt-get install -y ebtables

Then restart the services. Hope this helps you.


How do I get a CardScan 60 II working with SANE?

Looking into the sane cardscan software, it doesn't appear as if the CardScan 60 II is supported. Only the CardScan 600c and 800c devices have support from this sane driver.

It's possible to force the cardscan driver to attempt to work with your device by adding the usb ids to the cardscan.conf file and making sure the same ids are added to a udev rule similar to those found in 40-libsane.rules. But all of this work might just show that the device doesn't work anyway.

You need to get in touch with the cardScan manufacturers and ask them to release drivers if possible and documentation if not. We need to know how these devices work and what the protocols are. Otherwise it's going to be expensive to recreate the drivers from scratch.