Install package from without adding PPA Is there a way to install a package via a simple URL without having to add a PPA beforehand? Something like apt-get https://url.to.package.deb? Or perhaps some command line options that would add the PPA, update, and install the package all at once? Seems like I've seen other package managers that do this. I just find it a hassle to type the commands to add a whole repository just so I can install only one of its packages.

If you already know the .deb file link, then download that deb file by,

wget https://url.to.package.deb

If you want to download a package then run,

apt-get download <package-name>

It will download all the .deb files related to the package.Finally install all the .deb files by running,

sudo dpkg -i filename.deb

If I understand your question correctly, Not really. By using something like

sudo add-apt-repository ppa:<goalppa/ppa>

you are telling your system that you want the (file/program/code) you download from this ppa to be supported from this location and get updates from there.

Its a security question for sure, allowing new ppa's that is.
But the security concerns for just getting the (file/program/code) may be greater in the long run if it develops a security problem down the line.
Also easier to get super delicious updates (Mmmmmm updates).


Deluge start-up script works but won't start daemon on startup I've gone through the instructions here to configure Deluge, and I've also gone through these instructions to set up the necessary scripts.

The username I chose for DELUGED_USER was the user name I was logged in with, i.e. the Unity desktop user.

I executed each of the commands as instructed and received no error messages. Upon restart, deluged was not running. When I executed sudo update-rc.d deluge-daemon defaults I got a warning that the entry already exists. Manually executing sudo invoke-rc.d deluge-daemon start works, and I am able to connect.

It appears as though the start-up script will not execute at start-up, however there doesn't appear to be anything wrong with the script as executing it manually successfully starts the daemon.

Any idea why this might be happening?

On 14.04 don't use inid.d use Upstart scripts instead. There is a full Upstart guide on the Deluge site walking you through setting them up.


No brightness control 18.04 LTS: /sys/class/backlight is empty I know this issue had been addressed in the past (like this, this, this, this, this, this and more), but none were actually given a definite answer.

To begin, I'm using a NVDIA GTX1080 Max-Q graphic card. Installed driver 390 (Can't seems to switch to 396, it automatically rolled back to 390 when I select in 'Additional Drivers'). And the folder /sys/class/backlight is empty, as mentioned.

Next, I try to disable Wayland in /etc/gdm3/custom.conf and that resulted with me greeted by black screen after login. Can't seems to enter grub mode by pressing Alt+Ctrl+F1. Referred answer here. Reinstalled Ubuntu many times just to be sure about this.

Then, tried the method as suggested here and here. Still didn't fix it.

Temporarily I'm using the bash script to adjust the brightness, but it would jump to maximum again if a prompt pop up, like Authentication or copying files.

Any actual way to fix this once and for all?

xbacklight does not work for you, right?

In my case a workaround is use the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_EnableBacklightHandler=1"

in the /etc/default/grub file.
The problem is explained here

I followed Satya;s advice but it didn't work for me.

I have also created another config file as per Brightness problem - Ubuntu Forums but it didn't help either.

Finally I followed Ducky's answer as described in Brightness problem Ubuntu 18.04 LTS and changed grub a bit.

Open the file /etc/default/grub using gedit or any other text editor. Find below line.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change above line to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Finally my function keys became operative.


New installed Ubuntu 18.04 freezes I've just installed Ubuntu 18.04 instead of Ubuntu 16.04 which was working just fine
After installing Ubuntu 18.04, it freezes a lot, especially directly after logging in. If I tried to log in with another theme it freezes before logging in. Sometimes it even freezes before the login screen appear.

I read a couple of posts stating that it can be a graphics driver problem.

I have HP Pavilion dv7 laptop. I think it has an Intel graphics card and I read that it's driver is installed by default in all Ubuntu versions.

I also tried installing gdm from Alt+Ctrl+F2 but it said "no candidate"

How can I solve this problem?
I can't use my laptop and I'm writing this post using my iPhone.

The original answer is on superuser forum. The next command resolved my issue.

systemctl reboot --firmware-setup


What does outputting to /dev/null accomplish in bash scripts? Oftentimes I run into small bash scripts that use this sort of syntax in if statements:

some command > /dev/null 2>&1

What is the purpose of outputting to /dev/null like that, and what does the 2>&1 mean?

It always seems to work but I'd like to know what it's doing.

>/dev/null redirects the command standard output to the null device, which is a special device which discards the information written to it

2>&1 redirects the standard error stream to the standard output stream (stderr = 2, stdout = 1). Note that this takes the standard error stream and points it to same location as standard output at that moment. This is the reason for the order >/some/where 2>&1 because one needs to first point stdout to somewhere and then point stderr to the same location if one wants to combine both streams in the end.

In practice it prevents any output from the command (both stdout and stderr) from being displayed. It's used when you don't care about the command output.

STDIN is represented by 0, STDOUT by 1, and STDERR by 2.

/dev/null is the bit-bucket: the place where you dump anything you don't need.

So, the STDOUT is redirected to the bit-bucket(trash) and the STDERR is redirected to where the STDOUT is located: the bit-bucket.

You can also do this:

>/dev/null 2>/dev/null


I want to learn how Unity works (documentation/command line tutorials) some people are marking this question as duplicate of some other question(which are I looked up, not helpful. since it is just explainig how to use unity, not technical/command line documentation) which is not right

I want to learn how unity works. for example, instead of dragging application shortcut from dash to launcher, how do I do it using terminal?

how to make application shortcut ?

I can lock an application to the launcher by GUI but how to do it from terminal?

How an I add a mounted partition icon automatically if I mount it from a folder other than /media?

these are just examples, I dont meant just to learn these but unity all-together

I want to learn how unity works. for example, instead of dragging application shortcut from dash to launcher, how do I do it using terminal?

Add and remove launcher icons from command line

  How to make an application shortcut?

How to add programs to the launcher?

  I can lock an application to the launcher by GUI but how to do it from terminal?

Same as 1st question: Add and remove launcher icons from command line

  How can I add a mounted partition icon automatically if I mount it from a folder other than /media?

How to customize/label the hard drive icons in the launcher

Overall technical questions:

Go to the wiki, here. It says:

  The wiki documentation is targeting technical users, if you want to get an overview of Unity you might be interested.

There is also (of course) the Ubuntu Documentation site (please, please upvote Jacob's answer, as that is what reminded me of it), and a google search does give some good results:

The only one I can help you with is the shortcut. You could use ln -s to make a symbolic link via terminal to wherever you want. That should function the same way as shortcut.

I'd imagine there's some configuration file that's dynamically updated for the launcher on the left for things you add, remove, or lock. I have no idea where that is though.

I'd probably just try a symbolic link for tricking Unity into thinking there's something mounted at /media or /mnt to get the icon as well.


Init process at 100% CPU usage I have a Ubuntu x64 machine on a OpenVZ VPS account on a QuadCore processor with 1GB/2GB(burst). A few days ago I've managed to successfully update it to 11.10 Oneiric Ocelot. There's only one problem: my "init" process (PID = 1) is at 100% CPU usage, keeping one core 99.5% of the time at full throttle.

Is there any solution to stop the strange init's behavior? Can I trace what happens behind that init process to find out what makes it spike so high?

From Bellum PLC Forum - Ubuntu 11.10 init 100% cpu usage bug:

  I noticed an CPU usage issue with init due to upstart, Which was eating 99% ram constantly. and i decided to find working fix.
  This is a bug which has been confirmed by Ubuntu but below is a simple quick fix patch which should work completely for all.

  Firstly Open up SSH and add the following PPA
    add-apt-repository ppa:jammy/upstart.fix-880049
   Hit enter and Enter again.

  If It says command not found, Issue this command first
  apt-get install python-software-properties
  Then
  apt-get update && apt-get upgrade

What are PPAs and how do I use them

upstart fix released by James Hewitt (2011-11-24)

https://code.launchpad.net/~jammy/+archive/upstart.fix-880049

#add-apt-repository ppa:jammy/upstart.fix-880049
#apt-get update
#apt-get upgrade
#reboot

init after reboot 0.0%


How to upgrade the php version in Lampp in Ubuntu I need to upgrade the php version to 7.2 in my Lampp. Actually, when I am checking php -v in terminal, it's showing the following result:

PHP 7.2.1-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jan 11 2018 22:52:58) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.1-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies

But I am running the file from opt/lampp/htdocs and there I am getting the php version as 5.6.3 which needs to be upgraded to 7.2. I was referring the following steps to install this originally.

sudo apt-get install apache2 mysql-server php7-mysql php7 libapache2-mod-php7 php7-mcrypt phpmyadmin

Package manager info:

$ apt-cache policy apache2 mysql-server php7-mysql php7 libapache2-mod-php7 php7-mcrypt phpmyadmin
apache2:
  Installed: 2.4.7-1ubuntu4.18
  Candidate: 2.4.7-1ubuntu4.18
  Version table:
     2.4.10-1ubuntu1.1~ubuntu14.04.2 0
        100 http://in.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
 *** 2.4.7-1ubuntu4.18 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.7-1ubuntu4 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
mysql-server:
  Installed: 5.5.58-0ubuntu0.14.04.1
  Candidate: 5.5.58-0ubuntu0.14.04.1
  Version table:
 *** 5.5.58-0ubuntu0.14.04.1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.35+dfsg-1ubuntu1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
phpmyadmin:
  Installed: 4:4.0.10-1
  Candidate: 4:4.0.10-1
  Version table:
 *** 4:4.0.10-1 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
N: Unable to locate package php7-mysql
N: Unable to locate package php7
N: Unable to locate package libapache2-mod-php7
N: Unable to locate package php7-mcrypt

Seems you have already installed the newest version of PHP, then jump into the 2nd part of this answer. Please check you have installed LAMP stack correctly, follow a tutorial like this,

Lamp Installation tutorial or this.

Then please follow the exact steps.First,
1. Install the newest version of PHP on your Linux machine
# apt update
Then install following packages to install PHP newest PHP versions using PPA,
# apt install python-software-properties
# add-apt-repository ppa:ondrej/php
Then,
# apt update
Then you can check PHP versions available in apt,
$ apt show php -a | grep version or $ apt show php -a | grep -i version
Then install the newest version available in there.For an example, if you want to install PHP version 7.2,
# apt install php7.2
To check if the PHP is in the newest version, run the following command,
$ php -v
2. Change the PHP version of the lamp
# a2dismod php5 to disable current version
# a2enmod php7.2 to enable current version
# service apache2 restart or # /etc/init.d/apache2 restart
Hope you found it useful.

