Can I upgrade from 12.10 to 13.04 without losing my data?

There are two ways to upgrade to 13.04 without loosing your data:

You can upgrade your current install

You will get a promt asking you to upgrade in a couple of days (2 weeks after release I think), or you can upgrade now by typing sudo do-release-upgrade in a terminal

You can install over your current installation without formating the drive

Download ubuntu 13.04 and create a startup USB disk or burn it to a CD/DVD.
Install as you normally would.
When asked select "Upgrade Ubuntu 12.10 to 13.04"

Your data should not be overwritten, but it is good practice to back up your data anyway.

If you have a more complicated set up (such as separate /home partition) you can select "something else" and assing your partitions as you did before. But make sure not to put the checkmark to format you "/home" partition


It will require a few steps but everything can be done using the command line:

Install the following dependencies:

sudo apt-get install aha wkhtmltopdf python-pygments

Prettify your json file:

cat foo.json | python -m json.tool > bar.json

Call pygmentize to get syntax highlighting and export it to html with aha:

pygmentize bar.json | aha > bar.html

Finally export the html to pdf with wkhtmltopdf:

wkhtmltopdf bar.html foo.pdf


I need to know how does this specific software or the other similar softwares handles the drivers

All generic drivers are present on the ISO and are installed (ie. copied) to the system.
During a boot the system recreates the /dev/ section (see /sbin/MAKEDEV and /dev/MAKEDEV.local) (man page).


I had this problem one time when the daemon could not determine the ip address of the hostname I gave in the ejabber config file. My solution was to edit /etc/hosts file and make sure that there was a hostname entry for my public ip address and the domain I wanted ejabber to respond to.

0.0.0.0 hostname.domain.com hostname
1.1.1.1 ns1.yahoo.com ns1

Well, you get the picture. Hope that helps.


Installing onto a laptop after uninstalled with easybcd

You have downloaded the Server edition of Ubuntu

This does not come with a desktop environment and is not recommended unless you want to set up an application server. The installation process for the server edition is less user-friendly, and once installed it will boot to a plain text login with no GUI.

You are more likely to want the Desktop edition, and I suggest you download either the 11.10 or 12.04 image of this.

Your laptop is configured to boot from the hard disk by default

You will need to either enter setup to reconfigure your BIOS to boot devices in a different order, or strike a particular key during POST. The messages that appear on screen will often inform you which key you need to push. F9, F10 and F2 are commonly used.

wubi.exe is used to install Ubuntu to what's called a "loopback file" - the file system is written to a file contained within your Windows partition. This is convenient for people who don't want to repartition your disk, but is probably not the best solution for you.

Since you have already had Ubuntu installed on your laptop, reinstalling over this pre-existing partition is probably your best bet. If you manage to boot the standard Desktop LiveCD, it should be reasonably clear which partition contains your current (broken) Ubuntu install.


Ubuntu 16.04 : No Ethernet cable and system not detecting WiFi paired with "Low graphics problem" . Tried everything online still nothing

I have the same problem on several systems.
I noticed that:

WiFi shows: device not ready.
Wired connection does not work.
The keybord is set to default (en), not "it" as set.
Sometimes it boots correctly.

Re-install linux-header* linux-image* lightdm*  don't solve the problem.
Workaround:
Ctrl-Alt-F1, login, then:
sudo service lightdm restart

At least this works... I can login with graphic, wifi, keyboard etc. All work correctly... for one time!


Question regarding instructions installing OpenStack

I don't think it means you have to go to a website named maas.ip, but rather that you have to go to http://ww.xx.yy.zz where ww.xx.yy.zz is the IP address of the MAAS server.


The system logger, rsyslogd, is configured to send messages to anyone logged on as root.

The error should be dealt with by fixing the program not trying to hide the error message.

The you may need to install the Convert::BER module message suggests you should try:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libconvert-ber-perl

Once you do that you will fix only one issue and may have many more or maybe not because errors are somewhat serialized in that each fix only gets you to the next error.


Cannot uninstall software from Software Center

try to uninstall it from terminal

sudo apt-get autoremove (app name)

and about this problem try to search in software sources may be you put repository broken or something like that and remove it from other software tab in software sources

and try this command may help you

sudo apt-get check
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoclean
sudo apt-get purge

and restart afte that try again

if not you can do that but i'm sure the won't help you but try it remove ubuntu software center by this command in terminal

sudo apt-get autoremove software-center

and return install it

sudo apt-get install software-center


Cant install wireshark - failed to load xcb plugin

As noted on the Qt Forums, just add the following code to your ~/.bashrc file:

export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/appname/libs/Qt/plugins/platforms

replacing appname with your app's name. There should be a file called libqxcb.so within the platforms folder.


Brightness Settings Ubuntu or Mint for Toshiba Satellite C55D-B5102

This worked for my C50-B-14Z :

Step 1: Changing GRUB (using leafpad or gedit or whatever....)

1. Edit the grub configuration file:
Code:
gksu leafpad /etc/default/grub

2. Add the paramater to the line:GRUB_CMDLINE_LINUX=""...so that it reads:
Code:
GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

3. Save the file.

4. Update grub with the changes:
Code:
sudo update-grub

Step 2: Make file "70-keyboard.hwdb" in /etc/udev/hwdb.d/

1. gksu leafpad /etc/udev/hwdb.d/70-keyboard.hwdb

2. Fill the file with (Exactly!) this: (Satellite.............wlan)

Satellite C50-B
keyboard:name:Toshiba input device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEC50-B:pvr
 KEYBOARD_KEY_13c=brightnessdown
 KEYBOARD_KEY_13d=brightnessup
 KEYBOARD_KEY_13e=switchvideomode
 KEYBOARD_KEY_13f=f21                                   # Touchpad toggle
 KEYBOARD_KEY_158=wlan

3. Save the file.

4. Update the file
Code:
sudo udevadm hwdb --update

5. Reboot & Done


This is an IntelliJ Idea regression bug and will be fixed in 2018.1.5.

See issue here:
https://youtrack.jetbrains.com/issue/IDEA-191839


How to change GTK3 color scheme on Ubuntu 13.04

The colors are customizable. But it depends on the theme you use. What I'm writing below does not apply to the Adwaita theme which is somewhat "locked down" because part of the code was in a binary the last time I looked.

Anyway, the following relates to other gtk2 and gtk3 themes. There's a tool available that will allow a certain extent of customization. It has been described by its developer in Customize GTK themes with GTK theme preferences.

To quote from there:

  Customizing a GTK theme can be frustrating, especially with both GTK2
  and GTK3 themes lying there. And why go through all the hassle when
  you want to change just few things. You no more have to! I've made a
  GTK theme configuration tool that allows anyone to change some basic
  elements of a GTK theme easily (both GTK2 and GTK3) with a simple
  interface.

It requires you to install a ppa:

sudo add-apt-repository ppa:shimmerproject/ppa
sudo apt-get update
sudo apt-get install gtk-theme-config

Installing this software will allow you to customize quite a few things.

If you really want to fine-tune your theme, you may need to edit components of the theme yourself. These files will be found in the folder named after your relevant theme. Depending on how you've set things up, you may have to look in /usr/share/themes or in ~/.themes.

