How to get Clion to work on Ubuntu 20.04 xrdp?

@Hakaishin
To solve your Desktop look'n feel while connected through xRDP
xRDP can be used in conjunction with Ubuntu (Gnome Desktop) and present you the same Desktop look'n feel but you have to perform some post configuration actions if you have installed xrdp manually
To have the Ubuntu gnome desktop with dock bar presented to you, you can
Option 1 - Manual Fix
Try to create and populate the file ~/.xsessionrc with the following content
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

Please note that the .xsessionrc file is a hidden file (located in your home directory)
This would be for a single user. If multiple users need to perform remote connection, each user would need to have this file created in their profile
Option 2 - Automated install
You can also use the xrdp-installer script that basically perform the installation of the software and perform some post configuration actions that would provide you the same look'n feel when remotely connected as the one you have when connected to local console
the script (current version is 1.2.1) and how to use it can be found here
Please always check for the latest version of the script at this location
Hope this help
Till next time
See ya


How to install Ubuntu 13.04 without a CD or USB?

Assuming you need to install Ubuntu on your machine and you have already ruled out using wubi to install ubuntu inside windows; then I think the following method should work:

Remove your hard disk.
Connect it to a machine which does have a USB drive or CD ROM.
Install Ubuntu on your hard drive.
Re-attach the hard drive to your machine.

I know this does not answer the question of "how to install ubuntu without USB or CD ROM", but it can help some one without a USB and CD ROM get ubuntu nevertheless.


Can I migrate a tor hiddenservice from one user/PC to another?

All information about Tor Hidden Services are inside the directory /var/lib/tor (assuming Tor is installing as Ubuntu package). So you should do the following steps to migrate your hidden service.

Open a terminal.
Stop your Tor service: sudo service tor stop
This step is not necessary. It is just a cautionary measure.
Inside the directory /var/lib/tor is a subdirectory hidden_service. If this is not the case, have a look into your /etc/tor/torrc. There is a variable called HiddenServiceDir. This tells you the actual location of the subdirectory. I will assume that the correct directory is /var/lib/tor/hidden_service.
Make a backup of the files

/etc/tor/torrc
/var/lib/tor/hidden_service/private_key and /var/lib/tor/hidden_service/hostname

Change to the other machine and stop the Tor service there.
Create a hidden service directory on your new machine: sudo -u debian-tor mkdir /var/lib/tor/hidden_service and change permissions: sudo -u debian-tor chmod 2700 /var/lib/tor/hidden_service.
Copy the private_key and hostname to the new directory and make sure that only the user debian-tor can read and write both files.
Edit your /etc/tor/torrc. You should at least set HiddenServiceDir and HiddenServicePort. Another possibility is to use your backup. You can just copy it to /etc/tor.
Start the Tor service.

Now you are finished migrating the hidden service and it is reachable again.


From looking at the source, ping produces a bell by printing the ASCII bell char '\a', which is doing nothing, probably because the system beep is disabled.

You can manually try to produce the bell with:

echo -e "\a"


Ubuntu 20.04 Can't Use Camera Without Sudo

In VMWare, change your USB setting from 2.1 to 3.1. Your camera may only support USB 3.0
You can also reload the camera driver:
sudo rmmod uvcvideo
sudo modprobe uvcvideo


Analysis
There are some issues with the method from official README.
Moreover - following PKGBUILD from ArchLinux on Ubuntu with steps below

cd /tmp
git clone https://github.com/GNOME/meld.git
cd meld
python3 setup.py build
sudo python3 setup.py --no-update-icon-cache --no-compile-schemas install --prefix=/usr/local --optimize=1

does not lead to positive result either. It ends with already seen error:

$ meld
Traceback (most recent call last):
 File "/usr/local/bin/meld", line 97, in <module>
   import meld.conf  # noqa: E402
ModuleNotFoundError: No module named 'meld'

Solution
We need to utilize the deb-src package building procedure to latest source code from git repository.
In step-by-step style it will look as follows:
sudo apt-get install git build-essential gettext libgtk-3-dev python-gi-dev python3-cairo-dev appstream-util libgtksourceview-4-dev dpkg-dev python3-pytest
sudo apt-get build-dep meld

cd ~/Downloads
git clone https://github.com/GNOME/meld.git
cd meld

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/meld/meld_3.20.2-2.debian.tar.xz
tar -xf meld_3.20.2-2.debian.tar.xz
mv meld_3.20.2-2.debian.tar.xz ../

sed -i "s|meld.1|data/meld.1|" debian/meld.manpages
sed -i "s|3.20.2-2|$(git describe --tags | sed 's/-/+/g')|" debian/changelog

dpkg-buildpackage -b -uc -us

then finally install the package with:
sudo apt-get install ../meld_3*_all.deb

and check its version:

$ meld --version
meld 3.21.1


Issue is with wine, I installed an earlier version of PDF-Pro and it worked fine


Because of the : in the archive filename, tar thinks you are trying to extract an archive on a remote system - hence the message:

cannot connect to plugin: resolve failed

You can force it to treat the file as local by adding the --force-local option. From man tar:

  --force-local
          Archive file is local even if it has a colon.


what is a .fuse_hidden file and why do they exist?

You can safely ignore .fuse_hiddenXXXX files. It means a file was
  deleted but there is at least one software which is still using it, so
  it can't be removed permanently.

  It will be done automatically when the relevant software stops using
  the file or exists. Such files are always gone after umount/reboot.
  This is how Linux and any Unix works but only FUSE exposes these files
  to the user.

These are likely files that were meant to be deleted but are somehow still in use.UBF


How can I set a default profile for a network interface in network manager?

When you edit the connection you should see connect automatically at the top (my screenshot is from Ubuntu, but the functionality should be the same)

Check that checkbox for the one connection you want as default.


Permission denied during deletion of folder in UBUNTU

I think, there might be  a subfolder with other users ownership say ROOT ownership so if you try to delete parent folder with in your ownership shows permission denied. So if you don't care about this folder and want to delete it anyway, then become root by issuing sudo su and then execute next remove dir command by issuing rm -rf <directory-name>. Be careful that you are running with rm command with root privileges, so double check the folders and contents prior deleting.


Whats happened with already installed GNOME apps if I install and run KDE to Ubuntu 18.04?

In short, nothing will happen with your already installed gnome applications. They will continue to work as before.

In Linux, different desktops can be installed on a single system. And indeed, each user on the system can by default long in on his/her favorite desktop.

All existing applications will remain available for all users of the system, along with the new applications that came with that new desktop. All applications can be used on any desktop, although the use of different themes and widgets may cause an application look a bit out of place when run on a different desktop than that for what is is primarily designed.

All users will see many applications in their menu system, including these that belong to another desktop environment and that they probably will never use. This can be seen as a disadvantage of installing multiple desktops on the same system. While undesired applications can be hidden in the user's menu on a per-user basis, this  requires manual editing of the launchers, or of the menu when a menu-editing application is used.

Another potential issue is that different desktops come with different graphical login managers or screens. In Ubuntu, the current display manager will be replaced if another desktop is added using the *-desktop package. For example, the system will have a KDE login screen after the KDE desktop has been added to the system. A sufficiently skilled system administrator, however, can control what display manager is used for login, and actually may proceed to a more granular install, selectively installing these packages that are desired on the system.

With respect to memory use, there are no immediate consequences of having an additional desktop installed. Memory use depends on the applications you effectively use, not on the amount of software installed on your hard disk. In general, more memory is required if you use programs based on different toolkits simultaneously, because the libraries for these different toolkits need to be loaded in memory. That, however, is independent on having one or more desktops installed. It will also happen on a system containing only one desktop, for example Gnome, if you want to run a KDE application, example KDEnlive.


Connected to OpenVPN Server but can't SSH

To limit SSH connect for VPN clients, you need to first open port 22 for the VPN subnet. Using the default OpenVPN subnet 10.8.0.1/24

sudo ufw enable
sudo ufw allow 1194/udp comment "Allowing OpenVPN Connections"
sudo ufw allow from 10.8.0.1/24 to any port 22 proto tcp comment "SSH allowed for VPN clients"

Now after connecting to the VPN, SSH the server with

ssh user@10.8.0.1


How to know when grub memtest is complete

MemTest will keep running forever until you stop it. This allows you to run long-term tests which might discover issues that only show up after some time.

It has a Pass counter which increments every time it starts again from the beginning when the full set of test algorithms has completed:

Generally, they say a single pass should usually be enough but if you have reason to suspect any defects, more passes might detect some more obscure problems.


Idle memory increased about 20% after recent ubuntu 16.04 update

Found the culprit, It was an app running in the background. I have used ps aux command to find high memory using process and then disabled the problem causing daemon.


EtherApe is a graphical network monitor modeled after etherman. it displays network activity graphically, showing active hosts as circles of varying size, and traffic among them as lines of varying width.

It features link layer, ip and TCP modes, color-color coded protocols display, Ethernet, FDDI, Token Ring, ISDN, PPP and SLIP devices. It can filter traffic to be shown, and can read traffic from a file as well as live from the network. You can Download it from The Software Center.

Run it with Sudo

sudo etherape


Is there any REAL Skype alternative where I can add my Skype friends (without asking them to join to a new app)?

The short answer is: no, only skype can mannage skype accounts.

Also Pidgin is a client not a server, you did not import your friends. If you are interested in using Skype in Pidgin you can go to the third party plugin site and check for the Skype IM plugin.

Notice that for skype buddies to show in Pidgin you will need to run both skype and pidgin at the same time and that this functionality might stop working in the future due to api changes in skype that will, if you insist in using it, "force" you to keep an old version of skype installed with all the issues involved.

http://code.google.com/p/skype4pidgin/


Change names of incrementally ordered range of files

It's important to process the files in an inverse numerical order, otherwise the task will fail due to already existing files with the target filename:

find . -maxdepth 1 -type f -name 'blah-??-blah' -print0 | sort -zr | xargs -0 rename 's/-\K([0-9]{2})/$1+10/e'

find . -maxdepth 1 -type f -name 'blah-??-blah' -print0: prints a NULL-separated list of the files in the current working directory matching the globbing pattern blah-??-blah;
sort -zr: sorts the list in an inverse numerical order;
xargs -0 rename 's/-\K([0-9]{2})/$1+10/e': renames the files substituting the first couple of digits after a dash with the correspondent value incremented by 10;

% tree
.
├── blah-10-blah
├── blah-11-blah
├── blah-12-blah
├── blah-13-blah
├── blah-14-blah
├── blah-15-blah
├── blah-16-blah
├── blah-17-blah
├── blah-18-blah
├── blah-19-blah
├── blah-20-blah
├── blah-21-blah
├── blah-22-blah
├── blah-23-blah
├── blah-24-blah
├── blah-25-blah
├── blah-26-blah
├── blah-27-blah
├── blah-28-blah
├── blah-29-blah
└── blah-30-blah