Try this steps and your php version will get upgraded.

apt-get update
sudo apt-get install -y apache2
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

then check php version,

php-v


Command line move file with long directory path without repeating directory path Is there any way of executing a mv command without typing the full path in the second argument?

Example:

mv my/file/that/has/a/really/long/path/foo.bar some_magic_operator_that_means_the_same_directory/foo.baz

You can use bash's brace expansion. This:

mv my/file/that/has/a/really/long/path/foo.{bar,baz}

will expand into:

mv my/file/that/has/a/really/long/path/foo.bar my/file/that/has/a/really/long/path/foo.baz

and then mv is run with those two arguments. See http://wiki.bash-hackers.org/syntax/expansion/brace for more on brace expansion.

You can you alias command to short the directory name:

alias src='/directory/name/of/source'
alias dst='/directory/name/of/destination'
mv src dst


Hide debug information when running apps from the command line Most of the time running a gtk application from the command line it starts dumping debug information to the stdout even though I put them in background.

Example:

~$ gedit test.html # and ctrl+z to suspend
zsh: suspended  gedit .zshrc
~$ bg
[1]  + continued  gedit .zshrc
~$
# do some editing
(gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (whoosh), this should not happen!

(gedit:6208): GtkSourceView-WARNING **: Could not find word to remove in buffer (haystack), this should not happen!

I want to note that the error, or warning, changes according to what I'm doing at the moment. The GtkSourceView-WARNING shown here is one of the cases.

Anyway... Do you know if it's at all possible to avoid getting that information printed out?

You can send those standard output and error messages to the null device, so that they don't show up in your terminal, e.g. gedit test.html >/dev/null 2>&1

Another way to do it would be to start the command as a background process and then detach it from the current shell. This will 'hide' all output in the sense that the current shell is no longer interested in the process. The syntax in bash is:

gedit test.html &
disown %1

I often use the output redirection mentioned in the other answer because it is very flexible. You can output to files, devices, connect outputs, etc. However this is useful for when you have no interest in the output, you just want to start a GUI application from a shell and then have no other interaction with it.


append a word to the end of a line in txt file I have a file that should have "OK" at the end of a certain line

the line that should be modified is the first line not ending with "OK"

I can grep the file to get the line to be modified using the following code

grep -vnm 1 OK '/content2'

i need a help in add the pattern OK to the end of this line

Example:

if the file content has the following lines

aaaaaaaaaaaaaa OK
bbbbbbbbbbbbbb OK
cccccccccccccc
dddddddddddddd
eeeeeeeeeeeeee OK

i need to add OK to the line contains the cccccccccccc only

You could use the following awk program:

awk -v s=" OK" '/OK$/ { print; } !/OK$/ { print $0 s; s=""; }'

It works like this:

/OK$/ { print; }

prints out any line ending in OK as is, whereas

!/OK$/ { print $0 s; s=""; }

prints out any line not ending in OK with the value of variable s appended.

Variable s initially is the string ' OK'. It changes to the empty string after the first encounter of a line not ending in OK.

Update

Even more concisely:

awk -v s=" OK" '!/OK$/ { print $0 s; s=""; } /OK$/'

eliminates the { print; } action for the /OK$/ condition, as { print; } is the default action.

Correction

Looking at the question again, it does not say the OK should be added to the first line not having OK, but instead to the first line not having an OK which follows a line that does have an OK. So, we must keep a variable, c that flags that at least one OK line has been seen, and a variable d that flags that we are done:

awk ' /OK$/ { if (!d) c=1; }
     !/OK$/ { if (c) d=1; }
     c && d { s=" OK"; c=0; }
     { print $0 s; s=""; }'

sed -ri 's/.*cccccccccccccc */cccccccccccccc OK/g' filename

where filename is the name of your input file name.


How to change time-zone settings from the command line I have a virtual machine that is set to PST that a couple of colleagues have in different time-zones.

If I wanted to change the time-zone to EST and GMT, what do I need to do?

Use timedatectl

sudo timedatectl set-timezone <timeszone>

Examples:

Timezone as EST

sudo timedatectl set-timezone EST

Timezone as UTC

sudo timedatectl set-timezone UTC

Listing all valid Timezones

timedatectl list-timezones

This command is perfect for automation scripts since it doesn't require any user interaction while compared to the other given answer based on dpkg-reconfigure tzdata.

As root you have to execute:

ln -fs /usr/share/zoneinfo/Europe/Warsaw /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata


[Ctrl][Alt] causing windows to maximise vertically Ubuntu 14.10, Unity, running Windows under KVM.  Pressing Ctrl+Altimmediately causes the focused window to maximise vertically (no other keys pressed).

Pressing them again causes the window to toggles between that and maximise in both dimensions.  A double click in the title bar maximises (if not already so), and another double click restores the window to its original dimensions.

I have found no binding for simply Ctrl+Alt in Settings→Keyboard→Shortcuts.
I also tried CompizConfig settings manager, found no references to Ctrl+Alt

The output of

gsettings list-recursively | grep --ignore-case ctrl | grep --ignore-case alt

can be found here.

Go to settings > keyboard > shortcut tab and create a new custom shortcut using these values:

Name: [What ever you want]
Command: false
Shortcut: Ctrl+Alt


Why does printf report an error on all but three (ASCII-range) Unicode Codepoints, yet is fine with all others? The 'printf' I refer to is the standard-issue "program" (not the built-in): /usr/bin/printf

I was testing printf out as a viable method of convert a Unicode Codepoint Hex-literal into its Unicoder character representation,

I was looking good, and seemed flawless..(btw. the built-in printf can't do this at all (I think)...

I then thought to test it at the lower extreme end of the code-spectrum, and it failed with an avalanche of errors.. All in the ASCII range (= 7 bits)

The strangest thing was that 3 value printed normally; they are:

$ \u0024
@ \u0040
` \u0060

I'd like to know what is going on here.  The ASCII character-set is most definitely part of the Unicode Code-point sequence....

I am puzzled, and still without a good way to bash script this particular converion.. Suggestions are welcome.

To be entertained by that same avalanche of errors, paste the following code into a terminal...

# Here is one of the error messages
# /usr/bin/printf: invalid universal character name \u0041
#  ...for them all, run the following script
(
for nib1 in {0..9} {A..F}; do
  for nib0 in {0..9} {A..F}; do
   [[ $nib1 < A ]] && nl="\n" || nl=" "
   $(type -P printf) "\u00$nib1$nib0$nl"
  done
done
echo
)

The three working characters are the three printable ASCII characters that are not in the C basic character set. The reason why these characters are forbidden in C is that it would be hard on compilers: they would need to perform the \u interpolation before lexical analysis, which I think would break in a few corner cases, and would be impractical in many compilers anyway (because characters outside the basic set are only required to be allowed in a few places).

Having the same forbidden characters doesn't make sense in a shell utility. I suspect this is a bug, and $, @ and ` should not work either. The reason not to support them is again to make it easier to parse strings. For example, if you want to determine that there is no special character in a string you're going to put into a database query, you can check that the string doesn't contain ', and not worry about it containing \u002a.

Consider using recode as suggested in the GNU coreutils manual, or (more portable in practice) Perl or python.

(for nib1 in {0..9} {A..F}; do
  for nib0 in {0..9} {A..F}; do
   $(type -P printf) "\x$nib1$nib0"
  done
done
echo )

prints (hand format adjusted)

   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
 ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �

Note that some "character" control codes "worked" ie. HT, VT, LF. etc.


Problem installing phpmyadmin after upgrading to ubuntu 14.04 I've just upgraded from Ubuntu 12.04 to 14.04 and my phpmyadmin installation just vanished (I guess I did something wrong!). I've tried to reinstall it, but got this:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
phpmyadmin : Depends: php but it is not installable
             Depends: php-cli but it is not installable
             Depends: php-mysql but it is not installable
             Depends: php-json but it is not installable
             Depends: php-mbstring but it is not installable
             Depends: php-xml but it is not installable
             Recommends: php-gd but it is not installable
             Recommends: php-bz2 but it is not installable
             Recommends: php-zip but it is not installable
             Recommends: php-tcpdf but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any suggestion would be greatly appreciated.

You can install php7(apt-add-repository ppa:ondrej/php -y and apt-get update
&& apt-get install -y php7.0-common php7.0-cli php7.0-fpm php7.0-curl php7.0-sqlite3 php7.0-json php7.0-tidy php7.0-mysql), this solved my problem. The details has already been posted in another anwser, so I will just link it here: https://askubuntu.com/a/917628/621561


VLC media player is not displaying video, but audio works I had installed VLC media player from the Ubuntu Software Center recently. It worked for some time, but then instead of the video, only a blank screen was displayed with the audio. Even the same videos that could be played before did not work.

I tried uninstalling and re-installing, and I upgraded it to the latest.

I've tried: menu Tool → Preferences → Video → enabling Accelerated video output (Overlay).

Execution via the terminal also gives the same.

I'm using Ubuntu 14.04 (Trusty Tahr).

Go to Tools→Preferences→Video
Remove the tick for Accelerated video output (Overlay)
Try and play the movie again, you should now see output.

Or

2.

Go to Tools→Preferences->Video
Change Output to X11 Video output

If the above doesn't work, that particular video might have a proprietary video format that is not supported.

Reference here.

Resetting preferences helped me

Tools -> Preferences -> Reset Preferences


Re-installing default video driver? I am experiencing quite major problem with Ubuntu 11.10.

Here is what happened:
I installed the closed source video driver suggested by Ubuntu (my graphics card is ATI Mobility Radeon HD 560v).
Having installed the driver I restarted the computer, and after that some parts of the Gnome UI didn't show up properly, wrong colors & unclear.
I decided to remove the driver installed as everything had worked before installation, again rebooted my computer, but this time after showing the purple boot screen, whole screen turns black and nothing happens.
I tried restart couple of times, same black screen instead of login screen.

The recovery mode of Ubuntu works so I can access terminal, only problem is that I don't know what to do.

Anyone got any ideas?

Be sure you have followed this guide to correctly install the proprietary driver http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide

Also notice that there is a section of FAQ about problems and solutions, take a look at "Problems Starting Xserver"

sudo apt-get purge fglrx and maybe sudo nano /etc/X11/xorg.conf, delete everything and save with ctrl O and enter.


How can I enable edge stop velocity in 14.04? In 12.04, one of the settings enabled by default was "edge stop velocity", which helped keep the mouse on one screen of a multi-monitor setup unless you pushed a bit harder to get the mouse onto the other screen. This seems to be disabled by default in 14.04. How can I enable this feature?

I couldn't find the setting in the Unity Tweak Tool or the dconf editor.

You can enable it (if using Unity which should be the default) by running:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-capture-mouse true

Then, to customize how fast/hard you need to move the mouse to jump between displays:

dconf write /org/compiz/profiles/unity/plugins/unityshell/stop-velocity 20
dconf write /org/compiz/profiles/unity/plugins/unityshell/overcome-pressure 1

Note that this only works if you have the Unity launcher on all the screens and you can reset to that state by running:

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers 0

Looks like it is different in 14.04.  Done though display settings.

How do I disable mouse magnet on middle edge with multi monitors?


Can't open nano and can't install it on Ubuntu Server 14 I'm having a lot of trouble getting up and running Ubuntu Server. I just installed it on VMware and it appears it doesn't have nano. When I run sudo nano /etc/hosts it says "-bash nano: command not found" and when I try sudo apt-get install nano it says

  Media change: please insert the disc labelled 'Ubuntu Server 14.04.2
  LTS Trusty Tahr - release amd64 in the drive '/media/cdrom/` and
  press enter

This is a fresh install so if I messed something up with it I'd rather start again. I thought nano came with Ubuntu, did I select something wrong?

I'm out on a limb here, but it is probably simply a matter of 1. nano not being installed and 2. misconfigured package sources.

You can try the following:

Comment the cdrom-related line in /etc/apt/sources.list by adding a # in front of it, like

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main

Make sure you do have a Trusty repository in your /etc/apt/sources.list, e.g.

deb http://somemirror.ubuntu.com/ubuntu/ trusty main

deb-src http://somemirror.ubuntu.com/ubuntu/ trusty main

deb http://somemirror.ubuntu.com/ubuntu/ trusty-updates main

deb-src http://somemirror.ubuntu.com/ubuntu/ trusty-updates main

sudo apt-get update
sudo apt-get install nano

(Of course for this to work you'll have to rely on some other editor, I'm guessing vi or if you don't even have vi resort to some creative cat'ting and piping).

The problem seems to be the line relating to cdrom in your sources.list file. You can delete this line completely with

sudo sed -i '/cdrom/d' /etc/apt/sources.list

But perhaps it would be better (editor speaking here) to comment out the line to avoid too much destruction and make a backup in case you need it

sudo sed -i.bak '/cdrom/ s/^/#/' /etc/apt/sources.list


How do I restore my KDE desktop to default? I am a newbie in Linux. I decided to install Kubuntu 11.10 on it and I already have personalized it quite a bit.

I've also realised that Linux is much more sensitive when you reboot it in comparison to Windows! ;)

I switched off the laptop once without properly pressing reboot, and since then the buttons and the writing in the windows in the very top seem too big.

Looks like a bug to me. And if you make the windows smaller it looks really strange and the close and minimize and resize buttons disappear.

I have already once fixed this by inserting the kubuntu cd, but I've forgotten how I did it.
I think it was something like restore distribuion or so, but all personalizations kept the same, only the windows were displayed normally (which I of course intended!)

So, how can I restore KDE?

To reset you user's KDE modifications to defaults open a terminal and type

mv ~/.kde4 ~/.kde4.old

Log off and log back in and all the KDE settings will be recreated fresh.

That will move the folder where KDE keeps his settings in to another folder with .old in the end of the name. When you log in KDE will create a new .kde4 folder and all the settings used will be the default.

If you want to restore the previous settings you need to have a backup in your home folder inside the .kde4.old folder.

After I boot up my Kubuntu 18.04, I persistently lost the desktop icon setup to default (all the icons were packed up to the top) that is set up on boot process.
To cure this problem, first I recreate icon arrangements on my desktop.

Using Konsole, cd to go to default. There is a hidden directory .config. Do cd .config . Then,  I sudo copy the .config/plasma-org.kde.plasma.desktop-appletsrc to something like .config/plasma-org.kde.plasma.desktop-appletsrc.save. This saves the new desktop settings you wanted to preserve (This plasma-org.kde.plasma.desktop-appletsrc is continuously updated as you modify the desktop icons and setup.).

Then, log out your current user session. Then, without rebooting, login to the same user session. Then, the desktop is restored to what you wanted. Once that plasma-org*.save file was created in .config, you can copy it back anytime whenever you have the same problem to plasma-org.kde.plasma.desktop-appletsrc.


Use keyfile for encrypted swap I installed Ubuntu 11.10 using the alternate CD and set up an ecrypted root and swap partition. Now, during boot, I have to enter a password for the root and a passwort for the swap partitition. I want to get rid of the password for the swap partition and replace it by a keyfile that's stored on the root partition. How can this be done? Is there maybe some hidden option in Ubuntu so I don't have to configure this in some configuration files? Thanks for any help!

I think it needs to be this way by design - 2 passwords.

After the initial boot up where you enter 2 passwords
from then on you can use hibernate mode securely.

When you resume from hibernation it's just the one password.

You have to reinstall. I forget the terms, but you want one encrypted physical partition and then you just put LVM (maybe?) partitions on top of this one.


Why is Ubuntu moving to Snap packages? Why Ubuntu dumping .deb packages and moving to .snap packages?
At least for now they are keeping .deb package for normal distributions. .deb is already the most popular packaging format out there.
This gives an idea about what the Snap package format is. But what will happen to the existing deb packages? Is there any clear advantage on moving to Snap? Is it worth the pain?

Snap attempts to solve one of the fundamental problems with Linux as a desktop operating system: software availability and software distribution. Snap is not intended to completely replace debs, however. Snaps and Debs work alongside each other.
I am a Linux enthusiast and a project manager of a Linux application. While I love Linux systems as a whole, I can't stand the current state of package distribution. Universal App Formats like Snaps aim to solve this fundamental problem.
In Linux, packages are specifically built for a single version of a single distribution. With a lot of tweaking, it is possible to make one .deb package that runs on all Debian based systems, but this is complicated and limits developers. It's also not practical at times due to version locking of dependencies.
If I create a deb package for Ubuntu 20.04, it will only work on that version. I also have to make a different package for 16.04, 18.04, 20.10 and so on. I already have to make four packages just for Ubuntu. I also need to make one for every Debian version, every Fedora version and every openSUSE version. RPM is more flexible in this regard but the locked dependency issue still gets in the way.
This means if I want to release a new version of my application, I have to create over 20 packages to cover the majority of Linux distributions, and that still won't cover every distro. A second possibility is to wait for distribution maintainers to add your package to the distribution but this usually takes an absurd amount of time. Moreover, then the distribution maintainers decide which version their users get instead of the software developer.
With Snap, a single package runs on every version of every distribution that supports snap. See Installing snapd for a list of many distros that support it.
Additionally, with Snap, the developer publishes and maintains the package, instead of the distribution maintainer. So I as a developer can release new a version to all my users without having to wait on anyone else.
Essentially, everything I hate about Linux package distribution is solved by Snap. Though it's important to note that these core issues are also being solved by Flatpaks & to a degree by AppImages. The discussion for which format is better is highly debated and a much longer conversation than makes sense for this reply. For now, I will say that I am fine with running any of the universal formats since they all work differently and thus do not conflict with each other making it possible to run all 3 and traditional packages at the same time.
TL;DR
Linux package distribution is awful for both developers and users. Snaps,  Flatpaks & AppImages are intended to solve this fundamental problem with Linux based systems.

This question is really about why the move but if anyone is interested in learning more about what Snaps are and how they work. I created this video to explain the structure in-depth.

Consider moving to snappy Ubuntu Core today if you are thinking of creating something for others to use, in other words, a product.

The software is delivered in snaps, which given its traits, we can have confidence that installation and upgrades will work on every system as the original creator intended. Other traits are security, such as isolated execution and clean interfaces to talk to the system and configure the installed snaps.

To achieve such a thing, snaps differ a lot from are much different than a debian package:

snaps live in an isolated system determined location while debian packages
can spread files all over the place.
there are no maintainer scripts for snaps.

Going back to the original question of to use or not to use, if you plan to replace your desktop with Ubuntu Core I suggest you stick with regular Ubuntu desktop. Ubuntu Core, I personally like to call, the nothing distro, because alone it is nothing, but provides a very good building block to offer something and this is why it is popular in IoT these days.


Wired connection problem Ubuntu 12.04 LTS I am not new to ubuntu, but have encountered this problem several times. I am running with a wired connection on ubuntu 12.04 LTS. When I worked with ubuntu for the first two- three weeks or so, the connection seemed to work fine, and I hadn't even set up the connection- it had been auto-detected by ubuntu, which is natural. But now, the connection seems to have not working (its not detecting at all) . On repeatedly restarting my computer, I found that the internet seeme to connect (or detect), like 1 out of 5-8 restarts. Is there any solution to this unusual problem, as I have tried all the solutions on this site and other sites too, but have not found a working solution. On my other partition on windows vista, this problem never occurs and the internet connection alway connects.
PS: If there is any extra info I have to provide like error logs or any other info just tell me and I will do so, as I desperately want a solution.

Output for sudo lshw -c network-

*-network
   description: Ethernet interface
   product: NM10/ICH7 Family LAN Controller
   vendor: Intel Corporation
   physical id: 8
   bus info: pci@0000:01:08.0
   logical name: eth0
   version: 01
   serial: 00:1a:92:6b:2e:b1
   size: 100Mbit/s
   capacity: 100Mbit/s
   width: 32 bits
   clock: 33MHz
   capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=full firmware=N/A ip=10.0.0.2 latency=32 link=yes maxlatency=56 mingnt=8 multicast=yes port=MII speed=100Mbit/s
   resources: irq:20 memory:fdefe000-fdefefff ioport:ee00(size=64)

Output for cat /var/log/dmesg | grep eth0 -

[    1.199914] e100 0000:01:08.0: eth0: addr 0xfdefe000, irq 20, MAC addr    00:1a:92:6b:2e:b1
[   18.108866] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.317182] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.317593] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.320152] e100 0000:01:08.0: eth0: NIC Link is Up 100 Mbps Full Duplex
[   19.320401] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