I prefer to have my themes in ~/.themes because the changes will be user-specific and not system-wide (and you won't need sudo). Putting your themes in ~/.themes is a simple matter of creating the hidden folder .themes and then copying over the entire theme folder from /usr/share/themes. You may wish to rename the copied theme folder name to distinguish it from the other. Relevant files could include:

gtkrc in the gtk-2.0 folder
gtk.css in the gtk-3.0 folder and
gtk-widgets.css also in the gtk-3.0 folder

(To edit these files you'll need a basic knowledge of CSS and how colors are described. Ideally, you'd would use a text editor that allows syntax highlighting. Gedit works fine for this purpose. And to notice the effect caused by any changes you make, you may have to switch to another theme and back or even log out and back in.)


"Failed to load the package list" - fixes posted not working

Two problems:

You tried to fetch http://www.medibuntu.org/sources.list.d/trusty.list, and made a typo to http://www.mediabuntu.org/sources.list.d/trusty.list. The program (or the ISP) you used to obtain it saw that this domain doesn't exist, and sent you down a DNS Search website. It's more likely to be your ISP, since the website says Time Warner Cable. This created an HTML file, which caused the syntax errors. Note that www.medibuntu.org doesn't exist either, which brings me to:
Medibuntu is dead: The Medibuntu Project has come to an end - what do I do now? In most cases, you don't need it anymore, and are better off installing packages from the official repos.

For the moment, delete the Medibuntu source:

sudo rm /etc/apt/sources.list.d/mediabuntu.list


Installer does not see windows trying to dual boot.

Assuming there's not a more simple answer, I would personally opt to skip out the automated OS detection and to do it myself:

Boot to the LiveCD, use GParted to shrink the Windows partition.
Run the installer and install to the spare space, letting GRUB eat the boot sector.
Reboot into Ubuntu (it won't give you the option of Windows)
Fix GRUB to allow you to use Windows. Essentially you just want to just chainload onto the windows partition (which I assume you left as the first on the first drive) but you can't do that by simply editing a config file because GRUB is generated dynamically. You have to write a script that update-grub can call each time it rebuilds the bootloader:

Start by running sudoedit /etc/grub.d/15_windows and in that file, paste in out:

#!/bin/sh -e
cat << EOF
menuentry "Windows 7" {
    set root=(hd0,1)
    chainloader +1
}
EOF

Save that, run sudo chmod a+x /etc/grub.d/15_windows and then run sudo update-grub. This should edit the boot sequence and now in GRUB you should see a Windows option. (You might have to hold left-shift to see grub! You can edit that option in /etc/default/grub)

Be prepared for the worst.

You're dealing with important things here. A smart man plans ahead.

Make a backup of anything on the Windows partition you cannot replace and would miss if it was nuked from orbit. You're resizing a partition. This is dangerous. Not as dangerous as swimming in a lake full of freshwater crocodiles but up there with not wearing high-SPF sun cream.
Make sure you have a rescue disk for Windows. Be that an original installer or some sort of other device that you can run bootrec.exe from.
Wear a condom. You don't know where Windows' boot sector has been.
Don't do this the day/hour before you really need the computer to do something. If it does go wrong, you're under pressure and you're more likely to make a mistake and make it irreparably worse.


How to analyze and defragment drive in ubuntu 16.04

Ubuntu doesn't need disk-defragmenting
From this article:

If you’re a Linux user, you’ve probably heard that you don’t need to
defragment your Linux file systems. You’ll also notice that Linux
distributions don’t come with disk-defragmenting utilities. But why is
that?
To understand why Linux file systems don’t need defragmenting in
normal use – and Windows ones do – you’ll need to understand why
fragmentation occurs and how Linux and Windows file systems work
differently from each other.


I know this is really old, but I had the same problem (running Fedora). The suggestion in one of the comments was dead on. I copied ~/.local/share/shotwell/data/photo.db.bak to ~/.local/share/shotwell/data/photo.db and every thing worked again.


Can't install app from usc nor using teminal !! 16.04 LTS

You can remove the cdrom by undoing the selection you did before in Software & Updates > Other Software.

Also remove the offending file:

sudo rm /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist

Now you should be able to download and install updates and other software.


the only way I can extract to flac the the mo is by using Sound Juicer.
Ripper X only extracts the 1st 4 or 5 seconds as you say


Juniper Network Connect crashing on Ubuntu 14.04 32-bit

Found the solution to the issue. Your home folder contains the .juniper_networks and so if it is encrypted, then JNC has problems. So make sure your home folder is not encrypted.


The command that lists the last executed command is fc -nl -1 . Using output substitution , we can add more parameters to the same content

$> ls /etc/passwd
/etc/passwd
$> $(fc -nl -1)  /etc/group
/etc/group  /etc/passwd
$>

Quoting , however, may be an issue with this approach

A very nice feature of fc is that if you just run fc command by itself, it will open text editor specified inFCEDIT variable (which you probably want stored in ~/.bashrc) and the contents of the line will be your last command. For your ease, I suggest you use nano as your text editor, but if you know vim  - even better.

For example, what if I need to edit qdbus org.ayatana.bamf  /org/ayatana/bamf/matcher org.ayatana.bamf.matcher.ActiveWindow Huge line, right ? But with fc, I can open vim and edit /org/ayatana/bamf/matcher , save, exit and it will run.


A couple mysterious things happened. first of all, I tried installing braid via torrent and a message popped up telling me that I needed new nvdia drivers... so I did. Nvdia! I dont't even have Nvdia cards, but it worked, and the games installed. Then, like, yesterday, I got an email from ubuntu support (even though I hadn't contacted them yet) saying the braid link had been down and was back up now. Funny, huh? Well, at least it's working now.


How do I configure a script file to manage services on Ubuntu without using bash?

After reading a lengthier SO discussion that was sparked by a similar question, I finally understood the "why" behind the behavior I was experiencing.
So here is the answer.
After some pointed questions from @muru in the comments above, it dawned on me that although I had included #!/bin/sh at the top of each file, I had not run chmod +x $filename.sh to make the files (programs) fully executable.
Because of this, calling sh ./stop.sh or bash ./stop.sh worked fine, but I was attempting to call ./stop.sh directly, which did not.
Here is a before and after view of the solution.
Sample Script ~/run.sh
    #!/bin/sh

        service ssh start
        service mysql start
        service apache2 start

        echo "This version works too"

BEFORE (This is what I encountered originally.)
    ❯ sudo sh ./run.sh
     * Starting OpenBSD Secure Shell server sshd                   [ OK ]
     * Starting MySQL database server mysqld                       [ OK ]
    * Starting Apache httpd web server apache2
    *
    This version works too

    ❯ sudo ./run.sh
    sudo: ./run.sh: command not found

AFTER (After running sudo chmod +x run.sh)
    ❯ sudo ./run.sh
     * Starting OpenBSD Secure Shell server sshd                   [ OK ]
     * Starting MySQL database server mysqld                       [ OK ]
     * Starting Apache httpd web server apache2
    *
    This version works too

As you can see, I could only achieve the desired result after making the script executable with chmod +x run.sh.

NOTE: Additionally, I would advise the use of sudo to run scripts whenever possible instead of using root like I did in the original question. A safer option is to run these commands from within a user account that is part of the sudoers group, which helps limit security and user-error concerns that arise from using root directly.


Answering myself in case someone else is stuck on this.

On Ubuntu 16.04, the default versions are:

    # gpg --version
    gpg (GnuPG) 1.4.20

and

    # gpg-agent --version
    gpg-agent (GnuPG) 2.1.11

They are not compatible. It is mandatory to use GPG2:

    # gpg2 --version
    gpg (GnuPG) 2.1.11


WiFi not working in Ubuntu 13.10 with Ralink RT3290

It should be working out of the box with the driver rt2800pci. On my system,

modinfo rt2800pci | grep 3290
alias:          pci:v00001814d00003290sv*sd*bc*sc*i*

which shows the correct Vendr and Product id, see this Wikidevi page. You should first check that you get the same output, then please proceed with these commands:

sudo apt-get install linux-firmware-nonfree
sudo rmmod rt2800pci
sudo modprobe rt2800pci

This should take care of it.

Edit: please post the output of

sudo rfkill list
lsmod | grep rt2800
dmesg | grep rt2800

Edit: we may try to use the backport driver. You should issue these commands:

sudo apt-get install build-essential linux-headers-generic
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2013/10/18/backports-20131018.tar.gz
tar xvfz backports-20131018.tar.gz
cd backports-20131018
make defconfig-wifi
make
sudo make install


Ubuntu application switcher like ElementaryOS

The answer was in the Application Switcher of the compizconfig settings manager as mentioned in Dilmo's answer.

But a little tweaking was needed.

Here is what I did:

In the bindings tab disable alt+tab and shift+alt+tab for the "next window" and "previous Window" and assign those to "Next Window (no popup)" and "Previous Window (no popup)".

In the General tab, set speed to 0.0, Timestep 0.1, Saturation 100, Brightness 100, opacity 10.

Now my application switch is blazing fast and no background windows are shown.


Bluetooth DUN Connect with the command line?

In the case of you, I suggest to create a custom shortcut key:

go to System Settings > Keyboard > Shortcuts [tab] > Custom Shortcuts and clicking on the + button to create a new one.

Enter nmcli -t con up id "Tata Docomo Internet" for the command, and the name as you wish.

Then click on it and assign your desired shortcut key. Now when it gets disconnected, you can connect simply with the shortcut key.

If you want to use more complex script you can see this question.


Turn on Wi-FI hotspot disabled in Ubuntu 18.04

Apply the following steps:

Press Alt+F2 and then type

nm-connection-editor

and hit Enter.
Network Connections window pops up. Click on the + button at the bottom and select WiFi from the dropdown menu. ENter the following parameters:

Type connection Name: xyz
SSID Name: xyz-pc
Select Mode: Hotspot
Finally, set the password in the Wi-Fi security tab.


Is there a way to disable the Run command dialog in KDE?

You can disable the Run Command dialog by creating an custom definition  in the file kdeglobal.

You can find the kdeglobals file under your home dir.

#cd  /your-home-dir/.kde/share/config

#vim kdeglobals

Add the entry like

[KDE Action Restrictions][$i]
run_command=false

Here is the help link for kde system admin


How to run a parameter as an alias in a shell script?

This is not explicitly pointed out in the documentation (at least nowhere that I could notice), but the problem is that alias expansion takes precedence over variable expansion; that means that the $1 token is checked to see if it corresponds to an alias, discarded as a potential alias and only after that expanded as a parameter. Since there's no command named ll, Bash errors out.

You could use eval to make the parameter expand twice, the first time as a parameter and the second time as an alias:

#!/bin/bash

# Allow aliases to work in bash NON-interactive mode!
shopt -s expand_aliases

# .. and load them
source ~/.bash_aliases
eval "$1"

~$ cat temp.sh
#!/bin/bash

# Allow aliases to work in bash NON-interactive mode!
shopt -s expand_aliases

# .. and load them
source .bash_aliases
eval "$1"
~$ cat .bash_aliases
alias ll='ls -l'
~$ ./temp.sh ll
drwxrwxr-x  3 user user 4096 apr 24 15:18 articles
drwxrwxr-x  2 user user 4096 apr 24 00:20 bin
drwxr-xr-x  2 user user 4096 apr 21 20:22 Documenti
-rw-r--r--  1 user user 8980 apr 21 20:18 examples.desktop
drwxr-xr-x  2 user user 4096 apr 21 21:59 Immagini
drwxr-xr-x  2 user user 4096 apr 21 20:22 Modelli
drwxrwxr-x  6 user user 4096 apr 23 20:45 MT7630E
drwxr-xr-x  2 user user 4096 apr 21 20:22 Musica
drwxr-xr-x  2 user user 4096 apr 21 20:22 Pubblici
drwxr-xr-x  2 user user 4096 apr 24 23:02 Scaricati
drwxr-xr-x  2 user user 4096 apr 24 13:44 Scrivania
-rwxrwxr-x  1 user user  149 apr 26 13:22 temp.sh
drwxrwxr-x  2 user user 4096 apr 26 13:22 tmp
drwxrwxr-x 24 user user 4096 apr 23 13:45 util-linux-2.28
drwxr-xr-x  2 user user 4096 apr 21 20:22 Video


Yesterday I successfully installed Diablo 3 on my laptop, Asus Zenbook UX32VD. But I think steps that I did can be done on any other computer. My configuration:

Linux 3.8.6-030806-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"

This tutorial also works for:

3.13.0-24-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"

lspci:

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:04.0 Signal processing controller: Intel Corporation 3rd Gen Core Processor Thermal Subsystem (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
00:1f.6 Signal processing controller: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller (rev 04)
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] (rev ff)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 jev 24)

I will try to explain what I did.

1. Install last version of PlayOnLinux.

Today it is 4.2.2 (Also tested with 4.2.5)

It can be done by downloading from official site, or by doing this:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E0F72778C4676186

Add ppa and install.

sudo wget http://deb.playonlinux.com/playonlinux_saucy.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

2. Download Diablo 3 client from official Blizzard site

3. Install Diablo 3 using PlayOnLinux

Execute playonlinux, Click Install button.

Search for Diablo 3, then click install.

Then choose setup file from my computer, and pick file you downloaded in step 2.

Now install Diablo 3 as usual, login to battle.net and download D3 game.

PlayOnLinux will download wine automatically and configure itself.

I don't know why, but I have success with this only in 3-d time. I did same things in step 3. But it crashed 2 times. First time when Diablo 3 client was installed, it loaded but could not connect to battle.net. I just delete everything and did step 3 again

Before going to step 4, try to launch Diablo 3. If it works and you can play but graphics quality low - go to next step.

4. Install and configure bumblebee

Now, after D3 successfully installed you need explain to PlayOnLinux to use your graphic card. In my case it is GeForce GT 620M.  What is bumblebee?

  Many recent notebooks with a discrete nVidia card in it and an i3/i5/i7 processor use the nVidia Optimus technology to improve
  battery life. Unfortunately, this software solution is only available
  in Windows 7 and later.

  The Bumblebee Project is a set of tools developed by people aiming to provide Optimus support under Linux (legacy nVidia hybrid graphics is
  supported too) while waiting for kernel and drivers to support these
  notebooks

We will use util primusrun to run our D3 supporting nvidia card. To install bumblebee and primus do this.

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia primus

64bit: you also need to install the "primus-libs-ia32:i386" package:

sudo apt-get install primus-libs-ia32:i386

To configure bumblebee for you video card check this

5. Check bumblebee

  vblank_mode=0 primusrun glxspheres64