0 directories, 21 files
% find . -maxdepth 1 -type f -name 'blah-??-blah' -print0 | sort -zr | xargs -0 rename 's/-\K([0-9]{2})/$1+10/e'
% tree
.
├── blah-20-blah
├── blah-21-blah
├── blah-22-blah
├── blah-23-blah
├── blah-24-blah
├── blah-25-blah
├── blah-26-blah
├── blah-27-blah
├── blah-28-blah
├── blah-29-blah
├── blah-30-blah
├── blah-31-blah
├── blah-32-blah
├── blah-33-blah
├── blah-34-blah
├── blah-35-blah
├── blah-36-blah
├── blah-37-blah
├── blah-38-blah
├── blah-39-blah
└── blah-40-blah

0 directories, 21 files

If using Zsh, the task can be heavily simplified, as Zsh allows to expand filenames in an inverse numerical order:

rename 's/-\K([0-9]{2})/$1+10/e' blah-??-blah(On)

% tree
.
├── blah-10-blah
├── blah-11-blah
├── blah-12-blah
├── blah-13-blah
├── blah-14-blah
├── blah-15-blah
├── blah-16-blah
├── blah-17-blah
├── blah-18-blah
├── blah-19-blah
├── blah-20-blah
├── blah-21-blah
├── blah-22-blah
├── blah-23-blah
├── blah-24-blah
├── blah-25-blah
├── blah-26-blah
├── blah-27-blah
├── blah-28-blah
├── blah-29-blah
└── blah-30-blah

0 directories, 21 files
% rename 's/-\K([0-9]{2})/$1+10/e' blah-??-blah(On)
% tree
.
├── blah-20-blah
├── blah-21-blah
├── blah-22-blah
├── blah-23-blah
├── blah-24-blah
├── blah-25-blah
├── blah-26-blah
├── blah-27-blah
├── blah-28-blah
├── blah-29-blah
├── blah-30-blah
├── blah-31-blah
├── blah-32-blah
├── blah-33-blah
├── blah-34-blah
├── blah-35-blah
├── blah-36-blah
├── blah-37-blah
├── blah-38-blah
├── blah-39-blah
└── blah-40-blah

0 directories, 21 files


How to execute a script before login screen?


On screen keyboard is not changing when changing language

Disable the Screen Keyboard
Switch to the Arabic keyboard layout
Enable the Screen Keyboard

That should give you an Arabic on screen keyboard.


Which is the proper way to install postgresql [14.04]

Use the Ubuntu packages, or if you want a newer PostgreSQL than is available in your Ubuntu release, install from the packages provided at http://apt.postgresql.org/ .

You do not need to install from source code per install-short.html if there are packages for your operating system.

Postgres-XC is a different product, based on PostgreSQL. You do not need it unless you plan on using a distributed DB. Why are you considering that as an option?


Several packages suggested to be autoremoved. Is it safe?

The first part are redunant packages for the 32 architecture (I386). They are usually installed together with a 32 bit software, which might you've removed.
The lower part shows the linux headers & kernels not in use anymore. Tehy have been replaced by an update...
Removing the nvidia drivers should not be a problem, if you got newer ones:
xserver-xorg-video-nvidia-440 and xserver-xorg-video-nvidia-450 seem to be older packages.
To make sure you*ve got a newer NVIDIA driver check it with nvidia-smi (you may have Version -452)
That list looks exhaustive but nothing to worry about...


Firstly use fdisk to check the disk type

fdisk -l

Use the information from there as the fs type parameter to mount,

mount -t FSTYPE /dev/sdX DIR

where FSTYPE is the file system type reported by fdisk, and DIR is the mount point, ie where you want to mount the sd card too.

Additional options to mount can be checked using

man mount

or from here

As an alternative to mount you might also consider pmount which can be used by non-root users. The call to pmount is also simpler.

See here for further information on that.


Python callback/script returned the following error

This is the relevant line:

[Errno 98] Address already in use

This means that whatever port Python is trying to bind to is already in use.  You need to configure Kodi to use a different port for listening on an interface, because you can't bind to the same port twice (in a default standard Ubuntu setup)


Why doesn't deleting files increase available space?

Step by Step Tutorial