this is because your network configuration file sets for the default settings.

such as eth0 settings i think they are in the manual mode.

please check you interfaces settings and DNS settings

sudo gedit /etc/network/interfaces

change the eth0 from manual/static to DHCP

before editing the interface conf file, i suggest you read more about it plus DNS conf file too


How to disable OSD notifications for specific email addresses? I receive several logs per day via email, either from testing operations, server status or backup resumes.

Can I some how disable the notification balloon either by a specific email address, the email subject or any other possible filter, as to not be constantly notified about the success operations?

I've looked within the Notify OSD Configuration, but couldn't find any option to this end.

Since the email comes with different information when errors occur, I already have filters within Thunderbird as to move error logs to a folder that I keep tabs on...

If relevant, I'm using Ubuntu 12.04 fully updated, and Thunderbird 15.0.1.

While this solution does not work with configurations for OSD notifications, you can deal with your issue within the filters you've setup on Thunderbird.

Since the email notifications presented by OSD refer to unread messages, you can add to your filter the option Mark as Read.

This will prevent those messages from being presented by the OSD notification, thus solving your initial issue.

See this answer as well, which suggests unsubscribing from certain folders (for example, if you use Gmail to filter into folders).

How to configure Thunderbird to notify new mails only in certain folders?

I tried to use filtaquilla, but it would have required me to add a lot of folders.

