Recurring lsb-release and Software Center glitch after installing MATE

I had the same problem, and decided to run it into the ground (by doing grep -r until I found the script changing those files!).

The culprit is /usr/lib/linuxmint/mintSystem/mint-adjust.py , which is installed by the package mintsystem (on which MATE depends). Apparently it runs at startup, and keeps changing those files to provide Mint-based info.

As you noted, you can recover normal Ubuntu Software Center behavior by putting the correct info in the files:

/etc/issue
/etc/lsb-release
/etc/issue.net

(Fixing issue.net is not really needed to fix Software Center, but here for completeness. It holds system info that's displayed at the beginning of telnet sessions, and Mint writes its system info there, too).

Conveniently, Ubuntu also writes the correct, current system info in a separate set of  matching files which Mint doesn't touch, so you just have to copy them over:

/etc/issue.dpkg-dist
/etc/lsb-release.dpkg-dist
/etc/issue.net.dpkg-dist

I've given up on MATE since I'm happy with Cinnamon running on Ubuntu 12.04, but one fix would be to just comment out the offending lines in this script (you don't have to be a python geek to figure out which section is the problem!)

A more polished fix would be to use the LinuxMint overwrite system (explained in the file /etc/linuxmint/adjustments/README ) to manage the corrections - but I imagine that either of these solutions will be borked once the relevant files are updated (or you update Ubuntu base).

The best solution would be to convince the mintsystem package maintainers that Mint is a victim of its own success - now that many people are installing MATE, even on Ubuntu, it shouldn't be calling mintsystem scripts which assume a LinuxMint base install.

But I will leave that battle to someone else. As far as I can tell, Cinnamon doesn't trigger this behavior, so hopefully I won't run into this problem again. :).

EDIT: For those of you who are interested in trying MATE on Ubuntu, these instructions seem to avoid this problem:

How to install MATE on Ubuntu

The mistake I made is going to the Mint repository (rather than the specific MATE repository) and installing a bunch of packages labeled 'mate', eventually pulling in the mintsystem package, which caused the problem.


In Rhythmbox, is there a way to sort by artist and search by title?

Nothing more than simple. In fact, you should not necessarily use the small search box.

Now, to search by title or whatever you want, just press Ctrl+F or Alt+S and type the text to search.

To play the first track that was found, press Alt+Right Arrow.

After you find what you needed, just press Ctrl+Y to clear the search field text and remove all filters in the browser.

To know more about Rhythmbox's shortcut keys, when you are in Rhythmbox window, go to Help > Contents (or press F1) and select Shortcuts link.


CLI looking/acting strange on a BeagleBone

Answer found. I checked the /etc/passwd file and found that the shell for the user in question was /bin/sh not /bin/bash. Editing the shell fixed the issue.


How to change an order of mount points if a volume is mounted twice?

One solution could be to mount Folder_1 on Folder_2, instead of mounting the device on Folder_2, using bind mounts:

sudo mount /dev/sda1 /media/Folder_1
sudo mount -o bind /media/Folder_1 /media/Folder_2

This way, the device is never mounted on the second folder, but all its files are visible there.


By reporting a Bug you are actually helping the Ubuntu team to fix the issue and resolve it in their next update. Reporting bugs don't help you at that time; but may help them to make it easier to find bugs.

Also, Ubuntu is now Open source. So anyone who has some knowledge about how to fix the bug can contribute to fix it, and such persons are called Bug Fixers.

Reporting Bugs help them to understand that some users are experiencing an issue and it needs to be resolved. So their people will work on it and fix it in their next update.


Network Adapter Problem after Updating HWE

First of all, the package linux-generic-lts-trusty installs the 3.13.0-xx kernel version. http://packages.ubuntu.com/search?keywords=linux-generic-lts&searchon=names&suite=trusty&section=all The newest driver is included in 4.4.0-xx. Please verify the kernel version you have now:

uname -r

If you have anything other than 4.4.0-xx, we'll address a remedy.

Second, the driver you compiled is now deprecated in favor of the in-kernel mt7601u. Let's be sure that the driver you compiled is completedly removed:

cd ~/mt7601/src
sudo make uninstall

Next, these errors:

  [  161.215895] mt7601u 3-4:1.0: Warning: mt7601u_mcu_wait_resp retrying
  [  161.515928] mt7601u 3-4:1.0: Warning: mt7601u_mcu_wait_resp retrying
  [  161.515931] mt7601u 3-4:1.0: Error: mt7601u_mcu_wait_resp timed out
  [  161.820244] mt7601u 3-4:1.0: Error: MCU response pre-completed!
  [  161.820282] mt7601u 3-4:1.0: Error: MCU resp evt:0 seq:7-6!

I have read some reports that suggest these errors may be related to channel changes in the router. In fact, many Linux drivers are sensitive to settings in the router.

Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

Reboot and test. If it is not working as expected, please edit your question to add a new:

dmesg | grep mt76


Clevo w650sr, nvidia 750m driver problem

I have a "Tuxedo Book DC1502" with a Core i7-4702MQ and a Nvidia 750M GT running flawlessly under Ubuntu 12.04.2 (64 bit). The Nvidia 750M GT works properly as I already used it to play Dota 2.

I bought the laptop here (sorry, German only):
http://www.linux-onlineshop.de/Linux-Hardware/Linux-Notebooks/15-6-Zoll/Tuxedo-Book-DC1502-15-6-matt-Full-HD-IPS-NVIDIA-Geforce-GTX-750M-Grafik-drei-HDD-o.-SSD-bis-Intel-Core-i7-4900MQ-bis-24GB-RAM-DVD-o.-Blu-Ray-Brenner.geek
Both the specs and the Bios say, that it's just a rebranded Clevo W650SR, so the following recommendations should also work for your laptop.

To get the Nvidia 750M GT working I did a clean install of Ubuntu 12.04.2 (64 bit) in the standard Bios mode (not UEFI!), updated Ubuntu with apt-get and installed afterwards the proprietary Nvidia drivers and Bumblebee following this guide (sorry, again German only): http://www.linux-onlineshop.de/forum/index.php?page=Thread&threadID=3

The only thing you have to do is to open a terminal and type the following commands (for Ubuntu 12.04):

sudo su
add-apt-repository ppa:bumblebee/stable
add-apt-repository ppa:xorg-edgers/ppa
apt-get update && apt-get -y dist-upgrade
apt-get -y install bumblebee bumblebee-nvidia linux-generic-lts-quantal nvidia-319 && reboot

(currently I'm using the Nvidia driver 325.15, but this is how I started from the beginning)

If you are using Ubuntu 13.04 you should instead type the following commands:

sudo su
add-apt-repository ppa:bumblebee/stable
add-apt-repository ppa:xorg-edgers/ppa
apt-get update && apt-get -y dist-upgrade
apt-get -y install bumblebee bumblebee-nvidia linux-headers-generic nvidia-319 && reboot

After that you can use Bumblebee to run a certain application with your Nvidia card. Just type:

optirun program

in your terminal, where "program" stands for any application you want to run on the 750M GT.

To test the performance increase of the Nvidia card in respect to the integrated Intel HD Graphics 4600 just type:

glxspheres

in the terminal. It's a small graphics benchmark to test the performance.
Now stop the benchmark and type:

optirun glxspheres

The benchmark will run now on your Nvidia graphics card and should show a better performance.

If you want to see the Nvidia settings, just type:

optirun nvidia-settings -c :8

in the terminal.

Hope it helps,
Quando


First time ubuntu Intel GMA3150 on NB30 Plus

Type

sudo apt-get install mesa-utils

in the terminal and then check system info and youtube (to test 720p) everything will be hunky doory.

If you run glxinfo in terminal you should see you have direct rendering.


Root user cannot write to libreoffice folder in Ubuntu 14.04 LTS

To make changes in the directory /usr/lib/libreoffice/share you should have sudo privileges. Ubuntu doesn't use a root account by default, so you have to use append sudo before you run any command that requires root privileges.

For example, if you are trying to edit a file config/soffice.cfg/modules/sglobal/menubar/menubar.xml using nano you should run:

sudo nano /usr/lib/libreoffice/share/config/soffice.cfg/modules/sglobal/menubar/menubar.xml

You could also directly edit this file (without the need to use sudo) if you log-in as a root user by sudo su, but this is highly not  a recommended way.


try disabling fast startup in bios and then try, boot using the dvd,
alternatively you could make a usb bootable using unetbootin
I had the same problem, but unetbootin fixed  it http://unetbootin.sourceforge.net/
here is the link
hope it works, good luck


gnome-screenshot problem with color depth 8, any change to generate screenshots 32 color depth?

I got this hint from Bash script to take screenshot and save the image - Ubuntu. I alternatively used imagemagick and vary the depth using the following (hint from here on imagemagick.org).

  -depth value

  depth of the image.

  This the number of bits in a color sample within a pixel. Use this
  option to specify the depth of raw images whose depth is unknown such
  as GRAY, RGB, or CMYK, or to change the depth of any image after it
  has been read.


Ubuntu 19.04 new install stuck at boot starting hostname service

I am on a system with an nVidia card as well. I am not sure your problem is the same as mine, but in order for me to be able to boot, I had to add nomodeset to the kernel line in the GRUB menu entry.

When the GRUB boot menu is shown, press e to edit the menu entry. Go to the line that starts with linux & add nomodeset to the list of options then press F10 to boot. More details are in this answer.

If that boots your system correctly, make the change permanent by editing /etc/default/grub & adding nomodeset to the value of GRUB_CMDLINE_LINUX_DEFAULT.

For example, change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Then run sudo update-grub.

I also had booting issues when I tried using the nVidia proprietary drivers. I recommend using the open source nouveau driver if you are still having problems after adding nomodeset to GRUB. You may be able to change the driver by dropping to a root shell from recovery mode.

# apt purge xserver-xorg-video-nvidia*

# apt install xserver-xorg-video-nouveau


Remote mount point fails: Prevent unresponsive applications

I am not sure if that helps but have you tried to mount it via sshfs yet? At least in my setup if the remotely mounted drive becomes unavailable, I don't experience any freezes whatsoever. I can't write to the remote drive and applications complain that the location they want to access is not available but that's really all that happens.


Dowload the deb file for Ubuntu, and then, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to  where the file was downloaded, probably the Downloads folder, and run the command(s) below:

Install ib32-libs if you are on 64-bit PC

sudo apt-get install ia32-libs

sudo dpkg -i avg2013flx-r3118-a6926.i386.deb


Eclipse Stop Auto Complete text from being white

You can modify it here : Window > Preferences > General > Appearance > Colors and Fonts. You cannot change font color but you can do it for the background.


I fixed this by softlinking /lib/firmware/brcm/brcmfmac43430-sdio.txt to the txt-file that has pi3 in it's name in the same directory.


Is there a way to fix/repair a damaged storage device?

Attach your device to Ubuntu, then use:

sudo parted -l /dev/sdx

Change x with your device id, e.g: /dev/sdc. you can use parted -l to get a list of all drives/partitions then detect which on is your desired one based on their size.

This command will tell you what partitions with which file systems are living on your device, for example:

 1      1049kB  8186MB  8185MB  primary   ext4

As you can see my drive has "one" partition which has been formated with "ext4".

so I can run:

sudo fsck.ext4 /dev/sdc1

to check and fix inconsistency in this drive, if file system was something like "ext2" I could run:

sudo fsck.ext2 /dev/sdc1

There are a lot of other stuff for other file systems:

fsck.btrfs     fsck.ext3      fsck.fat       fsck.nfs       fsck.xfs
fsck.cramfs    fsck.ext4      fsck.minix     fsck.reiserfs
fsck.ext2      fsck.ext4dev   fsck.msdos     fsck.vfat

Pay attention to "1" in "sdc1", "sdc" is my drive and "sdc1" is my only partition in that drive.

If your file system is NTFS I strongly suggest you to connect your device to a windows and run check disk on windows.


In order to enable the "normal" text start up edit the "/etc/default/grub" and set the option as below

GRUB_CMDLINE_LINUX_DEFAULT=

After editing the file, you need your grup to reflect the new changes,

sudo update-grub


Ubuntu 16.04 not bootable after system update

Ok I solved my problem, and I'm writing an answer in case anyone else had the same problem.

What happened was that the update replaced the grub bootloader with this Linux-Firmware-Updater. All I had to do was to go into the BIOS settings and add a boot option under Boot Sequence. I choose grubx64.efi which is under EFI/ubuntu/. I placed it as the first boot option and everything was back to normal.


Trying to Update Kernel, Not Enough Space, sudo apt-get -f install failing too

Since you have run out of space, apt won't run; and thus, any automated fix will also fail. You need to manually free up some space in the /boot/ directory. One way to do this is delete the system maps for the kernels you are going to remove. If this doesn't give enough room, delete the initrd for some of the kernels. Note: you will need root privelage to remove files in /boot/.


DaVinci Resolve 16 doesn't work on Ubuntu Studio 20.04 LTS

Now I would like to post this as a comment but I can't yet... Here are some steps that you can start with:

Do you have libOpenCL.so installed and available to the app? see if there's anything missing in ldd /opt/resolve/bin/resolve | grep OpenCL
If it is not installed, you might want to try installing ocl-icd-opencl-dev, as described here: How to install libOpenCL.so on ubuntu, since this package is also listed as a prerequisite for installing davinci resolve in this article: https://www.fosslinux.com/24381/how-to-install-davinci-resolve-on-ubuntu.htm
Make sure libOpenCL.so is in your ldconfig cache: ldconfig -p | grep OpenCL, if not, update it with ldconfig, then run sudo dpkg-reconfigure davinci-resolve

If that doesn't help, this article (where I also found most of the other information) lists some more things you can try: https://bashbaug.github.io/opencl/2019/07/06/OpenCL-On-Linux.html (see section "Troubleshooting OpenCL on Linux")


How to install Google input tools in Ubuntu 17.04

You cannot install it for general use on Ubuntu, as it is only available as a general download for Windows.

If you use Chrome or Chromium for your browser, however, you can install the extension from the Chrome extensions store, to use within the browser.

There are links to install it from https://www.google.com/inputtools/try/


The best emulator I can reccommend for most platforms is Retroarch

sudo add-apt-repository ppa:libretro/stable
sudo apt-get update
sudo apt-get install retroarch retroarch-* libretro-*

This is a multi emulator frontend and it supports

PlayStation 1 (emulator: PCSX ReARMed)
Super Nintendo (emulator: SNES9x Next)
Nintendo Entertainment System (emulator: FCEUmm / NEStopia)
GameBoy / GameBoy Color (emulator: Gambatte)
GameBoy Advance (emulator: VBA Next)
Arcade (emulator: Final Burn Alpha)
Neo Geo Pocket Color (emulator: Mednafen NGP)
Virtual Boy (emulator: Mednafen VB)
Sega Genesis/Mega Drive (emulator: Genesis Plus GX)
Sega Master System/Sega Game Gear (emulator: Genesis Plus GX)
Sega CD / Mega CD (emulator: Genesis Plus GX)
PC Engine / PC Engine CD (emulator: Mednafen PCE Fast)
WonderSwan Color / Crystal (emulator: Mednafen Wonderswan)
Cave Story (game engine: NX Engine)
Doom 1 / Doom 2 / Ultimate Doom / Final Doom (game engine: prBoom)

It has an interface based on the PS3 XMB and uses a core system to load games, supports renderes, shaders etc and is easy to set up, you can find a detaild getting started tutorial here.


Recursive rename to remove the end of multiple filenames in a folder

I assume your current working directory is the one that contains the files you want to rename, like in this example:

$ tree

.
├── FILE1[file].doc
├── FILE2[file].doc
├── FILE3[file].doc
└── subdir
    ├── FILE1[file].doc
    ├── FILE2[file].doc
    └── FILE3[file].doc

Now you can run the following command to recursively list all files in the current directory with the extension .doc:

$ find . -type f -iname '*.doc'

./subdir/FILE3[file].doc
./subdir/FILE2[file].doc
./subdir/FILE1[file].doc
./FILE3[file].doc
./FILE2[file].doc
./FILE1[file].doc

To rename all those files and remove the [file] part right before the .doc extension (if it is present) from each name, run this:

$ find . -type f -iname '*.doc' -exec rename -v 's/\[file\](?=\.doc$)//' {} +

./subdir/FILE3[file].doc renamed as ./subdir/FILE3.doc
./subdir/FILE2[file].doc renamed as ./subdir/FILE2.doc
./subdir/FILE1[file].doc renamed as ./subdir/FILE1.doc
./FILE3[file].doc renamed as ./FILE3.doc
./FILE2[file].doc renamed as ./FILE2.doc
./FILE1[file].doc renamed as ./FILE1.doc

This executes the command rename -v 's/\[file\](?=\.doc$)//' FILES, where FILES is replaced with the list of files returned by the find command shown above.

What the rename 's/PATTERN/REPLACEMENT/' does is to apply the regular expression pattern \[file\](?=\.doc$) (matches the exact string "[file]" if followed by the exact string ".doc" at the end of the line) to each of the specified file names. If it matches, that matching part of the file name is replaced with the replacement string, which is empty in our case.


Unable to get read write permissions on internal hard drives

If the drive was mounted as root, your regular user probably doesn't have permission to do anything because the mounted directory is owned by the user root and group root.

You can run below to see who owns control of the mounted drive

ls -la

To change permissions to your user to be able to utilise the drive, substitute below username and groupname as your username you set and the /directory as folder your drive is mounted too.

sudo chown -R username:groupname /directory

If you still have problems accessing the drive to add/remove files you may need to set permissions of the files and directories as well.


How do I get a Lexmark T652 printer working?

In command line input/type following command:

usermod -l new_user_name old_user_name

new_user_name is the user name requested by printer.
Also need to change the password.


Are there are any pdf viewers that currently support video?

It seems the example you're trying to play is not just a video, but also Flash. It has an embedded Flash video player, which is then used to play the videos in the example document you listed.

I am not aware of any PDF viewers on Linux that support embedding Flash (or any other browser plug-ins). Even Chromium doesn't seem to support Flash in PDFs.


Updating to linux-image-3.2.0-26-generic occupies all disk space

OK my system is back in a healthy state.

First: "Is it asking for trouble to kill the update manager". Yes, it definitely is!

I couldn't free any disk space manually, and I couldn't remove any packages while the update manager was in progress, so I decided to terminate update manager and reboot the system.

The system couldn't boot normally but in recovery mode I could open a root command line. From here I could see that the above mentioned file was now only 4KB. I have no idea what happened in between or why it became 63GB in the first place.

In Recovery mode only the Root prompt worked, any thing else was just hanging. To get the system up and running I did:

In the GRUB menu edit the recovery mode to mount / as RW.
Enter recovery mode.
Go to the root command line.
Fix packages using: dpkg --configure -a.

So the only question remaining is why /lib/modules/3.2.0-26-generic/modules.ccwmap took up 63GB during installation.


looking for docker-compose in the wrong directory

Check if /usr/local/bin is in your PATH by running:

echo $PATH

If it isn't in the colon separated list of directories, add it to your PATH so bash can find the executable:

export PATH="/usr/local/bin:$PATH"


Why can't I open files and locations across a home network?

You have to check Folder sharing options - right-click on shared folder and choose Properties-->Share. The section "Allow others to create and delete files in this folder" has to be checked.

Here you can find useful info how to setup samba on Ubuntu 11.04


Setup iptable with preventing ab -n 100000 -c 1000

Finally the solution is:

iptables -A INPUT -i eth0 -p tcp --dport 80 -m hashlimit --hashlimit 1000/sec --hashlimit-burst 5000 --hashlimit-mode dstip --hashlimit-name hosts -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 80 -j REJECT

Do not block SE-crawlers packets and resists against http-flood like: ab -n 1000 -c 100 http://{host}/


What happens to a symbolic link when the original file is replaced?

Summary

Symlinks do not follow the files to which they point. If you have link_file -> original_file and you do mv original_file original_file.backup the link_file will be broken
If you recreate original filename ( which is what OP did ) the symlink will work again
If you have to  make link_file -> original_file.backup, you have to delete link_file and create it again, pointing to new filename

Answer

  What happens to symlink if we rename a file ?

Once you move a file to which symlink points, symlink is broken aka dangling symlink. You have to delete it and create new one if you want to point to the new filename.

For example, let's create a symlink to file:

$ ln -s testfile.txt mysymlink
$ ls -l mysymlink
lrwxrwxrwx 1 adm adm 12 Dec  8 13:28 mysymlink -> testfile.txt

Now let's rename the file. You will see symlink still points to the pathname that no longer exists (which is important, file exists, pathname - does not):

$ mv testfile.txt testfile.txt.bak
$ ls -l mysymlink
lrwxrwxrwx 1 xie xie 12 Dec  8 13:28 mysymlink -> testfile.txt
$ cat mysymlink
cat: mysymlink: No such file or directory

  How to fix a broken symlink ?

If you can rename file to original pathname, the symlink will start working.

$ mv testfile.txt.bak testfile.txt
$ cat mysymlink
one two three

If renaming is not an option and you may not rename the file, create a new symlink and delete the old one.

# break the symlink
$ mv  testfile.txt testfile.txt.bak
$ cat mysymlink
cat: mysymlink: No such file or directory
# remove the old symlink
$ rm mysymlink
# create symlink with same filename but pointing to new pathname
$ ln -s testfile.txt.bak mysymlink
$ cat mysymlink
one two three

  OP question: Did the link move to the new program minergate.cli?

If the symlink target /opt/minergate-cli has been re-created when new version of application was installed, the symlink will point to new  file. If the new file has different filename, then symlink will be broken. Symlinks do not follow filename if filename was moved, as in OP's example when they did mv /opt/minergate-cli /opt/minergate.old , so symlink will still keep pointing to /opt/minergate-cli regardless if that file exists or not.

See also

https://unix.stackexchange.com/a/18365/85039


Why some webpages are not opening in firefox?

Try to browse a page that doens't load, using the IP. For instance try Yahoo at  http://98.139.102.145

If the page loads, then most likely you have a DNS issue. Then you could try a different DNS provider like OpenDNS or Google DNS.

You could also try DNS Flusher


fail in installing Google Chrome in 12.04 both 32 & 64 bit

The correct app is dpkg, not dkg.Also correct extention is .deb and not .web.

So your command must be sudo dpkg --install /Absolute/Path/to/chrome.deb

  Absolute path means you start from /home/{user}/ and not from you home directory.

For example, consider you have stored your file in abc/def/chrome.deb.
Then your command will be sudo dpkg --install $HOME/abc/def/chrome.deb or sudo dpkg --install /usr/<whatever your user name may be, mine is aditya, so I'll put aditya here.You put your's>/abc/def/chrome.deb

An easier way,right click the .deb package and select open with Ubuntu software center.Then select install.

An third way, install gdebi by using this command.sudo apt-get install gdebi.Then right click on your file,select open with gdebi and click install.


How do I install an older version of the php5-mhash package?

Well if anyone is facing this problem I figured it out.

Download and install it manually

Here are the steps:

(I'm using the Karmic Repo to match the version I have pinned)

Download the matching version from here. Installed on my box is this version php-common 5.2.10.dfsg.1-2ubuntu6 So this is the version I downloaded

Then I manually installed the package like this:

sudo dpkg -i php5-mhash_5.2.10.dfsg.1-2ubuntu6_i386.deb

Output:

Selecting previously deselected package php5-mhash. (Reading database
... 357032 files and directories currently installed.) Unpacking
php5-mhash (from php5-mhash_5.2.10.dfsg.1-2ubuntu6_i386.deb) ...
Setting up php5-mhash (5.2.10.dfsg.1-2ubuntu6) ...

Note: I did install the wrong version before finding the correct version to download and install. The output was something like this:

$ sudo dpkg -i php5-mhash_5.2.6.dfsg.1-3ubuntu4_i386.deb
Selecting previously deselected package php5-mhash.
(Reading database ... 357032 files and directories currently installed.)
Unpacking php5-mhash (from php5-mhash_5.2.6.dfsg.1-3ubuntu4_i386.deb) ...
dpkg: dependency problems prevent configuration of php5-mhash:
  php5-mhash depends on php5-common (= 5.2.6.dfsg.1-3ubuntu4); however:
    Version of php5-common on system is 5.2.10.dfsg.1-2ubuntu6.
dpkg: error processing php5-mhash (--install):
  dependency problems - leaving unconfigured
Errors were encountered while processing:  php5-mhash

Running this to fix the broken install:

sudo apt-get -f install

Output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer
required:
  libmhash2
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  php5-mhash
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 69.6kB disk space will be freed. Do you
want to continue [Y/n]? y
(Reading database ... 357033 files and directories currently installed.)
Removing php5-mhash


Folder sharing ubuntu 12 - revoke permissions

It seems a reboot was required... facepalm


ssh man

  -X' Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file.

Running ssh -X user_name@machine_ip will log you into the remote machine, with X11 forwarding.

The meaning of X11 forwarding means that you'll be able to execute GUI commands on the remote machine, and the GUI will be shown on your local screen.

e.g. you will be able to run on the remote machine:

Ubuntu System Monitor using:

gnome-system-monitor

Firefox using:

firefox

You can try to  start the GNOME desktop environmen using:

gnome-session


Your topology is incorrect. You are using the same prefix (2001:db8::/64) on multiple subnets. To get routing to work you have to use different prefixes. For example 2001:db8:cafe:1::/64 between hosts 1 and 2, and 2001:db8:cafe:2::/64 between hosts 2 and 3.


Using a Huawei 366 broadband stick with Ubuntu 12.04 LTS 64bit and getting a faster connection than GSM

Get this deb (but before you do browse the website to make sure it solves your problem and I'm not sure if it runs on 64 bit), http://mwconn.net/download_ixconn.html , then sudo dpkg -i ixconn.deb  then sudo apt-get install -f to satisfy the dependencies (if any) .

On the first run you'll be required to configure  , follow the instructions then go to network tab type in your APN, go to connection tab and check all in "Automaticlly" , go to monitoring then set "Display connection errors" to 0 and "Connection error tolerance" all to 0, on their website they say:

Please note: To allow a user to connect to the Internet, you may want to give him/her the necessary access rights. To do so, open System→System Administration→User and group accounts, then click on the key ring, select  the user, klick on settings and check the two list entries whose names include the word "modem". logout then back in.

For this you'll need gnome system tools, why canonical removed it in precise is beyond me so we do :

sudo apt-get install gnome-system-tools

Now run ixconn and right click on the window and make sure "UMTS only" and "Connect automaticly" are checked.

If it connects to the internet but you cant browse the net , then one last thing you'll need to do is edit your resolv.conf file , back it up before editing. sudo gedit /etc/resolv.conf , change the nameserver to 8.8.8.8 or if you prefer opendns or what ever dns you use.

# Generated by NetworkManager

nameserver 8.8.8.8


Please can I get some help to install my Canon TS6350 printer scanner on 20.04

Underneath where it says Ready to Scan there is a drop down that lists the available printers (in this case an HP Printer).

Select a printer from the drop down (retry if necessary) and (in the case of the OP) it offered a pdf file to save and it worked thereafter.


I am wondering how I can have more fine control over that on my system.

You can fine tune when snaps update by editing the refresh schedule via the command:

sudo snap set core refresh.schedule={time-frame (24 hr time)}

You can only set the refresh schedule within a 24hr time-frame though.

An example would be:

sudo snap set core refresh.schedule=4:00-7:00/19:00-21:00

This will set the refresh schedule to only between 4-7 AM to 7-9 PM.

However if you haven't updated recently snapd might forcible update outside of the specified time-frame.

  Does that mean that if I set automatic updates to never the snaps will never update unless I do a sudo snap refresh? Or will they still update?

No, it will still automatically update unless you edit the 24hr time-frame in which it updates unless you want to mess around blocking the updating servers in the iptables.


How to enable mouse acceleration in 14.04?

I use below command for that purpose

xset m 50 1

Where m stands for setting the "mouse" and the first integer represents the "acceleration", and the second represents the "threshold".

The  acceleration  can be specified as an integer, or as a simple fraction, but the threshold is just an integer.

The pointer will go acceleration times as fast when the device travels more than threshold mickeys in 10 ms, including a  small transition range.

For more information, you can refer to the xset manual.


Do files at /etc/apt/sources.list.d need to have an extension '.list'?

Yes, names of files in /etc/sources.list.d must end in .list for lines in the files to be taken as specifying software sources that ought to be used. Otherwise, the files may be taken to have a different meaning.

sources.list

From man sources.list (1):

  NAME
         sources.list - Package resource list for APT

  DESCRIPTION

  The package resource list is used to locate archives of the package
  distribution system in use on the
         system. At this time, this manual page documents only the packaging system used by the Debian GNU/Linux
         system. This control file is /etc/apt/sources.list.

  The source list is designed to support any number of active sources
  and a variety of source media. The
         file lists one source per line, with the most preferred source listed first. The format of each line
         is: type uri args The first item, type determines the format for args.  uri is a Universal Resource
         Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator,
         or URL. The rest of the line can be marked as a comment by using a #.

  SOURCES.LIST.D

  The /etc/apt/sources.list.d directory provides a way to add
  sources.list entries in separate files. The
         format is the same as for the regular sources.list file. File names need to end with .list and may only
         contain letters (a-z and A-Z), digits (0-9), underscore (_), hyphen (-) and period (.) characters.
         Otherwise APT will print a notice that it has ignored a file if the file doesn't match a pattern in the
         Dir::Ignore-Files-Silently configuration list - in this case it will be silently ignored...

sources.list.save

The .list.save files are some kind of work/backup files:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614398
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/611925

Links:

http://manpages.ubuntu.com/


Ubuntu "sort -k " not working for all columns in file

The difference is probably to do with the default locale for the two systems, specifically the collation weight of leading whitespace.

First, it is important to note that sort delimits on a non-blank to blank transition by default - not blank to non-blank. So when you have a columnar file that uses multiple whitespace characters for alignment, those extra alignment characters are considered to be part of the following field. You can see how this affects your results by adding the --debug flag.

[NOTE: I'm going to use the C locale here, since it exhibits the behavior you are seeing and I don't know what your actual locale is]

$ LC_COLLATE=C sort --debug -k5 file
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying 'b'
00018  Jiminy      Cricket   Disney              Europe         Tuscon0y
                                   _____________________________________
________________________________________________________________________
00019  Speedy      Gonzales  Cats_Meow           North_America  Guadalajara
                                      _____________________________________
___________________________________________________________________________
00017  Jasmine     <tbd>     Disney_Princess     Asia           Desert_Sands
                                            ________________________________
____________________________________________________________________________
00013  Snow        White     Disney_Princess     Europe         Enchanted_Forest
                                            ____________________________________
________________________________________________________________________________
00016  Wiley       Coyote    Roadrunner_Nemesis  North_America  La_Paz
                                               _______________________
______________________________________________________________________

Here you can see that what's actually happening is that it is sorting on column 5, however once you take into account the leading whitespace, the result is that it sorts in order of most-to-least leading whitespace.

Likewise when you use -k6, it really is sorting on the 6th column, coincidentally however that gives the same order as an alphabetical sort on the column 5 geographical regions (just because Asia happens to be short and North_America is long)

$ LC_COLLATE=C sort --debug -k6 file
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying 'b'
00017  Jasmine     <tbd>     Disney_Princess     Asia           Desert_Sands
                                                     _______________________
____________________________________________________________________________
00013  Snow        White     Disney_Princess     Europe         Enchanted_Forest
                                                       _________________________
________________________________________________________________________________
00018  Jiminy      Cricket   Disney              Europe         Tuscon0y
                                                       _________________
________________________________________________________________________
00019  Speedy      Gonzales  Cats_Meow           North_America  Guadalajara
                                                              _____________
___________________________________________________________________________
00016  Wiley       Coyote    Roadrunner_Nemesis  North_America  La_Paz
                                                              ________
______________________________________________________________________

The simplest solution is given in the debug output:

sort: leading blanks are significant in key 1; consider also specifying 'b'

i.e.

$ LC_COLLATE=C sort --debug -b -k5 file
sort: using simple byte comparison
00017  Jasmine     <tbd>     Disney_Princess     Asia           Desert_Sands
                                                 ___________________________
____________________________________________________________________________
00013  Snow        White     Disney_Princess     Europe         Enchanted_Forest
                                                 _______________________________
________________________________________________________________________________
00018  Jiminy      Cricket   Disney              Europe         Tuscon0y
                                                 _______________________
________________________________________________________________________
00019  Speedy      Gonzales  Cats_Meow           North_America  Guadalajara
                                                 __________________________
___________________________________________________________________________
00016  Wiley       Coyote    Roadrunner_Nemesis  North_America  La_Paz
                                                 _____________________
______________________________________________________________________


How can I distribute a file across multiple systems in a network?

suppose that you have your IP addresses in a file named ips.txt, each IP in a line. create a file named, for example *scp_all.sh* and copy the following text bellow in it:

#!/bin/bash

while read LINE ; do
    scp $1 root@$LINE:$1
done < ips.txt

then execute it in this way:

./scp_all.sh /home/yaroo/Desktop/1.jpg

this is a really simple script, while it supposes that your username in all computers is root, it doesn't store password and you have to enter it each time, and it doesn't have any exception handler.
if you want to change the destination address, change the second $1 in scp command with $2 and use the script in this way:

./scp_all.sh /home/yaroo/Desktop/1.jpg /home/yaroo/Downloads/just_copied.jpg

I've said that you have to enter your password for each computer, but if you have decided to use this script regularly, you can solve this problem by this simple 6-step solution described here.
good luck ;-)


Lenovo ThinkPad E550 Touchpad Not Working After Forced Shutdown (Ubuntu 14.04)

After much struggling, I found a solution that worked for me, and will hopefully work for others who run into a similar issue. Following the instructions here, I removed all my alps folders in /usr/src/ and finished the instructions to no avail (I did install everything like they said and it's still in /usr/src/, so it may've helped). After deleting the folders, neither my trackpad nor the pointing stick nub on my keyboard would work (an external USB mouse still worked). I then ran sudo apt-get install xserver-xorg-input-synaptics-dev as described here. I rebooted my computer, and both my touchpad and the pointing stick nub work again! I didn't even need to do anything else described in the second link. I hope that someone, somewhere may find this helpful one day!


I found the working solution of my problem. Due to X server configuration you can not connect to it in init scripts, though i tried to configure X server to allow incoming connections to a tcp port i had no success to connect. So i launched my program when X starts by adding the display-setup-script=path_to_script in /etc/lightdm/lightdm.conf.
The solution i found here: Launch a program when X starts


Squid proxy not working, using Ubuntu Server 10.04 and two NICs. One is connected to WAN and other to LAN

Have you tried to ping www.google.com? If you don't get a reply there might be a problem with your squid setup or iptables. If you can install bind9 for DNS support. Hope it helps.


how to troubleshoot sluggish / really slow UI?

A server class hard drive can probably reach throughput as high as 100MB/s, where as a low end USB2 thumb drive might reach only 5 MB/s. So the difference in performance could be more like 20x, not the 10x you're assuming. (See this Tom's Hardware review to compare throughput numbers yourself.) Keep in mind that neither drive saturates its interface, so comparing SATA's 3Gb/s to USB's 480Mb/s isn't practical…

If you want to compare practical throughput, try some of the advice in this Q&A: How to monitor disk activity?

Having tried to run an OS off a USB2 thumb drive myself, I can tell you that it's going to be painfully slow. If you have a USB3 interface, you can get much, much better throughput if you pick the right thumb drive: some drives can exceed 100Mb/s. The Tom's Hardware link above includes a good comparison of USB3 vs USB2.

One of the non-obvious factors in thumb drive speed is that drives with more NAND chips are (all other things being equal) faster than drives with fewer NAND chips. So a 64GB drive is faster than 32GB, 128GB is faster than 64GB, etc.

One last thought: if swap is enabled on your thumb drive OS, try disabling it. Swap is used even when you have lots of physical memory (e.g. this Q&A) and if you are have tight I/O constraints, then it might be a good tradeoff to disable swap.


How to create a keyboard shortcut for a terminal command

You can use bind -x to bind a command to a shortcut in Bash. For example, to bind git status command to Crtl+p shortcut you can use:

 bind -x '"\C-p":git status'

Put it into ~/.bashrc file to remember it. From man page:

  -x keyseq:shell-command

  Cause shell-command to be executed whenever keyseq is entered. When shell-command is executed, the shell sets the
  READLINE_LINE variable to the contents of the Readline line buffer and
  the READLINE_POINT variable to the current location of the insertion
  point. If the executed command changes the value of READLINE_LINE or
  READLINE_POINT, those new values will be reflected in the editing
  state.


Ubuntu Server 12.1 CDrom issues after install

In Linux, devices must be mounted to a location in the filesystem before they become accessible for reading or writing. In the case of Ubuntu desktop editions, CDROMs are typically automounted, but in the case of the server editions they must be mounted manually. The general format for that is

mount [-fnrsvw] [-t vfstype] [-o options] device dir

where device is the block device (typically /dev/cdrom for CDROM devices) and dir is the filesystem location where you want the device to be mounted (the mountpoint). In the case of CDROM devices, the vfstype (filesystem type) should be detected automatically, and other options are probably not needed, so it should be sufficient to do

sudo mount /dev/cdrom /media/cdrom

so long as the mountpoint /media/cdrom exists - if not you can create it with

sudo mkdir -p /media/cdrom

You will then be able to access the CDROM contents by going to /media/cdrom i.e.

cd /media/cdrom

Of course you are free to mount at /cdrom instead of /media/cdrom if you prefer.


Xubuntu 13.10 position of remote cursor (teamviewer, x11vnc) does not change

I am using xrdp directly connecting using windows remote desktop

apt-get install xrdp -y
chkconfig --levels 35 xrdp on
service xrdp start

Once installed on destination, connect with remote desktop using

Module: sesman-Xvnc
username: your username (not the name of your account shown on login desktop, use your UserName)
password: your password


how can i stop the mouse from opening docs, etc with one click in ubuntu?

Check out Nautilus setting...

Edit->Preferences->Bihavior tab:

Single click to open items
Double click to open items

The following command should also do the job:

gsettings set org.gnome.nautilus.preferences click-policy double


The Software center won't start anymore how to fix it?

I recently had the same problem with 14.04. Each time the computer started a dialog would appear stating - System program problem detected -do you want to report it now? When I tried to report it after awhile it would state that I didn't have enough ram to do it, and so I had to try to solve the problem myself. I realized that Ubuntu hadn't been updating my system lately which was quite unusual so I clicked on the Software Updater and it wouldn't connect either. My next approach was to open synaptic and look for anything that might help me. I noticed that the square in front of the update manager was gray with an exclamation mark which meant it needed to be upgraded. I right clicked on it and selected upgrade marked the other file it selected applied it, and after it finished quit synaptic. This time the system updater worked, and after downloading and installing about 210 mega-bytes and restarting, Ubuntu software center was working again. That' all I can tell you. I'm not an expert.


Dual boot Windows 7 and Ubuntu, SSD + HDD

I actually did this for myself a few months ago. The process is a bit long, and read through the entire thing before you make any decisions as to whether you want to do it or not. You will need to change your registry, and although I have not experienced any problems so far, you may if you don't do everything as I did.

First, set up your partitions in a Ubuntu live disk. Copy all your information to a safe volume in case something happens. Then, wipe all your drives.

Install Windows first. When you create your account during installation, choose a spare account name. It doesn't matter what this name is, except for the fact that it cannot be the name you want to use in the future. I would call it something like "spare."

After installing Windows, create an account with your real account name, but do not log into it yet. Go into regedit, and change all instances of C:/Users to D:/Users (or whatever drive you have your storage on, be it D:, E:, F:, G:, etc. Don't change anything like C:/Users/Administrator, though, only the ones with C:/Users and the ones that would pertain to you.

After doing this load of registry edits, go and restart your computer and log into your new account. If you've done everything right, your new account's profile should be in the drive you had set it to be.

If it is, great. Delete the spare whose account is still on C:/. Do whatever you want on Windows, and after that, install Ubuntu.

I can expect that you can install Ubuntu without any instruction. During installation, I installed my user folder in the normal directory in the same partition as my main installation. I then created symlinks on my user folders by using the commands:

rm -r ./Documents
ln -s /media/Storage/Users/Tyler/Documents ./Documents
rm -r ./Downloads
ln -s /media/Storage/Users/Tyler/Downloads ./Downloads
rm -r ./Music
ln -s /media/Storage/Users/Tyler/Music ./Music
rm -r ./Pictures
ln -s /media/Storage/Users/Tyler/Pictures ./Pictures
rm -r ./Videos
ln -s /media/Storage/Users/Tyler/Videos ./Videos

Tyler is my username on Windows, and Storage is the name of my storage partition.

These commands don't include the templates and the Desktop folder, although I expect that they would be easy to implement.

These symlinks do not have the pretty images, and I have not found a permanent fix for that at this moment. I can set the icon image, but it is reset. I suspect that this is because it needs to mount every time I start up, and that resets the images. I'll post a fix if I find one.

If you want to automount your storage partition upon startup in Ubuntu, you'll need find which partition to mount. In a terminal, use

sudo fdisk -l

You should receive a list of partitions. Mine looks like this.

tyler@Tyler-PC:/$ sudo fdisk -l
[sudo] password for tyler:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf64a0fce

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   125831167    62914560    7  HPFS/NTFS/exFAT
/dev/sda2       125831168   188745727    31457280   83  Linux
/dev/sda3       188745728   608364543   209809408    7  HPFS/NTFS/exFAT
/dev/sda4       608364544   625141759     8388608   82  Linux swap / Solaris
tyler@Tyler-PC:/$

Search "Startup Applications" and add the command

udisks --mount /dev/sda3

sda3 should be replaced with the one for the disk you have. I had remembered that I had set mine to sda3 when I made my partitions. Also, it is my largest.

After that command, upon startup, you shouldn't need to navigate to your storage partition via nautilus to mount it. I'd only discovered that fix yesterday; as I use Eclipse to develop in Java, needing to mount it via nautilus every time was extremely obnoxious.

Good luck!


18.04 VPN l2tp issue - connects but no access to resources

I've seen settings that help. Your mileage may vary but ... working in my situation on 18.04.1 and derivates.

replace strongswan by libreswan

sudo apt-get install libreswan

don't use systemd-resolved :

sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop

sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
# add this line :
dns=default

restart network-manager

sudo rm /etc/resolv.conf
sudo service network-manager restart


How to tell which graphics card is being used in a hybrid system?

Optimus always use intel card to render the images (the images may be generated by nvidia card or intel card) in attached display. Maybe the HDMI port is connected to nvidia card. You have to test it. Otherwise it is always intel.

To use nvidia card you must use bumbleebee (+primus for better performance.)

Run glxgears to confirm, (it is not benchmark tool).

If you the fps is 50-60 then it is intel,

for nvidia you should got 600-800 in nvidia. (result are from 540m, so your card should do better )


Open file dialog showing white squares instead of text after upgrading LTS from 16.04 to 18.04

I'm sure there's some other way to fix this, but I uninstalled Atom and reinstalled it on my Ubuntu 18.04 to "fix" the problem.


Does gnome-schedule run things on startup if the run time is missed?

Gnome-schedule is just a GUI to cron. Cron itself doesn't support what you're asking for but anacron does. Examples of its usage are in the link provided in Ward's comment.


Found a laptop that I like, but it's not completely compatible with Ubuntu. Questions

Your link shows him using 11.10. I trump that with a link that uses 12.04 and it looks like it improved a fair bit.

Regarding the questions:

No-one knows. Not even AMD ;)
Yes, in case of the AMD drivers it is cross platform.  The installation of the Catalyst driver even state so:

Instructions for any general Linux system (recommended):

Download the latest AMD Catalyst™ Proprietary Linux x86 Display Driver from here. The latest driver works the best, and although it has "x86" in the name, it works on 64-bit machines as well.
Go to a terminal. Know where you saved the amd-driver-installer-XX-XX-x86.x86_64.run file.
Run the command cd /path/to/amd/driver , replacing /path/to/amd/driver with the location you saved the driver installer to.
Run the command sh amd-driver-installer-*-x86.x86_64.run .
Enter your password when the prompt for it pops up.
Follow the default installation configuration. If the installer refuses to install, it's probably because you have FGLRX already installed. Follow the third bullet of the instructions in the 'FGLRX troubleshooting after upgrading' section below and retry these instructions from step 4.


With these kind of problems "usb not burned correctly" usually turns out to be the problem most of the time. Try and recreate another ubuntu bootable usb stick - usually the latest version is the best even if you created the one you have a few months ago. From experience its usually the usb bootable disk when this errors happen. Goodluck.


Or from the terminal -

sudo add-apt-repository -r ppa:<ppa to remove>

Or, edit the /etc/apt/sources.list to find your ppa there, and remove from there manually (or automatically).

Or, remove the ppa file from /etc/apt/sources.list.d in newer versions of Ubuntu.


I'm sorry but your computer is not powerful enough to run current Ubuntu well. In my experience you will need at least 1 Gb of RAM for smooth execution.

You can try a light weight Ubuntu remix like Lubuntu, it should run fast enough in your setup, but it will lack some features and eyecandy.


I am trying to torrent and install games

Most games aren't programed for Linux, save for a few.

If you are asking how to play Windows games in Linux then install either WINE, PlayOnLinux, or Crossover Linux (the last one you have to pay for, so I just use Wine).

If you are asking how to torrent in Ubuntu, then you can use the Bittorrent app that comes with Ubuntu: Transmission.

If you are asking where to find torrents for Linux, you can try here: Torrentz2.

Hope this helps :)


Theres two options to boot an Operating System from..

MBR (Master Boot Record) Boot sector at very beginning of Disk drive
Boot Sector of each partition

some OS's like MS.Windows affects MBR and you need to place grub boot loader at MBR.
for this purpose:

Step 1:  Boot up your system with any grub installed emergency disk.
(like : Gparted Emergency, HBCD, Bootable Grub, or Puppy linux)

Step 2:  Run gparted program or this command: df and determine what is your drive name (result is like: /dev/sda) without any number at end of /sda

Step 3:  if grub is preinstalled then run these commands in shell (terminal):

sudo grub-install /dev/sda
sudo grub-setup /dev/sda

and if its not installed,do this command:

sudo apt-get install grub

anyway you need to edit /boot/grub/grub.cfg to enable resume function (Hybernate)


Cannot install packages properly with pip

With Python, it's generally recommended to install your dependencies in a virtual environment. In that way, you don't pollute the system's Python libraries with your own. Furthermore, it allows you to install different versions of the same package in separate virtual environments, which might be useful if you are working on multiple projects.

With Python 3 on Ubuntu, you first have to install python3-venv to be able to create virtual environments. Here are all commands you have to run:

$ sudo apt-get install python3-venv
$ pyvenv env
$ source env/bin/activate
$ pip install numexpr
$ python  # The library is now available and you may import it

If you are using Python 2, you will have to install the 3rd party tool virtualenv instead to create and use the virtual environment, since it doesn't come with one built-in. Note though that its commands are a bit different.


Why is my storage partition xxGB, when Disk Utility, and Gparted say otherwise?

If I remember correctly, Nautilus as switched to using base-10 representations of data (rather than the actual base-two conversion) whereby 1GB equals 1,000,000,000 bytes instead of 1,073,741,824 bytes.

This doesn't explain the difference between gparted and whatever the disk actually is though.


The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate

At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here


When I try to install nginx-common with apt-get --reinstall install nginx-common, I get this:

Firstly, you've got the NGINX upstream repositories enabled; these do not work with the Ubuntu nginx-common packages, and are never designed to.  I explain a lot more on this in-depth on my blog post about this, but in all practical use cases, use only one or the other between the Ubuntu packages for NGINX and the upstream nginx.org repository - do NOT use both simultaneously, they don't work together properly and never will as they clobber each other.  (upstream makes a single package, Debian/Ubuntu splits things into additional packages for sanity sake and ease of replacing configs with defaults and what not)

If you want to have the latest NGINX version and still have it be somewhat more compatible with Ubuntu, you can use the NGINX Mainline PPA (maintained by me, but I also maintain this in Ubuntu as well), which will have a more Ubuntu-compatible package set that is more similar to the packages you're expecting to use rather than the ones you are using.

If you want to go this way, I give details on my blog as well for that.


Installing Kompozer in Ubuntu Budgie 19.04

When you installing package with dpkg, it just installs this package, when all requirement are met. It does not look around, how to install those dependencies you may need for particular package. So one way (hard) is to make sure which packages your wanted package additionally need and download them an install them first.

Easier way is to do like you did and afterwards run one command (as suggested in your output, too):

sudo apt --fix-broken install

Anyway, your output also says:

kompozer is already the newest version (1:0.8~b3.dfsg.1-0.1ubuntu2)

I have no idea, is this really newest version (and version you need), but it seems somehow already installed. If you tried from multiple sources, there may be something still wrong, running command from above should fix this (most times).

Edit

You stucked and fix-broken won't help. So, my solution would be to remove kompozer from system completely, like:

sudo apt purge kompozer

and then try to install it already from repo:

sudo apt install kompozer

Edit2

After closer look to Kompozer I must tell: this software is so old, that it may be too hard to ran on such a new system, it depends on libraries from Ubuntu 12.04 or older. Maybe it is simpler to run it with older Ubuntu?


You are missing two points:

The -p (--protocol) option name before icmp
--icmp-type 8 is Echo_Request (type 8), not Echo_Response (type 0), you need --icmp type 0

Do:

iptables -A INPUT -s 192.168.1.0/24 -i eth0 -p icmp --icmp-type 0 -j ACCEPT


Google Chrome keep loading mobile URL on desktop Ubuntu 16.04LTS

According to OP's comment, the culprit was the Data Saver browser add-on that redirects page requests onto the mobile page versions, because they are (quite likely) smaller in data volume than their "desktop" counterparts.

Disabling the add-on fixed the issue.


apt-get is stuck trying to remove an unremovable package

In  /var/lib/dpkg/info/jitsi-meet-web-config.postrm remove the lines

if [ -x "/etc/init.d/apache2" ]; then
    invoke-rc.d apache2 reload
fi


Install Xubuntu 32-bit. After it's installed, install the Ubuntu desktop system package:

sudo apt install -y ubuntu-desktop ubuntu-wallpapers ubuntu-wallpapers-artful
sudo dpkg-reconfigure gdm3

sudo dpkg-reconfigure gdm3 will open up a new window allowing you to select gdm as the default login display manager. Select gdm3 and reboot.

sudo apt remove lightdm-gtk-greeter
sudo reboot


After much experimentation I think this is the answer:

The EFI system partition (usually mounted at /boot/efi/) doesn't hold many files, unless e.g. GRUB is stored directly there instead of /boot/grub/. The contents usually don't change, so there is no need to RAID the partition. Having multiple copies of the partition across different disks would also require the UEFI boot entries to be set with efibootmgr; usually GRUB initialises this based on the mounted partition of /boot/efi/.

So it seems that it's both not needed, and not easy to do.


How can I enable wifi on my Ubuntu 11.10 xps l702x?

I had the same problem, this fixed it for me:

sudo modprobe iwlagn power_level=5
sudo modprobe btusb reset=1
sudo rfkill unblock all

Then disable and re-enable wifi with fn+f2.
After that, fn+f2 works, bluetooth can be disabled without disabling wifi, and wifi can be re-enabled after it is disabled.


So I could solve the issue without knowing the default values like so.

bash
sudo apt-get purge google-chrome-stable # uninstall chrome
sudo rm -r .config/google-chrome

And reinstalled the .deb package form google. Now everything looks good


Ubuntu 18.04 Cloud Image takes long time to boot

Once your machine is up, run:

systemd-analyze blame

and look at the top of the list. A likely culprit is cloud-init.
See here.


HylaFAX is in the repos and they also have a hardware compatibility list which might be a good start.

There are also a couple of tools that were created to provide a GUI for HylaFAX:

http://www.downv.com/Linux/download-Hylafax-Panel-10003413.htm
http://www.downv.com/Linux/download-gnu-hylafax-10001617.htm

Source: Faxserver with GUI or web based interface

"WinModems" are unlikely to give you any real joy so if you can find a "real" modem (as listed) that should work. Finding one of those might solve your problems with efax.

Edit: Or throw the modems away and use an email->fax service instead.


Should I install VNC server for Gnome if I am using Unity?

It is made for GNOME, so I would normally say it might work an it might not and you might as well try it out. However, one of the reviewers seems to be using Unity, and has left a bad review:

  The default remote desktop doesn't work with compiz and Unity, after trying in many systems, you can connect to the computer, but you just see a freeze image. Try using x11vnc or even better NoMachineNX for remote desktop

https://apps.ubuntu.com/cat/applications/natty/vino/

Now, that was for 11.04, so maybe things have changed and it works on Unity now. But, looking at the other reviews, and seeing reports that it's a pretty resource intensive app for what it does, I think you should follow the recommendations in the reviews and try RealVNC or RDP instead.


How to install gstreamer 1.0 in ubuntu 12.04

I also had a problem in installing gstreamer1.0*. It was resolved after I installed Gstreamer from Ubuntu Repository

It can be installed with Official Ubuntu Repository.

sudo apt-get install libgstreamer0.10-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 gstreamer0.10-tools gstreamer-tools gstreamer0.10-doc gstreamer0.10-ffmpeg gstreamer0.10-x


This seems to not be the whole script. The if( some condtions) won't run because some condtions is being interpreted as an unknown value, and not true or false.

Csh seems to be unfavorable by many, and I personally recommend bash.


How do change the program automatically started when I insert a CD?

Try the following:

Edit -> Plugins.
Select Status Icon, click the 'configure' button.
Choose the "never shown" option for notifications.


You can use Clonezilla Live.

  Clonezilla Live is a small bootable GNU/Linux distribution for x86/amd64 (x86-64) based computers.
  To install Clonezilla live, the basic steps are to download pre-build
  Clonezilla Live then put it in a boot media (CD, USB flash drive or
  USB hard drive). Two types of files are available, iso and zip. The
  former one is for CD, the latter is for USB flash drive. Besides, you
  can put Clonezilla live on hard drive or PXE server, too.
  1

Read on

1Source:Clonezilla

Note: Once you create the CD/USB, make sure that your backup fits on the newly created bootable USB.


How to make PPA build for particular release

I would surmise from your question that your debian/changelog file has defaulted to quantal instead of precise for the target.

For example - this is an example changelog for a PPA package I have recently built:

rhythmbox-plugin-albumartsearch (0.1-3) precise; urgency=low

  * folder rename

 -- fossfreedom <fossfreedom@somewheremail.com>  Thur, 07 Jun 2012 13:19:18 +0100

You'll note - the target is precise

If you use dch -i to create your change log then this will not only increment your version number but change to the next development release.

Best use dch -i --distribution [foo] to ensure that the changelog is created correctly for the distro you wish to use - where [foo] is precise in your example.

Useful link:

http://www.debian.org/doc/manuals/maint-guide


transmission-cli connected to peers but not downloading

It works now. I think, I know why.
I accidentally executed transmission-cli once with the option -d but no value given. Could it be that this means download speed = 0?
When I gave the option -D it worked as expected.


How can I install and run mysqlworkbench on a remote Ubuntu Server?

For a GUI to work on Ubuntu server you'll need a desktop environment of your choice. LXDE for example is a lightweight one that won't load your server too much, it can simply be installed with:

sudo apt install lxde

However, your server will still be fully configurable via terminal only. For a Ubuntu server with graphical interface like Microsoft Windows Server you might want to look into Zentyal.

To remotely access a server I suggest to use remmina, see its homepage, Wiki and FAQ. If you connect to your server via ssh, there's the X-Forwarding function to display the gui of a program running on the remote server on your own screen. Use it like:

ssh -X user@server mysql-workbench &


Yes, you can remove or disable ufw and/or gufw without any problem. It will not affect your iptables configuration. UFW (Uncomplicated Firewall) was simply developed to ease some configurations done with iptables.

Removing it will not affect your iptables configuration.

To disable UFW you can type the following:

sudo ufw disable

To remove it you can type the following:

sudo apt-get remove ufw

To purge it (In those cases where you really hate ufw or wasting space) you can type the following:

sudo apt-get purge ufw

The only thing you can not do is remove iptables. This is because it is a dependency package of ufw, therefore ufw depends on iptables (Not the other way around ^^).


Increase reverse-i-search history length

It is really easy, just change your HISTSIZE and HISTFILESIZE variables in you .bashrc

HISTSIZE=-1
HISTFILESIZE=-1

In bash 4.3 and later you can also use HISTSIZE=-1 HISTFILESIZE=-1 to set it to be unlimited.

Consider that HISTSIZE is the number of lines or commands that are stored in memory in a history list while your bash session is ongoing.

HISTFILESIZE is the number of lines or commands that (a) are allowed in the history file at startup time of a session, and (b) are stored in the history file at the end of your bash session for use in future sessions.

Take a look at this link

Regards,


How to get access to my ftp server through internet

You can use some software for example filezilla for connecting to your ftp server.
download it from there:
filezilla


How do I reinstall Windows 10 while keeping my dual boot configuration?

The problem in this situation is that, if you install Windows 10, it will overwrite the MBR. Windows thinks it's the only OS in the world.

Install Windows using (non-pirated) Windows installation media.
Boot using an Ubuntu Live CD. Choose the "Try Ubuntu" option.
Open a terminal and type sudo grub-install /dev/sdX where sdX is your hard drive. The first hard drive is called sda, so if you only have one hard drive, replace sdX with sda.
Press ↵. After the command is executed run sudo update-grub
After the command is executed, reboot your system and remove the live CD or USB when asked to in order to prevent booting into it.
Voila! You will have grub restored with both OSes.


I also had a super slow rsync for some reason, then I built a backup server and had permission problems and it would quit copying due to only regular user privelages on the backup server, even though I have full sudo privelages on both machines and ran sudo rsync, on the backup server I didn't have the elevated privelage to root. I now run rsync as a daemon on my backup server which is 10 years old and sata 2, this allows me to also run as root on the backup server (destination machine) or as any user I choose, the first thing I noticed is how blazing fast it is to rsync my entire 8TB LVM volume. For an example a 6GB Movie MKV used to take around 20 minutes, Not 5 minutes ago I just synced up 4 movie files = 7.6GB, my timer gave me 1 minute and 48 Seconds. everything - permissions, ACLs', symlinks, hardlinks, etc. are exactly the same as far as I could tell, unfortunately I have had to use my backup to duplicate all data to another server and everything worked flawlessly.


How to handle fsck "Error while scanning inodes"?

Suggested commands

First of all, make sure that the target file system is unmounted.
I am usually using the following command line to check/repair ext file systems,

sudo e2fsck -cf /dev/sdxn

where x is the drive letter and n is the partition number, so in your case

sudo e2fsck -cf /dev/sda2

unless the device order has been changed.

Options

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a  read-only
          scan  of the device in order to find any bad blocks.  If any bad blocks are
          found, they are added to the bad block inode to  prevent  them  from  being
          allocated  to a file or directory.  If this option is specified twice, then
          the bad block scan will be done using a non-destructive read-write test.

   -f     Force checking even if the file system seems clean.

Exit code

   The exit code returned by e2fsck is the sum of the following conditions:
        0    - No errors
        1    - File system errors corrected
        2    - File system errors corrected, system should
               be rebooted
        4    - File system errors left uncorrected
        8    - Operational error
        16   - Usage or syntax error
        32   - E2fsck canceled by user request
        128  - Shared library error

So in your case, 9=8+1: Operational error and File system errors corrected

Next steps

If the process gets aborted also when you try again, I don't know what could repair the file system. Backup what can be backed up and create a fresh file system.

Maybe the drive has physical defects. You can check for that according to

FSCK reports that filesystem still has errors - what should I do now?


Since I happened to have the same problem with another package, wanting a reinstall, and all the methods in the answers either did nothing or first uninstall the whole system before reinstalling, I ended up with a solution.

sudo aptitude reinstall libebml3:i386

Of course, there must be another solution to force a package to reinstall using apt-get instead of aptitude.

sudo apt-get install --reinstall libebml3:i386


Just apply this:

sudo add-apt-repository ppa:happy-neko/ps3mediaserver
sudo apt-get update
sudo apt-get install ps3mediaserver


You may check the rights of the shared folder on Windows 7 side (Right Click > Property > Security tab) and check if your user as the appropriate rights.


There is a parameter called shutdown_lifetime. It has a default value of 30 seconds.

So when Squid receives a shutdown request, it waits at least 30 seconds before it terminates.

$ grep -B 8 "# shutdown_lifetime" /etc/squid3/squid.conf

#  TAG: shutdown_lifetime   time-units
#   When SIGTERM or SIGHUP is received, the cache is put into
#   "shutdown pending" mode until all active sockets are closed.
#   This value is the lifetime to set for all open descriptors
#   during shutdown mode.  Any active clients after this many
#   seconds will receive a 'timeout' message.
# Default:
# shutdown_lifetime 30 seconds

Just "uncomment" the last line and set a shorter time:

shutdown_lifetime 10 seconds

For more info see below.

http://www.squid-cache.org/Doc/config/shutdown_lifetime/


Xrandr orientation is correct, pointer is rotated 180 degrees

xinput and xrandr

to get the ID of the mouse (11 in this case) and the output monitor (eDP for me) and note that it might change on a reboot,

xinput map-to-output 11 eDP
                                                                                And you might have to apply a transformation for the coordinates

This was mine for the rotate right

xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

All in all the one liner for the touchscreen digitiser pen was

xrandr --output eDP --rotate right &&  xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1 && xinput map-to-output 11 eDP


Toshiba laptop overheats and switches off

This sounds like it might be a manifestation of the high power usage bug in the latest kernels.

There's a wiki page on it here: https://wiki.ubuntu.com/Kernel/PowerManagement

You might try installing and booting off the test kernels linked there to see if it fixes the issue. Ensure you get the correct ones for your Ubuntu version and architecture.


You should use the Disks utility to set it to mount automatically.

Open Disks from the Dash.
Select your disk in the left sidebar.
Select the partition you want to use.
Click on the gear icon under the partition and choose to Edit Mount Options.
Set the mount point and mount it on startup.


If you have already replaced the drive and cable, then there is only one thing left it could be ( unless you replaced the cable with another bad one ): the controller.  Do you happen to have a first generation sandybridge Intel P67 chipset?  If so, these were known to have SATA controller failures like this and were recalled a few years ago to fix the issue.


Command running on terminal but not on crontab

Assuming this all works now, here's a summary:
cron executes using /bin/sh as opposed to /bin/bash.  I'm not a bash expert but I think I see at least one thing in your script that /bin/sh does not support.
Adding a #!/bin/bash line to the top of your script (often called a "shebang") indicates that the script should be executed with that executable (it can be more than shells, you can also specify Python).  This should solve the problem of running bash code under /bin/sh.
I don't know if it's causing you issues but surrounding you whole script with backticks (`) is wholly unnecessary.


The issue is with the most recent releases of Flash into the repos. The solution that worked for me was to download a previous version of Flash from Adobe's archived versions, in particular 11.1.102.62:

http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp_11.1.102.62_archive.zip

Found here:

http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html

Simply extract and drill down until you find your distro (for me 11_1r102_62_64bit/flashplayer11_1r102_62_linux.x86_64) and copy the libflashplayer.so to /usr/lib/mozilla/plugins and then point Hulu there in ~.huludesktop.

flash_location = /usr/lib/mozilla/plugins/libflashplayer.so

Good luck and Good watching!


You have to disable the older version of PHP (a2dismod [oldversion]) and then enable the new version with

sudo a2enmod php7.3

Then restart apache2


Oh god, sorry to you all. It was me overlooking a really small detail. Thanks to ThatGuy who got me looking again at the instructions page and noticing this.

Problem was I was using

poweriso extract filename.iso -od dirname

HOWEVER, I should be using

poweriso extract filename.iso / -od dirname


After a clean installation Ubuntu does not see the hdmi port

I had the same problem. What worked for me was to downgrade the NVIDIA driver to version 390.


Can not logout correctly since upgrade to 14.04

Nevermind, I've already found out the system was suspended from logging out by fcitx-qimpanel, which get a segment fault after I install sougoupinyin.

So if any other chinese user installed that package find this topic, you might have an answer.


bluetooth not finding devices nor being detected

Have you tried to unplugging the USB bluetooth? If it doesn't work, try and switch it off and switch it back on and switch the bluetooth on your phone as well.


How to delete all files of a specefic name from /?

sudo find / -name "typhoon.svg" -type f -delete

See this post for some more explanations.


Does GRUB completely replace MBR or just the MBR's boot code

Here is the corresponding section from the documentation: 10 GRUB image files

  boot.img

  On PC BIOS systems, this image is the first part of GRUB to start. It is written to a master boot record (MBR) or to the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.

  The sole function of boot.img is to read the first sector of the core image from a local disk and jump to it. Because of the size restriction, boot.img cannot understand any file system structure, so grub-setup hardcodes the location of the first sector of the core image into boot.img when installing GRUB.

You should read the rest of the chapter and also 3.4 BIOS installation.

Both of your assumptions or given options are inaccurate:

  When we dual boot a computer with windows and linux…

That is the first wrong assumption. Bare hard drives don't ship with any operating system.

  The grub creates its own partition table and uses it.

That would imply loosing information about all previously created partitions, but GRUB is not a partition manager in the first place. The format of the partition table and partitions themselves have already been configured and created on a blank drive at the time GRUB or any other kind of bootloader is invoked in an operating system installation process. The role of a bootloader package during installation is to detect if it is compatible with the environment and use appropriate mechanisms to deploy itself.

  GRUB is loaded which further goes to stage 1, 1.5 and 2.

There are no stages in GRUB 2's design, read the For GRUB Legacy users section from the first link above.

  Only the boot code of MBR(around 446 bytes) is replaced with GRUB and GRUB uses the partition table of the DEFAULT MBR.

There is no "DEFAULT MBR", only the partition table you chose to use in previous steps of the installation process and it doesn't have to be a partition table in the legacy MBR format at all. If there is no other mechanism than to read and parse 512 bytes, replace whatever bytes and write 512 bytes back then this will be done and it shouldn't even matter to you since nothing else but what you chose should be performed on the disk and its layout. You may even find that your hard drive writes whole 4K sectors.

N.B.: It's hard to find actual BIOS systems in stores these days. Hardware certification for Windows 8 required manufacturers to ship UEFI systems. Intel and motherboard manufacturers were shipping UEFI systems for a few years at that time, but they had to rely on compatibility to legacy boot mechanisms until Microsoft decided to switch.


Citing for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 12111 (synaptic)...4s

I had the same problem while installing chromium through console. I also had Synaptic package manager and Ubuntu software open simultaneously. I'm no Linux pro but it seems to me that you can't install apps through console if you have other package managers open. After closing everything but the console the installation worked.


How to reinstall programm without removing it? All programms? Resetting configs?

Software center no longer appears to have the re-install button.  In command line:

sudo apt-get --reinstall install program-name


How can I tell Ubuntu 14.10 to do nothing when I close my laptop lid?

Go to the system settings and then click on Power. On that menu, you can configure the closed lid behavior.


The easiest way to do this is to install the OpenSSH server on your Kubuntu machine. You just need the indicate the ssh package, available from the Software Centre; alternatively you may use the command line:

sudo apt-get install ssh

Then you can access it from the Lubuntu machine with your file browser of choice (with Nautilus or Nemo this would be File -> Connect to Server...). You need to provide the IP address of the Kubuntu system and indicate 22 as the port.

For the command line you have tools such as ssh (the client) and scp.


Don't use sudo, if you are installing with pip then install to your home directory like so:

pip install --user youtube-dl

Uninstall which ever version you have now and run the above command as your regular user, and you won't have permissions problems any more. To update use:

pip install --upgrade --user youtube-dl


What is the equivalent to the Windows "Term232" program?

One similar serial port terminal client with logging available for all Ubuntu distros is [minicom][1] but I am sure there are others.


This answer of @rubo77 provides great solution of a similar question. I will elaborate it within the final part to achieve this result.

  You can find out where the setting is changed if you open a terminal:

gsettings list-recursively > /tmp/before
echo 'Now unity-control-center should open. Please change the scaling in "Displays" and close.'
unity-control-center
gsettings list-recursively > /tmp/after
diff /tmp/before /tmp/after | grep '[>|<]'

Copy and paste the above lines into a terminal. These command will create two temp files - before and after the change of the scale factor. Press Enter after you close Unity Control Center to execute the last line, that will compare these two temp files.

In my system when I change the scale factor from 1 to 1.5 the output of the above is:

< org.gnome.desktop.interface text-scaling-factor 1.0
> org.gnome.desktop.interface text-scaling-factor 1.5
< org.gnome.desktop.interface cursor-size 24
> org.gnome.desktop.interface cursor-size 36
< com.ubuntu.user-interface scale-factor {'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 8}
> com.ubuntu.user-interface scale-factor {'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 12}

So the new values are:

> org.gnome.desktop.interface text-scaling-factor 1.5
> org.gnome.desktop.interface cursor-size 36
> com.ubuntu.user-interface scale-factor {'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 12}

I've recorded the values when the scaling factor is 1, 1.25 and 1.5.

These values can be changed through the command line by the command gsettings set. So, according to the original answer, I've created a script, called setscalefactor and placed in /usr/local/bin/, thus it will be available as shell command:

sudo touch /usr/local/bin/setscalefactor
sudo chmod +x /usr/local/bin/setscalefactor
sudo nano /usr/local/bin/setscalefactor

The content of my script is:

#!/bin/bash

if [ -z "${1}" ] || [ "$1" == "1" ] || [ "$1" == "1.0" ]; then
    # set scaling to 1.0
    gsettings set org.gnome.desktop.interface text-scaling-factor 1.0
    gsettings set org.gnome.desktop.interface cursor-size 24
    gsettings set com.ubuntu.user-interface scale-factor "{'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 8}"
    echo "Set Scale factor: 1.0"; notify-send "Scale Factor" "1.0"
elif [ "$1" == "1.25" ]; then
    # set scaling to 1.25
    gsettings set org.gnome.desktop.interface text-scaling-factor 1.25
    gsettings set org.gnome.desktop.interface cursor-size 30
    gsettings set com.ubuntu.user-interface scale-factor "{'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 10}"
    echo "Set Scale factor: 1.25"; notify-send "Scale Factor" "1.25"
elif [ "$1" == "1.5" ]; then
    # set scaling to 1.5
    gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
    gsettings set org.gnome.desktop.interface cursor-size 36
    gsettings set com.ubuntu.user-interface scale-factor "{'VGA-1': 8, 'HDMI-0': 8, 'HDMI-1': 12}"
    echo "Set Scale factor: 1.5"; notify-send "Scale Factor" "1.5"
else
    echo "ERROR: Something went wrong!"; notify-send "Scale Factor" "ERROR: Something went wrong!"
fi

exit

Copy the above content and use in nano: Shift+Insert for paste; Ctrl+O and Enter for save; Ctrl+X for exit.
Replace the content after gsettings set with the values from your system!
Please note the quote marks: "{'VGA-1': ...}".

Now setscalefactor is available as shell command and can handle 1.0, 1.25 and 1.5 as arguments, also when it is executed without an argument it will sale to 1. The script will print and some status messages.

Next step is to create this scrip accessible via shortcut key combination. Go to: Unity Control Center (System Settings) > Keyboard > Shortcuts > Custom Shortcuts. Then create your custom shortcuts, like as the image:


12.04 vs 12.10 for PCs with less graphics memory

64MB video memory is plenty for running even the newest version of Ubuntu with all desktop effects.  What's more, 2GB is plenty of main RAM to run a full Gnome/Compiz/Unity graphical desktop.

If you are experiencing slow performance it's probably not so much the amount of video memory but the overall performance of the system.  A Pentium 4 is pretty old, your onboard graphics is also probably quite slow, and you may also have a slow hard drive if it's from a similar era.

Alternatively, it could be that your system is not running in accelerated graphics mode because of a problem with your system, which in 12.10 would mean that you're running software-emulated (which would be slow).

12.04 and 12.10 are not different enough architecturally that you should notice any significant difference in performance from them on the same hardware.  One notable difference however is that 12.04 has an optional "Ubuntu 2D" mode whereas 12.10 doesn't.  Ubuntu 2D may work better on systems without 3D acceleration (or with buggy/poorly supported 3D acceleration) than 12.10.

Things you could try:

Switching from Gnome to XFCE.

This can be done by installing Xubuntu, a version of Ubuntu which pre-selects XFCE for you, or by switching desktop environments on an already installed Ubuntu.

XFCE is a lot more light weight than Gnome, but most of this light weight is in the form of memory and resource usage (and with your 2GB of RAM, that's probably the area where you have the least problems).  So you may or may not notice a huge difference.
Run Ubuntu 12.04 in Ubuntu 2D mode.

Ubuntu 2D mode has been removed from subsequent versions of Ubuntu.  It is an alternative mode which doesn't make any significant use of graphics hardware, yet still has pretty much the same usability and compatibility with Ubuntu Unity.  If it's a graphics card problem, this will at least work.


Open terminal by pressing ctrl + alt + T Then type

sudo su

It asks for your password. Give it and press enter

Then type df

The screen outputs directory path of all available drives along with their names in the form of /dev/sda, /dev/sdb, /dev/sdc and so on. Try to identify your usb drive number by compaing with the storage capacity of displayed drives. Note down the number and this number is extremely important. Let us assume it is /dev/sdX.

Now type in terminal

umount /dev/sdX1

mkfs.vfat -L 'your-pendrive-label'  /dev/sdX1

Here replace your-pendrive-label with the label you want to give.

Explanation:

Pendrive cannot be formatted as long as it is ounted, we have to first unmount it.

umount /dev/sdX1

mkfs is apowerful command used to create or format file systems

vfat is an universal file system of pendrive understandable by all operating systems. It is actually fat32

-L argument is given to provide label to the new file system

and /dev/sdX1 is the partition where the file system to be formatted is present

General Syntax of mkfs command is:

mkfs.<filetype> -L <label>  <partition path>


Problem with Libre Office in Ubuntu 13.04?

The simplest solution would be exporting your documents as PDF, if the only goal is to print them. It'd assure that the documents will look exactly as expected regardless of the software used to open it.

In Libre Office Writer simply use File>Export as PDF... or use PDF button from your toolbar.


Errors when I open terminal after trying to install Metasploit

The error means you have some incorrectly formatted lines in your ~/.bashrc file.

It looks like you might have copied + pasted incorrectly under the section on installing ruby using rbenv.

The easiest way to solve this is to edit your .bashrc file and either correct or remove the lines the tutorial inserted.

What your .bashrc should contain (according to the tutorial):

export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"

Once you have that you make use of it by issuing the command $ source .bashrc.

I have no idea if the tutorial is correct so even if you match the content you might not get things working. In that case remove these lines and again issue $ source .bashrc.

Just in case you have to recreate your .bashrc file you can do the following :

/bin/cp /etc/skel/.bashrc ~/

Again you need to source the replacement:

source ~/.bashrc


not able to open System setting after upgrade to Ubuntu 14.04

As seen at www.ubuntu.com, do these commands

`ubuntu-support-status

cat /etc/dpkg/dpkg.cfg.d/multiarch

dpkg --print-foreign-architectures

sudo grep -R proxy /etc/apt/*

grep proxy  /etc/environment

echo $http_proxy

echo $ftp_proxy

grep proxy /etc/bash.bashrc

grep proxy ~/.bashrc

cat /etc/apt/apt.conf

sudo fuser -vvv /var/lib/dpkg/lock

sudo fuser -vvv /var/cache/apt/archives/lock

cat /etc/lsb-release

uname -a

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

sudo rm  /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

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

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

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status  ||  sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status

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

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

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

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

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

sudo mkdir /var/lib/apt/lists

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

LANG=C;sudo apt-get clean

LANG=C;sudo apt-get autoclean

sudo dpkg --configure -a

sudo dpkg --clear-avail

LANG=C;sudo apt-get -f install

LANG=C;sudo apt-get --fix-missing install

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

LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000

LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;`

and send the output status to me via a comment. Then if that doesn't work, it may be very simple as to just do

sudo apt-get install ubuntu-desktop to fix installed Ubuntu programs.


Oxwell does not load graphics on webpage

It was blanks in the http section under ow_includes/config.php


15.04 Problem: No Nvidia, No Mouse, No Connection


OpenStack networksetup for Install using AutoPilot

First - I configured a Windows server on the private subnet at 192.168.1.254 and used it to open the MASS URL.  I found that the MAAS URL that is references on the AutoPilot Server on 192.168.1.2 after running autopilot-config did not work.  Instead I needed to use http://192.168.1.2:5240/MAAS.  that worked.  I got the URL from running sudo dpkg-reconfigure maas-region-controller (I believe that's what it was).


Gameplay/openGL performance issues with AMD APU

Update:

According to AMD website, the 13.04 driver is not compatible with your APU, but the 13.08 beta driver is.

Catalyst 13.04 release notes:

http://support.amd.com/us/kbarticles/Pages/amdcatalyst13-4linreleasenotes.aspx

Catalyst 13.08 release notes:

http://support.amd.com/us/kbarticles/Pages/AMDCatalyst13-8LINBetaDriver.aspx

For AMD graphics you need to use the proprietary drivers from AMD website, any other driver will not work properly. It's also important to use the latest version of Ubuntu, since the driver needs up-to-date Kernel, X.Org and Mesa packages to achieve full performance.

You can try removing all AMD drivers from your system and start from the beginning, with the Catalyst driver from AMD website.

To remove all drivers from you system and go back to the open source driver, run the following commands:

sudo sh /usr/share/ati/fglrx-uninstall.sh

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Remove your X.Org conf:

sudo rm /etc/X11/xorg.conf

Reinstall X.Org and open source drivers:

sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core

Reconfigure X.Org:

sudo dpkg-reconfigure xserver-xorg

And then reboot the system:

sudo reboot

To install Catalyst from AMD website you will need to install the following packages:

sudo apt-get install linux-headers-generic dkms ia32-libs

Download the driver and run the following commands to install:

cd Downloads

chmod +x amd-catalyst-13.4-linux-x86.x86_64.run

sudo sh amd-catalyst-13.4-linux-x86.x86_64.run

sudo aticonfig --initial


In order to change pc-name after installation you just need to change the host and hostname file under etc directory. I don't understand why did you use netbios.

For in depth detail please refer Question-> How to change pc-name after installation


Why does running this restore command take so long?

Not knowing exactly what's being done, I can only speak generally:

Reads are simply reads from memory or disk.
Writes have to check constraints, action triggers and then write to disk. Usually within a transaction that needs to be setup, actioned committed and then cleaned up. And then there's cache invalidation.
Most disks (and their filesystems) read much faster than they write.

I'm not surprised a restore takes longer than a backup but if you really think it's erroneously long, benchmark your queries and work out what the problem is.


First hold Ctrl+Shift, then tap U and let go.
An underlined "u" will appear, to which you can append a combination of characters. Hit enter after that and the new character will appear.

For instance, if I hold Ctrl+Shift and hit U, type e+9, then hit enter, an é appears. If I hit e+8 instead, an è does instead.

You can find the correct combinations using the Character Map program in Accessories. The first "0" or two that you find on certain entries can be dropped (e.g. a ç is listed as 00E7, but you only need to type the e7).

It's a bit odd coming from using the Alt method in Windows, but you'll acclimate quickly.

N.B.: If you need to frequently type many types of accented characters see Adam Byrtek's answer below for a nice method that, while it requires some setting up, can save a lot of time in the long run.


Locked SSH to a single IP and then lost that IP so I'm now locked out of the server

Many VPS hosting companies provide "console" access to fix problems like this. In a comment you mentioned you are using OVH. Here is their help page explaining how to use their implementation of console access: https://docs.ovh.com/us/en/public-cloud/access_console_horizon/


Ok, this may not be the exact answer to the problems I was running into, but it did solve the problem for me.

I have resolved to running clamfs as root which handled the permission problems I was running into.

I have setup clamfs as a startup script (which is run as root). To create the script and not have to manually do this each time I followed the tutorial here:

  Write a script. put it in the /etc/init.d/ directory. Lets say you called it FOO. You then run
      % update-rc.d FOO defaults
  You also have to make the file you created, FOO, executable, using
      $chmod +x FOO

I do not know all the implications here and maybe this is not correct. But I have a shared file now on a Ubuntu server that is accessible by all windows computers on the network without a user name or password, and has on-access scanning which prevents spreading viruses on the network (of which there are a ton right now). I like to think it is a sort of venus-fly trap =).

Hope this helps someone.