Run sudo tune2fs -m 0 /dev/sda5 in a terminal, assuming /dev/sda5 is your drive.
Enter your password (you won't see it as you type it).
Check your space again, it should be free.

From man tune2fs:

-m reserved-blocks-percentage
  Set the percentage of the filesystem which may only be allocated by privileged
  processes. Reserving some number of filesystem blocks for use by privileged
  processes  is done  to  avoid  filesystem fragmentation, and to allow system
  daemons, such as syslogd(8), to continue to function correctly after non-privileged
  processes are prevented from writing to the filesystem.  Normally, the default
  percentage of reserved blocks is 5%.


Why can't I install compiz-plugins-extra?

If it tells you that "recent version is already installed" is because it's already installed. There were a bunch of plugins removed from the packages that were deemed as unstable, those you will not find them for the normal channels for obvious reasons.


The search isn't meant to be sorted in that manner, AFAIK, it simply returns results based on their name.

Also, if you are using a newer version of Zeitgiest (for example 0.8 from the PPA), Unity will be missing a few features.


Where is ubuntu server for Intel system?

AMD64 is AMD's name for its x86-64 instruction set extension. Intel uses this too. The amd64.iso is also sutable for 64bit x86 processors built by Intel.

Details here


Cinnamon: How to change position of Popup notification?

To change the position of the popup notification you need to change the css file in the theme.

Please refer this page for more info.

Changing the values of

margin-from-top-edge-of-screen: <value>px;

or

margin-from-right-edge-of-screen: <value>px;

will help you to move the notification popup.


Second Monitor Displaying at Half Horizontal Resolution

Adding amdgpu.dc back to my grub command line fixed the issue, but my splash screen got garbled. I ended up disabling the splash screen.


15.04 stopped upgrading Error (1) Udev and Insserv errors

They just mean that the special new tags have not yet been added to the boot scripts. Try removing insserv and try again.


I don't see Unity on 11.04 with Nvidia GeForce GT420 graphics card

Did you install the nvidia drivers in the additional drivers?

It should prompt you to install them, in the panel you should see a little icon.

If it doesn't they can be found System → Administration → Additional Drivers, then go ahead and activate the appropriate driver (probably the current version).

After that you will need to restart your computer when prompted and Unity should work.


New monitor not detecting an signal from my laptop (running Ubuntu 18.04)

Try booting a Live CD of Ubuntu 16.04 or older. You can get 16.04 here:
https://releases.ubuntu.com/16.04/
See if that activates your display in this older version.
If it does, try booting Live of 20.04, there is a "Try before you install" option on standard Ubuntu ISO image, but make sure you pick "saef graphics".
If that works, you'll have terrible resolution, but you'll be on a way to solution - that means that graphics driver (probably Intel) in newer Ubuntu versions is bugged and doesn't respond well to what your display sends back (EDID info).
I keep running into that thing with some displays, hard to say if it's Intel's or display manufacturer's fault.. but those same devices work fine with older kernels and/or Windows.


Will replacing GRUB with BURG increase my system's boot time?

I use burg since 1 year. It works well and I have never noticed a difference in boot time between grub and burg.


Distribution upgrade from 14.04 to 16.04 stuck installing pepperflashplugin-nonfree (amd64)

This is probably related to bug #1632870.

I'd suggest that you enable Canonical Partner and then run:

sudo apt purge pepperflashplugin-nonfree
sudo apt update
sudo apt install adobe-flashplugin

The adobe-flashplugin package will install an updated version of libpepflashplayer.so. It will also install libflashplayer.so for e.g. Firefox.


What to do to improve the speed of a laptop with Ubuntu?

You can make some improvements by moving /tmp and /var/tmp to your RAM.

First, edit /etc/fstab and add following lines:

tmpfs /tmp     tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

Next, remove all files from /tmp and /var/tmp and mount new RAM partitions:

sudo /etc/init.d/sysklogd stop
sudo rm -rf /tmp/*
sudo rm -rf /var/tmp/*
sudo mount -a
sudo /etc/init.d/sysklogd start

Also, you can move Firefox cache to RAM. Type about:config in Firefox address bar and hit Enter. Right click in the parameter listing and select New->String. Set the preference name to browser.cache.disk.parent_directory and set the value to /tmp.
Restart Firefox.


where does Ubuntu save user permission of a file?

In the ext filesystem, which is used in Linux, inodes are used to describe stored files. An inode contains attributes of a file as well as its data block locations (these are the blocks that contain the actual contents of the file). The following is briefly what is stored in an inode:

Inode number
File access, modify and changed timestamps
File size
Permissions
Owner
Group
Data Block Locations

So to answer your question, Unix stores the permissions of a file in its inode, which is in the filesystem, for example ext4.

If you want to see the inode information of a file, you can use the stat command:

$ stat /bin/bash
  File: ‘/bin/bash’
  Size: 635933          Blocks: 624        IO Block: 65536  regular file
Device: 2e208854h/773883988d    Inode: 281474976901122  Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/    Alaa)   Gid: (  513/    None)
Access: 2014-10-18 13:45:13.375853300 -0400
Modify: 2014-10-08 16:54:16.000000000 -0400
Change: 2014-10-18 13:45:13.438253400 -0400
 Birth: 2014-10-18 13:45:13.375853300 -0400

To point out something in your question: by default, when you copy a file from a Linux distribution to another, the permissions are not copied. What happens is that the data blocks (the actual contents) are copied, but all the other attributes are not. So for example, if you are copying files from your internal to your external hard drive (both formatted as ext4), the owner of the copied data on the external hard drive becomes (I think) the user that did the copy command. If you wanted to preserve the permissions (and other attributes) of a file, you would have to use an extra flag, such as -p (or --preserve) in the cp command:

   -p     same as --preserve=mode,ownership,timestamps

   --preserve[=ATTR_LIST]
      preserve   the   specified   attributes   (default:  mode,owner-
      ship,timestamps), if possible  additional  attributes:  context,
      links, xattr, all

Where mode is the permissions. Using options like the -p copies over those inode attributes to the new file.

Windows uses the FAT32 or NTFS which are completely different filesystems that don't understand inodes. That's why, when you copy something from Linux (ext4) into Windows (NTFS or FAT32), Windows applies its own attributes to the file.

When you mount an NTFS filesystem in Ubuntu, it sets permissions on everything in the partition using the umask command (or options fmask and dmask in fstab). When you copy something over to that mounted partition, those files take whatever the umask command entails, and the permissions cannot be changed unless you remount the whole partition with new options.

For more information, read the manpage of ntfs-3g here: http://linux.die.net/man/8/ntfs-3g.


You have to boot in maintenance (recovery) mode or with live CD / USB and mount the root volume.


How to install .debs in a folder using a single command?

here is how
Click the Dash -> type Terminal

open up the terminal

then type cd PATH_TO_THE_FOLDER_CONTAINING_THE_DEBS

then run

sudo dpkg -i *.deb

basically, what this does is fills in the rest of the name in place of the * character. You may encounter an error saying dependencies not met, if you see this then you can run

sudo apt-get install -f

This usually will cause apt to download the missing dependencies.


Set GRUB timeout to -1 but timeout remains 30

Look at the documentation, in the terminal with info grub or online at gnu.org

‘GRUB_TIMEOUT_STYLE’

    If this option is unset or set to ‘menu’, then GRUB will display the menu and then wait for the timeout set by ‘GRUB_TIMEOUT’ to expire before booting the default entry. Pressing a key interrupts the timeout.

'GRUB_TIMEOUT'
     Boot the default entry this many seconds after the menu is
     displayed, unless a key is pressed.  The default is '5'.  Set to
     '0' to boot immediately without displaying the menu, or to '-1' to
     wait indefinitely.

     If 'GRUB_TIMEOUT_STYLE' is set to 'countdown' or 'hidden', the
     timeout is instead counted before the menu is displayed.

So you should set GRUB_TIMEOUT to 0. And to get the menu being displayed until an entry is chosen aka indefenitvly you must set GRUB_TIMEOUT_STYLE to menu.

Is GRUB_DEFAULT correct ? You want to boot into windows  by default ?


Why am I getting this "Connection to PulseAudio failed" error?

The solution to this problem was discovered in the course of solving my other problem, with Pulseaudio and Flash.

First I needed to completely purge and reinstall Pulseaudio. One way to do this is to run the command:

sudo apt-get --purge --reinstall install pulseaudio

Then, after I had a clean start, I discovered there was this odd entry in /etc/pulse/client.conf. It had a line that said:

autospawn = now

It seems that now is not a valid option. I have no idea where that option was coming from, as I thought I was starting fresh after reinstalling.

I changed it to yes, and then commented it out as well anyway.

; autospawn = yes

Rebooted, and then I was able open pavucontrol without errors.

The lesson I took from this is that purging an application might not be as complete as one would assume it to be.


CDemu - a virtual CD/DVD drive for Linux


Though it's Mint Linux oriented, maybe this help: https://bugs.launchpad.net/linuxmint/+bug/576166

If you read the tread it's about a workaround to disable internet connection during install or using --skipmd5check switch.

However I am not sure it's the really same issue, but they seems to be similar.


How can I install gnome-photos in 13.10?

If it's not being found, yet the repository is there, then the software lists haven't been updated. Because that package name is in the repository. Run:

sudo apt-get update

and try again.


Back in Time says "working..." but nothing happens

Please remove the old lock and message files

rm -f ~/.local/share/backintime/worker*

and try again.

If it still doesn't work please install current version from our PPA bit-team/stable

sudo add-apt-repository ppa:bit-team/stable
sudo apt-get update
sudo apt-get upgrade

Open a Terminal, run backintime --debug backup and add the output to your question.

I'm member of BIT Dev-Team


Why some user functions don't get recognised by bash?

Instead of using eval, you can export your function so it is inherited by subshells:

myfunction () { ls -R "$1" ; }
export -f myfunction

And then

echo "myfunction ." | bash

just works.

echo "myfunction ." | sh probably won't still, unless your /bin/sh is a symlink to bash.


Two python distributions, sudo picking the wrong one

Sudoers specifies a secure_path:

Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

This will override your local PATH, thus your virtualenv isn't used. You have a few options:

Call your python binary explicitly: sudo /opt/anaconda/bin/python file.py
Comment out the secure_path line in /etc/sudoers (but it's probably there for a reason)
Specify keep_env for this specific command (though this probably has similar issues to above).

Do not add your Python path to the secure_path as this will probably screw up more than a couple of standard sudo calls.


Since I don't have the rep to leave a quick suggestion to try sudo & nano as comment, I'll do my best to answer your question.

Press Alt-F2 and enter

gksu gedit /your/path/to/.bashrc

if that doesn't open, there's something deeply wrong worthy of some troubleshooting.  However, you can by pass it for now using nano, in a terminal type:

sudo nano /your/path/to/.bashrc

if you are trying to edit the .bashrc for the user you are logged in as then simply

nano ~/.bashrc

should work

To exit and save in nano press Ctrl-x then y and Enter.


I thought I saw nVidia had experimental 340 drivers under Software Sources on 12.10, so it might be worth trying those and seeing if they fix the graphical issues.

As for retrieving server info taking longer, I'm also seeing this issue on my Win7 machine.  I assume that the game's GCF files may have gotten fragmented during recent updates... I know on Windows you can defragment the cache files for a game in its Properties page.


How to fix errors encountered while processing?

First, you could/should have copied the text, pasted it into your question, and Formatted with the {} button just left of the image button.

Second, it looks like it's complaining about /etc/python2.7/sitecuston.py. You should move this file to some other directory, do the sudo apt-get install -f, then compare and merge the saved copy with the installed copy.

Read the error messages slowly and carefully - programmers try very hard to make them helpful.


how to reverse the lower case characters in word using only sed

This sed script will do the job:

#!/usr/bin/sed

# Put a \n in front of the line and goto begin.
s/^/\n/
bbegin

# Marker for the loop.
:begin

# If after \n is a lower case sequence, copy its last char before \n and loop.
s/\n\([a-z]*\)\([a-z]\)/\2\n\1/
tbegin

# If after \n is not a lower case sequence, copy it before \n and loop.
s/\n\([^a-z]*[^a-z]\)/\1\n/
tbegin

# Here, no more chars after \n, simply remove it before printing the new line.
s/\n//


As commentswered by Gunnar Hjalmarsson here:

Uncheck the "Systembelegungen beibehalten" option to resolve this issue.


I need to permanently disable the touchscreen input - Ubuntu 16.04

Try finding your touchscreen XID with xinput --list, then add the following command to your startup applications: xinput disable [touchscreen XID] (for example, if the XID is 9, then the command would be xinput disable 9).


The first command is the correct one: sudo chmod 444 ron-video-intro-24fps-november-05-2015.mp4

The second command will only remove the executable bit and the file will end up with permission 666.


Executable runs without sudo privileges under one account, but not another?

@steeldriver got me on the right track.  I used the command 'groups originaluser' and 'groups newuser' to compare what groups they belonged to.  I had to add the 'adm' group to the new user in order to access the serial port.


How do I improve my Netflix quality on Ubuntu?

According to Netflix's help we are stuck with 720p on Linux.

You could try a Windows virtual machine (or even Chrome OS?).

Some web browser extensions are supposed to avoid that limitation, but I have never tried them.


How to use Ubuntu One through terminal on mini-Ubuntu

Great article documenting this written here.


How can an ext4 partition automatically be mounted to /var directory on system start?

Open a terminal and execute : sudo blkid ... search for the UUID of the partition you want to be mounted automatically when booting the operating system. Now add an entry to the fstab file.
Open a terminal and execute : gksudo gedit /etc/fstab. Add the UUID from blkid command.

Example :

sudo blkid

/dev/sda1: LABEL="data" UUID="5B9C797F2C733C9B" TYPE="ntfs" PARTUUID="e5c27785-4883-42d7-bd79-e27109e9f3a1"
/dev/sda2: LABEL="media" UUID="066265146F41F90F" TYPE="ntfs" PARTUUID="0de341ec-9dda-485a-8fe6-6603e10913a9"
/dev/sda3: LABEL="rescue" UUID="4D244C6A5C3C5310" TYPE="ntfs" PARTUUID="e9d08be2-d5b0-4bbd-aef4-330414b7b3ba"
/dev/sda4: LABEL="system" UUID="126F544516701913" TYPE="ntfs" PARTUUID="819cbefb-c483-41ea-a6ca-970ba757e608"
/dev/sdb1: UUID="7381-B73F" TYPE="vfat" PARTUUID="4af6ebbc-eb8d-4cbe-af28-de7ac03b0c37"
/dev/sdb2: UUID="4ccb0a38-686c-4045-bf53-5ad7a1fa7d90" TYPE="swap" PARTUUID="04188846-f2b0-44de-b19d-6a7d761aba68"
/dev/sdb3: UUID="057d688c-008b-4682-aabf-ee2e0762fc26" TYPE="ext4" PARTUUID="80298a8b-cc2a-4798-b9ef-ecd2bb474e79"
/dev/sdb4: LABEL="virtual" UUID="65077e7a-4bd6-47ea-8014-01e06655cc31" TYPE="ext4" PARTUUID="99807be9-fa3e-451e-b2a9-c95ebb0b2c8e"

In the example sdb4 shall be mounted to /var directory on system start - this has to be added :

UUID=65077e7a-4bd6-47ea-8014-01e06655cc31  /var/virtual       ext4    defaults        0       2

Save the changes you have made ... and now afterwards the fstab file will have to look like this :

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb3 during installation
UUID=057d688c-008b-4682-aabf-ee2e0762fc26 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdb1 during installation
UUID=7381-B73F  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sdb2 during installation
UUID=4ccb0a38-686c-4045-bf53-5ad7a1fa7d90 none            swap    sw              0       0
#
UUID=65077e7a-4bd6-47ea-8014-01e06655cc31  /var/virtual       ext4    defaults        0       2

You can use the nano command line editor as well, but when you want to use a GUI editor, open gedit with the gksudo command. In case it is not already installed, open a terminal and execute :

sudo apt-get update
sudo apt-get install gksu

Note : The default mount directory is /media/<user>/<partition-label>. You may want to consider mounting the partition to this directory instead, or alternatively to /mnt directory.


If the reason why is to easily use Vim, I recommend you to use xcape-lbo instead. Pretty simple to make it work.

Couldn't find the repository but but you can get it through Ubuntu Software.


Is it possible to install Ubuntu on a corporate laptop that is currently running Windows XP with Utimaco's disk encryption software?

It's your company's laptop not yours. You should probably ask them if they agree to you installing Ubuntu. It's unlikely as they usually have good reasons to run encryption software on it.

There are a couple of compromises: you can likely run Ubuntu inside a VM like Virtualbox and the cryptographic solution will still work.


Password protection for command-line suspension

It seems like I can answer my question myself. Still, give more answers if you have them.

sudo pm-suspend && vlock -a does the trick. But it requires the vlock being installed. And don't make it the other way round, ie. sudo vlock -a && pm-suspend, as it will ask for root's password on wake up, and there is no such thing in Ubuntu, as far as I know.


sorry about this i was missing the libgmp-dev library
 sudo apt-get install libgmp-dev


Lost around 200 GB of HD space after installing ubuntu

Linux is not large. But it writes randomly to hard drive not at beginning like Windows. So much of your data may still be on hard drive, but difficult to get to.

Stop using hard drive, only use live system, but Ubuntu live system uses swap and if you have data in swap area on drive it may overwrite that. Most Linux recoveryCD like parted magic or gparted will boot without activating swap.

You can try testdisk. It may see old partitions and deeper search may show files. That would be best case as then you can copy files with full file names. If that does not work then testdisk has photorec which just scans drive for anything that looks like a file, but only restores with file extension not file name. Slow process to run, lots of space on your backup drive needed and then lots of work to rename files. ( I have done it just for a few files and it took forever).

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

http://www.cgsecurity.org/wiki/TestDisk

https://help.ubuntu.com/community/DataRecovery#Lost_Partition

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

http://www.cgsecurity.org/wiki/Menu_Analyse

http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_NTFS

http://www.cgsecurity.org/wiki/PhotoRec


Software does not work properly after upgrade to 16.04

I had the same problem. I got it working by changing the language of the system into English. I think the problem was that the programme descriptions are not available in my language.


Attention required One more step CAPTCHA

Are you using Tor? (The Onion Router, a way to anonymize your web browsing)

Many website owners use free DDOS protection services from CloudFlare. Since many automated website attacks (such as botnets) use Tor to anonymize and hide their identity, CloudFlare forces all Tor users to complete a security check before accessing websites that use their protection services. If this is the case, disabling Tor and connecting directly should remove the security checks.

Another possibility is that you live in an area of the world from which Cloudflare has noticed a high number of malicious attacks, and has put extra security in place for IP addresses linked to that geographical area.


How do I make the shell to recognize the file names returned by a `ls -A` command, and these names contain spaces?

for iterates over words, words are delimited by whitespace. You should not iterate over the output of ls, you should use * .*:

for file in * .* ; do
    if [[ $file = . || $file = .. ]] ; then
        continue
    fi
    # ...
done


As Octavien Damien explained here:

How can I configure Unity?

Configuration Editor (dconf-editor)

There are also some options you can edit using dconf-editor (needs to be installed first by installing dconf-tools at Ubuntu Software Center or by clicking here):

Open up the Configuration Editor by pressing Alt + F2 and typing dconf-editor
Navigate to Desktop -> Unity to find the first two options:

form-factor: The form factor chosen will affect the size of the Dash. Desktop uses a fixed sized Dash, Netbook will always maximize the Dash to screen size, Automatic decides whether to use Desktop or Netbook based on the screen resolution.
home-expanded: Whether the home screen of the Dash should be expanded (Expanded) or not (Not Expanded).


md5sums are wrong on 2 downloads downloading a 3rd now

Sounds like bad downloads. Maybe your web browser or downloading program (or something mysterious) is doing something wrong. And checking against the right Ubuntu md5 hashes?

Try using the torrent download (under Alternative downloads and torrents) to get the file, it's uber-good at handling interrupted downloads and it does it's own error-checking too.


That IS NOT an Ubuntu repo , is for an Android ROM for your phone, you can't add it to Ubuntu, but you can download the files from it via Ubuntu, like this

wget https://github.com/kprkpr/android_device_samsung_s7560/archive/master.zip

No bugs to report as it is not an Ubuntu repo and offers no packages for Ubuntu.

Ubuntu repos look like this

ppa:user/ppa-name

Example:

ppa:libreoffice/libreoffice-5-0


Following muru's comment, I've searched for other vim files, and I found a .vimrc.bundles file, where everything is listed.


Screen resolution messes up when logging in

First, find out what your monitor is detected by Ubuntu. Open up a terminal, type this command to show your display details:

xrandr -q

You only have two monitors(one is the laptop screen, other is your external monitor) you will see a line which contains information about the monitors.

In the first line, the first word will be the monitor type. For, a convenience I assume it is detected as DVI-0.
Now, open up a terminal and create a file using the command

nano lightdmxrandr.sh

Paste the following contents in the file

#!/bin/sh
xrandr --output <DVI-0> --primary --mode <1440x900>

Replace the value  with the monitor type(detected in xrandr -q)

Make the script executable:

chmod a+rx lightdmxrandr.sh

Now run it:

./lightdmxrandr.sh

(If your screen automatically auto-corrects after login you probably won't see a difference so you may want to use a test resolution that is different but you know works while testing)

Now, the script needs to be run in lightdm, navigate to the correct folder:

cd /etc/lightdm

Open up the lightdm conf file:

sudo gedit lightdm.conf

Go to the end of the file and paste the line

display-setup-script=/home/<username>/lightdmxrandr.sh

Replace  with your username
Finally, reboot and that should set the correct resolution on your lightdm login screen.


Ubuntu Desktop is not available for the ARM arch, but there is a Server version available, which is not suitable for you


How to launch windows on default and Linux by choice?

In order to make your computer boot into Windows by default, you'll have to change GRUB's config file. While you could do that from the config file as root, I would recommend using GRUB Customizer, since it is a graphical interface for editing the boot order and a few other things, like the appearance of GRUB when you're selecting an OS to boot into.

Try the following in a terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

If GRUB Customizer doesn't show up in Ubuntu's applications, then you will be able to launch it with

grub-customizer

via a terminal or the Alt+F2 run command shortcut.


Ubuntu 20.04 USB not working after every reboot

Advantages of a Persistent install

You can use the Persistent pendrive to install Ubuntu to another computer.

A Persistent install takes up less space on the pendrive.

You can reset the Persistent pendrive by overwriting the old casper-rw file with a new one.

The Persistent install to pendrive takes less time.

Slightly less wear on the drive.

Advantages of a Full install

You can update and upgrade a Full Install.

If you have problems or wish to modify, the solution is the same as with an internal install, (You can ask for help in forums).

No ugly startup / install screen.

Better security, you can encrypt a Full Install.

You can use proprietary drivers.

Hibernation works.

There is no 4GB casper-rw or 4GB home-rw persistence file size limitation.

Generally faster boot than Live or Persistent USBs.

More stable.


Netplan inconsistent indentation Ubuntu 20.04 server

You have numerous .yaml errors... netplan is very fussy about spacing, indentation (should be only 2 spaces), no tabs...
Note: Install yamllint to check .yaml files.
sudo apt-get update
sudo apt-get install yamllint
Here are the current errors... but there are actually more... start with changing all indentation to 2 spaces, remove extra spaces in brackets, change comments to "* comment"...
  35:12     error    wrong indentation: expected 12 but found 11  (indentation)
  36:24     error    trailing spaces  (trailing-spaces)
  40:12     error    wrong indentation: expected 12 but found 11  (indentation)
  47:11     error    wrong indentation: expected 12 but found 10  (indentation)
  48:23     error    too many spaces inside brackets  (brackets)
  35:26     error    syntax error: expected <block end>, but found '<scalar>' (syntax)
  48:33     error    too many spaces inside brackets  (brackets)
  54:27     error    too many spaces inside brackets  (brackets)
  54:44     error    too many spaces inside brackets  (brackets)
  58:11     error    wrong indentation: expected 12 but found 10  (indentation)
  59:12     warning  missing starting space in comment  (comments)
  61:12     warning  missing starting space in comment  (comments)
  64:12     warning  missing starting space in comment  (comments)
  64:11     warning  comment not indented like content  (comments-indentation)
  65:16     warning  missing starting space in comment  (comments)
  69:11     error    wrong indentation: expected 12 but found 10  (indentation)
  80:11     error    wrong indentation: expected 12 but found 10  (indentation)
  81:12     warning  missing starting space in comment  (comments)
  83:12     warning  missing starting space in comment  (comments)
  86:12     warning  missing starting space in comment  (comments)
  87:17     warning  missing starting space in comment  (comments)
  87:16     warning  comment not indented like content  (comments-indentation)
  88:17     warning  missing starting space in comment  (comments)

This .yaml code passes lint...
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
    eno2:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
    eno3:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
    eno4:
      match:
        macaddress: xx:xx:xx:xx:xx:x
  bonds:
    bond0:
      interfaces: [eno1, eno2]
      parameters:
        mode: balance-alb
        mii-monitor-interval: 1
        gratuitious-arp: 5
        primary: eno1
  vlans:
    bond0.640:
      id: 640
      link: bond0
    bond0.1008:
      id: 1008
      link: bond0
    eno3.220:
      id: 220
      link: eno3
    eno3.230:
      id: 230
      link: eno3
  bridges:
    br0:
      interfaces: [bond0.1008]
      addresses: [x.x.x.x/x]
      gateway4: x.x.x.1
      parameters:
        forward-delay: 0
      nameservers:
        addresses: [x.x.x.x, y.y.y.y]
    br1:
      interfaces: [bond0.640]
      parameters:
        forward-delay: 0
    br2:
      interfaces: [eno3.220]
      addresses: [x.x.x.x/x]
      gateway4: x.x.x.1
      parameters:
        forward-delay: 0
      nameservers:
        addresses: [x.x.x.x, y.y.y.y]
    br3:
      interfaces: [eno3.230]
      parameters:
        forward-delay: 0

Note: See https://netplan.io/examples/


Why is there only one configuration management tool in the main repository?

First off, bcfg2, chef, and cfengine are all in the universe repository, which is a community supported repository of software. It is better explained here:

http://www.ubuntu.com/project/about-ubuntu/components

The most relevant portion of that page here is

  "Popular or well supported pieces of software will move from universe into main if they are backed by maintainers willing to meet the standards set by the Ubuntu team."

When you're talking about server related software, main is really a giant commitment.

At some point, one has to think about the burden that the maintenance of all the packages in main puts on Ubuntu as a project. LTS server releases in particular are supported with security updates for 5 years. So when the MIR team and greater Ubuntu development community looks at whether something should go into main, one of the first things they look at is whether there isn't already something with feature parity in main.

Many times, Ubuntu will still go forward with adopting the package for main. MySQL and PostgreSQL are both in main and at this point have very similar functions and features. This is in large part because there are massive groups of Ubuntu users who use either one, and plenty of people out there maintaining the software.

In the case of configuration management solutions, cfengine, puppet, and chef, all seem to offer a high degree of overlap in functionality, and zero compatibility. So there's an opportunity to make an opinionated decision for users who haven't chosen one. In this case, those involved with that decision up to now have chosen Puppet for a number of reasons which have been discussed at Ubuntu Developer Summits (UDS) in detail many times.

This choice is always up for discussion. Chef, Cfengine, anything else, just need to have somebody willing to make a compelling case that it will serve a large number of Ubuntu users to include the software in main.

I would encourage you then to read through the requirements here:

https://wiki.ubuntu.com/UbuntuMainInclusionRequirements

And file a MIR request if you think it will pass, using this process:

https://wiki.ubuntu.com/MainInclusionProcess

If you're not getting much traction on your MIR, file a blueprint attached to an upcoming UDS (UDS-Oneiric is coming up in May in Budapest). You don't have to fly all the way to Budapest to join the discussion (note that sponsorship is available on a limited basis), you can attend virtually. Either way, I think its clear that the Ubuntu development community wants to hear from you and any other users who feel that Ubuntu can be improved.


Ubuntu (14.04.02) installation fails on device with NVIDIA GeForce GTX970

Got this working but it was a number of things.

Changed Initial GFX display in Bios to be the onboard graphics display of the Intel i7-4790K (This required rewiring my monitor cables too. Forgot that at first)
Used nomodeset option as suggested by ubfan1 in comments.  I'm not sure if this helped or not. I did not try without nomodeset.  Running with the intel onboard graphics instead of the NVidia card was the important factor.
If I selected Flash Drive in the boot menu then Ubuntu install would not see my windows installation.  Selecting UEFI Flash Drive in the boot menu made it so that Ubuntu installation would see the Windows installation.
After all installing and updating, switched my Inital GFX display in the Bios back to PCI1.  (This was probably not necessary, but did it to be sure my graphics card is being used instead of Intel onboard graphics. Also switched wires back!)


What version of Ubuntu is most efficient and stable as a small-scale server?

You are asking different questions essentially, and are also requesting an opinion.

Let's split these analyses up then I'll add my two cents.

Desktop vs. Server Edition

Which do you want to work with more, a GUI or a command line?  Better question, do you want to deal with the overhead of a graphical interface which will need memory cycles and video memory to run (in addition to the extra software you want to run)?  Another question: Do you need the GUI for Firefox or a web browser?

If all you are running are server processes I would ditch the GUI and use the Server variant instead.  This recommendation is based on the need of graphical interfaces vs. my knowledge of the command line.  Most of what servers need is on the command line. The Server edition doesn't come with a GUI installed and is command line driven compared to GUI driven (the GUI is just a graphical front end to run the commands the terminal would need transparently).

If you need the computer for Internet browsing and things which need the graphical environment (line word processors, spreadsheet stuff, etc.) as well, then don't use Server variant, just install the relevant server processes alongside the GUI.  Lubuntu will be the 'quickest' GUI for those specs as its lightest weight compared to the other variants.

LTS or Newer Release (Non-LTS)

This is an easier question to answer in my opinion.

The LTS (14.04 currently) has a 5 year support cycle, meaning it gets security updates and patches for five years from its release date.  The trade off is that you don't get newer software versions (typically).  You trade cutting edge software (and newer features in them) for stability.

The non-LTS releases have a much shorter support period.  This means you will need to upgrade to a new OS version very frequently.  With each upgrade you run the risk of more things exploding.  After the support period ends you get no more security updates or bug fix patches for that release, and have to upgrade.  The trade off is that you get newer software versions but may sacrifice the stability of operation / version change differences and having to adapt software for each set of changes.

I suggest using the LTS regardless of Server or Desktop edition.

Performance Comparison between 14.04 and 15.04

I have no basis for comparison.  However, the GUI will be just as slow in 14.04 vs. 15.04 and will operate at similar speeds.  (this applies to 14.10 as well but as that EOLs in a couple months I would not use it)  Use Lubuntu with the LXDE environment for the lightest GUI (it won't lag or be slow as much compared to Unity on Ubuntu).

The server software will run about equally fast between 14.04 and 15.04.  The huge main difference between 14.04 and 15.04 is the init system - systemd is in 15.04 as primary instead of upstart as the primary.  The other big comparison point is the kernel version as well as the software versions available in each release.

However, for just server functions, both will operate about equally well compared to each other.

My Opinion

If all you're running on this is server processes, like TeamSpeak server or a file server, and nothing large scale, it's up to you.  However, I would suggest using 14.04 LTS Server.

I suggest this because stability of software version will likely be more useful than upgrading every new release.  I also suggest this because the graphics overhead is nonexistent and you have more resources freed up to the system and server processes.

If you want a GUI though, use Lubuntu 14.04 which has the LXDE GUI which is relatively lightweight compared to Ubuntu or the other variants.  It also will likely get core security updates for 5 years as well.

You should consider using newer equipment for GUI stuff, though.  GUIs are fine and all, but they add additional attack vectors on servers, and with the hardware you have listed GUIs will still likely be slower than on newer, more updated, hardware.


GRUB menu not showing - countdown is taken into account

You can try this: uncomment the line GRUB_TIMEOUT_STYLE=menu, i.e. change it from

#GRUB_TIMEOUT_STYLE=menu

to

GRUB_TIMEOUT_STYLE=menu

(The "#" is a kind of HIDDEN in and of itself)

Save the file, then

sudo update-grub

Restart and check


I have the Same Problem.This is the way what Works for me.use this link


Use netstat to find if a specific port is free

While you can netstat and grep, it's easier to lsof:

$ sudo lsof -i :22
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd      913 root    3u  IPv4  63380      0t0  TCP *:ssh (LISTEN)
sshd      913 root    4u  IPv6  63382      0t0  TCP *:ssh (LISTEN)
$ sudo lsof -i :80
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2 1914     root    4u  IPv6  19309      0t0  TCP *:http (LISTEN)
apache2 1917 www-data    4u  IPv6  19309      0t0  TCP *:http (LISTEN)
apache2 1945 www-data    4u  IPv6  19309      0t0  TCP *:http (LISTEN)


Erased root trash but still getting no memory

try and look for big files in your system

find / -type f -size +10000k -exec ls -lh {} \;

then delete them and make some room for other files.


Services in rc.d, not starting automatically at boot

I corrected this problem by chuser'ing the files/directories that were involved (including settings). I believe this happened because starting and stopping services with sudo gives them root privileges, whereas they're run as the user account at startup.


How do I get the Nuvoton infrared remote control working?

I have it working 100%. It requires building a custom kernel with Jarod Wilson's Nuvoton driver patch, see this thread.


minidlna is running as root. is this bad?

This page has instructions on running minidlna as a non-root user


How do I fix an overheating problem with an HP ENVY-4 ultrabook?

Check powertop to see if you're reaching the deeper idle states, if you can't reach them then that's part of the problem. The next big problem is video, if you're not already running a proprietary video driver, get one, they have advanced power management that the opensource drivers don't even come close to. If your laptop has both discrete and integrated video see if you can disable the discrete, the Intel opensource video drivers are very good power wise.

http://lesswatts.org/projects/powertop/powertop.php

Video and CPU is where the most heat is dissipated, everything else is irrelevant in comparison.


Try to execute these commands. They will help to clear/fix broken packages/dependencies and also try to install required library packages needed:

1. Fix using Command Line:
    $ sudo apt-get autoremove
    $ sudo apt-get --purge remove
    $ sudo apt-get autoclean
    $ sudo apt-get clean
    $ sudo apt-get -f install
And then try to upgrade again:
    $ sudo apt-get update
    $ sudo apt-get upgrade

2. Fix using Synaptic Package Manager

Fist install synaptic package manager if you don't have already installed:

$ sudo apt-get install synaptic

Then open synaptic package manager -> click Custom Filters down-left -> click Broken top-left, it will list all broken packages try to all broken packages. Also if any residual packages are there on more option you will get as residual packages.
Search for packages libc-bin, libc-dev-bin, libc6 and others one by one which have unmet dependencies, select it, chose Package from the menu -> Force Version and chose some other version from the list. Then click Apply to install it.
Try to upgrade again, if everything goes ok.

$ sudo apt-get update
$ sudo apt-get upgrade

Hope it works for you.


Chromium needs to be opened from terminal to load user profile

Trying the following fix may help to fix your problem with chromium browser.

1. Open a terminal and run the following commands.

cp  /usr/share/applications/chromium-browser.desktop ~/.local/share/applications/

gedit ~/.local/share/applications/chromium-browser.desktop

The file will open now and find the first line in the file that begins with Exec=. This should be under the category [Desktop Entry]

2. Replace the line by Exec=chromium-browser

3. Save the file and logout and try again. This should fix the issue.

Note : In your case i think the first line start with Exec= would be Exec=chromium-browser --temp-profile. If yes, disable it using # and add the new entry above that.

The above methode will load your default user profile. If you have multiple profiles, you may need to specify which profile should be opened by default using --user-data-dir=DIR option in the file described above. see the man page of chromium-browser for more info.


Opening the file browser of the remote machine via terminal and moving files around?

You don't need to ssh to the remote host - just use your local machine's Nautilus file browser to open the remote server directly.

On your local machine, open Nautilus.
in the location bar, enter  sftp://username@remotehost.example.com
enter your remote password when prompted.
You will then be able to copy files to/from the remote host using drag&drop.

You can bookmark the remote server as well to make it even easier to connect next time.

More info:
http://linux.about.com/od/ubuntu_doc/a/ubudg10t9.htm


Installing Ubuntu on a system with a windows 10 that won't boot!

Because Linux and Windows do RAID differently unless you have had a hardware RAID controller, I wouldn't suggest using the Windows RAID system at all. If the reason you have RAID is that you have 2+ storage devices, your best bet is to re/install Windows on one of them, and install Ubuntu on the other. If you only have one drive, I would suggest re/installing Windows again, running the windows equivalent of fsck (CHKDSK or something?), shrinking the partition, and installing Ubuntu in that new space. Best of luck!


Missing Dropbox icon overlays after upgrade from 11.04 to 11.10

Found the following post on the dropbox forums, so two things to try (I can confirm it is working on my computer with nautilus-dropbox 0.6.8-1).

1) Downgrade to nautilus-dropbox 0.6.8-1 if running a newer version.
2) Try running the following commands if on the newer version:

    sudo ln -s /usr/lib/nautilus/extensions-2.0/libnautilus-dropbox.a /usr/lib/nautilus/extensions-3.0/libnautilus-dropbox.a
    sudo ln -s /usr/lib/nautilus/extensions-2.0/libnautilus-dropbox.la /usr/lib/nautilus/extensions-3.0/libnautilus-dropbox.la
    sudo ln -s /usr/lib/nautilus/extensions-2.0/libnautilus-dropbox.so /usr/lib/nautilus/extensions-3.0/libnautilus-dropbox.so


Can I install Ubuntu to internal drive by running Unetbootin from Windows 10 external drive?

If you have no optical disk drive, you will need a LiveUSB made by Windows (or Linux)  because you can't install Xubuntu by booting from a Windows HDD. In step 2 of that tutorial, when it says to get an ISO of Ubuntu, download Xubuntu instead.


Upgrading MAAS from 1.5.4 to 1.7.0 or latest on ubuntu 14.04

I had this question myself and newell from the IRC channel helped me out in realising that the PPA was missing, but this might not be your case. These steps will help you get the update without compromising your other packages (please read the answers to the linked questions, they might be useful to your case and needs).

You should check if there are any held back packages, and if maas is
one of them, when you do:

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

If there are, and they are maas related, you can skip the following step, to add the Maas PPA.
To add the Personal Package Archive (PPA) for Maas's stable version
(ppa:maas-maintainers/stable) you can do

sudo apt-add-repository ppa:maas-maintainers/stable

One normally installs Maas on a server so apt-add-repository or
add-apt-repository, are not available. To install apt-add-repository/add-apt-repository, in order to add the ppa, use the following How to add a PPA on a Server?. After adding the ppa use   the command from step 1.
Assuming you see held back packages, this means that the software
you are to upgrade has new dependencies that it did not have on the
version you currently have installed. You can have maas (or any
package in this situation) installed by doing:

sudo apt-get install <list of held back packages>

You could do a sudo apt-get dist-upgrade, but it would mean
getting more than just the held back software listed on apt-get
upgrade. The latest version of ubuntu would also be installed. I
took this information from here (the link points to the answer
I used, the others hint at the fact that dist-upgrade and other
commands, such as aptitude, might do more than what you want).


Monitor Resolution problems after last update

remove the xorg config file & reboot.

Type in

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.back.

Then reboot the system sudo reboot now

If that doesn't solve the problem or cause any other thing, revert back using

sudo mv /etc/X11/xorg.conf.backup /etc/X11/xorg.conf


How to add exports to fish like in .bashrc?

You can put the user-specific fish configuration, including set directives, in ~/.config/fish/config.fish. The contents should look more or less like that

set -x PERL5LIB /home/iaco/workspace/perl:/home/iaco/devtools

More information can be found in the documentation.


Create files with exact name as in a given directory

Maybe more simple way exists, but here how I'm getting the result you expect:

find ../foo -type f | while read i ; do basename "$i" ; done


While this is not the answer to question "how to install linux without GPU?", I believe you might find useful a way to bypass discrete GPU. After the install you will be able choose to run it headless or not.
2011 MBP has 2 GPUs, discrete and Intel (integrated in CPU). Discrete one is the one that probably has failed. Integrated usually is OK.
If you can see GRUB while loading from USB stick, it's easy: while at it, press 'e' to enter editing mode of the default boot option, find a string with insmod gzio and type in the following strings above it:
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0

And press Fn+F10 to boot.
This will disable discrete GPU and will allow to boot and use the selected distro. Or live-install it. Now, if your GPU so messed that GRUB menu is unaccessible, it's somewhat trickier.

Install linux to a flash drive on a different PC. Load from one stick, and use another as a target drive.

Boot from that linux-on-stick on PC.

Use this tutorial https://www.variadic.xyz/2020/06/15/ubuntu-2011mbp/ to modify default GRUB options

Boot MBP off this modified live stick, install linux to your Mac. (In Ubuntu, the GUI for installing os is named Ubiquity, and can be installed like any other application:apt install ubiquity.)

After installation is complete, don't reboot, but chroot to an installed Ubuntu. To do that, from terminal enter the following:
 sudo mount /dev/[your new root partition] /mnt
 sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
 sudo mount --bind /dev /mnt/dev
 sudo mount --bind /proc /mnt/proc
 sudo mount --bind /sys  /mnt/sys
 sudo chroot /mnt /bin/bash
 sudo mount -a

After that, repeat step 3.

Exit the chroot and reboot:
 exit
 umount /mnt*
 reboot

Now Macbook should boot, function with Intel GPU and survive OS updates. If not, just boot that "rescue usb" you made in step 3 and repeat steps 5-6.

Also, this GRUB 'outb' fix will even allow macOS to run, if it's loaded via GRUB, and macOS can be modified to ignore discrete GPU... But that's another question.


How to insert new user in MariaDb/Mysql through a script?

try the -e parameter of mysql client:

mysql -uroot -pPsswrd -e "CREATE USER 'user1'@'localhost' IDENTIFIED BY 'psswordUser1';"
mysql -uroot -pPsswrd -e "GRANT ALL PRIVILEGES ON * . * TO 'user1'@'localhost';"
mysql -uroot -pPsswrd -e "FLUSH PRIVILEGES;"

this would work even with one command:

mysql -uroot -pPsswrd -e "CREATE USER 'user1'@'localhost' IDENTIFIED BY 'psswordUser1'; GRANT ALL PRIVILEGES ON * . * TO 'user1'@'localhost'; FLUSH PRIVILEGES;"


What's the best way to search my file system on ubuntu with instant results?

Recoll can do this for you. It features full-text indexing for almost every document type you can imagine and a result overview sorted by page numbers for PDF documents.

You can install it through the software center (search for Recoll) or get the new newest version through the Recoll PPA (including a Unity lens/scope). First add the official Recoll repository:

sudo add-apt-repository ppa:recoll-backports/recoll-1.15-on
sudo apt-get update

If you are on Ubuntu 13.04 and below you will have to install recoll-lens:

sudo apt-get install recoll recoll-lens

For Ubuntu 13.10 and up use unity-scope-recoll instead:

sudo apt-get install unity-scope-recoll

If this is the first time you are installing from a PPA, make sure you read these first:

What are PPAs and how do I use them?

Are PPA's safe to add to my system and what are some "red flags" to watch out for?

You will have to execute Recoll at least once to build your search index before being able to use the Recoll lens/scope.

More extensive documentation on how to use Recoll can be found here.


One side of headset / headphone does not work in Ubuntu 18.04.1

I recommend trying pavucontrol click the lock icon and confirm that both channels are up.


The selection marked as 0 is not a duplicate, it just indicates what is currently the alternative with the highest priority, and therefore the one that will be used in auto mode.
In Auto mode whenever you add a new alternative the system always uses the one with the highest priority. In manual, the system honors your choice even if a higher priority alternative is available.
You can choose auto mode by selecting 0 at that prompt, or manual by entering the number corresponding to any of the alternatives. Look at the man page for more details


How can I share an optical drive in a way that fools the client into thinking it's a local drive?

I think you might be able to accomplish what you want using network block devices (NBD). Looking at the wikipedia page on the subject there is mention of a tool called nbd. It's comprised of a client and server component.

Example

In this scenario I'm setting up a CDROM on my Fedora 19 laptop (server) and I'm sharing it out to an Ubuntu 12.10 system (client).

installing

$ apt-cache search ^nbd-
nbd-client - Network Block Device protocol - client
nbd-server - Network Block Device protocol - server

$ sudo apt-get install nbd-server nbd-client

sharing a CD

Now back on the server (Fedodra 19) I do a similar thing using its package manager YUM. Once complete I pop a CD in and run this command to share it out as a block device:

$ sudo nbd-server 2000 /dev/sr0

** (process:29516): WARNING **: Specifying an export on the command line is deprecated.

** (process:29516): WARNING **: Please use a configuration file instead.
$

A quick check to see if it's running:

$ ps -eaf | grep nbd
root     29517     1  0 12:02 ?        00:00:00 nbd-server 2000 /dev/sr0
root     29519 29071  0 12:02 pts/6    00:00:00 grep --color=auto nbd

Mounting the CD

Now back on the Ubuntu client we need to connect to the nbd-server using nbd-client like so:

$ sudo nbd-client greeneggs 2000 /dev/nbd0
Negotiation: ..size = 643MB
bs=1024, sz=674983936 bytes

We can confirm that there's now a block device on the Ubuntu system using lsblk:

$ sudo lsblk -l
NAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                    8:0    0 465.8G  0 disk
sda1                   8:1    0   243M  0 part /boot
sda2                   8:2    0     1K  0 part
sda5                   8:5    0 465.5G  0 part
ubuntu-root (dm-0)   252:0    0 461.7G  0 lvm  /
ubuntu-swap_1 (dm-1) 252:1    0   3.8G  0 lvm  [SWAP]
sr0                   11:0    1 654.8M  0 rom
nbd0                  43:0    0   643M  1 disk
nbd0p1                43:1    0   643M  1 part

And now we mount it:

$ sudo mount /dev/nbd0p1 /mnt/
mount: block device /dev/nbd0p1 is write-protected, mounting read-only
$

did it work?

The suspense is killing me, and we have liftoff:

$ sudo ls /mnt/
EFI  GPL  isolinux  LiveOS

There's the contents of a LiveCD of CentOS that I mounted in the Fedora 19 laptop and was able to mount it as a block device of the network on Ubuntu.

Autoplaying & Automounting?

In the above setup I had to manually mount the DVD.

In investigating the plausibility of whether this approach would work with autoplaying and automounting, out of the box, Ubuntu's autoplay doesn't work but the nbd-client and nbd-server stayed up when I ejected the disk.  When I put the DVD back in I was able to run the mount command on Ubuntu, which remounted the DVD just fine.

So I would assume you could stick a UDEV rule in on Ubuntu to detect this change and do the automount/autoplay automatically. I'm not gonna try it all out but I don't see anything that would lead me to think that it won't work.


How to tell if squid-deb-proxy is working?

The logs on the server will show you if it's working, see here:

Best way to cache apt downloads on a LAN?


How reinstall ubuntu new userName without losing right to read my backuped data?

Linux file permissions and ownership are actually defined by the UID (User ID) and not the actual username.  The username itself is just there to help make it user readable.  If you run sudo grep $USER /etc/passwd you will see a line like the following:
terrance:x:1000:1000:Terrance,,,:/home/terrance:/bin/bash

The above shows my UID as 1000.  Which means that as long as my username has a UID of 1000 I will be able to see my files.
When you install Ubuntu for the first time on the computer it defaults to UID 1000 for the first user created when you type in the username you want.
If you run ls -n in your home folder you will see something like the following:
terrance@terrance-ubuntu:~$ ls -n
total 66076
-rw-rw-r--  1 1000 1000        0 Dec  2 16:55  adp.log
drwxrwxr-x  2 1000 1000     4096 Nov 29 08:06  bin
drwxrwxr-x  4 1000 1000     4096 Dec 15 15:35 'Calibre Library'
drwxrwxr-x  2 1000 1000     4096 Nov  3 11:48  data
drwxr-xr-x  2 1000 1000     4096 Dec 20 21:09  Desktop
drwxr-xr-x  9 1000 1000     4096 Dec 16 07:41  Documents
drwxr-xr-x 27 1000 1000     4096 Jan  5 22:52  Downloads
-rwxrwxrwx  1 1000 1000     1331 Nov 28 17:07  getintip.bsh
-rw-rw-r--  1 1000 1000       23 Dec 18 08:10  HomeIP
-rw-rw-r--  1 1000 1000 16697736 Oct 22 14:28  licenses.txt
-rw-rw-r--  1 1000 1000       83 Aug 27 07:58  links.txt
-rw-rw-r--  1 1000 1000      797 Nov 29 20:57  list-fftabs.py
-rw-------  1 1000 1000    20712 Dec 11 22:25  mbox
drwxr-xr-x  2 1000 1000     4096 Dec 26 20:45  Music
drwxrwxr-x  4 1000 1000     4096 Sep 26 21:48  Notebooks
drwxr-xr-x 12 1000 1000     4096 Oct 31 22:29  NVIDIA_CUDA-11.1_Samples
drwxr-xr-x  7 1000 1000     4096 Dec 12 08:02  Pictures
drwxr-xr-x  2 1000 1000     4096 Sep 26 14:23  Public
drwxrwxr-x  2 1000 1000     4096 Jan  5 12:32  scripts
drwxr-xr-x 14 1000 1000     4096 Dec 30 17:03  snap
drwxrwxr-x  3 1000 1000     4096 Oct  7 08:21  Steam
drwxr-xr-x  2 1000 1000     4096 Sep 26 14:23  Templates
-rwxrwxr-x  1 1000 1000      261 Dec 14 09:59  test.bsh
-rw-rw-r--  1 1000 1000      140 Oct 23 09:17  testfile
-rw-rw-r--  1 1000 1000      150 Dec 14 11:06  test.txt
-rwxrwxrwx  1 1000 1000     1825 Nov  1 07:05  things.bsh
drwxrwxr-x  3 1000 1000     4096 Jan  5 17:52  tmp
-rw-rw-r--  1 1000 1000       69 Nov  6 21:16  tty_firefox
-rw-rw-r--  1 1000 1000 50822163 Aug 14 21:01  ubuntu-unleashed-2021.epub
drwxr-xr-x  2 1000 1000     4096 Sep 26 14:23  Videos
drwxrwxr-x  3 1000 1000     4096 Nov 30 13:54 'VirtualBox VMs'
drwxrwxr-x  2 1000 1000     4096 Oct 27 11:04 'Winamp Skins'

The above shows that all the files and folders in my home directory are owned by my UID.
So, if you reinstall your OS and as long as your new username has a matching UID, you shouldn't have any issues being able to read your backed up data as long as its permissions and ownership match your existing UID.  You also can also create the user manually to have that UID if you need with the following command:
sudo adduser -u 1000 <username>

Hope this helps!


The error you get is typically related to the target filesystem
The usb device is probably FAT or NTFS witch does not allow special chars like : and so.

A quick workaround will be to modify the file naming pattern on your raspberry pictures taker.

And if you want to sanitize files names to make them accepted by Windows filesystem, here is a simple bash function to do it :

function sanitize_file_name {
    echo -n $1 | perl -pe 's/[\?\[\]\/\\=<>:;,''"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/-/g;'
}

Here is an example script that will move your files

#!/bin/bash
## -------- CONFIG ---------------------------------------------
PicsFolder=~/Desktop/gphoto/images/Split  ## Source Folder
DestFolder=/media/pi/B0ED-02C5/Split      ## Destination Folder
FILES=$PicsFolder/*.jpg                   ## File selection
## -------------------------------------------------------------
function sanitize_file_name {
    echo -n $1 | perl -pe 's/[\?\[\]\/\\=<>:;,''"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/-/g;'
}

OldIFS=$IFS;
NewIFS="
";
IFS=$NewIFS                               ## Handle spaces in filenames
for F in $FILES
    do
        mv $F $DestFolder/$(sanitize_file_name $(basename $F))
    done;
IFS=$OldIFS


Try

System Testing

System Testing, can test your system and submit results to the Ubuntu Friendly project.

You have to manually participate for the test.

To install, just click System Testing

Can also install with :

sudo apt-get install checkbox-gui


How to delete a specific number of files inside a folder with fish shell?

You can delete them by running:

rm file\ {01..50}

The \ is there to escape the space that you have in the filename while {01..50} defines a range of integers from 01 to 50.

I recommend changing rm to ls first to confirm the correct files are listed before actually using rm to delete them!


How to add more Languages\Voices to `Espeak`?

you just need to download the language packs off the languages you need there is also a dictionary available  here is what might help you out How can I install one language by command-line


Bitcoin is using +90% CPU power using Ubuntu 12.04?

Adrian's answer is valid and is looking at it from a potential root cause. But my preferred answer was a work around that got answered in the bitcoin stackexchange

Direct Quote:

Using bitcoin-qt you can go into Helps->Debug Window->Console and then type

setgenerate false

By default it should already be false so my guess is that you have a fast internet connection and that your computer receive a lot of blocks in a short time. Your computer then need to check all the ECDSA signatures for the transaction and this can consume a lot of CPU.

I had an overheating issue like that when I was mining litecoins with my laptop. I installed the cpufreq package to decrease my cpu frequency about 30% and everything was fine then.

If you have a dual-core processor you should type something like this in your terminal.

sudo cpufreq-set -c 0 -u "1.8GHz"
sudo cpufreq-set -c 1 -u "1.8GHz"

I then decide to browser around for CPU Freq scaling and decided to use the following indicator-cpufreq indicator

Computer did not overheat and got the job done without suffering to much performance loss.


VideoCapture.read() using OpenCV. Why is USB Camera faster than CSI Camera? (NO GPU)

For anyone who is having similar issue, I have found a reason using $ htop.

This was related to the different CPU consumption as CSI camera requires more CPU.

With CSI Camera (OV5640)

  Continuous VideoCapture.read() occupies full CPU power (100% @ all 4 cores)

With USB Camera (Logitech C270)

  continuous VideoCapture.read() occupies maximum 60-70% CPU power only at 1 core.

I want to know further why CSI requires more CPU power than USB UVC camera but this should be a separate question.


If you what you want is basic GNOME, you probably should try:

sudo apt-get install gnome-desktop-environment --no-install-recommends

IF you want a desktop just like you would have if you installed the Desktop Edition, try:

sudo apt-get install ubuntu-desktop


WiFi connected, but no Internet - MacBookPro

Sounds like you'll need to reconfigure resolvconf:
sudo dpkg-reconfigure resolvconf

Say yes to "Prepare /etc/resolve.conf for dynamic updates?" and reboot.


How do I make Empathy use the system proxy settings?

This is a longstanding bug in Empathy. There is currently no fix available but perhaps others can post work arounds.


Touchpad becomes very jerky and other problems on ubuntu 17.10

I unchecked Natural scrolling within Settings Touchpad and felt that the touchpad on my Dell laptop behaved less erratically (I'm a noob to Ubuntu so still getting to grips with all things Linux)


Ubuntu 12.10 hangs on checking battery state

At least one other person had the same problem and found a solution:

http://dbastreet.com/blog/?p=972


sudo apt purge libapache2-mod-php7.0 libapache2-mod-php

then

sudo apt install libapache2-mod-php7.0 libapache2-mod-php

fixed it.


How to boot in recovery mode? It's not in the menu

While your computer boot, select Advance menu for Ubuntu from grub menu. There you can find recovery mode.

If your grub do not have recovery mode, then at grub menu presse. It will let you to edit your grub menu. Your grub menu would look somthing like this

etparams 'Ubuntu , with Linux 3.6.0-26-generic

recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root <uuid>
linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> ro ipv6.disable=1 quirt splash $vt_handoff
initrd /boot/initrd.img-3.5.0-26-generic`

now change the line

linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> ro ipv6.disable=1 quirt splash $vt_handoff

to

linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> single

which will boot up and show a text-mode terminal with root permissions from where you can make changes.


Unlocking Ubuntu with a pin instead of a long password

First of all, this is a bad thing security wise!

And you are using a Arch Linux instruction on Ubuntu....

The Ubuntu way is:

Step 1

Run update command to update package repositories and get latest package information.

sudo apt-get update -y

Step 2

Run the install command with -y flag to quickly install the packages and dependencies.

sudo apt-get install -y libpam-pwdfile

Ref.: https://zoomadmin.com/HowToInstall/UbuntuPackage/libpam-pwdfile


Before you get infected, and assuming your disk is /dev/sdq,

sudo dd if=/dev/sdq of=/tmp/sdq.mbr bs=466 count=1

Move /tmp/sdq.mbr onto a removable USB key. Remove it and keep it safe.

Then, to check, re-insert the USB key and

sudo dd if=/dev/sdq of=/tmp/sdq.newmbr bs=466 count=1

cmp /tmp/sdq.newmbr /media/USB\ key/sdq.mbr

But, I must point out that you're probably solving the wrong problem. This isn't important.


Canon supply their cnijfilter2-5.40-1-deb.tar.gz from here http://support-asia.canon-asia.com/contents/ASIA/EN/0100839901.html and download and SAVE the package

My summary suggestion would be to

1) install the above package; it does not have a ppd file for the G2000 so it likely will not work;

2) knowing that, let's add a ppd file for the G2000;

3) delete any entries in your PRINTER folder that were created by the first run of the install script

4) re-run the install script: any joy?

Details

1)go here http://support-asia.canon-asia.com/contents/ASIA/EN/0100839901.html and download and save what will be cnijfilter2-5.40-1-deb.tar.gz
open a terminal; paste the commands below into the terminal; hit the ENTER key after each paste

cd Downloads
tar -zxvf cnijfilter2-5.40-1-deb.tar.gz
cd cnijfilter2-5.40-1-deb
sudo ./install.sh

2) EDIT THE PPD FILE: sudo gedit /usr/share/ppd/canong3000.ppd.. see picture below

find the cluster of G3000 entries and change all to G2000; save as

  /usr/share/ppd/canong2000.ppd

and close Gedit

3) delete entries as describe above

4) open your PRINTERS folder; click the ADD button top-left
it should find the G2000; click on till you get to PROVIDE PPD FILE as in photo
.. so click the NONE box; look for your name at the top; when the dialogue box opens; click the LEFT arrow; to the left of your name; go the left of the HOME button and click the little icon to its left; that enters your file system and then navigate to go into /usr/share/ppd and find the canong2000.ppd you created;


Before you continue I should warn you that HP removes any warraty (at least that was my personal experience in Mexico) after you touch the configuration they sold you ( Windows version, Partitions etc.)

In the case you don't care, use the official guide:

https://help.ubuntu.com/community/DualBoot/Windows


Desktop is horizontally stretched and doesn't fit the monitor display space

I tried again after a couple months and found the solution, I decided to post it here since the same problem could affect someone else and the question got an upvote in the meantime.

Basically, the problem was the monitor "clock" setting being way off and failing at auto-adjusting itself with the auto-adjust function.

Step by step solution that worked for me:

Set the desired resolution in the NVidia X-Server Settings application.
Press the auto-adjust button on your monitor.
Look for the "clock" setting in your monitor settings menu, then start reducing its value. My monitor didn't allow it to be reduced below a threshold (it was set at 50 and couldn't go below 0). If your monitor allows you to reduce the clock value as much as you need to, don't look at the steps below.
Press the auto-adjust button again, this put the clock value in the settings to 50 again without setting the picture back to its initial stretched state for me.
Reduce the value of the clock setting again.

If it's not enough yet (like it was in my case, as the picture was very stretched), repeat steps 4 and 5 until the picture fits the screen.


Restore original notification icons after uninstalling Xfce

OP solved the problem by removing the xfce4-notifyd by running sudo apt-get remove xfce4-notifyd.


Try vokoscreen:

Install it

sudo apt-get install vokoscreen

Check Settings

Start


Windows 8.1 bootloader is not working after install Ubuntu 14.04

If you can not see the menu of GRUB on start up, you've to type the shift button of your keyboard when you're turning on you laptop

If you to fix it you've to edit /etc/default/grub file in sudo mode and modify the following line like this :

# GRUB_HIDDEN_TIMEOUT=0

Don't forget to update your grub with this command:

sudo update-grub


The service runs nginx -t (test) before starting the server and this threw up an error:

host not found in upstream "localhost" in /etc/nginx/sites-enabled/default:27

That means you're making a reference to localhost, probably as part of a proxy_pass directive (just guessing) on line 27 of /etc/nginx/sites-enabled/default. And Nginx can't resolve it.

This might be cause for broader concern, but the most simple way around this is to just replace localhost with 127.0.0.1.


Any email client that supports IMAP (which is all of them) can be setup to use Yahoo Mail. Just use the following settings when adding a new account to your email client...

Incoming Server: imap.mail.yahoo.com
Outgoing Server: smtp.mail.yahoo.com
Incoming Port: 993 with SSL
Outgoing Port: 465 with SSL or port 587 with SSL/TLS
-It is necessary to enable SSL or TLS for Outgoing SMTP port.
Username: full email address (for example, free2rhyme@yahoo.com)
Password: the password you use to sign in to your Yahoo! Account


If you need to re-encode certain video file, you doesn't need the previous encoder used to encode the file you have now.

You can either use FFmpeg or similar converter or use online services that'll provide conversion when you upload your file to their service.

Regarding the error message you get, it shows that file is corrupted in the time frame pos. 2241497 . It isn't a problem with FFmpeg.

You can either search for FFmpeg option that'll let you skip certain frames while converting or there are some other converter programs which has the ability to skip error-some frames.

To verify this, try encoding different file.

P.S

If you just need to change the container from mkv to mp4, you should try mp4 Muxer / Re-Muxer program. no need to re-encode. re-Muxer program will extract video data and audio data from your mkv file, then put it inside mp4 container. It'll only take few seconds (depending on your system's resources)


If you change it in the dash, you'll automatically change it in the launcher. So start "main menu" (that's alacarte) from the dash, navigate to Internet and then Firefox. There you can set a new Run-entry (replace firefox %u with optirun firefox %u - whatever optirun is).
You could also edit the launcher manually with sudo vim /usr/share/applications/firefox.desktop and change the Exec line.


Xubuntu uses the XFCE desktop, which is much less resource intensive. Everything else about the distro is pretty straightforward Ubuntu; packages are part of the regular Ubuntu release, so nearly every howto applies

If you want a more minimalistic desktop and still stay within the Ubuntu distros, try Lubuntu which uses LXDE. This is even slimmer than XFCE, but also much more "stripped down" than the other desktops.


Adding PPA's results in "Couldn't resolve host 'launchpad.net'"

Ah ... I've been caught out with this before!  I've been trying to add the webupd8team PPA to my newly installed 12.04

I already had:

export http_proxy=

but webupd8team (and I think launchpad) need:

export https_proxy=


I added the icon to /usr/share/pixmaps , but the name of the icon was not eclipse.xpm instead it was icon.xpm

In the terminal:

cp /yourEclipseFolder/icon.xpm /usr/share/pixmaps/eclipse.xpm


(xenial-backports/main amd64) Packages server certificate verification failed

apt-cache policy gfortran reveals that it is available in main Ubuntu repository. And since this error is about backport repository, you can safely ignore this. Proceed with

sudo apt-get install gfortran

To install the package.

Check this AU question to know about backport repository

  What are the differences between "precise" and "precise-updates" and "precise-backports"?


Why is my Intel Wireless 5100 card performing at half of its capacity?

You can try to edit this file:

sudo -H gedit /etc/modprobe.d/intel-5300-iwlagn-disable11n.conf

change this line:

 options iwlagn 11n_disable=1

to:

 options iwlagn 11n_disable=0

If you do not have that file there may be another cause.


Wired connection doesn't work in Quantal - Toshiba c850

Please open a terminal and do:

   sudo apt-get install linux-headers-generic build-essential
   wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2
   tar -xf compat-wireless-3.5.4-1-snpc.tar.bz2
   cd compat-wireless-3.5.4-1-snpc
   ./scripts/driver-select alx
   make
   sudo make install
   sudo modprobe alx

Your ethernet should now be working.

When a new kernel version is installed by Update Manager, recompile:

    cd compat-wireless-3.5.4-1-snpc
    ./scripts/driver-select restore
    ./scripts/driver-select alx
    make clean
    make
    sudo make install
    sudo modprobe alx


Run this command in Terminal (providing it with the name of the output image file, the name of the directory(s) to copy into the image, and options as desired):

mkisofs -J -r -o your.iso /name/of/directory/with/your/files/


i Have a Computer with Old Configuration and want to install ubuntu

If you try to install 64bit Ubuntu on a 32bit machine, you will receive an error message accordingly.
A 64bit machine however will allow a 32bit Ubuntu installation.

As you said the machine currently uses Win7 32bits, more than likely you should use Ubuntu-32bit.


By default, on Ubuntu, any Linux user which is member of the group sudo or admin is allowed to use sudo to run any commands as root on the system.
But this can be more complex than that.
In fact, the authorizations to use sudo are defined into the /etc/sudoers file. You must edit this file using the visudo command as root.
The default behaviour I've expressed at the beginning of this answer is represented by the line :

%admin ALL=(ALL) ALL
%sudo ALL=(ALL:ALL) ALL

Short overview of this syntax :

First ALL : indicate that members of this group can run sudo from any host
Second ALL : command will be run as the specified user (by default it is root) with sudo -u <username>
The third ALL (on the line with %sudo) specify that the group can also set when running sudo (sudo -g <group name>)
The last ALL indicate that any command present on the system can be run by the concerned users.

Therefore, the syntax (see man visudo for more example) would allow you to specify restriction in a sense that :

A given user is given sudo priviledge
A user or group may be restricted to use only some command
A user or group may be restricted to change to a specify user only

Restrictive example :

operator ALL=(root) /sbin/reboot

which allows the user operator to run only the command /sbin/reboot as root.


How to recover from an apt-get bricked system

As @guiverc suggested, I looked through /var/log/apt/history.log, found the uninstall command that had bricked my install, and reinstalled everything under the "Removed" section.


How to download wine and install to many computers

Will this be the only case where you need to download a package once and install it  on all students' computers?

What about keeping the machines updated?
What if other packages turn out to be necessary in the course?

I can't imagine that you - as a tutor - want to fiddle around with a memory stick all the time.

Since multiple downloads are out of question, you'll have to find a way achieve the following:

download necessary packages (and updates/fixes) once to the tutor's computer, using the recommended way, that is from a repository with ap-get, the SoftwareCenter or synaptic
use your (the tutor's) computer as the local repository for the installation of packages on the students' computers via the local network.

You might want to have a look at the general AptGet How-To and AptProxy for possible directions.


Lubuntu and KDE are 2 Desktop Environments that both lie on top of a similar Linux Kernel.

Lubuntu is a lighter DE yes, meaning you have more resource left to have things open and better all round stability (resource wise)  but that doesn't mean it will run software's faster.


Automatically mirror a directory in Ubuntu

I don't think (or know) how " each time I add a file/folder " could be done easily. But if you are OK with say a once a minute sync, I believe you could put together rsync and cron into a workable solution. I am not sure how efficient rsync is with data on the order of GBs, possibly made mostly of binary data?

A question arises though. If you want to mirror each change immediately, how is that a backup? Wont a mistake/corruption get mirrored instantly as well?

Checkout rdiff-backup if you want a proper backup solution.

But frankly, I would expect your backup drive to fail before dropbox store does.


The significant part of these features of new GNOME Shell are really missed. Some of mentioned issues are partly reported to launchpad. Some people are using Nemo to manage desktop, but it is not expected workaround for enterprise-grade desktop system which Ubuntu is.
If you want to change something more - you can try to report missed features by apport-bug gnome-shell.

As a final remediation fix I would recommend to install Unity or MATE DE instead of GNOME Shell with one of the two solutions below:

sudo apt-get install ubuntu-unity-desktop
sudo apt-get install ubuntu-mate-desktop^

then select one of these sessions on the login screen and as the result to forget this new GNOME sHell nightmare (the Desktop without DESKTOP is a pain, but not the real desktop).


How do I disable touchpad while typying in Ubuntu 18.04 with LXDE?

sudo add-apt-repository ppa:atareao/atareao
sudo apt update && sudo apt install touchpad-indicator

To disable touch-pad while typing, open the program and select the respective option from Preferences -> Actions.
Then add the app to the startup list.
Preferences -> General options tab.


GIMP 2.10 Drop Shadow are in separate layer - how to achieve like in GIMP 2.8

The old version is still available as Filters>Light and shadow>Drop shadow (legacy).
IMHO not worth the effort, because it's not too interactive, the effect is a bit of hit or miss. A drop shadow is easy to do manually:

On layer object: Layer>Transparency> Alpha to selection
Add a layer, fill the selection with the shadow color
Move the layer under the object
Apply Gaussian blur (which is interactive)
You can also shift the shadow layer a bit, and reduce its opacity.


Ubuntu 14.04 disable secondary desktop in Unity

If anyone else out there has this same problem try this answer from Antoniu Mesesan HERE:

xrandr --output NAME-OF-DISPLAY1 --rate 60 --mode 1920x1080 --fb 1920x1080 --panning 1920x1080* --output NAME-OF-DISPLAY2 --mode 1920x1080 --same-as NAME-OF-DISPLAY1

you can get the names of the display and supported output resolutions by simply using the xrandr command

What this does is stacks your desktops on top of eachother so that it appears & behaves as though there is only one desktop. I am sure thre are going to be some glitches (one already is that the Unity System gear launcher menu is displaying off the screen), but it may be worth the work if you need this solution.


During the installation process you'll see a window like this:

Check off the second option, "Encrypt the new Ubuntu installation for security," and your disk will be fully encrypted.

Here's a snapshot of my hard disk, which uses Ubuntu's default LUKS encryption:


Unable to compile programs in Ubuntu with Geany

Did you install build-essential package?

sudo apt-get install build-essential

It contains gcc and g++ compilers for C and C++ languages respectively.


How to modify rootfs of an unprivileged LXC container?

Got it. By using lxc-usernsexec command to execute my container modifying commands.

Man page quote:

NAME
       lxc-usernsexec - Run a task as root in a new user namespace.

SYNOPSIS
       lxc-usernsexec [-m uid-map] {-- command}

DESCRIPTION
       lxc-usernsexec can be used to run a task as root in a new user namespace.

Example for custom /etc/hosts file

lxc-usernsexec cp hosts $HOME/.local/share/lxc/u1/rootfs/etc/hosts


Ubuntu supports two-finger right click on multitouch pads, but there’s no much options in Mouse/Touchpad Settings (due to GNOME changes). However it’s possible to activate secondary click by holding down primary button through Dconf Editor which is pre-installed in Ubuntu 12.10 and 13.04. So:

open Dconf Editor by searching in Dash;
go to org > gnome > desktop > a11y > mouse;
check secondary-click-enabled;

As seen in the screenshot, it’s possible to set the time of long click as well.


Why do all my 16.04 servers in VirtualBox have the same IP address (10.0.2.15)?

@Byte Commander pushed me in the right direction with his comment.

When using NAT, VirtualBox hides all other connections except the virtualized "single" address for that one server. So it's a single, isolated network that happens to be "the same" for all VMs.

You need to create a NAT Network in Preferences to group VMs together.

VirtualBox preferences panel

create a new NAT Network

And you need to connect the VM to that NAT Network (by name) vs just NAT.

pick the named NAT Network


Why did my file-system suddenly become corrupted and why can I not repair it?

Possible reasons for corrupted data :

Improper voltage on component, this may be voluntary (overclocking, not connecting the machine to an Uninterruptible Power Supply) or involuntary (defect in Uninterruptible Power Supply, Power Supply, voltage regulators elsewhere).
Improper shutdown.
Storage got above maximum temperature allowed by manufacturer.
Writing to raw device.
Bad sectors.
Malicious software or script due to human or software security flaw.

You could try to repair the file system using the tool associated to said file system you chosen after making a full image backup of the drive.
If you do not have a favorite imaging tool yet, you may want to check ddrescue and dd man pages.
ddrescue may not be pre installed, use sudo apt install gddrescue ddrescueview to install it.
You can execute it from a livecd's terminal, including the installation part in case the livecd does not come with this tool pre-installed.


using ZTE MF1 HSPA USB Modem in Ubuntu 12.04LTS

What I did in order for my vodafone usb stick, which is of ZTE HSPA + usb stick, to work was:

Go to linux folder and copy paste the .tar.gz file to Downloads
Use cd to go to the downloads which is cd Downloads
Unzip tar.gz file which is tar xvzf filename.tar.gz
Install config file which is ./install.sh in my case