Personally, I don't like the "Mark as read" option, because I haven't read them.  I do like to look at mailing lists, but I hate them interrupting me when I am working.


Will "Oilrush" be available for purchase from the Software Center? Oilrush is a game with a high-end graphics engine due for release on the linux platform very soon. As a matter of fact, preordering is already possible!

That is why I would like to ask whether it will be available for purchase in the Ubuntu Software Centre.
If it will be offered, I would wait until it is available and buy it to support Ubuntu. If not, I'd rather buy it now and save some money.

Just to keep this up to date:

It is in the software center now! (In 11.04 Natty at least)

I think it will, eventually, there is a post in Ubuntu Brainstorm to add a few more paid apps to the Software Center. Besides, Oilrush is a huge release as a Linux game, there are few games that can be compared to it, and a lot of people are looking forward for a stable Ubuntu release.
EDIT:
I think i got your definitive no, i'm afraid. The Feature Freeze of the Natty development cycle was on February 24th. This means that no new packages will be added to the official repositories. AFAIK, unless they make an exception, we will have to wait until Ubuntu 11.10 to be able to purchase Oilrush from the software center.
More info here


How can I play encrypted DVD movies? My machine can't play encrypted DVDs on a fresh install.  How do I add this capability?  Another useful bit of information would be what programs are best for playing DVDs, once I'm able to do so.  See the similar question here.  Will I be able to play DVD movies from any region?

To Enable Playback:

Install libdvdread4:
sudo apt install libdvd-pkg

Note: You may have to enable multiverse to install this package.

Then install libdvdcss:

Ubuntu 20.04 onward
See this answer instead.

Ubuntu 15.10 to 19.10
 sudo dpkg-reconfigure libdvd-pkg

Then follow the instructions to let it download and compile.

Ubuntu 12.04 to 15.04
 sudo /usr/share/doc/libdvdread4/install-css.sh

(More about libdvdcss here.)

Best Players:
According to the Ubuntu Wiki, Kaffeine, MPlayer, xine, Totem-xine, VLC, and Ogle will play DVDs with libdvdread and libdvdcss installed.
I use both Totem and VLC to play DVDs. It's useful to have both installed, because sometimes one will have a playback quirk that the other will not.
Regions:
I believe playback will work in any region.

I had troubles with one german dvd with new all-in-player from asus, and only help was to change the region-code:
https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs#Ubuntu_15.10_and_newer


Ubuntu 18.10 Asus GL504GV fn keys (screen and kb backlight) not working My main problem is that rgb keyboard lighting all day on, as there is no way to turn it off. I tried to change the settings on windows, but keyboard tunrs on after rebooting.