or for 32bit

    vblank_mode=0 primusrun glxspheres

It should give you more or equal than 120 fps.

As an alternativ you can use

    optirun glxspheres.

Since primusrun has steady fps in Diablo 3 but still is laggy, I prefer optirun over primusrun.

6. Run D3 using primusrun

After step 3, PlayOnLinux should add Diablo3 launch icon to your Desktop. If it doesn't just create it by yourself in ~/Desktop folder. Call it "Diablo III.desktop". Open with your editor. It should look like this:

[Desktop Entry]
Encoding=UTF-8
Name=Diablo III
Comment=PlayOnLinux
Type=Application
Exec=primusrun /usr/share/playonlinux/playonlinux --run "Diablo III" %F
Icon=/home/c0rp/.PlayOnLinux//icones/full_size/Diablo III
Name[fr_FR]=Diablo III
StartupWMClass=Diablo III Launcher.exe
Categories=

Note that I change Exec. It was just /usr/share/playonlinux/playonlinux --run "Diablo III" %F. I add primusrun to get best graphics that my video card can provide.

7. Resolving problems.

I also have a problem with resolution. Game always started with 800x600 configs. I found configuration file in my home directory. /$HOME/Diablo III/ there is a file D3Prefs.txt, where I put my resolution:

DisplayModeWinWidth "1400"
DisplayModeWinHeight "1050"
DisplayModeUIOptWidth "1920"
DisplayModeUIOptHeight "1080"
DisplayModeWidth "1920"
DisplayModeHeight "1080"

Thanks for everyone who did this before, I found everything on the Internet. Here the Links that I use:

UbuntuUpdates - PPA: PlayOnLinux
Running specific games with 'primusrun'
Primus: Better Performance And Less Power Consumption For Bumblebee [Optimus Hybrid Graphics Chipsets] ~ Web Upd8: Ubuntu / Linux blog
Home · Bumblebee-Project/Bumblebee Wiki
Configuration · Bumblebee-Project/Bumblebee Wiki
PlayOnLinux - Set resolution manualy


Firstly make sure your internet connection is working. Can you browse websites in your browser when this error occurs?

You might need to update the package metadata. Close Software Center. Open the Unity Dash (top icon in the dock) and type "Update Manager". Open the Update Manager, and click on "Check". Wait for it to finish (this needs an internet connection), close it, open Software Center, and try to install. Note that installing the updates suggested by Update Manager is not necessary for this (but is recommended in general).

Alternatively, instead of the Update Manager you could also do sudo apt-get update in a terminal.


Why Ubuntu ask me for for root password while upgrading?