I tryed almost everything I found over the Internet, but no luck. Some posts suggest to manually set bright values on /sys/class/leds/asus::kbd_backlight/* but in my case this directory does not exists.

$ ls /sys/class/leds/
asus::lightbar           input11::scrolllock  input8::kana
asus-wireless::airplane  input4::capslock     input8::numlock
input11::capslock        input4::numlock      input8::scrolllock
input11::compose         input4::scrolllock   phy0-led
input11::kana            input8::capslock
input11::numlock         input8::compose

Also having some trouble with modprobe

$ sudo modprobe asus-laptop
modprobe: ERROR: could not insert 'asus_laptop': No such device

For the screen brightness I guess i can work arround /sys/class/backlight/intel_backlight values

Thanks in advance

After some more tries I get to a good enough "solution" (at least to me)

1.- Screen brightness:

I made my own script to increase/decrease screen brightness and assign it to C^F7 and C^F8. It's not the solution I was looking for, but now I can change screen brightness

#!/bin/bash

BASEPATH=/sys/class/backlight
DEVICE="intel_backlight"
cd $BASEPATH
MAX=`cat ${DEVICE}/max_brightness`
CURRENT=`cat ${DEVICE}/actual_brightness`
PERCENT=`echo $MAX/100 | bc`

echo $PERCENT
if [ "$#" -ne 2 ]; then
    echo "Error: wrong parameters"
    echo "Run: # set-brightness.sh inc/dec percentage"
    exit -1
fi

MODE=$1
DELTA=$2
if [ "$MODE" = "inc" ]; then
    # Increase brightness an x%
    NEW_BRIGHT="$(( $CURRENT + ( $PERCENT * $DELTA ) ))"
    if [ $NEW_BRIGHT -gt $MAX ]; then
        NEW_BRIGHT=$MAX
    fi
elif [ "$MODE" = "dec" ]; then
    # Decrease brightness an x%
    NEW_BRIGHT="$(( $CURRENT - ( $PERCENT * $DELTA) ))"
    if [ $NEW_BRIGHT -lt 0 ]; then
        NEW_BRIGHT=0
    fi
else
    echo "Option: $MODE does not exists. Please use inc or dec"
    exit -1
fi
# Set the new bright
echo $NEW_BRIGHT
echo $NEW_BRIGHT > ${DEVICE}/brightness
exit 0

2.- The KB problem still unsolved, but now I finally have white lights with the led bar and asus logo disabled.

To change the lights just follow the next steps

Open windows
Install Asus Aura Core from the windows store
Chenge the lightning setup on Asus Aura and save the changes

This way the changes are stored and loaded after booting.

Any of this "solutions" are the solutions I'm looking for, but I hope this can help others with the same issues.

I recently got an Asus ROG GL504GV. I installed Linux Mint and W10. In W10 I have installed Aura Sync software to control RGB keyboard leds. If I apply a custom profile, it remains after rebooting even in Linux. It's not a confortable way to change leds but, at least, I am able to turn it on and off or change brightness and colors.


Not able to run sudo apt-get update in 12.10 I am trying to run sudo apt-get update but getting below mentioned error .. do you think there is any issue with Ubuntu's installation?

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Your help is highly appreciated ...Thanks

Try this.  Make sure that Synaptic, and update manager are not running.

Then, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo rm /var/lib/dpkg/lock

You are installing some other programs in the background. Ubuntu only supports one installation at time


IBus Keyboard Layout changing but cannot type in Tamil I'm using Lubuntu 13.10 and I'm trying to type Tamil characters in LibreOffice Writer

I have installed m17n packages and installed the keyboard layout Tamil - phonetic (m17n) from IBus Preferences as in this answer given for How do I turn on phonetic typing for Tamil? by jokerdino

I could see the iBus icon in the system tray and I could change the keyboard layout from English - English (US) to Tamil - phonetic (m17n) by using super + space keys or by clicking on the iBus icon from the system tray.

I couldn't type in Tamil even after changing the layout to Tamil - phonetic (m17n)

I also tried the layouts Tamil - tamil99, Tamil - itrans (m17n) etc. But I couldn't type a single Tamil character...

I wish to type in Tamil in my Instant Messengers, Browser, Writer etc.

Ubuntu 14.04 supports Tamil Language. It can be added by:

In Settings > Language Support > Install/Remove languages > select Tamil and Install.
Now Tamil Language Support is enabled.
Installing Tamil Keyboards for Tamil typing in browsers, Libreoffice, etc.

a. For Tamil Unicode Keyboard (Old Tamil Typewriter Layout)

⠀⠀In Settings > Text entry > click + and add Tamil Unicode Layout.

⠀⠀Now switching from English to Tamil Keyboard and vice versa can be done by pressing Super (Windows key) + Space. It can also be done by selecting the Keyboard Menu (displayed as En or Ta) at the top of the screen.

⠀⠀Onboard can be used for Tamil Unicode.

b. For Tamil 99 Keyboard or Tamil Phonetic

⠀⠀i. Install ibus-m17n package from Ubuntu Software Center.

⠀⠀ii. In Settings > Languages Support > select ibus from the dropdown menu under Keyboard Input Method System.

⠀⠀iii. In Text Entry select +, now the search with keyword Tamil will show Tamil 99, Tamil Phonetic & other Tamil layouts. These can be added as per the requirements. Keyboards can be selected from the menu at the top of the screen.

⠀⠀Onboard does not work with Tamil 99, since it is installed through the m17n package and not by Ubuntu itself.

For more details relating to Tamil / Tamil 99 in Ubuntu see: http://oppili.wordpress.com/

I suffered a lot to be able to type in Tamil in Ubuntu 14.04 LTS, but I finally solved the problem very easily:

First step

sudo apt-get update

second step

sudo apt-get install ibus-m17n

after installation select Text Entry and click +... you get "language pack already installed"... select Tamil 99(m17n)... finished!

Now an en symbol appears in the indicator (usually top right) and in one click (on the en) you can switch to the layout for your selected language... one minute's work. Even in LibreOffice this goes well.


git config global file - remove settings The following command:

$git config --global --list

gives me:

user.name=test user
user.name=gotqn

I want to remove the first name. I referred to this article and have done the following commands but without any result:

git config --global --remove-section user.name='test user'
git config --global --remove-section user.name="test user"
git config --global --remove-section user.name=test user
git config --global --remove-section user.name
git config --global --remove-section test user

I am using Ubuntu 12.04 and

git version

gives me

git version 1.7.9.5

Please, help on this, because I want to try to save my project using git, but do not want to exec the command with 'test user' name.

You can edit the ~/.gitconfig file in your home folder. This is where all --global settings are saved.

I was having trouble trying to clear out double entries for core.editor... I'd run

git config --unset-all core.editor

then

git config --list

and see no changes.

The answer was to run:

git config --global --unset-all core.editor


Swap switch rearrange workspaces by hotkey? Known stuff:

CTRL + ALT + left-arror moves to the previous workspace. (i.e., WS2 -> WS1)
CTRL + ALT + right-arrow moves to the next workspace (i.e., WS1 -> WS2).

But swapping workspaces isn't so easily referenced!

Issue:

I made a mistake!  WS3 should be WS2!   WS2 should be WS3!

Questions by value:

How to rearrange workspaces via keyboard?
How to rearrange workspaces?
How to clone a workspace [via keyboard]?

Terribly cumbersome workaround:

right-click every proggy/app taskbar-item in both WSs and click Move to Another Workspace

Slightly better workaround:

mod: launcher.
Keyboard Shortcuts.
Change Switch to workspace # to CTRL + mod + num #.

There are additional shortcut keys that can be added.


how do you copy a directory and its contents to a new location under a new directory name? I'm new to the Linux command line and am trying to get to grips with the copy command at the moment.
Can anyone please tell me if it's possible to copy a directory with its subdirectories and associated files to a new directory with a new name, e.g. directory_backup?
Thanks for any and all help in advance.

You can use cp with the -r (copy recursively) flag and specify the new directory name:
cp -r /path/to/directory /path/to/location/new-name

In the above command replace the given paths with the real ones.
For example, to copy stuff from my home directory to an existing directory named backup and name the new directory stuff-backup (if this directory already exists, note that stuff will be copied into it, not overwrite it), you run:
cp -r ~/stuff ~/backup/stuff-backup

~ is a shortcut for your home directory /home/$USER or /home/zanna in my case. You can omit it if the current working directory is your home directory - you can see this from your prompt
zanna@monster:~$
              ^--the ~ here is where I am - home!

You can add the -v (verbose) flag to make cp report each copy being performed:
$ cp -vr stuff backup/stuff-backup
'stuff/thing1' -> 'backup/stuff-backup/thing1'
'stuff/thing2' -> 'backup/stuff-backup/thing2
...

You generally want to keep the file permissions the same when making a copy, not a new set of default creation permissions. That means use -a flag for cp.

cp -a file filenew


Change Kernel from 4.2 to 3.13 in Ubuntu 14.04 I want to run Pin(Intel's Simulator) but it is not supported in Kernel 4.2 version, so I should change it to 3.13 that works for sure.

I run Ubuntu 14.04 LTS (32bit) in VirtualBox and i followed the instructions i found

[e

But when I tried to run pin I saw "E:4.2 is not a supported linux release".

Could you help me please?

It is quite easy to downgrade kernel in 14.04.

Run in terminal

sudo apt-get install linux-generic

Then remove all 4.2 kernel image and headers packages using Synaptic.

As an option you can leave 4.2 kernels and just boot with 3.13 using grub.

According to your screenshots you already have some 3.13 kernel installed.

Install with:

sudo apt-get install linux-image-3.0.0-12-generic linux-headers-3.0.0-12-generic

and remove all 4.2 kernel image and headers packages using Synaptic.


How do I prevent totem and other programs from logging all recently played files? This is a frustrating problem, is there any way to prevent totem from logging all of the files I watch? The same goes with picture viewer.

Under Dash -> Privacy, I've turned off logging and disabled it specifically for those problems yet every new file I watch appears in the totem menu.

It leads me to believe that if totem is recording it, then other programs are recording it as well.

Are there any workarounds?

I've already added "gtk-recent-files-max-age = 0" to my gtkrc-2.0 file and the problem persists.

Any ideas?

This will hide your recently viewed items from the Totem interface.

sed -i 's/<separator name="recent-separator"/<!--<separator name="recent-separator"/g' /usr/share/totem/totem.ui
sed -i 's/"recent-placeholder"\/>/"recent-placeholder"\/>-->/g' /usr/share/totem/totem.ui

This will remove your recently viewed items from Totem interface.

rm -v ~/.local/share/recently-used.xbel


18.04 audio (Realtek ALC3254) fails on new Dell G3 15 3590 Things were working fine for the first three weeks on the new notebook. Then, it stopped recognizing the audio board in a Dell G3 15 3590 (service manual) (audio specs).

I've disabled the secure boot, reinstalled plug audio, fed several different commands into the terminal, but it continues to not give any option for audio output aside from "dummy output".

After the mic and speaker output options disappeared in Configurations, leaving me with only "dummy output" as an option.

I tried:

Reinstalled Pulse Audio and rebooted.
Disabled Secure Boot.
Ran tests with Dell technical support to confirm that the video and audio board and drivers are working, during boot up.
Opened the terminal and ran sudo apt-get install pavucontrol pavucontrol then entered configuration profile to set configuration to analog stereo out, only to find "dummy output" as the only option again.
Opened the terminal and ran sudo alsa force-reload.
pulseaudio -k && sudo alsa force-reload had no effect.
BIOS -> disable audio -> boot to Ubuntu -> restart -> BIOS -> enable audio -> boot to Ubuntu did not work. I still have "Dummy output" as the only sound output option.
In accordance with instructions given on this conversation threat, I ran "inxi -Fxz && arecord -l && dmesg | grep snd" the result was: Command 'inxi' not found, but can be installed with: sudo apt install inxi
I went onto the dell site to see if I could download a new driver for the  Realtek ALC3254 but the only drivers that I could find on the site are only for Windows 10.
Regarding the question about updating the bios. I dropped into the bios, audio section and headphone and speaker output are all checked as on. I am sorry but I don't understand how I would update the bios. What I see in the audio section of the bios are 3 options: bios defaults; factory settings; custom user settings. I was thinking of maybe changing to bios defaults and saving, but decided I'd better not start screwing around with bios until I know exactly what I was doing. Would that be something worth trying?
installed inxi. Ran inxi -Fxz. It reads:
``
Audio: Card-1 NVIDIA Device 10fa driver: snd_nda_intel bus-ID 01:00.1
Card-2 Intel Cannon Lake PCH CAVS
Driver: sof-audio-pci bus-ID 00:1f.3
Sound: Advanced Linux Sound Architecture v: k5.0.0.-1043-oem-osp1

12 (April 12 - one month with no sound on brand new Dell G3 purchased with Ubuntu 18.04) Following Wikihow instructions on how to install a new kernel. After following steps 1-5, then typing sudo apt-get install ukuu i get a message saying  it can't find ukuu

Installed Kernel 5.5.9. Nothing changed. Still only getting dummy audio.

``

Dell technical support walked me through some tests to confirm that the audio board and driver is working fine, but they do not provide software support for Ubuntu.

I have now given up on Ubuntu completely. I will now move on to Mint. I have come to the conclusion that, for a lay person with average computer stills Ubuntu is incompatible with the Dell G3 and it is, therefore, a waste of time and money to purchase it with the Ubuntu installation.

Im using Ubuntu 18.04 Dell G3 3590 i7 series
I just follow the instruction here and fixes my problem
Edit /etc/default/grub
sudo vi /etc/default/grub

Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append snd_hda_intel.dmic_detect=0 to its end. For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"

Update grub configuration
sudo update-grub

Reboot
https://askubuntu.com/questions/1218058/ubuntu-19-10-audio-driver-issue/1238287#1238287

same problem here. Using Linux Mint,18.

The kernel I've installed was the 5.0, and the sound worked fine.

When I upgraded to 5.3, the audio stopped working.

Comparing the modules that was loaded in each kernel (lspci -k) I noticed that audio module was not the same, the kernel 5.3 was using sof-audio-pci driver.

Searching, I discovered that solution:

I've just got new HP Spectre x360 15-DF1033DX, installed Arch and got stuck with Audio. No output/input, no sound.

I used to change /etc/default/grub to have this line

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' snd_hda_intel.dmic_detect=0 "

Then run in terminal

grub-mkconfig -o /boot/grub/grub.cfg

Then reboot.

Link of the solutuion:
https://bbs.archlinux.org/viewtopic.php?id=251157


How to install Maya 2019 On Ubuntu 18.04 on Acer Hello i have been trying to install Maya 2019 on my Acer running Ubuntu 18.04 the error i keep getting is

{
./Setup
./Setup: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory"
}

i am new to ubuntu and have little idea on where this is or how i can fix, what i have tried doing is installing this separately but to no avail.

There is much more to be done in order to get Maya to work on Ubuntu: installing libpng1.5.15 is only one out of many steps.

The full process is described here: https://knowledge.autodesk.com/support/maya/learn-explore/caas/simplecontent/content/installing-maya-2020-ubuntu.html

To solve the libpng problem, simply download libpng1.5.15 from the libpng project: https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/, and install it to /usr (where Maya expects it to be. You can also let it install to the default /usr/local and set up LD_LIBRARY_PATH instead). It can perfectly fine coexist with modern versions of libpng.

To build it, make sure autotools and libtool is installed, and do:

tar xvzf libpng-1.5.15.tar.gz
cd libpng-1.5.15
./autogen.sh
./configure --prefix=/usr
make
sudo make install

Now the Maya installer will run, and then complain about not supporting the operating system and exit. The full process described on the AutoDesk Knowledge Network linked above has 14 steps. By following them exactly, I just got it to work.

Please cut-and-paste, then format (with the {} tool) your actual command and messages.

Should I tell you that libpng15.so.15 is a problem to resolve with the developers, or should I suggest you pick a package from the results of apt-cache search libpng, and install it?


Can't boot after a dd, BIOS reports no bootable drives I bought a new computer, removed the Windows disk (as usual) and installed 2 brand new 3TB drives. Installed 11.10 from USB stick, apt-get updates and favorite installs, everything was fine. Then I booted from USB stick again and did:

dd if=/dev/sda of=/dev/sdb bs=1M

and after that I cannot boot. BIOS says I have no bootable drives. Don't even get as far as grub. Booting from USB stick sees both drives and the files successfully copied (so I did not dd the wrong direction). It is as if when the second drive was blank the first drive worked, but now that they are identical the BIOS does not know what to do.

Update 1:
Checking the "BIOS confused" idea I physically disconnected one drive and booted from the other. No joy, on either drive. It is as if the blank drive had something that was helping the boot sequence, and the dd overwrote it!

Update 2:
Since it is not even getting to GRUB I thought I would try to recreate the MBR. update-grub just recreated an (identical) grub.cfg. grub-install /dev/sda said "grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!" I don't think I want to embed anything, just rewrite the MBR. grub-setup /dev/sda said Segmentation fault (core dumped)

Update 3:
Gave up, did:

dd if=/dev/zero of=/dev/sda

and reinstalled Ubuntu from CD. Still won't boot! It is as if the brand new 3TB drives (Seagate, if it matters) had some little helper boot code on them and when I installed Ubuntu it overwrote that. Of course it is too late to confirm that now, since both drives were overwritten once I did the dd.

Has anyone heard of a brand new drive not being really blank?

Update 4:
OK now my hypothesis is that my BIOS cannot boot to a GPT partitioned drive, at least not a 3TB one. If I repartition it as MSDOS it boots, if I go back to GPT it doesn't again.

Happy to post details but don't know what would be relevant. TIA!

Did you format either drive and ensure that they are marked as bootable? There is usually a flag that marks a disk bootable. You may want to check that with the liveCD or liveUSB

I have had similar issues before with this sort of thing. My problem was I was using an SSD and not a hard drive and the SSD did not support the way TRIM was being used.


failure writing sector .. to hd0 I have a dual boot windows 10 - linux system and just installed ubuntu 18.04 a couple days ago. The error in the picture below just started showing up.

It doesnt prevent me from using ubuntu or windows, just curious what's causing it.

I googled around a bit - ended up running bad blocks, gnome disks, crystal disk info and chkdsk in windows .. nothing so far points to the drive failing. Any help would be appreciated.

Now this seems like an old question by now, but since alot of people around the internet seems to have this problem, I'd like to post how I fixed the problem.
I had two problems:

can't find command "hwmatch"
failure writing sector 0x... to "hd0"

The first error I fixed by running:

sudo apt install grub-efi-amd64
sudo dpkg-reconfigure grub-efi-amd64
Through the whole reconfigure process, I just pressed "enter"

The second error, the same as yours, I fixed by changing the boot mode in BIOS from "UEFI" to "legacy mode"

try upgrading to an SSD or SSHD. hard disks does'nt work well for laptops (SSHD's also, but it's better than hard disks) . if you are on a desktop, try a new hard disk or SSD.


How do I enable or disable the global application menu? I'm fairly excited for Unity, as it looks like a promising new direction for Ubuntu.  However, I do have a concern - will it be possible to use Unity without the global menu?

I have my window manager set to focus-follows-mouse/sloppy focus, and find the productivity gains to be immense. Sloppy focus is incompatible, however, with global menus, as it is possible for the focus to change while you move from window to menu.

Will Unity support an option to use window menus while still using Unity?

11.04 - 13.10
Yes, the Desktop version of Unity will use the global menu by default.

To disable the global menu remove the indicator-appmenu
package, then log out and back in.

Unity will continue to run without it and your menus will appear inside the application windows as normal. You can also tell the appmenu to ignore specific applications if you're having a problematic app.
The command line way to remove the package is:
sudo apt-get remove indicator-appmenu

Removing the appmenu will break the HUD feature

11.10
I successfully disabled the global application menu by following the advice from http://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-global-menu-in-ubuntu-11-10-tip/.
I deinstalled the packages appmenu-gtk3, appmenu-gtk and appmenu-qt by running:
sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt

Apparently, you can get the functionality back by reinstalling the packages.


How can'i pass this " openssh-client' has no installation candidate " I am trying to use ssh command, but I have this:

sudo ssh git-codecommit.us-east-1.amazonaws.com
[sudo] password for dali:
sudo: ssh: command not found

So when i am trying to install openssh-client, I have this :

dali@dali-Lenovo-G50-70:~$ sudo apt-get install openssh-client
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Package openssh-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openssh-client' has no installation candidate

same as when I remove it and reinstall it.

You didn't say which operating system version you use, so I would first try to search for it, giving different package names, like ssh, ssh AND client etc etc.

Open Terminal windows and try make few searches and check whether package description says about ssh/ssh client.

  sudo apt-cache search XXX

...where XXX is one of the following: openssh, ssh, ssh-client

IF it does, then install this package with:

  sudo apt-get install  _package_name_received_

Eventually, search for this file on disk, as you might have it stored in different location, and if found, use absolute path to this ssh file.

  sudo find / -name ssh -type f 2>/dev/null


Fsck on every bootup, slow bootup, moved / Today I started experiencing an annoying issue. When I boot to Ubuntu 15.04, it runs fsck on one disk every time. I've located the cause to this problem on my /home partition, which is located at /dev/sda5. After disabling it's bootup fsck completely from /etc/fstab, it no longer runs fsck on any disk. The partition appears clean even without running fsck.

Also after disabling the fsck procedure (this was also taking a lot of time before getting rid of fsck), Ubuntu takes a really long time to boot up (1m 30s), even though / is on an SSD.

Just to mix this up a little, I just moved my root-partition to the SSD mentioned above. The fsck-issue was occurring before I did this, but the slow boot-up did not.

Here's my sudo tune2fs -l /dev/sda5: http://pastebin.com/8fr7ZWCk
Please inform me of any other info/logs I should include.

EDIT:

Looking at dmesg output, I saw this rather time-consuming task:

[    7.019883] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[    7.020394] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input19
[    7.020611] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input20
[    7.020736] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[   96.330932] cgroup: new mount options do not match the existing superblock, will be ignored # this one is taking very long
[   96.348967] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   96.348969] Bluetooth: BNEP filters: protocol multicast
[   96.348972] Bluetooth: BNEP socket layer initialized
[   96.352761] Bluetooth: RFCOMM TTY layer initialized

I just noticed that my swap-partition was referenced to a wrong UID in fstab. I changed that (and also reinstalled my NVidia drivers), and now the system boots in just seven seconds!

I have found the cause of my issue.

In /etc/fstab, the swap partition was referencing a non-existing partition UID. I updated it, and now my system boots just fine!

To me, the solution was edit /boot/grub/grub.cfg (after have done a copy, sure), I found the line that contains linux /boot/vmlinuz + YOUR KERNEL VERSION, and add on end of line fastboot. After I execute sudo update-grub. Done, fsck isn't executing more on startup.
Of course, it's a little dangerous if you don't have a script to execute fsck with some frequency.


DNS set to systemd's 127.0.0.53 - how to change permanently? I've recently upgraded to 17.10.  When I try to browse to a website, or ping a domain it fails saying the site cannot be resolved.

network-admin shows the contents of /etc/resolv.conf to be nameserver: 127.0.0.53

If I change that to 8.8.8.8 or 208.67.222.222 then everything works.  Until I reboot.

Upon reboot or resume, the nameserver is reset to 127.0.0.53.

How do I permanently set the nameserver to something that works?

For systemd fans, if I run systemd-resolve --status I get

Link 3 (wlo1)
      Current Scopes: LLMNR/IPv4 LLMNR/IPv6
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

If I follow the advice at this question - DNS keeps resetting after reboot. Ubuntu 17.10 - DNS still fails to resolve.

You can install a package resolvconf, which will modify the way /etc/resolv.conf is built up at system boot.

sudo apt install resolvconf

You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail.  If you put in this file a line nameserver 8.8.8.8, this line will be added at the end of /run/resolvconf/resolv.conf at boot.  /etc/resolv.conf will now be a symbolic link to this file.

Post Scriptum:

Almost two years after posting my answer I came across https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946 which explains exactly why merely installing resolvconf solved a dns problem I had at the time.  I feel I have to share this here.

  Although my answer addresses the question in a proper way, indeed a
  warning should be added that, if you want/need to do this, probably
  something else is wrong.   This was already stated by @intelfx at the
  time,  127.0.0.53 should work by itself.

According that bug report, after a pptp VPN goes down, resolv.conf is restored with the wrong access rights.  ping ubuntu.com does not work, sudo ping ubuntu.com does. Installing resolvconf solved it, because it takes over resolv.conf, restoring it with correct rights.  Changing systemd-resolve settings is no solution in this case, since the bug is in ppp.  But an alternative, maybe simpler solution is sudo chmod a+r /etc/resolv.conf after VPN down.  And this can be automated by putting an executable script in /etc/NetworkManager/dispatcher.d with contents:

#!/bin/sh
if [[ "$1"="ppp0" && "$2"="vpn-down" ]]; then
    /bin/chmod a+r /etc/resolv.conf
fi

In all cases the contents of resolv.conf do not change.
And, yes, I know pptp must be avoided because of security issues, but at the time I thought of it as a good excercise for an ubuntu newbie.  I imagined it would work out of the box.  Little did I know that it would give me a headache, as diagnosed so well by @intelfx.

This required some playing around with. After I updated the setting, I rebooted. Use:

ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

/etc/systemd/resolved.conf
DNS=8.8.8.8
Cache=no

System resolved failed
systemctl stop systemd-resolved
systemctl disable systemd-resolved

When Comment out the "request" for

# domain-name, domain-name-servers, domain-search, host-name,

Add this line to your /etc/dhcp/dhclient.conf:

 supersede domain-name "cwillenterprise.com";

Edit config file and add entry. Additional will not replace.

Add entries to /etc/resolvconf/resolv.conf.d/tail

nameserver 8.8.8.8
search "cwillenterprise.com"

Run to implement changes

resolvconf -u


How to set up an old laptop as a wireless terminal to the desktop I have searched countless phrases to find an answer and can't quite figure this one out. It is to my understanding that (as it was many moons ago at universities and the like) you can still use one central setup to do the processing/video/account/file management and have terminals to access it that merely function as a screen, keyboard, and mouse which to provide input back to the main PC.

SSH is an easy way to do this from a command line point of view, but I have a few old laptops that would function excellent as terminals, while leaving the load to my self-proclaimed super computer... Ex: My significant other has an old Dell mini 10... The thing is total garbage, even for surfing the web, EVEN AFTER a factory reset... but it does have a decent processor and a Gig of RAM. I was thinking to do a minimal ubuntu install and then lxde or e17 or the like for a DE... but what might be better is to keep it a command line variant that can let the desktop take the burden and just use it as a terminal...

This would benefit me more, I think, because it would allow the laptops to run smoothly (I have a few of them I'd like to revive through this cause) but more so I can manage all user accounts, homes directories, and installed applications right from one system...

I am by no means a Linux pro, but even if no one has time to tell me step by step, even a push in the right direction with which programs to use would mean a lot to me. I'm guessing this goes a step beyond SSH and involves so kind of setup with an X server, but again, I'm guessing =)

Here's what I'm looking for summarized:
I would like to, from any ubuntu device, have it set up so that when booted, it will connect to the desktop. Then they can proceed to use the laptop as a terminal and connect to the desktop as if they were sitting in front of the screen/keyboard/mouse attached to it.

Thanks in advance for any help!

You might want to have a look at the Linux Terminal Server Project for "Thin Client" type solution: http://www.ltsp.org/

I have found the answer to my own question;

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


How can I prevent Skype from starting automatically on boot? My girlfriend logged into her Skype account from my Xubuntu 12.10 netbook, and ever since then Skype starts automatically every time I boot. How do I prevent this from happening?

Things I've tried:

Removing it from the Settings Manager->Session and Startup->Application Autostart - couldn't find it in the list.
Checking for a relevant setting in Skype itself - couldn't find anything of the sort. (I remember there was a similar Skype setting somewhere whenever I've used it on Windows. Considering my girlfriend is a Windows user, could it be that this is a setting that's available on the Windows client but not on the Linux one, and somehow got transferred?)
Using BUM to turn it off - again, couldn't find it in the list.
Uninstalling Skype with apt-get remove skype --purge and hoping that it removes all the settings as well - it didn't.

Save for reinstalling, what else can I try?

While on the same note - how is it possible for Skype to autostart without going through the normal Upstart route?

EDIT: Couple of more things I tried:

Looking for anything similar in Skype support - I didn't expect to find anything, and I didn't.
Looking through the .Skype folder in my home directory. I did find a couple of files which looked promising (.Skype/shared.xml, .Skype/[my username]/config.xml, .Skype/[girlfriend's username]/config.xml), but looking through them didn't yield anything. Plenty of SQLite files though. Could it be that this setting is somewhere within?

For the new 2017 version of skype that's impudent enough to add itself to autostart each time it's started (seriously? Never installing it on my own machine) it's enough to create a folder with the same name as a file it's trying to create:

rm ~/.config/autostart/skypeforlinux.desktop
mkdir ~/.config/autostart/skypeforlinux.desktop

It seems to be the case that 'closing' Skype isn't actually really closing it. You can notice that also by the fact that if you 'reopen' it, it is already logged in.

You can really close it by typing in the command line:

killall skype

This way it won't be saved in your working session when you log out of your computer, and so won't be automatically restored when restarting your computer.


Lubuntu - power button doesn't turn off computer, I am using Lubuntu 13.04 and would like to have the power button cause the computer to shut down. Currently it only brings up the power preferences menu (logout, reboot, hibernate, etc...).

In Lubuntu, there is xfce4-power-manager v1.2 and I've tried to fix it here by setting the
general->when power button is pressed->shut down
option, but this doesn't change anything.

Any help would be much appreciated.

Try this.  Edit /etc/acpi/powerbtn.sh, and the make sure that the lines below are the last lines in it.

# If all else failed, just initiate a plain shutdown.
/sbin/shutdown -h now "Power button pressed"

also look in /etc/acpi/events/powerbtn, and make sure it matches below, specially the last part.

# /etc/acpi/events/powerbtn
# This is called when the user presses the power button and calls
# /etc/acpi/powerbtn.sh for further processing.

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

# We need to react on "button power.*" and "button/power.*" because
# of kernel changes.

event=button[ /]power
action=/etc/acpi/powerbtn.sh

If you make any changes, make sure you run, before you try to see if it works.  You may need to reboot.

sudo service acpid restart

This is all I needed.

xev | grep "keycode"

https://help.ubuntu.com/community/Lubuntu/Boot_Install_Login#I_want_to_bind_the_power-button_to_change_computer_state.2C_how_do_I_do_it.3F


grave accent key is not working I am using Ubuntu since August 2010. Now, I am using Ubuntu 14.04 with gnome-shell 3.12.1.
I was trying to find shortcut for toggling language but it couldn't work and my grave accent key (`) is also disabled.
Now, whenever I am pressing this key on my keyboard, it works as Esc key. Can some-one tell me how can I configure it?
Can some-one tell me how can I define a key-board shortcut key for input languages-toggling.

When I am pressing command "xev -event keyboard" then it opens a small window and in that if I press grave key (`)  then the output is as:

KeyPress event, serial 28, synthetic NO, window 0x4000001,
    root 0x2bb, subw 0x0, time 2422193, (366,566), root:(368,710),
    state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) ""
    XmbLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4000001,
    root 0x2bb, subw 0x0, time 2422339, (366,566), root:(368,710),
    state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

You need to remap the key to Grave.

This is taken from this answer.

xev will output some information about the pressed key. The third line is important. It should look similar to:

state 0x10, keycode 49 (keysym 0xff55, Escape), same_screen YES,

in this example Escape is the name of the behaviour the key is assigned to at the moment, the number keycode is the internal id to recognize the key.
now when you want to change the keys use xmodmap.

 xmodmap -e "keycode 49 = grave"

This changes the key with keycode 49 on your keyboard to the key grave. It's pretty simple. Unfortunately, this loses the ~ char.

To allow the ~ key, you have to assign it to a modifier. The modifiers are, in order:

(no modifier key used is implied as first)
shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

So we want it to be ` when there is no modifier (item 1) and ~ when there is a modifier. The command is:

xmodmap -e "keycode 49 = grave asciitilde"

asciitilde is the ~ key.

You can also set it to change with caps etc, so if I wanted | when caps is on, you use:

xmodmap -e "keycode 49 = grave asciitilde bar"

bar is the `| key.

Note: These change are for the active X session only and will be lost after reboot.
When you want to save the changes permanently you have to run the following commands after the ones above:

xmodmap -pke >~/.Xmodmap

(it creates a file named .Xmodmap in your home directory (~))

Then you have to create a file named .xinitrc in your home directory where you put command xmodmap .Xmodmap in.

source: Ubuntu Foruns

I find I can do the correct accents quite simply using the compose key.

The grave à is achieved by pressing (in my case) the Right Windows key RtWinthena then the `¬|  key in succesion (top left of keyboard next to the 1!  key) and not necessarily together, just one after the other.

The other accents are just as logical. The least obvious is ç which is RtWin key then c then comma ,.

I hope that helps and that I have understood your requirement properly.


How to SCP a file from Mac -> Ubuntu VirtualBox? I have a Mac (OS X) and a VirtualBox running Ubuntu.

I want to SCP a 500mb file from the Mac to the VirtualBox.  How do I do this?  (Probably something to do with /etc/hosts?)

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

Cyberduck

fugu

You could also run WinSCP under wine..


Driver for Epson L360 scanner Can't connect to the scanner of Epson L360 with the standard epson linux deb scanner driver (http://support.epson.net/linux/en/iscan_c.html.). Are more advanced drivers available or other ways to connect to the scanner?

This is a wrong place to get the drivers. That bundle does not have a required plugin.

Get the drivers HERE

Enter the model name and you will get the correct bundle.

You need to configure it manually following these instructions


Wrong Login Screen Resolution On the odd occasion, usually after incorrectly restarting my computer, my login screen resolution is not the default 1440x900, but I think 1600x900. Now, I have this monitor that's really bad at handling resolutions it's not designed to handle, and will show a silly "wrong resolution" box jumping around the screen.

Is there any way to make the login screen load a 1440x900 resolution no matter what? I'm running Ubuntu 11.10 with Unity and LightDM.

You can make a script for this (source LightDM Resolution).

Firstly we need to find out what your monitors identifier is. Open up a terminal, start typing terminal in your unity dash to see the option or press Ctrl+Alt+T
Type/copy this command to show your display details:

xrandr -q

If you only have one monitor you will see a line in the output like the following (probably with some different values, its the identifier at the start we are after):

DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm

The screen identifier is DVI-0 in this case
Open up your favourite text editor, lets use gedit for this example, press Alt+F2 and type gedit
Type/copy this in:

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

Save this on your desktop as lightdmxrandr.sh
You may want to test the script before we put it into practice. Back in the terminal navigate to where we just saved it:

cd ~/Desktop

Now we need to make it executable:

chmod a+rx lightdmxrandr.sh

Now run it:

./lightdmxrandr.sh

(If your screen automatically auto-corrects after log in you probably won't see a difference so you may want to use a test resolution that is different but you know works while testing)
Now lets move the little script we made:

sudo mv ~/Desktop/lightdmxrandr.sh /usr/share/.

If you don't use sudo you may get a permission error (I use this folder out of personal preference)
We need to now run this in lightdm, navigate to the correct folder:

cd /etc/lightdm

Open up the lightdm conf file:

sudo gedit lightdm.conf

Now add the the instruction to run your script after the last line and save:

display-setup-script=/usr/share/lightdmxrandr.sh

Now reboot and that should set the correct resolution on your lightdm log in screen.

(these instructions might look long but they don't take long at all)

I've created this script to make it more dynamic (multiple workspaces / different monitors).

Only annoyance: when you log in from lightdm, the screen still flashes like it wants to change resolution :s


File transfer is freezing while copying When I make any data transfer process (from computer to usb), after a couple of seconds file transfer process freezes. It be normal after a few minutes later but again freezes. If there would no problem, copy process will be fast. Unlikely my hard-disk works without any problem. Also Flash-disk hasn't got any problem. -I disgust to say that- USB works fine in other OSes.

Note: I am using 3.0 port and 3.0 USB-Driver. I have no 2.0 port on my laptop.

Actually it was not freezing or hanging, it just filled up the cache (that is why it was faster at some point and suddenly looks like freezing.)

To make sure the copying running. You can do strace to see if system call I/O is running.

Open terminal, then ps -ef|grep <name_of_the_program> and then strace -p <prog_pid>.

This is a Disk Management issue. To stop a USB hard drive from freezing while copying data, you have to disable the default "Quick removal" and check the "Better performance" property in the Disk Management. This enables the "write caching", and in order to remove the drive without losing data, you must use the "Safely Remove Hardware" notification icon to disconnect the device safely.


Slow boot - "a start job is running for dev-disk-by..." I don't recall when the issue started to occur but it's likely when I moved my VMWare Ubuntu image to an external SSD so that I can use the OS on any of my PCs. There aren't many links on Google about the issue but the ones that appear talk about fstab. For example, Slow boot - What is "A start job is running for dev-disk-by..." ? - OpenSUSE Forum.

Mentions having to delete the swap partition and creating it again.

I can try to do this with Gparted but my main concern is losing my current set up in Ubuntu as I'm not entirely sure what will happen if I mess with swap as suggested in the thread.  Anyone able to help?

If you get

A start job is running for dev-disk-by...

followed by a 90 second delay during each boot, complete the following steps:

Install GParted using the Software Center

Open GParted and see what partitions Ubuntu is currently using

Edit the fstab file using the line below.
sudo -H gedit /etc/fstab

Find the device that you are not currently using

Insert a # and a space at the beginning of that line comment it out.

Reset

I tried editing /etc/fstab && the /etc/default/grub

To no avail.  What I found using gnome-disks was that my partitions were being loaded as block devices at system startup

Unchecking the "mount at system startup" option fixed the problem.


Sandisk USB not detected by Ubuntu 14.04 but detected by Windows 7 I have a SanDisk 16GB USB drive that is not being detected by Ubuntu 14.04 but is detected by Windows 7.

lsusb detects it but sudo fdisk -l or blkid doesn't.
Even GParted and Disks don't detect it.

Here's some terminal output:

lsusb

Bus 002 Device 006: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E230/E270/E870 HSDPA/HSUPA Modem
Bus 002 Device 004: ID 0781:5576 SanDisk Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1a2c:0021 China Resource Semico Co., Ltd Keyboard
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f2:b070 Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

tail -f /var/log/syslog

Sep 10 22:28:22 xhakz kernel: [ 2203.587319] usb 2-2: USB disconnect, device number 4
Sep 10 22:28:25 xhakz kernel: [ 2206.212045] usb 2-2: new high-speed USB device number 7 using ehci-pci
Sep 10 22:28:25 xhakz mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2"
Sep 10 22:28:25 xhakz kernel: [ 2206.344889] usb 2-2: New USB device found, idVendor=0781, idProduct=5576
Sep 10 22:28:25 xhakz kernel: [ 2206.344895] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 10 22:28:25 xhakz kernel: [ 2206.344897] usb 2-2: Product: Cruzer Facet
Sep 10 22:28:25 xhakz kernel: [ 2206.344900] usb 2-2: Manufacturer: SanDisk
Sep 10 22:28:25 xhakz kernel: [ 2206.344902] usb 2-2: SerialNumber: 4C532000030522108444
Sep 10 22:28:25 xhakz mtp-probe: bus: 2, device: 7 was not an MTP device

usb-devices

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=5576 Rev=01.26
S:  Manufacturer=SanDisk
S:  Product=Cruzer Facet
S:  SerialNumber=4C532000030522108444
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)

I don't know what to do anymore to get it detected and I don't want to format it as it contains important data.

I backed up my data in another laptop, formatted the drive in Windows 7 but still it's not recognized. The funny thing is that Windows 7 detects it and uses it fine but it's not detected in Ubuntu except by the lsusb command. Weird.

EDIT

Requested command output:

sudo lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 149.1G  0 disk
├─sda1   8:1    0   1.5G  0 part
├─sda2   8:2    0  74.4G  0 part
├─sda3   8:3    0     1K  0 part
├─sda4   8:4    0    32G  0 part /media/kagz/New Volume
├─sda5   8:5    0   1.9G  0 part [SWAP]
└─sda6   8:6    0  39.4G  0 part /
sr0     11:0    1  1024M  0 rom

sudo lshw

http://paste.ubuntu.com/8332788/

uname -a

Linux xhakz 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:01 UTC 2014 i686 i686 i686 GNU/Linux

EDIT 2

Something interesting:
The USB DOES NOT work in guest mode but WORKS in live session mode. All running Ubuntu 14.04.
Re-installing is not an option.

EDIT 3

Other USB's don't work, this is a problem with the system not the USB.

It turned out the usb-storage module was not being loaded at startup and so couldn't detect any USB drives.

To try it first, I inserted my usb, opened up the terminal and typed sudo modprobe usb-storage and it was detected.

To make the changes permanent, I edited the file /etc/modules as root and added the line usb-storage

My file now looks like this:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

usb_storage
lp

Source: ubuntuforums


Is there an alternative to XWord for doing NY Times crosswords? I love doing the New York Times crosswords, and have had a subscription to the online site for over a decade. On Windows and Mac, they use the AcrossLite program from LitSoft, but their Linux version hasn't been maintained, and I don't even know if it's still available. I know there's XWord, but it doesn't support all the newer features of AcrossLite, like allowing more than one letter per square (a frequent trick in the Sunday puzzles).

I've tried the Windows version of AcrossLite under wine, but it's surprisingly bad.

EDIT (02/11/2011) I contacted LitSoft directly to see if they were ever planning on making the Linux version available again. I received a response right away from a developer. I'm quoting directly from the email:

  Yes, Across Lite for Linux will be available again sometime in 1Q2011. We are currently working on a v1.2 re-compile for newer Unix distros as a first-step and will later evolve it to 2.0 version. We tried an Adobe Air version for all platforms other than Windows and Mac but the user experience was terrible partly because of Adobe Air issues so we went back to the native version. Hence the delay.

NY Times recommends (for Linux) http://www.nytimes.com/ref/membercenter/help/litlinux.html

However - with a little searching I found;

http://timesreader.nytimes.com/timesreader/index.html

JClic: puzzles, test exercises, crosswords, you can get it all from Synaptic.


Ubuntu can't find Wi-Fi driver My newly set-up Ubuntu GNOME 15.10 system isn't able to find a Wi-Fi driver for my laptop. When I boot from a live USB it's able to find the driver easily, and activate it so I can use Wi-Fi. Yet, on the actual system it is unable to do so. Nothing appears in the "Additional Drivers" page.

Is there a way to enable Wi-Fi without the need for an Ethernet cable?

For a bit of extra info, the battery driver seems to be missing as well (battery level always shown as critically low), and I'm on a very old HP Mini laptop. When I use rfkill list it shows that everything is unblocked.

The command lspci -knn | grep Net -A2 prints:

01:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01) Subsystem: Hewlett-Packard Company Device [103c:1508] Kernel driver in use: b43-pci-bridge

Download this file and save it in "Downloads":

http://media.cdn.ubuntu-de.org/forum/attachments/04/32/2480236-Broadcom_Firmware.tar.gz

Installation

cd ~/Downloads/
sudo tar xvf 2480236-Broadcom_Firmware.tar.gz -C /lib/firmware/

Reboot. From here:
http://forum.ubuntuusers.de/topic/netzwerkkarte-nach-deaktivierung-im-autostart/#post-2480236


Kubuntu 14.04 login fails after lightdm/ xdm/ lightdm swap I am running kubuntu 14.04.

Recently as part of a python development project changed the DM to xdm. Since then I have not been able to get the system to let me back past the login page.

To be precise, if I enter my password it just blacks the screen then presents me with the Login page again.

I can raise a command line and have tried running dpkg-reconfigure lightdm, which seems to have worked, but to no avail.

I have also run apt-get autoremove, apt-get clean etc in order to try and clean the system of any broken packages, redundancies etc. that might be causing problems.

I tried:

sudo dpkg-reconfigure lightdm

sudo dpkg-reconfigure -a

and restarted...same thing

If I try to start the system and then ESC during startup the system seems to be looping over the same block of instructions.

I  have looked at comments for earlier versions of k/Ubuntu but can't find anything that sorts this. Hence the new question.

Suggestions, please? ls -al $HOME/{.ICE,.X}authority

gives

-rw------- 1 peter peter 29018 SEp 26 12:18 /home/peter/.ICEauthority

-rw-rw-r-- 1 peter root 155 Sep 26 12:18 /home/peter/.Xauthority

(After the changes described below)

I've been using Ubuntu since 2006.  From 2005 to 2006 I exclusively used Kubuntu.  Before that tried various other types of linux.  I like the look and feel of Kubuntu, but I didn't like how often it would crash in the most unpredictable ways.  Since then I've tried several KDE programs under Ubuntu, and time and again these KDE applications are visually appealing buggy as hell.  Do yourself a favor, upgrade to the REAL ubuntu.  KDE? Just say NO!


Using rsync with sudo on the destination machine Having a problem that rsync does not set UID and GID as expected, my gut feeling is that rsync should be run as root on the destination machine.

I can't login as root via SSH, since that's disabled for security purposes. The user on the destination machine is able to use sudo.

Is it possible to use rsync with sudo?

On the destination machine

Find out the path to rsync: which rsync
Edit the /etc/sudoers file: sudo visudo (see also: must I use visudo?)
Add the line <username> ALL=NOPASSWD:<path to rsync>, where username is the login name of the user that rsync will use to log on. That user must be able to use sudo

Then, on the source machine, specify that sudo rsync shall be used:

rsync ... --rsync-path="sudo rsync" ...

Using it without the NOPASSWD on the destination machine will result in the message

  sudo: no tty present and no askpass program specified

If there is no access to sudoers file,
just create a wrapper script for the ssh command.
ssh_sudo:
{
  echo $PASSWORD;
  cat - ;
} | ssh $* &

At first, this passes the password to the ssh client's sudo process in order to start rsync on the remote side. Next all input coming from the local rsync is piped to ssh.
Finally call rsync e.g. with:
PASSWORD=<SUDOPASS> rsync -avzue ssh_sudo --rsync-path "sudo -S rsync" SRC DST

I guess the security aspect here is not that bad, you'll only have to save the password locally as env var. Reading it from a file should work as well...


NAM installation problem in NS2, Segmentation Fault I am having trouble running the network animator on Ubuntu14.04.  It
gives me this error segmentation fault (core dumped). I am using NAM version
1.15 and ns2-2.34.

I also faced the same error... The following will help u to get the exact result... Try to install ns2 with the procedure given in the link
 "Segmentation fault (core dumped) in nam ubuntu 14.04".
 If you have installed ns2 successfully and still getting "Segmentation fault", then do the following step

copy the 'nam' file from your '/home/[username]/ns-allinone-2.35/nam-1.15' folder and paste it into '/usr/local/bin' folder
now surely it will work... restart your terminal and execute your tcl script