Reboot the computer and stay in the grub menu.
Select the default entry and press "e".
Add to the kernel line at the end " single" (if it doesn't work try with 1).
Press "b" to boot with the modified parameters. You will be prompted with a console, this is a passwordless root console.
You can change the root password with passwd and you will not be asked for the old password.
After that, reboot and in terminal as root, add yourself to sudoers (because it seems you have removed yourself from the list).


You can use dd.

dd if=/dev/sdXX of=/home/rootfs.img where /dev/sdX is the block device you're looking to copy (input).

your root filesystem is likely /dev/sda1 if you have a standard installation, but you will be able to tell by running 'df' and picking the device mounted on '/'.

the argument of indicates where the image will be saved when you're done.

You may have to run this as root.


Installed Ubuntu in VMware Player, Black side bars / broken GUI

You should disable 3D graphics acceleration.

Firstly, shutdown Ubuntu.
Then go to Virtual Machine Settings → Hardware → Display → un-check Accelerate 3D graphics.
Lastly, start the Virtual machine.


Edited Jun 02 2018: As of Ubuntu 18.04, you need to add one more element selector for this to work.

Paul was mostly right. This expanded solution works as of Ubuntu 14.04.1 with GNOME Terminal 3.6.2.

For all versions:

Add the following code to ~/.config/gtk-3.0/gtk.css:

VteTerminal,
TerminalScreen,
vte-terminal {
    padding: 10px 10px 10px 10px;
    -VteTerminal-inner-border: 10px 10px 10px 10px;
}

Edit: You will need to create the file if it does not already exist (thanks jonS90).
Kill all instances of gnome-terminal:

$ killall gnome-terminal

Restart gnome-terminal.


How can I create a Click package manually?

click build . builds the package for the current directory


Those fans are there and triggered at that speed for a reason.  Trying to lower the fan speed just to reduce the noise might actually be harmful to your hardware causing it to overheat and then you are in a bad place!

Sounds like you are driving your CPU a bit ... try reducing the amount of active proceses and the total amount of CPU and then I believe the fan speed will lower.

One note, if your system is dirty or clogged on the inside this could potentially be causing the fan speed to be higher.

Summary, change fan speed realizing the risk for serious hardware damage.

If the fans are noisy, replace them.  This is not a high cost part.

After the fans, the HDD are the next thing to cause noise, afterall that is about the only other thing with moving parts.   In the past, I have had to eventually replace a noisy HD drive due to this.  I was afraid that the disk was going bad and wanted to avoid the pain and agony of a surprise situation.  My guess is that some of the bearings in the drive go out (just like the wheels in your car) and cause this obnoxious noise.


Show total disk space needed for installation including Dependency Package sizes?

apt-get will show this by default.

example:

sudo apt-get install kde-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  akonadi-server akregator amor ark aurorae-themes-artwork avogadro-data blogilo bomber bovo cantor cantor-backend-kalgebra
  cervisia cvs cvsservice dolphin dragonplayer gnugo gnupg-agent gnupg2 granatier graphviz gwenview jovie juk kaddressbook
  kajongg kalarm kalgebra kalzium kalzium-data kamera kanagram kapman kapptemplate katomic kbattleship kblackbox kblocks
  kbounce kbreakout kbruch kbugbuster kcachegrind kcalc kcharselect kcolorchooser kde-config-cddb kde-config-cron

       [ Output truncated ]

 python-avogadro python-dateutil python-enchant python-iniparse python-kde4 python-levenshtein python-lxml python-pyasn1
  python-qt4-dbus python-qt4-sql python-twisted python-twisted-conch python-twisted-lore python-twisted-mail
  python-twisted-news python-twisted-runner python-twisted-words python-utidylib python-vobject rocs setserial step
  subversion sweeper system-config-printer-kde systemsettings translate-toolkit ttf-dustin umbrello valgrind xplanet
  xplanet-images
0 upgraded, 349 newly installed, 0 to remove and 0 not upgraded.
Need to get 376MB of archives.
After this operation, 815MB of additional disk space will be used.
Do you want to continue [Y/n]

At the bottom you can see that the total size to fetch from internet is 376MB and after installation it will use 815MB of disk space.

If you are ok with this type 'Y' to continue the installation or type  'n' to cancel the installation.


Failed to install untrusted sources and failed to download update information

first install Y-PPA manager:
for this you have to download deb package, you cant install through PPA, since you cant update software list.

click on this link to download deb
then open it and click on Advanced Option.

then click on the second option( try to import all missing GPG keys) shown in image below:

wait for some time. Then click on third option (try to fix all GPG BADSIG errors)
You need to wait for some time untill its shows you notification that its done !
in case you have upgraded your Ubuntu recently, you have to click on "Re-enable working PPAs after Ubuntu upgrade"
then run sudo apt-get update After this you can go back to thing you were trying to do.


There is no package hostpad, thats right. The package name is hostapd, a user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.

Therefore

sudo apt-get install hostapd

The package is in the universe repositories. Check your configuration via Software & Updates. Select the right entry and select Main server.


How do I set up Deja Dup to use encryption?

After setting up your backup, press "back up now". A dialog will then appear asking you if you want to password-protect your backup.

If you do choose a password, your backup is automatically encrypted with that password.


How to configure Kodi, running on ubuntu, for fullscreen mode

In Kodi goto

System → Settings → System → Video output

Change the option "Display mode" from "Windowed" to "Full screen"
To toggle between "Windowed" and "Full screen" mode you also can use the keyboard shortcut \ (the backslash key). Look at Keyboard controls (Kodi wiki) for more Kodi keyboard shortcuts.


I think I'm late with my answer but here it is just in case:

you can install the following packages and retry.

using this command line

sudo apt-get install python-dev qt4-designer


Why not try to find out why it is not running, check those logs as the error states:
sudo systemctl status mysql.service
sudo journalctl -xe


If the "try" option in ubuntu's installer works alright would the install be ok as well

Yes, I think it would be alright. I would suggest dual-booting (having both Windows and Ubuntu installed) just in case something doesn't work or you don't like the Ubuntu way for solving it. For instance, from my personal experience, LibreOffice is not always 100% compatible with Microsoft Office, and for gaming, sometimes WINE doesn't work well enough.


Run the following commands in an open terminal.

First, run the following command to zero out the resolv.conf file:

echo "# Generated by NetworkManager" | sudo tee /etc/resolv.conf

Then, restart network-manager:

sudo service network-manager restart

You may need to click on the network-manager icon on your panel where you may then need to select the network from the dropdown menu or try unplugging and plugging the ethernet cable back in if you need to. If the issue is fixed, proceed no further. If not fixed, you may need to clear out your existing network configurations by running the following commands:

First, make a file to backup the existing cofigurations and then move the files there instead:

sudo mkdir /etc/NetworkManager/backupconnections
sudo mv /etc/NetworkManager/system-connections/* /etc/NetworkManager/backupconnections/

Now, restart network-manager:

sudo service network-manager restart

You may need to unplug and plug back in the ethernet cable.


How to highlight current screen (or window)?

Highlight the focussed screen (or dim- flash on focus change, see EDIT further below)

In a side-by-side dual monitor setup (left-right), the script below will set
the brightness of the monitor with the focussed window to "normal" (100%),
while other one is dimmed to 60%.

If the focus changes, the brightness will follow the focus:

focus on (a window) on the right screen

focus on (a window) on the left screen

The script

#!/usr/bin/env python3
"""
In a side-by-side dual monitor setup (left-right), the script below will set
the brightness of the monitor with the focussed window to "normal" (100%),
while other one is dimmed to 60%. If the focus changes, the brightness will
follow the focus
"""
import subprocess
import time

def get_wposition():
    # get the position of the currently frontmost window
    try:
        w_data = subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").splitlines()
        frontmost = subprocess.check_output(["xprop", "-root", "_NET_ACTIVE_WINDOW"]).decode("utf-8").split()[-1].strip()
        z = 10-len(frontmost); frontmost = frontmost[:2]+z*"0"+frontmost[2:]
        return [int(l.split()[2]) for l in w_data if frontmost in l][0]
    except subprocess.CalledProcessError:
        pass

def get_onscreen():
    # get the size of the desktop, the names of both screens and the x-resolution of the left screen
    resdata = subprocess.check_output(["xrandr"]).decode("utf-8")
    if resdata.count(" connected") == 2:
        resdata = resdata.splitlines()
        r = resdata[0].split(); span = int(r[r.index("current")+1])
        screens = [l for l in resdata if " connected" in l]
        lr = [[(l.split()[0], int([s.split("x")[0] for s in l.split() if "+0+0" in s][0])) for l in screens if "+0+0" in l][0],
               [l.split()[0] for l in screens if not "+0+0" in l][0]]
        return [span, lr]
    else:
        print("no second screen seems to be connected")

def scr_position(span, limit, pos):
    # determine if the frontmost window is on the left- or right screen
    if limit < pos < span:
        return [right_scr, left_scr]
    else:
        return [left_scr, right_scr]

def highlight(scr1, scr2):
    # highlight the "active" window, dim the other one
    action1 = "xrandr", "--output", scr1, "--brightness", "1.0"
    action2 = "xrandr", "--output", scr2, "--brightness", "0.6"
    for action in [action1, action2]:
        subprocess.Popen(action)

# determine the screen setup
screendata = get_onscreen()
left_scr = screendata[1][0][0]; right_scr = screendata[1][1]
limit = screendata[1][0][1]; span = screendata[0]

# set initial highlight
oncurrent1 = scr_position(span, limit, get_wposition())
highlight(oncurrent1[0], oncurrent1[1])

while True:
    time.sleep(0.5)
    pos = get_wposition()
    # bypass possible incidental failures of the wmctrl command
    if pos != None:
        oncurrent2 = scr_position(span, limit, pos)
        # only set highlight if there is a change in active window
        if oncurrent2 != oncurrent1:
            highlight(oncurrent1[1], oncurrent1[0])
        oncurrent1 = oncurrent2

How to use

The script needs wmctrl:

sudo apt-get install wmctrl

Copy the script into an empty file, save it as highlight_focus.py
Test- run it by the command:

python3 /path/to/highlight_focus.py

With the second monitor connected, test if the script works as expected.
If all works fine, add it to startup applications: Dash > Startup Applications > Add the command:

/bin/bash -c "sleep 15 && python3 /path/to/highlight_focus.py"

Notes

The script is extremely low on resources. To "save fuel", the screen setup; resolutions, span size etc. is read only once, during startup of the script (not included in the loop). That implies that you have to restart the script if you connect/disconnect the second monitor.
If you added it to startup applications, it means you have to log out/in after changes in monitor configuration.
If you'd prefer another brightness percentage for the dimmed screen, change the value in the line:

action2 = "xrandr", "--output", scr2, "--brightness", "0.6"

The value can be between 0,0 (black screen) and 1.0 (100%).

Explanation

On startup of the script, it determines:

the spanning resolution of both screens
the x-resolution of the left screen
the names of both screens

Then, in a loop (once per second), it:

checks the position of the active window with the commands:

wmctrl -lG (to get the list of windows and their positions)
xprop -root _NET_ACTIVE_WINDOW (to get the id of the frontmost window)

If the window's (x-) position is greater then the x-resolution of the left screen, the window apparently is on the right screen, unless it is greater then the spanning size of the two screens (then it would be on the workspace on the right). therefore:

if limit < pos < span:

determines if the window is on the right screen (where limitis x-res of the left screen, pos is the window's x-position and span is the combined x-res of both screens).

If there is a change in the position of the frontmost window (on left screen or right screen), the script sets the brightness of both screens with the xrandr command:

xrandr --output <screen_name> --brightness <value>

EDIT

Dim-flash the focussed screen instead of a permanent dimmed "unfocussed" screen

As requested in a comment and in chat, below a version of the script that gives a short dim flash on the newly focussed screen instead:

#!/usr/bin/env python3
"""
In a side-by-side dual monitor setup (left-right), the script below will give
a short dim- flash on the newly focussed screen if the focussed screen changes
"""

import subprocess
import time

def get_wposition():
    # get the position of the currently frontmost window
    try:
        w_data = subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").splitlines()
        frontmost = subprocess.check_output(["xprop", "-root", "_NET_ACTIVE_WINDOW"]).decode("utf-8").split()[-1].strip()
        z = 10-len(frontmost); frontmost = frontmost[:2]+z*"0"+frontmost[2:]
        return [int(l.split()[2]) for l in w_data if frontmost in l][0]
    except subprocess.CalledProcessError:
        pass

def get_onscreen():
    # get the size of the desktop, the names of both screens and the x-resolution of the left screen
    resdata = subprocess.check_output(["xrandr"]).decode("utf-8")
    if resdata.count(" connected") == 2:
        resdata = resdata.splitlines()
        r = resdata[0].split(); span = int(r[r.index("current")+1])
        screens = [l for l in resdata if " connected" in l]
        lr = [[(l.split()[0], int([s.split("x")[0] for s in l.split() if "+0+0" in s][0])) for l in screens if "+0+0" in l][0],
               [l.split()[0] for l in screens if not "+0+0" in l][0]]
        return [span, lr]
    else:
        print("no second screen seems to be connected")

def scr_position(span, limit, pos):
    # determine if the frontmost window is on the left- or right screen
    if limit < pos < span:
        return [right_scr, left_scr]
    else:
        return [left_scr, right_scr]

def highlight(scr1):
    # highlight the "active" window, dim the other one
    subprocess.Popen([ "xrandr", "--output", scr1, "--brightness", "0.3"])
    time.sleep(0.1)
    subprocess.Popen([ "xrandr", "--output", scr1, "--brightness", "1.0"])

# determine the screen setup
screendata = get_onscreen()
left_scr = screendata[1][0][0]; right_scr = screendata[1][1]
limit = screendata[1][0][1]; span = screendata[0]

# set initial highlight
oncurrent1 = []

while True:
    time.sleep(0.5)
    pos = get_wposition()
    # bypass possible incidental failures of the wmctrl command
    if pos != None:
        oncurrent2 = scr_position(span, limit, pos)
        # only set highlight if there is a change in active window
        if oncurrent2 != oncurrent1:
            highlight(oncurrent2[0])
        oncurrent1 = oncurrent2


How to check if a new username is a system user?

You can use awk to find local users with id >= 1000:

awk -F: '$3>=1000 && $3!=65534 {print $1}' /etc/passwd

To also check for a home folder below /home:

awk -F: '$3>=1000 && $3 != 65534 && $6 ~ /^\/home/ {print $1}' /etc/passwd

Replace /etc/passwd with <(getent passwd) to list all users including network accounts ...

See also this related question, as well as this one.


What GID number assigning policy does have Ubuntu so I can asign my organization GID without conflict?

There is an implicit policy in /etc/adduser.conf. There are 4 interesting variables with default values:

FIRST_GID=1000
LAST_GID=29999 # Twenty nine thousand ...
FIRST_SYSTEM_GID=100
LAST_SYSTEM_GID=999

So, I should use GID from 1,000 to 29,000 for my organization groups.

Maybe there is a more elaborated explanation...


I solved with solution I found in https://blog.revant.me/blog/asus-zenbook-ux431fa-linux-display/

First boot with nomodeset to get access to system.
As root change working directory to /lib/firmware/edid/
cd /lib/firmware/edid

Download the edid file
wget -c https://github.com/akatrevorjay/edid-generator/raw/master/1920x1080.bin -O ncp.bin

As root modify the kernel boot parameter and update grub menu
nano /etc/default/grub

###
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm.edid_firmware=edid/ncp.bin"
###

update-grub2 # for ubuntu

Reboot and the display and brightness control will work


minidlna and samsung tv file format doesn't support

Here are the settings of our /etc/minidlna.conf to stream audio, video, or pictures without issue to our Samsung UE40ES6100 smart TV:

Port

Make sure you stream on the port your TV listens to. You may also have to make sure that this port is accessible for your TV from your router. In case the port is wrong your TV may not see miniDLNA at all.

port=9500

Media directories

Put here the directories to add to miniDLNA's media library. These directories may need consideral time for scanning on the first run. Unfortunately there is no feedback from miniDLNA when it is finished with scanning. Make sure the group minidlna has read acess to these directories. Replace the full path and directory name with your's.

media_dir=V,/<path>/<Videos>
media_dir=A,/<path>/<Music>
media_dir=P,/<path>/<Pictures>

Data base and log directory

This is where miniDLNA stores it's database and log files. It's crucial to give the group minidlna write permission to the path you give here.

db_dir=/home/<user>/.config/minidlna # or any other directory
log_dir=/home/<user>/.config/minidlna # or any other directory

Model number

This may not be needed, but our TV did not recognize miniDLNA unless we gave it the model number AllShare here.

serial=
model_number=AllShare1.0

Other settings

These settings were set per default but I will post them here just in case they are not.

network_interface=eth0 # change appropriately, e.g. wlan0 if you stream from wireless
friendly_name=miniDLNA # how miniDLNA is named on the TV
enable_tivo=no
strict_dlna=no
notify_interval=900


Look whenever you are setting up a domain on a server, you need NS1 & NS2 name server.

These entries you will make using BIND service on your Server. Now These NS1 & NS2 need to be added with your registered domain from where domain is purchased. then it will take 2-48 hours to propagates through network to be available.

Here NS1 & NS2 use to Bind the IP Address with your domain Name.

Try doing this. i think it will help you.


How do I fix "Error opening terminal: unknown." on Ubuntu server?

Try to run /bin/bash, I think it will allocate pseudo tty

Also try:
TERM=linux
then run nano


cron job not working but works on terminal

Give the complete path of the python file. Change your command to

 5 * * * * /path-of-the-file/smart-cv.py archive

Hope it helps.


What are these unknown partitions I see in gparted?

there is no swap, otherwise gparted would have found it.

You can start gparted as root and mark a partition as swap.

After that you should modify manually fstab

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


Ubuntu Snappy Core RPi3 model 3 boot failure

I had a similar issue due to too much free space in front of the first partition on the SD card. I extended this partition via GParted to fill the free space in front of it, then everything worked.

I believe this has something to do with the bs=32 option.

Hash sums can be found one level higher on the download link; see: http://cdimage.ubuntu.com/ubuntu/releases/16.04/release/

fresh and almost ready here are some true snappy aka ubuntu.core images for the raspberryPi3:  http://cdimage.ubuntu.com/ubuntu-core/xenial/daily-preinstalled/20161027/ but be aware of the new install routine as can be watched here https://youtu.be/QT8QJz82iYg?t=5m2s - the ports outside a vm are still 22 and 4200.

just tried it and works nicely


I had a similar problem, running ubuntu-sdk with Ubuntu 14.04. The ReadMe file helped me figure out what was wrong. I first apt-get installed the applications they asked for testing, but I reckon this was not entirely necessary.

In my case, the [myhtml5project].desktop file, the file that is run, indicated Exec=webapp-container --inspector ./www/index.html. You have to run that command on your terminal and see what goes wrong. Actually, there was a missing library when running.
Depending on your config, the ReadMe file advises to put instead : Exec=ubuntu-html5-app-launcher $@ --www=www --inspector.
After another install (sudo apt-get install ubuntu-html5-container), the program started.

I hope that works.

Good luck and tell us if you managed eventually to overcome your problem.


What are the differences between netcat-traditional and netcat-openbsd?

You can look at the packages' descriptions using apt-cache show. They say it all:

$ apt-cache show netcat-traditional
...
 This is the "classic" netcat, written by *Hobbit*. It lacks many
 features found in netcat-openbsd.
...
$ apt-cache show netcat-openbsd
...
 This package contains the OpenBSD rewrite of netcat, including support
 for IPv6, proxies, and Unix sockets.
...

So the significant differences are as stated. The OpenBSD rewrite supports IPv6, proxies, and Unix sockets, which the traditional implementation lacks. In practice, if you don't need any of these, you won't notice a difference.


How to install MSI Radeon R9 270 graphics card driver?

Open the terminal and type:

sudo apt-get install fglrx-updates fglrx-amdcccle

Reboot the computer to enable the graphics driver.

fglrx-updates is the updated version of the proprietary video driver for the AMD graphics accelerators, suitable for your recent model MSI Radeon R9 graphics card. At the AMD Graphics Drivers and Software website you can check whether the up-to-date proprietary graphics driver is suitable for your graphics card using the selection form that looks like this:

The only thing that you did wrong was you misspelled fglrx-updates, so your command said it was unable to locate the package. You can also install fglrx-updates from either the Ubuntu Software Center or the Additional Drivers utility.


Do this:

Reboot into the GRUB menu.
Select the Advanced options for Ubuntu choice.
Select a Recovery Mode kernel (doesn't matter which).
On the next window that pops up, select root.
Run umount /dev/sda1.
Run fsck -f /dev/sda1.
When that finishes, reboot.


When I had the "no installation candidate" issue (but with a different installation), the problem was with my /etc/apt/sources.list. It might help to check yours

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse


How do i get a systemd unit to redirect or copy logs to syslog?

Found a workaround using systemd to run journalctl immediately after starting the service I need to get a log from.

Add a systemd service script to create a log file for "MyService"
 /etc/systemd/system/multi-user.target.wants/MyService-journalctl-to-log.service:

[Unit]
Description=MyService journalctl parser to filebeat
#I needed to get a log file for filebeat to read
#Wants=filebeat.service
#After=filebeat.service

[Service]
Restart=always
RestartSec=5
ExecStart=/bin/sh -c '/bin/journalctl --no-tail -f -u MyService.service  > /var/log/MyService.log 2>&1'
ExecStartPre=/bin/journalctl --vacuum-size=10M

[Install]
WantedBy=multi-user.target

Enable and start the new systemd service

systemctl enable MyService-journalctl-to-log.service
systemctl start MyService-journalctl-to-log.service


Error Found When Loading /etc/profile Line 38:8.0_121 & 45:20.0_121 Command Not Found

Show the contents of the file /etc/profile . It seems that there is an incorrect commmand, but without reading is impossible to fix it. You could see it with:

cat /etc/profile

or

nano /etc/profile

Posted as an answer because I can't make comments :\


Automate two commands in sequence on login (Killing Nemo)

You can set nautilus as the default for the desktop and file manager:

sudo apt-get install dconf-tools
gsettings set org.gnome.desktop.background show-desktop-icons true
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search


Following works
dialog --ok-label "Next" --cancel-label "Back" --menu "Choose Next or Back" 15 50 4 Blah "blah"


Changinge font size of a pdf file using Libre draw?

Readable text from PDF is imported in LibreOffice Draw as Text objects, one for each line because that is also how text may be coded into the PDF. Bear in mind that PDF was never designed to be editable.
You can change the font size of multiple text objects in Draw by selecting them, then changing the font size via the Properties pane on the right, or via the Format - Characters dialog. Because Draw is a drawing program, you work with one page at a time.
Depending on the nature of the document, it could, or could not, be interesting to manipulate the text using styles. You then would select all text and clear direct formatting (Format - Clear direct formatting). Then, by editing the style, you would change the appearance of all text. Selected text, e.g. headings, could then be manually assigned a different style.
Another way, if you really need to totally re-typeset the document, would involve export the text with a commandline tool like pdftotext or pdftohtml and then importing the resulting text file into Libreoffice Writer. There, typesetting will be more convenient. The figures could then be transferred from the PDF document open in Draw.
In the end, it will all require significant manual labor. PDF is not designed for such operations, so you may want to avoid reformatting a PDF unless absolutely necessary for some reason.


Whenever I delete Jabber and Yahoo from my online accounts list, they reappear

Ok. I've a good news and a bad news for you. :)

Good news, this annoyance can be removed. The account information is stored in ~/.config/libaccounts-glib/. Just delete every file in there. All your accounts will be gone on reboot. Then you can recreate the one you want.

Bad news, this seems to be an old bug which is not yet cured. Checkout here.

I would suggest you update your gnome version or file a bug report with Gnome.


string "if" statement comparing is string empty

The code you are using has a few issues:

It is not recommended to parse ls, but let's keep it for now since it has nothing to do with your problem.
Using `` to execute your commands works, but is old style and should be replaced wit $(). Not very important here, but maybe worth mentioning for the future.
Your if-construct has the wrong syntax. It is missing a then and a fi.
The way you are using -n is wrong. -n tests if a string is not empty.

Here is an improved version:

#!/bin/sh

testString=$(ls -l $1 | awk '{print $1}' | grep x)
if [ -n "$testString" ]
then
    echo "file is executable"
else
    echo "file is not executable"
fi

The question is about string manipulation and uses the executable flag only as example, but I still want to mention the recommended way to check if a file is executable:

#!/bin/bash
file="$1"

if [[ -x "$file" ]]
then
    echo "File '$file' is executable"
else
    echo "File '$file' is not executable or found"
fi


Why can't I find 32bit edition of Kubuntu 20.04?

Kubuntu 18.04 LTS was the last Kubuntu with i386 (x86 32-bit) support.

Xubuntu and Lubuntu continued releases i386 versions of 18.10 releases, and continued with alpha builds of i386 of 19.04 until Dec-2018 (Xubuntu dropped early in December, Lubuntu later in the month).

The best official notice maybe https://lists.ubuntu.com/archives/kubuntu-devel/2018-May/011657.html,  for a press/blog article (often easier to read in context) maybe read https://www.omgubuntu.co.uk/2018/05/kubuntu-drops-32-bit-installer-images


First, copying your home directory to a Windows partition isn't a good idea, because there are a few files in your homedir that have specific requirements for permissions, and those permissions will be lost on a Windows partition.

For a backup, you could make a tar archive of your files and store that archive anywhere. That would preserve all your permissions.

tar cjvf /windows/c/home_backup.tar.bz2 "$HOME"

As far as your Firefox data goes, all that info lives in a hidden directory under your home directory: ~/.mozilla/firefox. Back that up, and your Firefox bookmarks are safe.


Microsoft Office 2010 on Ubuntu 17.10 - Wine - Connection error, activation problem

I cannot answer your exact question as posed, but I can explain how to get Microsoft Office 2010 working on Ubuntu 17.10, which sounds like what you are after.

(I don’t have the required reputation to add a comment, which I would have done to check whether this answer is of interest to you.)

Step 1: Install PlayOnLinux

sudo apt-get install playonlinux

Step 2: Use PlayOnLinux to install Microsoft Office 2010

open PlayOnLinux
click Install a program
find and select Microsoft Office 2010
follow the instructions to install the components you want

Step 3: Install Wine version 2.22 (x86) into PlayOnLinux

on the PlayOnLinux main window, go to Tools, Manage Wine versions
under the Wine versions (x86) tab, select 2.22 and click > to move it from Available Wine versions to Installed Wine versions (i.e. to install it)
close that window

Step 4: Change the Microsoft Office 2010 install to Wine 2.22

select the Microsoft Word 2010 icon
click on Configure in the left pane
change the Wine version to 2.22

Step 5: Enter the product key

go to the Wine tab, click Control Panel
double click Add/Remove Programs
select Microsoft Office Professional (or whatever you have) 2010, click Modify
select Enter a Product Key
enter your key, click Continue
click customise
ensure that the components you want are selected (because it resets the component list at this point), click continue
click Close and Yes (to reboot) when asked
close the configuration window

The product key should be retained. Open one of the components (e.g. Microsoft Word), go to File, Help; it should say Product Activated on the right hand pane.


How to downgrade PHP from 5.5.9 to 5.4 in Ubuntu 14.04 (Installed with LAMP)

First you need to remove all php5 files :

sudo apt-get remove --purge `dpkg -l | grep php | grep -w 5.5 | awk '{print $2}' | xargs`

After that try to search for php 5.4. available resources :

apt-cache policy php5

My result :

php5:
  Installed: (none)
  Candidate: 5.5.9+dfsg-1ubuntu4.4
  Version table:
     5.5.9+dfsg-1ubuntu4.4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

If there is no resources available than we need to add some by following command :

echo "deb http://php53.dotdeb.org stable all" | sudo tee -a /etc/apt/sources.list

and

apt-get update

If there is a problem with signatures like following :

Reading package lists... Done
W: GPG error: http://php53.dotdeb.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY xxxxxCODExxxx

we need to sign our Deb repository by commands :

gpg --keyserver keys.gnupg.net --recv-key xxxxxCODExxxx
gpg -a --export xxxxxCODExxxx | sudo apt-key add - apt-get update

After that execute :

sudo apt-get update
apt-cache policy php5

you should see last result :

php5:
  Installed: (none)
  Candidate: 5.5.9+dfsg-1ubuntu4.4
  Version table:
     5.5.9+dfsg-1ubuntu4.4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     5.4.33-1~dotdeb.1 0
        500 http://php53.dotdeb.org/ stable/all amd64 Packages

and finally install your version by hitting :

apt-get install php5=5.4.33-1~dotdeb.1

Enjoy ;)


I've found that, it is much easier to install .deb packages using gdebi. You can install gdebi with the following command:

sudo apt-get update
sudo apt-get install gdebi

You don't need to extract the .deb file to install it. To install the .deb file, navigate to the folder containing the file using cd, for example:

cd ~/monitor-0.1+monitor1.0.0

or . . .

cd ~/

Then, run:

sudo chmod +x monitor_0.1+monitor1.0.0-1_amd64.deb

. . .  to make the file executable. Then, run:

sudo gdebi monitor_0.1+monitor1.0.0-1_amd64.deb

After the package loads in gdebi, you may need to click install. If gdebi shows the option to reinstall the package, your job is done.


Switching from Mac OSX Lion Theme back to 12.04 easily

If you've already downloaded the appropriate Mac OSX theme components (wallpapers, cursors, icons, window theme), it's easy enough to switch between themes using the gnome-tweak-tool. However, it's not a one-click procedure.

Noobs Lab has a good tutorial for installing and setting up a Mac theme. The tutorial includes installing gnome-tweak-tool, and a couple other apps that assist in "Macifying" your interface.

Don't hesitate to ask follow-up questions if any of the theme-installation steps need clarification.


I don't have enough points to comment yet or I'd post this as a comment.

Could you have something locking you in you udev rules?

 sudo less /etc/udev/rules.d/70-persistent-net.rules

This caches the MAC address and interface name for you system. I've been burned by it before when changing out network cards then swapping them back.

Check if the MAC in the rules file is the one you are getting reset back too.


Can I reinstall nvidia drivers if corrupted and root is locked?

Yes you can. While you started booting your Ubuntu, you may see GRUB menu & in that menu choose recovery mode. If you have not seen recover mode keep pressing SHIFT key until you see GRUB Menu

After you getting into GRUB menu there is a option like " root drop to root shell " . From there you can do as a root user or you can reset root user password too.

There we have one more option like dpkg with which you can reconfigure your packages too. so I mean to say installing/removing/repairing your packages.

hope that helps.


Ubuntu does not boot up at all, not even to grub - completely black sceeen

If you cannot get into boot options / BIOS / UEFI, it's likely a hardware issue.


Can't boot Ubuntu 16.04 LTS after installing it alongside Windows

Made it work. But none of the post I found about creating it in UEFI worked(because I had already created it in UEFI). It is ineed importat that you verify that if you want to boot it in UEFI, you install it in UEFI.

What I did different was that I had to turn on Enable Secure Boot in BIOS

Go to Security Tab

Gent to the Secure Boot options

Add file to secure boot(something like that)>EFI>ubuntu> Save changes

Restarted machine didn't boot instantly(even though the order is arranged) so I
pressed F12> chose ubuntu and done.


Intel Provides an as-is linux compatibility lists for SOME motherboards.

List For Intel Desktop Boards:

Step #1 = http://www.intel.com/p/en_US/support/dsktpboards

Step #2 = Choose A Board

Step #3 = Under "Compatibility" choose supported operating systems. [Usually there are several charts, the first is windows only the second is windows and linux testing]

Intel Server/Workstation Boards:

Step #1 = http://www.intel.com/p/en_US/support/server

Step #2 = Scroll down to "Sever Motherboards"

Step #3 = Choose A Board

Step #4 = Under "Compatibility" choose "Tested Operating Systems" [Depending which board you've selected there may be little or no testing, while others have a fair bit]


Multiple ways are available to save power in Ubuntu, but because of instability , most of them are not enabled by default. Few things you can do to extend  battery life of your laptop are mentioned below.

Enter into low power mode

In order to enter low power mode, run this:

sudo pm-powersave true
Adjust Laptop Backlight

On a typical laptop dropping from full brightness to 2/3 brightness will save about 1 Watt.
Disable Unused Bluetooth Devices.
Enable i915 LVDS Downclocking

It  will down-clock the LVDS refresh rate. For systems that do not support LVDS down-clocking the screen can flicker.
edit /etc/default/grub to enable it.

change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.lvds_downclock=1"
Enable Aggressive Link Power Management

It  is a mechanism where a SATA AHCI controller can put the SATA link that     connects to the disk into a very low power mode during periods of zero I/O activity and into an active power state when work needs to be done.

Enable ALPM:

echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm
Use powertop

Powertop is a power consumption and power management diagnosis tool. Use it to send the following app in "Good" power saving state.

Webcam
Audio
DRAM
Ethernet
Wifi
Bluetooth
SATA link
MMC/SD

Reduce Wakeup Events

Wakeup events in applications cause an idle processor to come out of a sleep state and this consumes power.
You can save few  wakeups in a second. For example, just disabling the gnome-terminal cursor flash will save wakeup events.

You can also use Laptop Mode Tools.It  is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file.

Install Laptop Mode Tools

sudo add-apt-repository ppa:webupd8team/unstable

sudo apt-get update

sudo apt-get install laptop-mode-tools

Open it using gksu lmt-config-gui.

Source:wiki.ubuntu.com


So the admin of the VMWare Server / firewall fixed it. He didn't tell me yet where the problem was. I'm still waiting for his answer. But it wasn't with my system.

Thank you so much for your questions and for trying to help me! The problem actually made me learn quite a bit about network configurations on Linux.

//edit: He finally wrote back and told me that the problem was in the firewall configuration

Cheers


GParted won't seem to let me shrink an encrypted partition

The partition/dev/sda2 is an extended partition under which the logical partition /dev/sda5 was created. Although this would not have been necessary for the setup being shown in the screenshot you've provided, the reason to create an extended partition is to achieve the possibility to create more than three additional partitions later on. It is not possible to create more than four primary partitions on a disk with msdos (MBR) partition table. But now to your question : you can - and have to - resize the partition /dev/sda5. First decrypt this partition and then start the resizing process with GParted ...

Shrink /dev/sda5 (make all free space to be preceding space)
Shrink /dev/sda2 (make all free space to be preceding space)
Grow /dev/sda1 (add the complete free unallocated space)

It is important that afterwards no free unallocated space is left between /dev/sda1 and /dev/sda2,
which means that you may need to add 1 MB still remaining space to /dev/sda1 or to /dev/sda2.
I've tested it in a virtual machine, but I recommend to backup the disk in case something goes wrong.
Find more information about partition resizing and what you have to pay attention to : GParted Manual


I was looking around for clues on running openjdk and applets. I installed:

OpenJDK: 1.7.0_51

IcedTea: 1.4-3ubuntu2.1

On a 64 bit Ubuntu 13.10 install and the chess site you linked to (buho21.com/salas/ajedrez.jsp) worked fine for me. Maybe you should start firefox from a terminal window and see if there is any error output.


As g_p said in the comments, your if [ "$CURNUM" -lt "$_MAXNUM" ] isn't terminated. Bash is expecting a fi before the while's done.


When you remove the password from your keyrings, gnome keyring manager will save the files as clear text. You can edit those files with a text editor and copy the keys around. Set a password to have the keyring files encrypted again.

I suggest you backup your keyring files before doing this.

I assume you have two keyrings like this:

And the keyring files looking like this:

$ cd ~/.local/share/keyrings
$ file foo.keyring bar.keyring
foo.keyring: GNOME keyring, major version 0, minor version 0, crypto type 0 (AEL), hash type 0 (MD5), name "foo", last modified Thu Jan  1 01:00:00 1970, created Thu Jan  1 01:00:00 1970, not locked if idle, hash iterations 1087, salt 10888099772058093604, 1 item(s)
bar.keyring: GNOME keyring, major version 0, minor version 0, crypto type 0 (AEL), hash type 0 (MD5), name "bar", last modified Thu Jan  1 01:00:00 1970, created Thu Jan  1 01:00:00 1970, not locked if idle, hash iterations 1749, salt 12972167437702069911, 1 item(s)

Remove the password from the two keyrings. To remove the password you have to change the password (right click > change password), enter the old password and leave the new password blank. A dialog will prompt you to verify that you want to store your passwords unencrypted.

Now your files should look like this:

$ file foo.keyring bar.keyring
foo.keyring: ASCII text
bar.keyring: ASCII text
$ cat foo.keyring

[keyring]
display-name=foo
ctime=0
mtime=0
lock-on-idle=false
lock-after=false

[1]
item-type=0
display-name=key1
secret=pass1
mtime=1311897928
ctime=0
$ cat bar.keyring

[keyring]
display-name=bar
ctime=0
mtime=0
lock-on-idle=false
lock-after=false

[1]
item-type=0
display-name=key2
secret=pass2
mtime=1311900380
ctime=0

Edit the files using your favorite text editor. Make sure to change the section numbers so they are consecutive and do not overlap.

$ cat foo.keyring

[keyring]
display-name=foo
ctime=0
mtime=0
lock-on-idle=false
lock-after=false

[1]
item-type=0
display-name=key1
secret=pass1
mtime=1311897928
ctime=0

[2]
item-type=0
display-name=key2
secret=pass2
mtime=1311900380
ctime=0

Back to the graphical keyring manager. Lock, then unlock the keyring so the changes take effect (right click > lock, right click > unlock). Alternatively you can close and reopen the keyring manager. You should now see all the keys you moved in one keyring.

You can now set a password and the keyring files will once again be encrypted.


I run a command sudo startx and then I can only log in as a guest

Method 1 - Try this first!

Go to a TTY terminal [I think that's what they're called] and press Ctrl + Alt + F1

Login with your username and password, and type sudo chown $USER:$USER ~/.Xauthority followed by enter. Then type in your password again and press enter.

Now go back to the main X server Ctrl + Alt + F7 [or reboot] and try login to your account now. It should get you to the desktop.

Method 2

Go to a TTY terminal [I think that's what they're called] and press Ctrl + Alt + F1

Login with your username and password, and type sudo rm ~/.Xauthority followed by enter. Enter your password again and press enter.

Now go back to the main X server Ctrl + Alt + F7 [or reboot] and try login to your account now. It should get you to the desktop.

Other info

When you mentioned GRUB, to access it [for example for entering recovery mode] press and hold the Shift key on boot until GRUB appears. If you press at the Ubuntu logo, you were too late. Press and hold at the PC vendor screen.

If you tried to run sudo rm ~/.Xauthority as guest, the ~ bit indicates the user home folder, in which in guest was the guest /tmp folder, not your user directory in /home.

List item


14.04 LTS on Toshiba Satellite C75D-B. Brightness, WiFi, Fn-keys control and Suspend problems

This kernel patch is needed to fix acpi keys on C75D-B

*** drivers/platform/x86/toshiba_acpi.c 2015-02-08 20:54:22.000000000 -0600
--- drivers/platform/x86/toshiba_acpi.c.fixed   2016-01-2013:32:56.623965574 -0600
*************** static const struct dmi_system_id toshib
*** 247,252 ****
--- 247,258 ----
        DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A50-A"),
    },
},
+   {
+       .matches = {
+           DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+           DMI_MATCH(DMI_PRODUCT_NAME, "Satellite C75D-B"),
+       }
+   },
{}
};

I have tested this on my Satellite C75D-B7360 and it works! If you are familiar with kernel building this should be a simple matter to patch the file and rebuild toshiba_acpi.ko.


Run different java based on command line parameter

The examples you show do precisely what you are looking for. So, though a command line parameter will not do the trick, an environment variable will. And you can specify 'one-time' environment variables on the command-line, preceding the command.

Most, if not all, Java based software will honour the JAVA_HOME environment variable, and run the JVM located underneath that directory.  Maven certainly does: have a look at less $(which mvn) and see just how much effort it puts in getting this right.

Note that - in the specific case of Maven - if your goal is to compile Java sources for an older JVM version, then there is no need to switch JVMs. Instead, specify the source and target Java versions in your POM.


Wireless Card Behaving Oddly on an HP Pavilion dv6

Sounds like a problem I had with my Dell laptop, and according to the HP web site it is mostly a Intel based 802.11 ABGN wireless card which my Dell had.

My Dell laptop had a problem with it losing connection with a wireless access point using 802.11n. This problem is a known issue with the iwlagn driver, and the best workaround is to disable 802.11n on the card. To disable 802.11n on this card create/edit your /etc/modprobe.d/options.conf file:

sudo gedit /etc/modprobe.d/options.conf

And add the following to it:

options iwlagn 11n_disable=1 11n_disable50=1


The bug is a dependency issue on oxide :

https://bugs.launchpad.net/ubuntu/+source/oxide-qt/+bug/1543215


Create a shell script with this content:

#!/bin/sh
dpkg -l linux-*  | \
awk '/^ii/{ print $2}' | \
grep -v -e `uname -r | cut -f1,2 -d"-"` | \
grep  -e '[0-9]' | xargs sudo apt-get -y purge

This script will remove old kernels, headers and sources.


The only real solution is to replace it. If it is under warranty (as it should be), you should be able to replace it for almost free (may need to pay shipping), by getting an RMA from the manufacturer of it. You'll have to contact their support and do that.

Or you can use the opportunity to upgrade to better quality, faster, or more RAM, if your system isn't maxed out already in that respect.


How do I set a shortcut to screenshot a selected area?

Open System Settings -> Keyboard -> Shortcuts
Select Custom Shortcuts(you can go to Screenshot-s too and it will work)
Click +
Fill fields

Name to Take a screenshot of area
Command to gnome-screenshot -a or shutter -s(if u prefer shutter)

Click OK
Double-click on what you make and set shortcut Shift+PrtSc

— And that's all ... ;)


fdisk: cannot open /dev/sdb1: No such file or directory

You are trying to perform very dangerous actions.
Any mistake here may cost very high.
You can lose your data.

But please make sure that /dev/sdb exists.
You can check all block devices with sudo lsblk and then continue using dd. Usually it is possible to write to the whole disk, not its partition (sdb instead of sdb1).

In qemu part you should use the full path:
sudo qemu-system-i386  /dev/sdb.


What to do with USB Webcam "Not enough bandwidth for new device state" Issue?

After a long time I finally got it working. I have to plug the cam directly into a laptop USB port. It fails completely when plugging it into my TB16 docking station. Also, I had to eliminate my previous Dell D3100 docking station.


How to get WiFi not working on Dell Inspiron 15R 5520 notebook?

$ lspci -vvnn | grep 14e4
08:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)

download this file: http://jas.gemnetworks.com/debian/pool/main/w/wireless-bcm43142/wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb

sudo apt-get install linux-headers-generic build-essential dkms

navigate to the folder you have saved the downloaded file and run this command.

sudo dpkg -i wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb

i tried this but i was to fix : lo no extension


These are the steps I picked up at their official site with this you should be able to see it in cups:

Download the printer drivers here
extract it and then move it to /home directory
open your terminal in the extracted folder

run sudo ./install.sh and follow the command prompt
Go to cups console in a browser http://localhost:631/admin and add your printer

Hope it helps


Is it possible to start chromium with a chrome:// url?

While "normal" url's do work as expected, it seems impossible at first to use the chrome:// urls from a command, and there is nothing in the man chromium-browser man page on this.

However, it is very well possible to work around this, with the help of xdotool.

How it works

install xdotool

sudo apt-get install xdotool

Use the following command in your .desktop file:

/bin/bash -c "chromium-browser&sleep 2&&xdotool type 'chrome://inspect'&&xdotool key Return"

What it will do is open chromium browser, xdotool will type the chrome://inspect url and (simulate) press return.

Effectively this will do exactly what you want.
No need to say that you can replace chrome://inspect with any other of the chrome:// commands.

Note

In the command, there is a small break included of 2 seconds, to make sure the browser is loaded before xdotool starts to type. On my system (not the most recent) it can be changed to sleep 1 and still work perfectly. You can experiment a bit with it.

edit

Alternative

Dirty or not, a solution should always work. I tried the solution above now and then, and found that occasionally, it takes too long for the chromium-browser window to appear. Especially when the computer is heavily occupied, there is a chance xdotool starts typing "blindly".

The solution below is "time-proof" and should work under all circumstances; it makes sure xdotool only starts typing when a new chromium-browser window appears within appr. 15 seconds.

How to use

Copy the script below into an empty file
Save it as run_chrcommand.py
use as command in your .desktop file:

python3 /path/to/run_chrcommand.py

The script

#!/usr/bin/env python3
import subprocess
import getpass
import time

user = getpass.getuser()
get = lambda x: subprocess.check_output(["/bin/bash", "-c", x]).decode("utf-8")
ws1 = get("wmctrl -lp"); t = 0
subprocess.call(["/bin/bash", "-c", "chromium-browser&"])
while t < 30:
    ws2 = [w.split()[2] for w in get("wmctrl -lp").splitlines() if not w in ws1]
    procs = [[p for p in get("ps -u "+user).splitlines() \
              if "chromium-bro" in p and w in p] for w in ws2]
    if len(procs) > 0:
        command = "xdotool type 'chrome://inspect'&&xdotool key Return"
        subprocess.call(["/bin/bash", "-c", command])
        break
    time.sleep(0.5)
    t = t+1


This question comes up infinitely and has been answered many times.  We should probably create a canonical question for this.

After a release goes End of Life, there are zero updates to the repositories.  Eventually after End of Life, the repositories for that release get migrated to oldreleases, which only holds the archive state as it was at the EOL date.

You will not get any security updates or bugfixes if you continue to use an EOL release.  It is highly advisable that you upgrade from 14.10 to 15.04 after it EOLs (and after 15.04 is released), or that you use the LTS release (14.04) if you plan on not upgrading your Ubuntu version every interim release.

The problem with EOL releases is you have to either do a fresh install (to an LTS) or an in-place upgrade (to 15.04 after it is released).

If you do a fresh installation, you'll lose everything unless you back up your files, and you will still likely not have everything that 14.10 had in it.

If you do an in-place upgrade to 15.04 after 15.04 releases, you can keep most of your settings, but some programs might have dropped away.  You have to examine the upgrade tasks closely before hitting "OK" on the upgrade.  Do note that with upgrades, bugs and other problems can arise.


There was a bug reported for that card model in lucid:
https://bugs.launchpad.net/ubuntu/lucid/+source/linux/+bug/509273

According to the bug report is is fixed now, probably the upgrade pre-validation data was not updated after the bug was fixed.


What is the difference between touch file and > file?

Both touch and > will create a new file if it doesn't exist. As the following terminal commands show when you touch an existing file the access/last modified time are updated. But if you > to an existing file it is truncated and the last modified time is updated (access time is not).  Note that > does not delete/unlink the file.  The inode stays the same -- which is why > / or truncate are commonly used to clear out log files even with an open file handle.

rick@dell:~$ > EmptyFile

rick@dell:~$ touch EmptyFile2

rick@dell:~$ ls Empty*
EmptyFile  EmptyFile2

rick@dell:~$ ls -l Empty*
-rw-rw-r-- 1 rick rick 0 Sep 29 20:27 EmptyFile
-rw-rw-r-- 1 rick rick 0 Sep 29 20:27 EmptyFile2

rick@dell:~$ echo Hello > EmptyFile

rick@dell:~$ ls -l Empty*
-rw-rw-r-- 1 rick rick 6 Sep 29 20:28 EmptyFile
-rw-rw-r-- 1 rick rick 0 Sep 29 20:27 EmptyFile2

rick@dell:~$ > EmptyFile

rick@dell:~$ ls -l Empty*
-rw-rw-r-- 1 rick rick 0 Sep 29 20:28 EmptyFile
-rw-rw-r-- 1 rick rick 0 Sep 29 20:27 EmptyFile2

rick@dell:~$ echo Hello > EmptyFile

rick@dell:~$ touch EmptyFile

rick@dell:~$ ls -l Empty*
-rw-rw-r-- 1 rick rick 6 Sep 29 20:32 EmptyFile
-rw-rw-r-- 1 rick rick 0 Sep 29 20:27 EmptyFile2

As mentioned in comments, touch is an external command and only operates on files. > is a shell built-in feature that serves many different purposes. Typically you would see it used like cat source.fil > target.fil.

A long form to empty a file would be:

cat /dev/null > emptyme.fil

Using > emptme.fil accomplishes the same thing in a compact format of redirecting nothing to the file.


How to search as you type in the File Dialog window in Ubuntu 13.04?

Just be sure that the focus is set on the list with the files and 'the search as you type' procedure will work:


Why can't I log in to my Samba share on my home network?

The CUPS errors are not an issue.  I get those also with my setup and I have no trouble accessing samba shares.

Is your firewall turned on and if so, is samba being blocked?

Is the dylanweber user also a regular login id on your system?  Have you tried using your regular login password (if different from what you set for samba)?

If you try to access the share directly from the linux box, does that work?  i.e. something like:

> smbclient //1.2.3.4/storage

from a prompt in the 1.2.3.4 host itself logged in as dylanweber


At what time does cron execute daily scripts?

Approximately 7:35am, but the exact timing will depend on anacron.

By default cron delegates the running of /etc/cron.daily jobs to anacron.  /etc/crontab contains the line:

25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

but this defines the behaviour if anacron is not installed

With anacron installed, the running of cron.daily jobs is controlled by the entry in /etc/anacrontab:

1   5   cron.daily   nice run-parts --report /etc/cron.daily

which says run these jobs once per day, with a delay of 5 minutes.

anacron itself is run by cron, as specified in the file /etc/cron.d/anacron, which runs anacron at 7:30am.


Unfortunately, this is not how it works in Gnome Shell.

By default, one monitor has the work spaces, the second monitor is a static extension of the space on the first monitor. Thus, if you switch workspaces, the display of the other monitor does not alter.

Gnome Tweaks has a setting where you can alter the behaviour such that the second monitor is an extension of the space of the currently active workspace on the first monitor. Then, both monitors simultaneously will change view when you switch workspaces.

Unfortunately, that is it. It is not out of the box possible to have one workspace allocated to one monitor, like it works in for example i3 window manager.


I found the solution. It will be solve if you restart budgie-panel. You can also add command to startup.


Disable new keyboard shortcut for Show Desktop

As hinted by @doug in the comments, I needed to log out and in for the change to apply.

Removing the "Show Desktop" icon worked immediately, which is why I expected the shortcut to also be removed immediately. It was not.

It is still very strange that the shortcut was active, but not visible in any of the settings tools I mentioned in the question. It looks like the shortcut was hard-coded together with the icon enable/disable. Why the icon turned up at my last system update is also a mystery.


DHCP server not routing to connect to internet for clients

In /etc/network/interfaces do not specify a broadcast or gateway. This is done with the dhcp lease. You do need to specify a network for the DHCP however. This will configure eth1 to run on the 192.168.10/24 network. eth0 will be your gateway which is connected to your primary DHCP router. Change it to this -->

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
     pre-up iptables-restore < /etc/iptables_rules
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0

Then your dhcp.conf file will specify the routers and gateways. Use the DNS IP adresses in your /etc/resolv.conf file. These are known to be suitable in your location with your ISP. Change the routers and DNS settings in your DHCP.conf to this -->

option routers 192.168.10.1;
#8.8.8.8 is google's public DNS server (this is optional)
#Include the DNS IP addresses in your /etc/resolv.conf file
option domain-name-servers 8.8.8.8, (IP addresses in your /etc/resolv.conf)

Note:
If you want to save your iptables rules, than after you set them, run this command to save it to a file --> iptables-save > /etc/iptables_rules
You can see the placement to load the rules in the /etc/network/interfaces settings I provided. This will happen when the network manager is loaded/reloaded.

Let me know if this helps.


Flash Plugin Crashes After 1 Second of Audio or Video Playback

Go to Mozilla website for plug-ins. Install flash-aid or flash-video-replacer.

You can reset Firefox back to OEM settings:

Backup your profile

sudo cp ~/.mozilla/firefox/profiles.ini ~/.mozilla/firefox/profiles.ini.bak

Then remove it

sudo rm ~/.mozilla/firefox/profiles.ini

This will reset everything in firefox to default settings.


How to start the OpenVPN client service on Ubuntu 15.04

Is this why openvpn client doesn't work from the command line on Ubuntu 15.04?

No.  The reason is that you haven't read the commentary at the top of that very unit file, and you are calling a System 5 rc script directly.  Do not call System 5 rc scripts directly, especially on a system where System 5 rc isn't used, such as Ubuntu version 15.

Calling them indirectly via the service command is wrong in the case of OpenVPN, too.

OpenVPN is a templatized service under systemd.  The services are named openvpn@config.service.  So you should be starting your /etc/openvpn/myvpn.conf instance with systemctl start openvpn@myvpn.service

Further reading

https://unix.stackexchange.com/a/206490/5132
http://fedoraproject.org/wiki/Openvpn


The package name of the Fonts application is gnome-font-viewer. You can remove it using the command:
sudo apt purge gnome-font-viewer

In general, you can list the installed applications using:
apt list --installed

apt list also accepts globs for matching package names, as can be seen in man apt:
list
    list is somewhat similar to dpkg-query --list in that it can display a list of packages
    satisfying certain criteria. It supports glob(7) patterns for matching package names as well
    as options to list installed (--installed), upgradeable (--upgradeable) or all available
    (--all-versions) versions.

So you could list all installed packages containing "font" using:
apt list --installed "*font*"

and you would find gnome-font-viewer among others.


Yes.

The easiest and safest way is making a backup in an external drive.

An EFI partition (if your machine is UEFI) and a system partition:


Ubuntu 16.04 and Eclipse Mars menu problem

Try to start Eclipse after editing your eclipse.ini file and tweaking the launcher entry like this:

--launcher.GTK_version
2

Example file:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.GTK_version
2
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m

See:
https://stackoverflow.com/questions/36822242/eclipse-doesnt-work-with-ubuntu-16-04/36859485


How do I install Ubuntu onto a laptop with a 32GB SSD drive a 500GB hard drive? I want to take advantage of the quick boot option

You don't.  The intel fakeraid caching option is not supported in Linux.  If you want to install Ubuntu, you will have to do so either on a non cached volume of the hd, or on the ssd, and not have it cache the hd.


Can I do a factory reset to revert back to Windows 7?

You might be able to restore from system recovery if Ubuntu hasn't deleted it.

Try this:

Turn off your computer and remove everything you have connected to the it (including mouse connected through usb), leaving only the power plug.
Turn it On and quickly press and hold the Key 0
Continue to hold it until recovery wizard appears (or it doesn't and ubuntu boots)

Please keep in mind that using this method you will have to reinstall all your applications and data so you better backup your data, it will be erased in this process.

more info here


Reflink cloning of LXC container on btrfs?

You can always bedup later. It is blazingly fast (incremental run takes only seconds to finish), thanks to the advanced features of btrfs, so you can put as an upstart job.

It's not an answer, but rather a walkaround.


PPPOE doesn't work on 15.04 (intel I217-V)

I'm not sure about 14.10, but to connect to PPPoE/DSL using NetworkManager on 15.04 requires installing the pppoe package, which (for some reason) was not installed by default on my Lubuntu 15.04.

sudo apt-get install pppoe

I've reported this bug: https://bugs.launchpad.net/ubuntu/+bug/1455219


As you can read in the install wiki of Ubuntu Touch only the latest Nexus devices family are supported.

And a phone from 2009 is definitevly old in comparision to today smarthphones.

So if you want to test Ubuntu Touch you will need to get any of the Nexus devices listed in the install wiki.


What is the meaning of "-y" in this command

The -y means Assume yes as answer

i.e. in any case of a question, the program will automatically respond with yes as answer.

From man apt-get

  -y, --yes, --assume-yes

  Automatic yes to prompts. Assume "yes" as answer to all prompts and
  run non-interactively. If an undesirable situation, such as changing a
  held package or removing an essential package, occurs then apt-get
  will abort.  Configuration Item: APT::Get::Assume-Yes.


Cannot delete/move files with special characters in file name

A simple way would be to remove these files by their inode. :)

Use ls -li in the directory with the uncommon characters to show the inode number of each file, e.g.,

$ ls -li
total 0
133370 -rw-r--r-- 1 malte malte 0 Dec 30 19:00 ?2?.???љ?!?Gb??σ?[?F?
132584 -rw-r--r-- 1 malte malte 0 Dec 30 18:59 ??3]d???:????????1????G?p?ȋ??????嫳?d????ą-??

Next, use the find utility to delete the corresponding file by its name, using the syntax find <somepath> -inum <inode_number> -exec rm -i {} \;, as in the following example:

$ find . -inum 133370 -exec rm -i {} \;
rm: remove regular empty file ‘./?2?.???љ?!?Gb??σ?[?F?’? y
$ ls -li
total 0
132584 -rw-r--r-- 1 malte malte 0 Dec 30 18:59 ??3]d???:????????1????G?p?ȋ??????嫳?d????ą-??

The -i option to rm is not really necessary, I just added it to keep you from accidentally removing files you didn't mean to remove. :) It causes rm to ask for confirmation for each file that you want to delete.

If you want to remove multiple files by their inodes, you can use the -o (meaning or) syntax for find:

$ find .  \( -inum 133370 -o -inum 132584 \) -exec rm -i {} \;
rm: remove regular empty file ‘./?2?.???љ?!?Gb??σ?[?F?’? y
rm: remove regular empty file ‘./??3]d???:????????1????G?p?ȋ??????嫳?d????ą-??’? y

You can add more inode numbers by extending the expression in parentheses with more -o -inum <inode_number> expressions.


You just can't - as there is no support for the fingerprint reader in the system/API (and lots of other features you may have expected, probably).


Ubuntu Software Centre Issue (unity 11.10) after broken sun-java6-jre package installation

ok - you are using a PPA that when installing producing the following screen.

I looks like you closed this screen unexpectedly causing the package manager issues.

Restart the package installation via

sudo apt-get install -f

When you get to this screen, press the TAB key or possibly the arrow keys to navigate to the OK button.  Press ENTER

This will allow your installation to complete successfully.

Note - this is not the recommended method to install Java.

The links below will explain the community accepted Java installation methods.

If you follow this, then first clean up your installation by removing the PPA.

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ferramroberto/java
sudo apt-get update && sudo apt-get upgrade

This should now report no more errors.

N.B. if you definitely want JRE 6 - just substitue the 1.7 reference with 1.6 in my answer.

Linked Question2:

How do I install Java?
How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?


How to install HPLIP on my Ubuntu to support my HP printer and/or scanner?

Currently Ubuntu have the following HPLIP versions in universe pocket:

trusty (14.04LTS): 3.14.3-0ubuntu3.4
xenial (16.04LTS): 3.16.3+repack0-1
bionic (18.04LTS): 3.17.10+repack0-5
focal (20.04LTS): 3.20.3+dfsg0-2
groovy (20.10): 3.20.5+dfsg0-3build1
hirsute (21.04): 3.21.2+dfsg1-2

This leads to the following variants.
HPLIP installation
(a) Required HPLIP version ≤ repository HPLIP version
So if one sees that Min. HPLIP
Version is lower or equal to the version of the HPLIP package from repository, then the installation of the following packages will be enough with:
sudo apt-get install hplip hplip-gui

(b) Required HPLIP version > repository HPLIP version
If one sees that Min. HPLIP
Version is greater than the version of the HPLIP package from repository, then then one needs to install binary HPLIP by following my other answer.
(o) Optional HPLIP binary/proprietary plugin/driver
If one sees that Driver Plug-in is set to yes (or required), then one needs to install the binary/proprietary plugin/driver by following my other answer.

Examples for Ubuntu 18.04 LTS (hplip 3.17.10) and some HP device models:
| Model Name                  | Min. HPLIP Version | Driver Plug-in | Action |
| HP LaserJet 6l Printer      | 0.9.5              | No             | (a)    |
| HP LaserJet Pro MFP m426fdn | 3.15.11            | Required       | (a)+(o)|
| HP Tango                    | 3.18.12            | No             | (b)    |
| HP PageWide MFP 774dn       | 3.18.9             | yes            | (b)+(o)|


Ubuntu 12.04 and Virgin Media Backup & Storage

Got the same problem and a bit of Googling turned up this: What is the 'ptrace_scope' workaround for Wine programs and are there any risks?  which suggests setting ptrace to 0

echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope

I tried this to see if it had any impact and now the Virgin Media application connects and does the backup.  I have no idea about what ptrace is but it seemed to fix it!


How to Install Skype for Linux in Ubuntu 16.04 Via Console only?

Skype for Linux

You can download Skype on official website. They have two versions: DEB and RPM. Link to download - Skype for Linux

Install Skype for Linux on Debian/Ubuntu via console

Install apt-transport-https:

sudo apt install apt-transport-https

Download key GPG key:

curl https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add -

Add Skype to the list of Apt repositories:

echo "deb https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skypeforlinux.list

Install Skype for Linux:

sudo apt update
sudo apt install skypeforlinux


Should I install VirtualBox Guest Additions in an Ubuntu USB install?

The kernel modules provided with the guest additions should only load when booting Ubuntu in a version matching VirtualBox environment but not on bare metal. It should therefore be safe to install the guest addition which provide better graphics, USB support, and shared folders functionality.

However booting a VM from raw disk rather than from a virtual drive is not how VirtualBox is designed to perform best. It is therefore possible that the kernel modules don't play nice on a bare metal boot. You will have to test this for your individual setting.

Just install the guest additions while in a virtual environment. In case you are not happy on bare metal you can always boot to a VM in order to remove the guest additions with:

cd /opt/<VirtualBoxAdditions-x.x.xx>/
sudo ./uninstall.sh