Is there a command-line program that can convert an image to an ASCII art image? Is there a command-line program that can convert an image to ascii art and then save that output as an image e.g. jpg or png?

To illustrate what I'm in need of, I want to convert the image below into ascii art

The output that I desire from a program should be similar to this one, which was created by taking a screenshot of the output of an image-to-ascii converter (the output was pure text)

I'm aware that GIMP has the ability to save an image as ascii art and aview can also convert an image to ascii. However, the former cannot be done via the command line and the latter only lets you view the output, not save it (I don't want to resort to taking a screenshot of the output).

I'm also aware that libcaca can save its output to an image, but it only outputs colourful ascii, like below.

Made by converting the source image to greyscale and then with the following command:

img2txt -W 70 -f tga input.jpg > output.tga

The reason for wanting a command-line program is to batch process a folder full of images.

When you say you don't want to resort to taking a screenshot, do you mean that you don't want to have to resort to taking a screenshot manually?  Generating images with aview and taking screenshots of the results could be automated.  For example:

#!/bin/sh

aview $1 &
pid=$!
sleep 1 # Give aview time to map its window.
xwd -name "aa for X" | convert - $2
kill $pid

It is not an answer to the final question, but a hint, if you just read the title: Why use ascii? If you just search for a way to get a hint of images on the console, better use a terminal with Sixel support and show images directly in the terminal:

apt install libsixel-bin mlterm
mlterm
img2sixel test.jpg

works on Ubuntu 19.10!


Downloading Google Chrome (armhf?) I've been using this question (How to install Chrome browser properly via command line?) to try to install google chrome.
I get to the very last command,

sudo dpkg -i google-chrome*.deb

And I get a message "package architecture (amd) does not match system (armhf).
I'm sorry if this is a noobish question, but I can't find a fix myself. Any pointers or advice?

Chrome doesn't support armhf systems, but the community open source Chromium does. Do a one liner sudo apt-get install chromium-browser to install Chromium, which, to the average user, is an exact replica of Google Chrome (logins and everything are supported). If you get an error after this, something saying that a dependency is missing, do sudo apt-get install -f.

Using raspberry pi, maybe? Full browsers tend to run slowly on raspberry pi's, but enjoy it if you can get it to run!

Its weird to install the genuine Google Chrome, as the normal Chrome browser for Linux is the Chromium Web Browser.Available via command line and software center.

But for genuine Google Chrome its odd...if you do get Google Chrome you will be able to access normally limited streams such as Netflix.

You will need to go to https://www.google.com/chrome/browser/desktop/index.html. I have included a link for you to click of for easy access. You will need to click the download button and select your OS type for the download.

Once you have finished your download you will need to go to your downloads folder and double the download for chrome.

It will reroute you to the software center, where you must download Google-Chrome-Stable.Once it has downloaded you now have Google Chrome, just search your dash home for it and lock it to your launcher.


Ubuntu 18.04 - Suspend Issues After a clean installation of Ubuntu 18.04, I realize that the sleep mode does not work. When I suspend from the menu button or with the sudo pm-suspend command, the screen turns off but the power LED stays on and the fan continues to run. In addition, no keyboard keys or even the power button wake the computer. The only solution is to force the shutdown by pressing the power button.

After reading different posts, I did not find a solution to my problem.

I do not have a nvidia graphics card.
The command cat /sys/power/mem_sleep tells me that I'm in deep mode (s2idle shallow [deep])
I tried different kernel versions: 4.18.7, 4.17.14 and 4.15.0-34(=current)

Computer specifications: Samsung NP530U3B with ubuntu 18.04 64bit. It's a core i5 with 4Gb of ram and no graphic card.

How can I fix that?

My boss and I had similar issues with our Dell Venue 11 Pro 7140.  After many releases, Dell eventually discovered an S3 bug relating to pre-5.0 kernels.  They advised 2 things:

Update the BIOS to the latest version available, most likely post-November 2018.
Upgrade to a 5.0 kernel.

Additionally, we found 2 more things were required:

Completely clean your user config (as in, mv ~/.config ~/.config.old) as some previous settings in X11 have hung around in upgrade and are incompatible with S3 "freeze" features.
a. If using Gnome, change Settings->Power->"When the power button is pressed" from "Nothing" to "Suspend".

b. If using XFCE, change all "freeze" settings to "suspend" in the Power Manager.

sudo systemctl suspend -i

[ edited to -i as I incorrectly put in -l previously]

and I need to unplug all usb ports before doing so else they are lost.
it is, however, unreliable as said above.

also last night it was as you say yours is, blank screen fan running and did not go to sleep until I pressed the space bar. go figure.


Permission denied when running .sh scripts ./geany_run_script.sh: 5: ./geany_run_script.sh: ./Area_circumference: Permission denied

program exited with code: 126. This problem always occur when I try to execute my code. What might be the solution?

Here's a link which explains about Changing file permission (and ownership)

If you want to skip these (for now of course), you can create a directory/folder in your user-home directory and work on your C programmes (or others) there.

You can open the terminal (press Ctrl + Alt + T) and cd to the target directory:

cd /path/to/target

To give the file "the_file_name" execute permission (if the file-system allows you with the RW rights):

chmod +x the_file_name

Open your terminal application by pressing CTRL + ALT + T or with the apposite shortcut on the graphical enviroment (like Terminal or xTerm).
In the uniform window which appears on the screen you'll see a blinking character, it's the terminal cursor: simply click on the window and write to enter text (typically commands) and press ENTER to confirm the input.
Before the cursor there is always listed your current position on the file system from the root directory ("/") and your home (where your personal files are) is called "~".
To change directory/folder use cd EXISTENTFOLDER (replace EXISTENTFOLDER with the folder name); if you feel lost, simply type cd to return to your home directory in a blink!
Now let's solve your problem:

Use the cd command to find the directory with your source code. Use TAB to help you. If you execute ls -lh, you'll see a list of possible paths to follow and files to execute.
When you've find the blocked file execute chmod +x FILENAME (replace FILENAME with the name of your source code file).
If you have multiple blocked files execute chmod +x * to unlock all files in the current directory. Never chmod +x dangerous or insecure files.
Execute ./FILENAME YOUREVENTUALARGUMENTS to execute your executable file.
Remember that if your compiled program tries to read/write outside your home directory you'll need to execute it as root by using sudo ./FILENAME YOUREVENTUALARGUMENTS.

If you want to have a manual for a command execute man COMMAND (replace COMMAND with the exact command name, Linux is case sensitive).

Some shells have an Open terminal here command to simplify your life, search for it in the future and remember that the command shell can be your best friend, if you use it well. :-D

It's all. If you need more help comment under here.
If I'm helping you press the UP arrow on the left; if you solve mark this answer as best answer.

Have a nice experience on Linux & Ubuntu.


Dell XPS 9360 Crazy slow wifi I just bought the new Dell XPS 9360.

I've had two main issues after installing latest Ubuntu:

touchpad config, which I fixed thanks to this post
wifi being reallllllly slow, not all the time, not on every wifi, but too often. Most of the time it starts by working reasonably, until falling down to super slowness interrupted by temporary disconnections...

I read several things on the topic, but until now without success:

This one did not have any observable effect
This post seems to relate to an old kernel-header issue so I doubt it still applies
In there: I tried several tips, without success for now

Anyone experiencing this? Any fix to offer? Or at least some tips to investigate (where are the logs, what are the layers on the network config in linux, what is modprobe.d, why does ath10k lives along several other versions in /lib/firmware etc.)

Using:

$ apt-cache search linux-headers-$(uname -r)
linux-headers-4.4.0-79-generic - Linux kernel headers for version 4.4.0 on 64 bit x86 SMP

Cheers

EDIT: Here's the output of lspci -knn | grep Net -A3:

➜  ~ lspci -knn | grep Net -A3
3a:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
    Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter [1a56:1535]
    Kernel driver in use: ath10k_pci
    Kernel modules: ath10k_pci
3b:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)

I had the same issue with a HP and realtek wifi card. The repository drivers didn't work the card properly. After searching threads for a couple of days, I finally found (by trial and error) a driver source that worked.

first, try compiling the drivers yourself with (make,make install) to eliminate the possibility of a kernel mismatch. if that doesn't work search for newer drivers. if you get source, it doesn't matter what distro they come from because they will be compiled to match your kernel.

EDIT:
try these: wget https://github.com/FireWalkerX/ath10k-firmware/raw/master/QCA6174/hw3.0/board-2.bin


After recent update my netbook launcher in Ubuntu 10.04 has vanished After a recent system update my netbook launcher is not working and has vanished. I am able to see the title bar like system clock and other apps but not able to access any apps. I tried booting to the 2d edition and it works fine.. Can you help..

You probably need to re-install Ubuntu Netbook's launcher.
Run the following in a terminal:

sudo apt-get install ubuntu-netbook

That should do the trick for you.

Try purging Unity's and Compiz's configuration files by reinstalling.

Open a terminal and write:

sudo apt-get purge unity compiz
sudo apt-get install unity compiz

This is a dirty solution though and you'll lose all custom configurations made to those two.


Permissions denied to owner, although it is set to 666 in .ssh directory I recently messed around with the .ssh directory. Made some permission changes, I think and now it won't let me access it anymore. I can access it as the root user (sudo -i) but not as user1

I get permission denied when listing or cding into .ssh even though it shows the files

ls: cannot access /home/user1/.ssh/amazon.pem: Permission denied
ls: cannot access /home/user1/.ssh/id_rsa: Permission denied
ls: cannot access /home/user1/.ssh/known_hosts: Permission denied
ls: cannot access /home/user1/.ssh/id_rsa.pub: Permission denied
total 0
-????????? ? ? ? ?            ? amazon.pem
-????????? ? ? ? ?            ? id_rsa
-????????? ? ? ? ?            ? id_rsa.pub
-????????? ? ? ? ?            ? known_hosts

Logging in as root and ls gives following results

# ls -l /home/user1/ -a |grep ssh
drw-rw-rw-  2 user1 user1 4096 Aug 27 15:45 .ssh

Even the files inside are .ssh are owned by user1:user1 and chm

-rw-rw-rw- 1 user1 user1 1692 Aug 27 15:45 amazon.pem
-rw-rw-rw- 1 user1 user1 1675 Aug 25 20:01 id_rsa

Steeldriver is right. On directory you need also x access flag to be able to list files inside.

Fixing the directory using chmod 700 ~/.ssh should help you to get into this (correct) state:

$ ls -ld ~/.ssh
drwx------. 2 user user 4096 Aug 26 10:37 /home/user/.ssh

Also you should fix your keys using chmod 600 ~/.ssh/id_rsa and chmod 644 ~/.ssh/*.pub to get this:

$ ls -l ~/.ssh/
-rw-------. 1 user user  1766 Mar  7  2014 id_rsa
-rw-r--r--. 1 user user   415 Mar  7  2014 id_rsa.pub

When you run command ls -l on any directory the first column is the permission column which is interpreted as follows:

1-------------2     3     4-------5     6     7-------8     9     10

(TYPE)----(user)-----(group)----(others)

TYPE : If '-', it is a file. If 'd' it is a directory.

Permissions: read: 4, write: 2, execute: 1

So for read, write and execute your permissions will be 7 in user group.

You can use

sudo chmod 7 6 6 file_name

or

sudo chmod -R u+x /home/somesh/.ssh

-R – this modifies the permission of the parent folder and the child objects within


vivid - failed to connect to upstart: connection refused Just updated via do-release-upgrade and now certain upstart jobs such as fail2ban and plexmediaserver will not start (have tried reinstalling)

$ sudo service fail2ban start
Job for fail2ban.service failed. See "systemctl status fail2ban.service" and "journalctl -xe" for details.

$ systemctl status fail2ban.service
  fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2015-04-27 19:47:27 BST; 26s ago
     Docs: man:fail2ban(1)
  Process: 14423 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)

$ sudo service plexmediaserver start
Failed to start plexmediaserver.service: Unit plexmediaserver.service failed to load: No such file or directory.

$ sudo dpkg -i plexmediaserver_0.9.11.16.958-80f1748_amd64.deb
(Reading database ... 88738 files and directories currently installed.)
Preparing to unpack plexmediaserver_0.9.11.16.958-80f1748_amd64.deb ...
stop: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

Any ideas with where to start on this?

Ubuntu switched to systemd as its service framework starting in 15.04 for all flavors, including Desktop and Server. The recommended practice is to change your upstart jobs to systemd jobs (see the wiki article for more info). You can also switch back to upstart if you want, which is certainly the quicker fix. I recommend you read the first few sections of the wiki article to weight the pros and cons.

Recommended Fix

Refer to the wiki article to transition your upstart scripts to systemd.

Discussion and coding guide: Systemd For Upstart Users

Quick Fix (for 15.04 only)

To permanently switch back to upstart just run:

sudo apt-get install upstart-sysv
sudo update-initramfs -u
sudo reboot

EDIT: The wiki article only recommends this for 15.04, but some users have found it helpful on 16.04 too.

I had this problem after upgrading a Linux VM (VirtualBox).

Turns out I had to run VBoxLinuxAdditions.run from the pseudo-terminal as root and reboot to fix this.

FYI in case anyone out there has the same problem.

David


How to get host-name from DHCP server via Network Manager? I can get hostname and ip address from DHCP server with invoking the script under /etc/dhcp/dhclient-exit-hooks.d/ directory as explained here on client side .

EDITED: I assigned host-name and ip address in /etc/dhcp/dhcpd.conf on server side:

...
host slave1 {
    hardware ethernet 00:50:56:89:A5:90;
    fixed-address 192.168.1.100;
    option host-name "slave1";
}
...

But it stopped after installed network manager. I realize that network manager doesn't invoke scripts under /etc/dhcp/dhclient-exit-hooks.d/ directory. After some research, I found that I can run a script under /etc/NetworkManager/dispatcher.d/ directory as explained here. I tried it (moved file, then gave permissions) but It didnt work. Because I can not reach variables like $reason, $interface, hostname etc. under that directory. I'm stuck here. So is there a way to get hostname from dhcp server via network manager? or how to run a script under dhclient-exit-hooks.d directory on boot even if network manager runs ?

I searched about 8 days to find a solution but I found nothing. I developed my own method. It is not the best way but It works.

First step: Ubuntu always shows "Waiting for network configuraion..." and waits 2 minute to pass that. I changed two lines in failsafe.conf and disabled "sleep" functions to solve this problem.

* sudo nano /etc/init/failsafe.conf

...
$PLYMOUTH message –text=”Waiting for network configuration…”
#sleep 40

$PLYMOUTH message –text=”Waiting up to 60 more seconds for network…”
#sleep 59
...

Second step: Network fails after disable "sleep" functions. I changed rc.local to run /etc/init.d/networking restart to configure network correctly before login.

* sudo nano /etc/init/rc.local

/etc/init.d/networking restart
exit 0

I hope it will be useful for someone who faced the same problem.


Opening vim inside terminator window I have started using the terminator emulator, and overall it's great. One annoying issue I have however, is that everytime I open up vim inside of it the window acts very odd. Basically all the symbols get wacky and it's illegible. Even doing screen redraw doesn't help.

However, if I open one addition terminal window , the original window with Vim inside goes back to normal.
I'd like to not always open a new window for Vim to work, so i'm hoping someone has perhaps had a similar issue.

I think be a vimrc setting that's off. I could put part of it up if that would help. Thanks

Here's some of the vimrc file:

"source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin

nmap <F8> :TagbarToggle<CR>

"set t_Co=256
" Let's set the wrap margin

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
" runtime! debian.vim

filetype plugin on
set hlsearch

"set foldmethod=syntax
"set foldnestmax=1

"set shellcmdflag=-ic

autocmd  BufRead,BufNewFile /tmp/calcurse* set filetype=tex
autocmd BufRead,BufNewFile ~/.calcurse/notes/* set filetype=tex

"if has('gui_running')
"  set guifont=Lucida_Console:h11
"endif

"set termguicolors

set grepprg=grep\ -nH\ $*
"set t_ut=

"set background=light ## Heading ##
"syntax enable
"let g:solarized_termcolors=16

"colo desert

" Setting up the relative numbering feature.
set relativenumber

set foldlevelstart=99

set nocompatible

set shellslash

"innoremap <expr><buffer><silent> gb  ':!zathura --synctex-forward
'.line(".").':'.col('.').':% ' .
shellescape(g:latex#data[b:latex.id].out()) . ' >/dev/null<CR>'
let g:livepreview_previewer = 'zathura'
nmap <F12> :LLPStartPreview<cr>

set sw=8

let mapleader=','
"filtetype indent on

set ttimeout

let g:tex_flavor ='pdflatex'

let g:Tex_DefaultTargetFormat ='pdf'

let g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 -
interaction=nonstopmode $*'

let g:Tex_ViewRule_pdf = 'zathura'

"let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
"let g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode  $*'

Thank you for posting this question!   I am using this every day now.

You can find out the version of Ubuntu you are using with this command:

lsb_release -a

Under Ubuntu 16.04 LTS terminator installs like so:

sudo apt-get update
sudo apt-get install terminator

and run by typing:

terminator

vim can be installed from inside the terminator window

sudo apt-get update
sudo apt-get install vim

and run it by typing

vim

It works just fine.  Nothing strange about it at all.

You can open a window to the right with Ctrl+Shift+E

And another just below it with Ctrl+Shift+O

vim works fine in all of them.

Ctrl+Shift+W closes the "current window" which you can select with your mouse.

Also, if you right-click inside a window it gives the options to split it horizontally or vertically or close it.

Here is an example of using vim in the top screen.

/home/pi/.vimrc looks like this:

syntax enable
set number
set ts=4
set autoindent
set expandtab
set shiftwidth=4
set cursorline
set showmatch
let python_highlight_all = 1

Regurlarly I monitor my cron activity by opening one window below

(Ctrl+Shift+O)

wcron

to get my real-time cron log monitor running, as per:

16.04: How do I make cron create cron.log and monitor it in real time?

Then in this example I have wcron in the bottom part, and above it I ran a script that went out to the OUTSIDE data-logger to run an rsync back to the hard drive of the mothership.

This is great.  Makes the Ubuntu experience much more rich on a single monitor.


15.04 Installed fglrx AMD/ATI drivers -- won't boot I installed the proprietary AMD/ATI drivers on Ubuntu 15.04 64-bit, and restarted my PC. Now, it will show the Ubuntu logo, but won't go to the login screen. I can't switch to a terminal via CTRL+ALT+F1, CTRL+ALT+F2, etc.

I'm unsure how to uninstall the fglrx drivers if I can't boot to the login screen or terminal.

Running Ubuntu GNOME 15.04 64-bit w/ GNOME 3.14 on Acer Aspire laptop (model 8943G-9319, ATI Mobility Radeon HD5850)

Thanks in advance!

Thanks to the community, I found - and am writing down - the steps to remove fglrx AMD/ATI drivers when you can't get to the login screen (or a terminal/console/command prompt/etc.)

Switch on your computer.
Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.)
Select the line which starts with "Advanced options".
Select the line ending with "(recovery mode)", probably the second line, something like: "Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)"
Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be "Drop to root shell prompt". Press Return with this option highlighted.
The root partition is mounted read-only. To mount it read/write, enter the command:

mount -o remount,rw /

If you have /home, /boot, /tmp, or any other mount point on a separate partition, you can mount them with the command (unsure if this step is needed, but unless I'm corrected by someone, I recommend you type in this command as well, otherwise you may not be able to uninstall fglrx. And, again, the command:

mount --all

Type in the following command:

sudo apt-get remove fglrx-*

Enter Y to accept the changes. Ubuntu should then uninstall all fglrx drivers.
Remove the X.org configuratiuon:

sudo rm /etc/X11/xorg.conf

Type in the following command to reboot your PC:

sudo reboot

Ubuntu should now reboot and use the default open-source drivers again. Cheers!

Have you tried this:

sudo apt-get install nvidia-update

and then this

sudo apt-get install nvidia:i386

and you can enter this

sudo apt-get install fglrx-*

startx

and use settings-detail and then check for update, and then enter updates and hatch the updated gfx driver and then this enter in the terminal:

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get dist-upgrade

and it might work fine this way.


Keystroke error in Unity after upgrade to 14.04 After upgrading to Ubuntu 14.04 a strange error occurred: keystroke on c has no effect, whereas a longer stroke gives a lot of c's (as expected).

The error is reproducible, but appears in Unity only, not in Gnome 3.10 which is installed as well. Key c still works well at the login prompt. Changing the keyboard layout (from German to English) has no effect. So it shouldn't be a hardware error, nor an error of the keyboard layout. But what else could it be? As far as I mentioned, there are no other keys affected.

Does anyone have a clue?

After checking user275435-comment, I found a solution:
I looked through all shortcuts and disabled (press backspace) all with a hexcode, e.g. 0xa1.
Now the c-key works again.

I had the same problem after upgrade to 14.04 on the unity desktop, the problem was the program touchpad-indicator. This has a shortcuts created under "All Settings - Keyboard - did own shortcuts"


Unable to run TOR Browser Bundle, not even in terminal I am a Linux newbie, and this is the first time I am using TOR in 12.04.
I have an issue in running TOR for which I couldn't find any specific answer in the Internet.

So let me explain.

I downloaded TOR browser bundle (tor-browser-gnu-linux-x86_64-2.2.38-1-dev-en-US.tar.gz) and saved to this location: /media/50B8245BB82441B8/TOR/
I then extracted tar.gz file into the same directory. So now I have /media/50B8245BB82441B8/TOR/tor-browser_en-US

In this directory, there is a file start-tor-browser. The problem is that, when I double click this file, it opens in text format, instead of launching TOR Vidalia.

So I right-clicked this file > Permissions > checked Allow executing file as program, but again it automatically unchecks it.

I then thought of executing this file through the terminal, but nothing seems to work.

cd /media/50B8245BB82441B8/TOR/tor-browser_en-US
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$ start-tor-browser
start-tor-browser: command not found
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$ cd start-tor-browser
bash: cd: start-tor-browser: Not a directory
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$ sudo start-tor-browser
[sudo] password for jerry:
sudo: start-tor-browser: command not found
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$ gksu start-tor-browser
jerry@ubuntu:/media/50B8245BB82441B8/TOR/tor-browser_en-US$

As you can see, when I use gksu, nothing really happens except an empty command line added with a blinking cursor.

Can someone please help?

It seems that the device you have extracted it on does not support permissions (is not a native Linux filesystem). Re-extract the tar.gz but do it in your home directory (home directory should support permissions).

DO NOT JUST COPY THE FILES FROM WHERE YOU EXTRACTED THEM! IT WILL NOT WORK!

Navigate to the top menu bar of your screen and click on Files.

Click on Preferences → select the behavior tab →  change setting to "Run executable text files when they are opened"

The default setting is to "View executable text files when they are opened" and that is why it opens as text file.


How to add WiFi password and static IP to OSMC, before saving the image? I would like (using Ubuntu 18.04) to save my Wifi password and a static IP on an OSMC disc image before "burning" this image to an SD card to be used in my raspberry pi 3.

The reason is that I have a fairly long and not particularly human legible Wifi password and a rather terrible keyboard on the pi.

I have done this before on a raspberry 2 and XBMC, but I do not remember how...

Network passwords are stored in /etc/NetworkManager/system-connections and you can create a static IP for your device by changing your /etc/network/interfaces file to something like below:

# The wifi network interface
auto wlan0
iface wlan0 inet static
    address 192.168.0.87
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 192.168.0.1, 8.8.8.8
    wpa-ssid <Your wifi network SSID>
    wpa-psk <Your hex encoded wifi WPA password>

Then you can create your image of the system.


Installation: can't boot the ubuntu 12.04 I'm trying to install Ubuntu 12.04 on my laptop. I downloaded the .iso file and burned it to DVD, then I restart the system and select boot from DVD.

Now, there is just a black screen that a prompter is above the screen at the left side and I cannot write anything. After about 15 minutes my system automatically shut down.

How can I solve this?

Check your BIOS SATA Mode, it has two options: IDE Mode and AHCI Mode. IDE Mode enable you to see the disk

Hope it's helpful!


Asus Xonar DGX recognized but no sound I have a dual boot system with Windows 8 and Ubuntu 14.04LTS and I have a ASUS Xonar DGX. There's no sound in Ubuntu but it works correctly in Windows. I've looked at some of the other threads and used the terminal to check the card out. (That was a fun learning experience. :) ) The card appears to be recognized correctly. It shows as a CMI8788 [Oxygen HD Audio] in the sound settings as it should. But when I test the sound I get nothing.

Any help would be greatly appreciated.

EDIT:
I ran the requested reset on alsa and ran Lspci -v | grep -A7 -i "audio" again

01:00.1 Audio device: NVIDIA Corporation GF104 High Definition Audio Controller (rev a1)
    Subsystem: NVIDIA Corporation Device 0865
    Flags: bus master, fast devsel, latency 0, IRQ 17
    Memory at f7dfc000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel

02:00.0 SATA controller: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 03) (prog-if 01 [AHCI 1.0])
--
04:04.0 Multimedia audio controller: C-Media Electronics Inc CMI8788 [Oxygen HD Audio]
    Subsystem: ASUSTeK Computer Inc. Device 8521
    Flags: bus master, medium devsel, latency 64, IRQ 17
    I/O ports at d800 [size=256]
    Capabilities: <access denied>
    Kernel driver in use: snd_oxygen

07:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0) (prog-if 10 [OHCI])

Just ran into the same problem

After fiddling around I started alsamixer, selected the sound card (F6), and changed Analog Output to Multichannel.

Install alsa-utils In terminal type:

sudo apt-get install alsa-utils

Run alsamixer in terminal
Hit the F6 key.
Arrow over to "Analog Output" and arrow up/down to change to "Multichannel"

You need to edit this file /etc/modprobe.d/alsa-base.conf and then add a line in its end. Use the following commands:

sudo nano /etc/modprobe.d/alsa-base.conf

Now add the following line at its end:

options snd-hda-intel model=generic

Now reboot your computer. It should solve your problem.

See this question:

No sound from speakers, but headphones work


No internet connection while installing ubuntu 12.04 Currently I am running Windows 7 on my PC. When I boot to Windows, it connects to the internet.

But when I try to install Ubuntu 12.04 and boot from the flash it shows Disconnected - You are now offline.

I am using wireless internet, and I also tried connecting directly from my router to my PC too, still I cannot connect to the internet.

Anyone has an idea how fix this very annoying problem?

the output of ifconfig is as bellow:

    eth0      Link encap:Ethernet  HWaddr 62:d5:10:5d:82:31
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1312 (1.3 KB)  TX bytes:1312 (1.3 KB)

I had the same problem with my hp dv6. After a lot of playing around with things and making sure the right drivers were installed, I tried checking my Bios settings and reset to default. Apparently that did the trick for me I guess when they install windows on laptops it changes something in the Bios.

Try connecting to the internet directly with an ethernet cable, not through the router. Just disconnect your router from the internet and plug the cable into your computer. Does it work? If it doesn't then there's a problem with the network-manager package.

I suggest to make the flash drive bootable again. Or you can install Ubuntu without connecting to the internet. You can connect later, after the installation. Let me know if it worked. If not i can help you fix your network-manager package


Connect Mac to Ubuntu with USB to USB cable I need to make a large file transfer between a Macbook air and Ubuntu Desktop (16.04). Is this possible with a usb to usb cable? Would I need a driver to get the cable to work in Ubuntu?

Thanks

Typically, data is transferred between computers using a network, such as your LAN.  A lot of the time a router is involved, but you can create a network between two machines in the same way, using WiFi or crossover cables.  While it may be obvious, the speed of the transfer will be limited by the speed of the network speed, so you should try to use wire connections if possible.

Once you establish a network, you can use programs such as rsync, sshfs, scp or even samba to share files between the computers.

Another solution, especially when dealing with raw data (vs files), or a lot of data, would be for you to remove the HDD from one machine, and connect it to the other machine.  You can buy special SATA to USB cables or self-powered devices to make this easier.  Unfortunately, it is unlikely that you can remove the HDD from the Apple product.

Is there a reason both of these machines couldn't be hooked up to a router/switch so that you could use SAMBA, or other data-transferring programs?  How often do you intend to need to do this?  Do you actually have a Standard A to Standard A USB cable?

You can find more information about difficulties using USB in this way by checking out this explanation, or look at a more hopeful explanation that this is possible by using TCP/IP over USB.

USB is not made to connect two computers. It is a bus system, where you have one computer (taking the role of a bus master) and several slave devices that send or receive some data on request of the master. Even your smartphone, when connected to your PC via USB, will act as a slave device, similar to a thumb drive.

What you need is either a network (e.g. Wifi or LAN), or a mass storage device to move the date between both computers (e.g. a thumb drive or a external hard disk). You won't need special drivers for either option.


Chmod error changing permission read only file system I have three main partitions on my disc /dev/sda:

/dev/sda1            2048   117186559    58592256   83  Linux
/dev/sda2       117186560   128905215     5859328   82  Linux swap / Solaris
/dev/sda3   *   128905216   324216831    97655808    7  HPFS/NTFS/exFAT
/dev/sda4       324216832  1250263039   463023104    b  W95 FAT32

/dev/sda3 is a Windows 7 partition and /dev/sda4 is a FAT32 partition where I keep my data. My problem is that yesterday I can't write on /dev/sda4 and when I tried to change the file permissions I get an error:

$ sudo chmod 777 /media/fourat/74A7-A44E/
chmod: changing permissions of ‘74A7-A44E/’: Read-only file system

mount output:

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=fourat)
/dev/sda4 on /media/fourat/74A7-A44E type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

Solved: Remounted the partition as instructed in mikewhatever's comment with

sudo mount -o remount,rw /dev/sda4

I guess you can use the below command to remount:
adb remount

this solution should work for the above issue


What is the default data directory for mongodb if we install that in amazon ec2 I tried to find this info everywhere and couldn't find it. I already change mongodb.conf so I forget where the original directory is.

When you are searching a file in your filesystem while you are running Ubuntu a very easy way to find it is to do the following:

Update the database with your files (may be a bit slow, depending on when it run the last time automatically from your system):

sudo updatedb

Search for the corresponding file (super quick):

locate mongodb.conf

The config file name has recently change, now use locate mongod.conf (no more "b") (or just locate '*mongo*.conf', if you aren't sure).

Note: In the latest mongodb versions, the configuration file has been renamed to mongod.conf

IMO finding files with locate isn't the best approach, since you have to know the identical name of the file you're searching

Try instead

find / -name 'mondo*.conf'


Alt + F4 switches to TTY4 Since yesterday Alt+F4 is working unexpectedly on my computer. When I press those keys TTY4 is opened. Also, the application which is running on the GUI receives the Alt+F4 message. This is solved by rebooting the system, but after a while it starts doing this again.

As far as I have googled there are other people finding this problem but with no solutions (1, 2).

I am running Ubuntu Gnome 16.10, Kernel version 4.8.0-39-generic and GNOME Shell version 3.20.4.

I had this recently on Ubuntu GNOME and on Unity. The answer is this:
sudo kbd_mode -s

Run that in a terminal and then the Alt+F4 keyboard combination returns to normal.
From kbd_mode man page (from kbd project and package):

kbd_mode - report or set the keyboard mode
Without  argument,  kbd_mode  prints  the current keyboard mode (RAW, MEDIUMRAW or XLATE).
With argument, it sets the keyboard mode as indicated:
-s: scancode mode (RAW),

Some ideas to trace down and maybe fix the issue:

Booting with a Live-CD in order to check if the problem is physical
Use another keyboard
Switch the keyboard layout or try to remap the Ctrl
Does it only happen on the desktop environment or does it also switch to TTY4 if you are at some other TTY? If it happens also on the TTYs, it might be related to some kernel parameter.

Did you try the tip on the last comment of your second reference (update-grub)?


How can I create a Windows bootable USB stick using Ubuntu? I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?

WinUSB is old, obsolete, and outdated.  It can cause problems on newer systems.  You should be using WineUSB or other software in place of WinUSB.
This answer is, however, left here as-is for historical purposes.

Create a bootable Windows USB (Vista and above) from Ubuntu through WinUSB software.
Ubuntu 12.04 through 15.04
Run the below commands on terminal to install WinUSB from a PPA,
sudo add-apt-repository ppa:colingille/freshlight
sudo apt-get update
sudo apt-get install winusb

Warning for Ubuntu EFI:
installing WinUSB on EFI loaded Ubuntu will uninstall the grub-efi packages in order to install the grub-pc packages. It will make your system unbootable if you don't manually reinstall grub-efi package before rebooting.
To do the manual re-install do:
sudo update-grub
sudo grub-install /dev/sda
sudo update-grub
sudo reboot

Creating a Windows Bootable USB Stick using Ubuntu
Windows can be installed to boot in BIOS, (Legacy), mode or in UEFI mode. I will describe each method.
BIOS, (Legacy), mode, MSDOS Partition Table

Boot Ubuntu in Legacy mode.

Using GParted, create a 8GB NTFS partition for the installer and a 50GB or larger partition for Windows.

Mount the Windows ISO using sudo mount -t udf /{Path to ISO}/Win.iso /media/iso, Copy the contents of  /media/iso/ to the 8GB partition.

In Terminal run sudo update-grub to add the Windows installer to Ubuntu's GRUB menu.

Edit the grub.cfg Windows menuentry, to add ntldr /bootmgr on the line after chainloader +1

Reboot and select Windows Recovery Environment from the Boot menu.

Proceed with Windows 10 installation as normal.

UEFI mode, GPT Partition Table

Boot Ubuntu in UEFI mode.

Using GParted, create a 8GB NTFS partition for the installer and a 50GB or larger NTFS partition for Windows.

Mount the Windows ISO using sudo mount -t udf /{Path to ISO}/Win.iso /media/iso, Copy the contents of  /media/iso/ to the 8GB partition.

It should not be necessary to Update GRUB to boot in UEFI mode. (Please let me know if you find otherwise).

Reboot, The Windows installer should start. At this point you can close the installer to open the GRUB menu.

UEFI Notes:
UEFI properties may vary among vendors.
It may be necessary to add Windows Recovery Environment menuentry by hand.
Some instructions for installing Windows recommend the ISO be extracted to a FAT32 partition. If there are problems using the ISO extracted to NTFS see: https://www.dedoimedo.com/computers/windows-10-usb-media-linux.html, (thanks to oldfred).
I was not able to install as UEFI mode from Legacy Ubuntu on GPT disk.


Freeze while installing Server 12.10 from USB I'm putting together a new computer and trying to install Ubuntu Server 12.10 from USB (no optical drive). I'm using the AMD 64 bit installer (MD5 checksum reported fine) and Pendrive to put it on my USB drive.

When I start the computer with the USB drive connected, I get to an initial language select screen and then to the boot screen (the one with the option to install, do a memory test, etc). When I select "Install Ubuntu Server" I'm taken to another language selection screen where I'm unable to do anything but hard shutdown the computer (no keyboard or mouse input accepted). How can I fix this freeze?

Additional info:

USB appears to look like a UEFI drive in BIOS
While a SSD is first in boot order, it's a blank drive (as are the HDDs)
Using wireless USB keyboard the whole time. Keyboard works with other devices
Legacy USB Support is enabled
Using an AMD APU C-60

After getting ahold of a PS2 keyboard, everything works. Looks like there's something up with using a USB keyboard.

Yes, I was experiencing the same thing in 13.10. I swapped the USB keyboard with a PS2 and it worked fine.


Steam not opening in Ubuntu 16.04 LTS I have never used Ubuntu or any other Linux OS before last Friday. For all I know, I might have installed Ubuntu wrong and be missing a component. I would prefer if you use simplest terminology possible, but I'm OK with doing a bit of googling if need be. I just installed Steam for Ubuntu 16.04 but it won't open when I click on it in the launcher. The icon flashes for a few seconds, stops and then nothing happens. I looked in the system monitor and steam shows up there but ending the process and trying again does nothing. I heard trying to open apps that aren't working through the terminal tells you what the error is so I tried that and I got this:

Running Steam on ubuntu 16.04 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0)
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

Please help I just want to play CS:GO again.

This problem is only present at Ubuntu 16.04. In ubuntu 16.10 install steam:i386 package from Ubuntu's multiverse repository (the repository is enabled by default) and most problems have been fixed. To fix on Ubuntu 16.04:

Recommended solution:

If you just installed Steam then make sure steam is closed and go to ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ and delete the link libstdc++.so.6.

rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

That's it now it should start without problem. Let it do the update. After the update, if the message is the same (the file will be recreated after first update)then make sure steam is closed and do the same. Also if you have 64bits system go to ~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/ and delete libstdc++.so.6.

rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
rm ~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6

In some systems libstdc++.so.6 keeps getting recreated. If that's your case, then create the script steam.sh with executable permissions:

#!/bin/bash
export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
export DISPLAY=:0
steam

Then change at the steam desktop entry the Exec= line at the absolute path of the steam.sh script. Every time you want to play a game, open first steam with the modified desktop entry and then run the game from inside steam. Source: https://wirejungle.wordpress.com/2015/01/09/how-to-fix-broken-steam-linux-client-with-radeon-graphics-driver-workaround/

Ubuntu 18.04: Once you successfully uninstalled your current Steam (all directory related to steam) please open a terminal and type the following in order to have a fresh and clean installation:

sudo add-apt-repository multiverse

Once you're right the output should be:

  'multiverse' distribution component enabled for all sources

Then install steam (using the terminal this is important in order
   to see potential error messages)

sudo apt install steam
sudo apt update

Once the installation is successfull, just type steam

steam

Here either it works and then have fun ! Or you have the following error message:

tar: This does not look like a tar archive
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
find: ‘/home/$USERNAME/.steam/ubuntu12_32/steam-runtime’: No such file or directory

If you do have this message, don't give up and run:

mkdir "/home/$USERNAME/.steam/ubuntu12_32/steam-runtime"

It should now works !


ubuntu 12.04 desktop Error: unknown command 'gfxmode'. Pressing any key continues Premise: linux noobie here, I have the same issue as OP: fresh 12.04 desktop, changed grub with grub customizer, now I get a: unknown command 'gfxmode' press ...etc

was asked to "re-post" this question and link to this thread which I refer to above.

I have tried what Tarek said, and nothing seems to work, I find two lines with gfxmode:

function gfxmode {

gfxmode \$linux_gfx_mode

Note: not sure if it matter but in the error the two single quotes before gfxmode are not the same, the first is a slanted quote mark, the second (after gfxmode) is a straight one.

I commented out the whole line, I tried to add 'set' before gfxmode, neither did any difference.

I found another place that said to remove the line from another file 40_custom, but I checked and those files do not contain anything relating to the line we are looking for: gfxmode $linux_gfx_mode

Not sure what I am missing, but the file linux.save has recently appeared when searching for the line. Not sure if its just a temp file of some kind.

In any case I cannot seem to get it, what am I missing?

Thanks!

P.S. sorry for any messups in form :)

Try to re-install GRUB

sudo apt-get install --reinstall grub-common
sudo update-grub

Then you can use boot-repair software to re-install GRUB. There should be no error messages any more.

I solve this problem using the same thread that you, when you remove the line, open the terminal and write:

--> sudo update-grub

1-You must erase the Line 'gfxmode \$linux_gfx_mode'.
2-Open the Terminal and write 'sudo update-grub'.

Tell me if you can solve the problem.

PD: please excuse my bad English.


Can not access ssh server from outside We are using ubuntu 10.04 LTS server.I can ssh access that server from other ubuntu machine in own network. But when we are trying to access the server from out side of LAN we are unable to ssh connect.I can give the outputs :
starlite@starlite-laptop:~$ nmap -A -T4 192.168.1.46

Starting Nmap 5.00  at 2011-05-20 14:03 IST
Interesting ports on 192.168.1.46:
Not shown: 996 closed ports
PORT     STATE SERVICE    VERSION
22/tcp   open  ssh        OpenSSH 5.3p1 Debian 3ubuntu5 (protocol 2.0)
|  ssh-hostkey: 1024 00:12:34:45:56:67:78:89:9070:91 (DSA)
|_ 2048 5d:96:00:12:34:45:56:67:78:89:90:36:70:91:a6 (RSA)
5001/tcp open  apc-agent  APC PowerChute agent
5432/tcp open  postgresql PostgreSQL DB
8080/tcp open  http       Apache Tomcat/Coyote JSP engine 1.1
|_ html-title: Apache Tomcat
Service Info: OS: Linux; Device: power-device

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 8.35 seconds

but when nmap from a different global IP the output is

starlite@starlite-laptop:~$ nmap 122.XXX.XXX.XXX -p 22

Starting Nmap 5.00  at 2011-05-20 16:50 IST
Interesting ports on 122.XXX.XXX.XXX:
PORT   STATE  SERVICE
22/tcp closed ssh
The ssh connection is terminated as shown below -
starlite@starlite-laptop:~$ ssh openbravo@122.176.65.178
ssh: connect to host 122.XXX.XXX.XXX port 22: Connection refused

please help me how can I overcome this problem

Did you check if the IP for the server is Class C (Local Network) or has an Internet IP. If it is local you will not be able to connect to it except rerouting from the Internet IP assign to that network.

Class C IP are for example: 192.168.0.1 (Common one used in cafes) 192.168.1.10 and tipically any 192.168.X.X

In your question the ip 192.168.1.46 is Class C which is not accessible by normal means except rerouting connections.

The other ip 122.XXX.XXX.XXX is an Internet IP which will work

What i recommend is telling the router that connects to the Internet (The one that has the 122.XXX.XXX.XXX) to redirect all connections to that port to the 192.168.1.46 IP in the network.

I think the problem is with the firewall, try something like:

iptables -I INPUT -i eth0 -p tcp --dport 22 -j ACCEPT


Boot problems with Ubuntu on a external drive I have tried to install Ubuntu 14.04 LTS on an external drive alongside my Windows 10 OS on my internal drive.

If my external drive is connected everything works just fine. The GRUB menu loads and I have a choice Ubuntu or Windows.

But when my external drive is not connected, Windows should automatically boot, but it doesn't. Instead I'll get a sort of grub-bash. I've tried boot-repair and I see there are some Ubuntu entries on my Windows boot drive sda1, which I think shouldn't be there. I'll guess they should be on the external drive sdb1, or am I wrong?

If that is the problem, how can I move them?

I'm fairly new to all this installation stuff. I only want to try a Linux system for web development.

Here is my boot-repair info

Thanks for your help!

You've run into a design flaw of the way Ubuntu configures GRUB 2. Basically, on an EFI-based system, the main GRUB binary goes in the EFI System Partition (ESP), but that binary relies on a grub.cfg file that resides in the Ubuntu /boot/grub directory, which in your case is on the external disk. Because Ubuntu configured GRUB as your default boot loader, the result is that the boot process fails whenever you unplug that external disk. There are several ways to correct this problem, including:

Move /boot -- You can repartition your disks so that you have a ~500MB /boot partition on your internal disk, then re-install GRUB. This way, GRUB will be able to read its configuration file from the internal disk even though the bulk of Ubuntu will be installed to the external disk. The drawback is that you'll see an Ubuntu entry whenever the system boots, even when it's non-functional because the external disk is unplugged.
Re-prioritize your boot loaders -- You can use efibootmgr in Linux, EasyUEFI in Windows, or other tools to re-order your boot loader priorities. Typically, you'd want to put Windows at the top. You'd then use your firmware's built-in boot manager (typically accessed by hitting Esc, Enter, or a function key, usually F8 or above) to select Ubuntu only when you want to boot it. This may be a workable solution if you boot Ubuntu infrequently, but the awkwardness of accessing the boot manager makes this solution a poor one if you want to boot Ubuntu frequently.
Use rEFind (or another boot manager) -- You can install my rEFInd boot manager to the ESP. It will then take over as the default boot manager. Because rEFInd builds its boot list on a boot-by-boot basis, the result will be a boot menu that shows only Windows when the Ubuntu disk is unplugged, and a boot menu that shows Windows and Ubuntu when the Ubuntu disk is plugged in. If you set rEFInd's default to boot Ubuntu, the result would even boot Ubuntu when the disk is plugged in and Windows when it's not plugged in. There are other boot managers, like gummiboot/systemd-boot and rEFIt (rEFInd's predecessor) that would work in this role, too.

You have to boot the Windows USB/DVD, then after selecting your language etc, do not click "Install Now", but instead of that, click "Repair your computer".
From there you are able to open up a Command Prompt. Make sure that your external drive is NOT connected, then use the following command: bootrec.exe /FixMbr. This should rewrite the Windows MBR to the main hard drive.


How do I enable hyperthreading in a Intel Xeon E5-2407? We have the following CPU that supports hyper-threading. Though Ubuntu doesn't recognize that each core supports 4 threads.

Intel® Xeon® Processor E5-2407
http://ark.intel.com/products/64614/

The server is a Dell PowerEdge R320
http://www.dell.com/support/Manuals/us/en/19/product/poweredge-r320

The results of lscpu is
lscpu

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                2
Thread(s) per core:    1
Core(s) per socket:    2
CPU socket(s):         1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Stepping:              10
CPU MHz:               800.000
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              6144K

I've gone thru and checked the BIOS and I enabled all the features related to virtualization and logical CPUs.

Any ideas?

cpufreq is not being run as asked below

sudo cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 2:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 3:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.

The Intel Xeon E5-2407 does not have Hyper-threading. Refer to this link. The Intel page you link to also lists the CPU has having only threads across 4 cores.

11.10 is really old. Give 12.04 a try at least (if you want LTS... which you probably do.)
It should see all the cores. If it doesn't, report this as a bug.

How do I report a bug?


nvidia-settings makes one of my dual monitors grey and useless, disables network I'm running Ubuntu 12.04 64-bit, Precise Pangolin, with a PNY GTS 250 1GB video card and a monitor plugged into each of the DVI ports. I'm using the proprietary drivers (post-release updates).

If I set anything to do with Separate X Screens up in nvidia-settings (and write it to xorg.conf and reboot), my second monitor has a grey background, no menu bar, no ability to have a window on it, the second monitor doesn't get picked up in a screneshot, and if I move my mouse cursor to it it's an ugly black X. Plus, my network is unable to connect to anything.

If I subsequently delete /etc/X11/xorg.conf and reboot, everything goes back to working, albeit with a single monitor activated.

If I set anything to do with TwinView up in nvidia-settings, my second monitor starts working, but it isn't seen as a second monitor by Ubuntu, so I can't apply color calibration to it separately. Plus, my mouse gets "caught" between the monitors every time I try to move my cursor between the two.

What gives? If it helps, this is the xorg.conf that nvidia-settings generates for Separate X Screens.

After such a struggle with settings here and settings this with the Nvidia graphics GUI  I clicked on dash, typed in driver, selected additional driver. Here you should see 2 options after opening addition drivers

NVIDIA accelerated graphics dirver (version current)[Recommended]
NVIDIA accelerated graphics dirver (post-release updates)(version current-updates)

I had 1 selected as this is how I installed my Nvidia driver initially (Had trouble downloading directly from the site and installing it). This then broke and after a struggle as mentioned above I selected 2 and clicked on activate, restarted my machine and boom. Up and working np. Here is my xorg.conf file output

Edit:
Oh and how to get rid of the mouse getting stuck between the 2 screens:

Dash - Displays
Sticky Edges - Slide to off (this is on by default)

This is a known bug in 12.04, after upgrade to 12.04 amd64 Gnome Classic not properly draw second screen

At the time of this writing, it is confirmed and has "Low" priority.

It might be helpful to go to the bug and mark it "This bug affects me…"

I solved this problem by installing Arch Linux with kdm display manager, xfce desktop and compiz with extra plugins.

Now I have two working screens each with working compiz effects (cube. 3D windows).

Also I have different wallpapers on each monitor, not done before.

Also each has fully fictional panels and menus.

It's also very fast.  The downside is that if you choke at the terminal, installing it will be a nightmare.  Also I had to compile Google chrome but it went without a hitch.  I so happy my face hurts from grinning.

A compiz trick was needed, you have to open ccsm on each screen and set screen selector to proper screen.

My two screens:


How can I use code or a script to lock my screen programmatically in Lubuntu? I want to write code or a script to lock the PC when my C++ program receives a specific command from Ethernet.

Is there any way to show the Login screen from the command line? I want to lock the screen from a c++ code. Actually I want to do something like Ctrl + Alt + L programmatically (from a c++ code). Thanks

Edit: I found the way. For those who want to know, as Lubuntu uses LXDE desktop, it has some methods to do thing like it. The command for locking the screen is lxlock.

In accordance with what @gertvdijk said, you can use DBus:

qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock

I have used that in my lock and off project.

I found the way. For those who want to know. As Lubuntu uses LXDE desktop, it has some methods to do thing like it. The command for locking the screen is lxlock.


How to solve: "Connect to host some_hostname port 22: Connection timed out"? I have two Ubuntu machines. Both have openssh-client and openssh-server installed on them. ssh-ing from machine G (fresh Ubuntu 11.10 installation) to machine K works great. But ssh-ing from machine K to machine G results always in the Error:

  Connect to host some_hostname port 22: Connection timed out

I went through the troubleshooting section of help.ubuntu.com and I got the following results:

ps -A | grep sshd # results in
848 ?        00:00:00 sshd

-

sudo ss -lnp | grep sshd # results in
0   128   :::22   :::*   users:(("sshd",848,4))
0   128   *:22    *:*    users:(("sshd",848,3))

-

ssh -v localhost # works!

-

sudo ufw status verbose # yields: "Status: inactive"

I haven't changed anything in the config file. What can I do to locate the problem and solve it? I would appreciate any hint!

Edit:

ping was succesful in both directions!

I did a telnet <machineK> 22 from machine G which resulted in trying  and then in telnet:

  Unable to connect to remote host: Connection timed out.

But telnet the other way around worked just fine!

Edit 2:

ssh start/running, process 966 # yields: ssh start/running, process 966

/etc/hostname # contains my hostname, let's call it blubb
/etc/hosts # contains the following
127.0.0.1       localhost
# 127.0.1.1     blubb
129.26.68.74    blubb # I added this!

-

sudo service ufw status # yields: ufw start/running

I installed Gufw and set it to ON. Then I selected from Incoming the option ALLOW. Then I ssh'ed to another machine from where I ssh'ed back to my machine. Still the same error as above: connect to host blubb port 22: Connection timed out

Any more hints, what I can check?

So your machineG (the fresh install) is the one with issues:

Check sshd if it's up sudo service ssh status.
Check Name resolution. The name of your machine, check it if is the same on /etc/hostname, and /etc/hosts.
Check firewall. sudo service ufw status maybe is best if you install firewall of ubuntu Gufw.

hi! did you solve it? @philipballew asked you to see if you have port 22 enable.. do this on the 2 machines netstat -nat | grep 22:
you will see something like this:

~> netstat -nat | grep 22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 10.202.10.13:53414      173.194.76.125:5222     ESTABLISHED
tcp        0      0 10.202.10.13:50912      10.100.202.21:22        TIME_WAIT
tcp        0      0 :::22                   :::*                    LISTEN

If one of the ports 22 are not listen then re-check all that I previous told you.
Actually I'm a bit lots with the names of the machines. You call them in differents names all the time....

Same issue here. I cleared my iptables with iptables -F.
Works fine now.
Of course you will have to setup rules again if you want to put the iptables up again


Merge all files from directory tree I have a directory called /home/foobar/ which contain numerous text files in numerous sub directories. I need to generate a file which has the merged content of all the files inside this directory structure.

The order in which the files are merged does not matter. I can copy all the files to one directory first and merge then, but in that case the solution must take into account that the files do not have unique names.

It's a simple task for find and cat:

 find <path_to_files> -type f -print0 | xargs -0 -I {} cat {} >> merged

The content of all files in <path_to_files> and in all sub-folders will be added to merged. Therefore remove merged for each new run of the command.

This should work (replacing path/to/dir with the path to the base directory):

for i in $(find /path/to/dir -type "f" ); do cat "$i">>OUTPUT.txt;done


Ubuntu 14.04 no longer detecting eth0 I have set my eth0 to Shared Internet with other and that used to work.
I can't figure out what I may have done to break this, but the eth0 doesn't seem to detect the link ... sometimes it does and get the expected 10.42.0.1 IP.

My linux

~# uname -a
Linux mymachine 3.13.0-68-generic #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty

Boot

root@qb57:~# dmesg | grep eth0
[    1.827420] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 70:71:bc:82:41:f9
[    1.827422] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[    1.827477] e1000e 0000:00:19.0 eth0: MAC: 9, PHY: 9, PBA No: FFFFFF-0FF
[   13.729334] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.152555] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.152818] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   17.938359] e1000e: eth0 NIC Link is Up 100 Mbps Half Duplex, Flow Control: None
[   17.938475] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
[   17.939503] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  119.700357] e1000e: eth0 NIC Link is Down
[  124.125948] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Depending on the reboot, I may or may not get eth0 ready

~# ethtool eth0
Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: Unknown!
    Duplex: Unknown! (255)
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown (auto)
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: no     <======================= NOT DETECTED ???

I tried bringing the link down and up again. Occasionally the link will come up with this operation ... but that's not consistent

ifconfig eth0 down
ifconfig eth0 up

~# ifdown eth0
ifdown: interface eth0 not configured
~# ifup eth0
Ignoring unknown interface eth0=eth0.

/etc/network/interfaces

This may have been overwritten somehow. What's the original content of this file?

~# more /etc/network/interfaces

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp
#netmask 255.0.0.0
#gateway 10.0.0.1
#dns-nameservers 8.8.8.8 8.8.4.4

#auto eth0:1
#iface eth0:1 inet static
#address 192.168.42.163
#netmask 255.0.0.0
#gateway 10.0.0.1

Hardware

~# sudo lshw -C network
PCI (sysfs)

  *-network
       description: Ethernet interface
       product: 82578DC Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 06
       serial: 70:71:bc:82:41:f9
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=2.3.2-k firmware=0.12-5 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:41 memory:f0400000-f041ffff memory:f0424000-f0424fff ioport:1020(size=32)

Any guidelines to troubleshoot this?

Try this link below:
http://ubuntuforums.org/showthread.php?t=2222204

Hope it will help, thanks


I need to reinstall Ubuntu 14.04 after erasing a lot of files and ubuntu won't start anymore I played around without looking in terminal and I somehow started to erase all the ubuntu system files. Now all I want to do is access my photos and transfer them over to my portable hard drive but I can't do that using a LiveUSB with ubuntu or with the Boot-repair liveUSB.

My only option I understand is to reinstall ubuntu but I'm afraid that doing that it will erase both the system files and the other partitions files where my photos are.

If your photos are in Another partition it is easy to recover via Live USB :) in case of reinstalling Ubuntu. Make sure that you're formatting a correct partition.


NVIDIA not working on 19.10 I have NVIDIA mx 230 and intel and i cannot use NVIDIA.
Now few problems:

1) $ nvidia-smi gives the output

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

2)

$ prime-select query
nvidia

3) In settings, the active GPU is intel and in prime-select menu, it is NVIDIA.
4)

lspci | grep -i nvidia
02:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX230] (rev a1)

5)

$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
    Subsystem: Acer Incorporated [ALI] UHD Graphics 620 (Whiskey Lake)
    Kernel modules: i915
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 30)
--
02:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX230] (rev ff)
    Kernel modules: nvidiafb, nouveau
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    Subsystem: Acer Incorporated [ALI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller

Also, in additional driver, there is driver selected for nvidia. I have searched all forums and yet couldnt find a solution. i have tried to swith and reboot multiple times both via prime-select command and gui menu, yet of no use.
    also, my prime select GUI menu seems different. It dont have any side tabs. it consist of only 3 radio buttons to select the processor.

Do someone have solution for this?

edit:
after installing the util-440, the nvidia-smi is working and in that, it shows gforce mx230 off but  the gpu usage is never 0%. Also, settings>about system shows intel and prime-select query shows nvidia.
the output of nvidia-smi :

Tue Apr 21 17:21:44 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce MX230       Off  | 00000000:02:00.0 Off |                  N/A |
| N/A   47C    P3    N/A /  N/A |    287MiB /  2002MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1453      G   /usr/lib/xorg/Xorg                            28MiB |
|    0      2042      G   /usr/lib/xorg/Xorg                            83MiB |
|    0      2306      G   /usr/bin/gnome-shell                         128MiB |
+-----------------------------------------------------------------------------+

can someone please tell me is my NVIDIA active? if not then how do i make it active?

I fixed the issue by first completely uninstalling all the drivers.
Then reinstalling nvidia-440 driver since my GPU is MX230.
Also, along with it, i installed nvidia-utils-440 package
now nvidia-smi works perfectly.
Though there are instances when i switch on the system and the command dont respond or the GPU is listed but inactive so i simply shut down and start again and this fixes the issue.
Hope this helps you too.
Also, i have installed nvidia-418 and nvidia-utils-418
now in additional drivers, 418 is unlisted even after installing, i don't know why? but this have worked for me.Hope it do for you too.

First and foremost, try out all the available Nvidia drivers available to you in the Additional Drivers section of Software and Updates (software-properties-gtk). For instance, I have three different versions available. If you have not installed the driver on your own, then you are probably using the open-source Nouveau drivers. Nvidia recently released v418.56 for MX 230. Install that and see whether it solves your issues.

If it still isn't detectable, try out the Nvidia-release of Pop!OS. Being based on Ubuntu, you will not have to modify your workflow in a significant way.


WiFi password doesn't work on Ubuntu 12 I jusy installed Ubuntu 12.04 and had a lot of problems getting the WiFi to be recognized. But even as I solved that issue I cannot yet get connect with my WiFi, as my (100% sure) correct password is not accepted and the system keep asking me for the password.
Anybody here could help?
Thnks a lot!

Try installing any Updates to Ubuntu and if that doesn't work try using Ubuntu 13.10. I had the same issues until the system was updated.

An alternate suggestion that you boot into Ubuntu with a different version of Linux, you should be able to do this from booting up the computer and then selecting "Advanced Options for Ubuntu" and selecting another version to boot into.


Error with tar command, cannot install xampp 1.8.1 on Ubuntu 13.04 I am trying to install xammpp on my Ubuntu 13.04. What I did was downloaded xampp from SourceForge, and then in the terminal I created /opt directory like this:

mkdir /opt
sudo tar xvfz xampp-linux-1.8.1.tar.gz -C/opt

and this error shows up:

tar (child): xampp-linux-1.8.1.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

to install XAMPP

# wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-4-installer.run
# chmod 755 xampp-linux*
# ./xampp-linux*

Example your xampp files in Downloads directory.

cd Downloads

sudo -s

tar xvfz xampp-linux-1.8.1.tar.gz -C /opt

After install xampp you will get permission denied error. Therefore to fix this, run the following code in terminal.

sudo chmod 777 -R /opt/lampp/htdocs/

Run the following command in terminal to start lampp,

/opt/lampp/lampp start


Phones charging slowly on USB C port Sorry if this is obvious, but I am a bit of a novice. I am using an Acer Nitro 5 laptop with a dual boot (Windows 10 and Ubuntu 18.04.1 LTS using Budgie). I have 2 fast charging ports (one usb-3 and one usb-c) that are indicated with a battery icon next to the port. When I boot into Windows, if my phone is plugged into either port it will charge rapidly at 1.5 amps. When I boot into Ubuntu I can only charge slowly at .5 amps using same cords etc. Is there anything I can do to get the fast charging under Ubuntu? Ubuntu does recognize my phone and has the correct model number for it when I plug it in, and allows data transfer.

lspci -d ::0c03 -k gives me the following:

00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
    Subsystem: Acer Incorporated [ALI] Sunrise Point-H USB 3.0 xHCI Controller
    Kernel driver in use: xhci_hcd

and lsmod | grep typec gives me:
typec                  24576  0

Legacy USB is not turned on in BIOS.

You can use this command to see how much amperage Linux is providing to the port:

sudo lsusb -v

This will print out a detailed report of your USB system. You want to look for areas with the MaxPower sign, you can filter and see them only using:

sudo lsusb -v | grep -i power

You should see output with lines like this:

MaxPower              500mA

There are tools and kernel modules that allow you to manually change how much power the USB port is given, but these tools could damage your system or hardware connected to those ports. One such tool is ipad-charge another is uhubctl (you have been warned)

Some USB cables are used only for transferring data, others only for charging, and others allow both.  I think you need to unplug other things from your laptop to make sure more power goes to the phone.


Why can this command unlock my lock screen without password? (Security question) I work at an IT company, started here not so long ago. Many of us are using linux, and I have discovered a problem or security issue with Ubuntu.
As it is now, locking the screen is of no use in case there would be a user-enabled process running a certain command: gnome-screensaver-command --lock or loginctl unlock-session

None of the commands require a password to reactivate my desktop, and I honestly consider this to be pretty unsafe (or at least removing the safety around having a lock screen after all). I had expected it to ask for password when trying to re-enter the desktop environment.

I noticed this behavior upon developing my own bluetooth-lock functionality, so if someone moves away from the pc the screen will lock. But I had not expected it to be so easy to unlock it.

Are there any previous discussions around this? I find it very weird it is supposed to be this way.

In both use-cases, these seem like secondary issues.

If somebody can run gnome-screensaver-command or loginctl as you, remotely, your home, your $PATH, essentially your whole computer —from the perspective of your security and privacy—  is compromised.

If somebody just rocks up at your computer, they can't just run this stuff.

Disclaimer: I don't work in IT, but I do play BOFH when given a chance.

It seems here that the proper solution in a workplace environment is for IT to push out controls/tools/whatever which force all users' machines to run password-locked screenlocks.  Disable the specific commands which turn that off.  Just keep in mind the unbreakable law "Whenever you make a system foolproof, Nature invents a bigger fool."


Editor with caching like Notepad++ in windows Is there an editor for linux which can cache files in it? Every time I started the Notepad++ on windows, it brought all files which I've left open (even unsaved files).

Unfortunately the Notepadqq doesn't brings up this function. Does anybody have a recommendation?

Ubuntu have plenty of editor. Here are two options:

You can use Gedit with plugin (gedit-restore-tabs).
Atom is a very powerful editor with a tons of plugins, save-session or remember-session will does the trick.

You can also try Visual Studio Code for Linux. It has auto completition, words highlighting and themes, plugins, extensions...


Upgrading 10.04LTS -> 10.10 using custom sources I'm trying to upgrade to 10.10 from 10.04 LTS using a custom sources.list file that points to an unofficial mirror*. The mirror does have maverick, but I get the following output when upgrading:

boatzart@somecomputer: > sudo do-release-upgrade
Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
extracting 'maverick.tar.gz'
authenticate 'maverick.tar.gz' against 'maverick.tar.gz.gpg'
tar: Removing leading `/' from member names

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Updating repository information
WARNING: Failed to read mirror file

No valid mirror found

While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run a internal mirror or if
the mirror information is out of date.

Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'lucid' to 'maverick' entries.
If you select 'No' the upgrade will cancel.

Continue [yN] y
 WARNING: Failed to read mirror file
96% [Working]
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Calculating the changes

Calculating the changes

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade:
The package 'update-manager-kde' is marked for removal but it is in
the removal blacklist.

This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu

If none of this applies, then please report this bug against the
'update-manager' package and include the files in
/var/log/dist-upgrade/ in the bug report.

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done

Here is the relevant section from /var/log/dist-upgrade/main.log:

2010-11-18 14:05:52,117 DEBUG The package 'update-manager-kde' is marked for removal but it's in the removal blacklist
2010-11-18 14:05:52,136 ERROR Dist-upgrade failed: 'The package 'update-manager-kde' is marked for removal but it is in the removal blacklist.'
2010-11-18 14:05:52,136 DEBUG abort called

*I'm located inside of USC, and for some crazy reason any sustained downloads to anywhere outside of the University are throttled down to 5kbps inside of my lab. Because of this I need to use the following sources.list:

deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ lucid main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ lucid-updates main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ lucid-backports main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ lucid-security main restricted universe multiverse

I've tried adding four more entries to the sources.list with s/lucid/maverick/ but that didn't help.

Does anyone know how to fix this? Thanks!

I've hit this before when using a local mirror. What I recall worked for me was:

add and entry in /etc/hosts for us.archive.ubuntu.com with the address if you mirror
change /etc/apt/sources.list to point to us.archive.ubuntu.com
sudo apt-get update
sudo do-release-upgrade

at this point, apt and do-release-upgrade should think they're talking to us.a.u.c, and hopefully it will work.

this does require that mirrors.usc does not care what 'site' header is sent in the http get.


Will there be a derivative with GNOME 3? I just wonder, will there be a separate version with GNOME desktop (GNObuntu/Gbuntu or something)? I think there are many users including me who like GNOME. Please don't take GNOME away from us.

Unity is simply an interface, Ubuntu will still use GNOME. You will be able to install GNOME Session on the Software Center, and choose beetween Unity and GNOME Environment (or something like that), as you do now if you install unity on your ubuntu-desktop.
The same will happen when Gnome-shell will be released, you will be able to install a Gnome-Shell session.

I don't think so, but you will have the possibility to run gnome instead of unity


USB Flash Drive not Detected on 12.10 x64 My Mediatek usb flash drive is not get detected.

The o/p of lsusb

falguni@falguni-M61PME-S2P:~$ lsusb
Bus 002 Device 002: ID 0e8d:0003 MediaTek Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

and the o/p of usb-devices

falguni@falguni-M61PME-S2P:~$ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=10
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=03.05
S:  Manufacturer=Linux 3.5.0-18-generic ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:02.1
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh=10
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev=03.05
S:  Manufacturer=Linux 3.5.0-18-generic ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=0000:00:02.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

But in 12.04, the o/p of usb-devices was:

falguni@falguni-M61PME-S2P:~$ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=10
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=03.05
S:  Manufacturer=Linux 3.5.0-18-generic ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:02.1
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh=10
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev=03.05
S:  Manufacturer=Linux 3.5.0-18-generic ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=0000:00:02.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0e8d ProdID=0003 Rev=02.00
S:  Manufacturer=MediaTek Inc
S:  Product=MT6235
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
I:  If#= 1 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm

It was working fine in 12.04.
Now after upgrading to 12.10 the problem started.

Where is the problem and how to solve it?

I had the same issue. (USB was getting detected on windows)
Although USB drive was not displayed in the file explorer, it was still being detected on lsusb. steps below might work if you're positive on the lsusb part.

Take a back up of all the files on windows
Plug the USB back on ubuntu
Format using Disk Utility (Disk on 13.04)
Make sure you create a new partition

Hopefully, your USB drive will now be working fine.


no sound via HDMI using Xubuntu 13.04 32 bit AMD mesa 9.2 This question has perhaps been asked before but no clear solution seems to exist for me.  I have a Radeon 6850 connected to my screen via HDMI.  The picture is fine but I get no sound at all, not even sound effects.

This is via open source drivers.  According to X.org Foundation website, it says HDMI audio is "Done."  I get no sound using my extra speakers with 3.5mm jack either into the motherboard itself or in the monitor.  The pavucontrol seems to recognize both the built-in sound card and HDMI card from Radeon, with the progress bar reacting to the Youtube video currently on.

Switching between built-in card and HDMI doesn't work.  Other things I've tried include downgrading to 12.10, adding the xorg-edgers ppa, manually updating the kernel to 3.9, adding the radeon.audio=1 to grub, and downloading an ALSA update from Ubuntu Audio Development Team.

The only thing that has worked is installing fglrx, but that makes my emulators crash sometimes.  Attached here is the lspci and aplay output...

amd-fx@amd-fx:~$ lspci | grep -i audio
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA)

01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Barts HDMI Audio [Radeon HD 6800 Series]

amd-fx@amd-fx:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****

card 0: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

card 0: SB [HDA ATI SB], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Any help is appreciated.  Thank you.

If you're using a kernel version less than 3.10.1 and you can upgrade to that or a later version, that may solve the problem.

I had the same exact problem, and after updating the kernel, my problem is gone now. (Though problems with the fan spinning all the time remain.)


Error changing between Nvidia and Intel GPU using Nvidia-settings (no module named 'dbus') I can't change between Nvidia GPU and Intel using sudo nvidia settings. I get the following error:

Traceback (most recent call last):
 File "/usr/share/screen-resolution-extra/nvidia-prime.py", line 22, in <module>
    import sys, dbus, logging
ModuleNotFoundError: No module named 'dbus'

I already tried reinstalling dbus but it did not work.

I had the exact same problem. I stumbled upon a solution.

Try switching GPU using terminal. It does not give an error then.

TO SWITCH TO NVIDIA GPU:

sudo prime-select nvidia

TO SWITCH TO INTEGRATED INTEL GPU:

sudo prime-select intel

You need root privilege to change GPU. Try again with sudo from the terminal.

$ sudo nvidia-settings

Or you can launch the GUI by searching for "NVIDIA X Server Settings" at  the left top Ubuntu button at the toolbar. It will pop up asking you to enter password when you are  trying to change the GPU.

Good luck!


DPKG error message with libsane while installing WineHQ-stable With a fresh copy of 17.10 ubuntu installed.  I have found a repeatable error which I believe is messing up my wine installation permanently.  After the error I simply format the system and retry another time.  The error message is encountered when installing winehq.  Both stable and staging versions run into the exact same problem.

I cannot find an answer on the internet.  Please help if you can.

Selecting previously unselected package libtxc-dxtn-s2tc:i386.
Preparing to unpack .../150-libtxc-dxtn-s2tc_1.0+git20151227-2_i386.deb ...
Unpacking libtxc-dxtn-s2tc:i386 (1.0+git20151227-2) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-mh7wRK/137-libsane1_1.0.27-1~experimental2ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I met the same problem and solve it.
This is caused by a bug in sane-backends.

First, remove Wine, then execute:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install libsane1:i386

and then install Wine again.

in synaptic search for "libsane" and install all the extras, devs etc. worked for me on ubuntu studio 17.10


Play sound through two or more outputs/devices I think this is a pretty simple concept.  I have one sound card and one pair of bluetooth headphones.  I want to play my audio through both my sound card and my bluetooth headphones.

I believe Windows has checkboxes allows you to "check" outputs to enable/disable them, but Ubuntu seemingly has the equivalent of radio selectors (you can only select one at a time).

Bonus Question:
On a similar note, I have 5 analog output channels on my sound card (in addition to my digital & HDMI audio) -- I would like to be able to determine what comes out of each of those ports (e.g. "front speakers" on all 5 or "front", "center", "back", etc).

Thanks in advance!

With paprefs you have access to a virtual output device that enables simultaneous output to all attached sound cards/devices:
sudo apt install paprefs

Then in terminal run paprefs, select "Simultaneous Output" tab, and check "Add virtual output for simultaneous output on all local sounds cards".

The additionally created audio output device for simultaneous output may be selected in the "Output" tab from pulseaudio sound preferences menu:

In this example it is shown for a HDMI-device but as soon as your Bluetooth device is recognized it will also be available for simultaneous output.
The changes may need a restart of pulseaudio to take effect either by logging out and back in to your session or by running pulseaudio -k in a terminal.

In case paprefs does not do the job or if you prefer to have paprefs not installed use this command from the command line:
pactl load-module module-combine-sink

To unload the module from command line and reset pulseaudio to defaults just restart pulseaudio with pulseaudio -k or issue
pactl unload-module module-combine-sink

To complement the excellent answer from Takkat, I found the default name given to the new device was excessively long and distorted the Sound Settings dialog. In order to shorten that name, I had to additionally execute the following command:

gconftool --set --type string /system/pulseaudio/modules/combine/args0 sink_properties=device.description=Combined


How do I disable window move with alt + left mouse button in GNOME Shell? There are lots of posts on this about Unity, this is about GNOME shell.

As with other posters, I use apps (Inkscape in particular) that uses Alt-Click and Alt-drag. GNOME shell is grabbing this off me and thus disabling features in the application.

I have tried

using ccsm's Move plugin - you can turn this off and you still get Alt-drag window moving.
using gconf editor to change /apps/metacity/general/mouse_button_modifier - this has no effect AFAICS.

It's really hindering me. Otherwise I find GNOME shell a really productive environment.

First of all, install dconf-tools .

To do that, run the following command:

sudo apt-get install dconf-tools

Then open it, Alt+F2 → dconf-editor.

Scroll down to org → gnome → desktop → wm → preferences → mouse-button-modifier → Set it to whichever key you like.

Or, equivalently,

gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"

in the terminal. (This requires neither dconf-editor, nor dconf-tools )

Warning: Setting it to nothing means that all clicks move windows, instead of disabling it!

Go to System Settings
Select Keyboard
On the bottom left click on ‘Layout Settings’
Select your language and click the ‘Options’ button on the lower right
Select ‘Alt/Win key behavior’
Change it to the one you like. I use ‘Left Alt is swapped with Left Win’.


Desktop icon size editing with nautilus Icons on my desktop look very big even after setting the icon view defaults to 50% in nautilus preferences.

Please help in fixing this issue?

you can just Right click on icon and select Resize Icon option in popup window...

It will show u a dotted rectangle around icon, and then u can resize it to anyhow u want.

for more details, visit resizing desktop icon


Route all traffic through OpenVPN Yep, this question has been asked a hundred times, and I have searched everywhere, to no avail.

The title says it all really.

I have an OpenVPN server (On ubuntu), and I can connect to it through my client (Windows 8) ...

The problem starts when I try to route ALL traffic through the VPN.

I have added the push flags in server.conf:

push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"

When I connect from the client, the client outputs:

Wed May 07 21:38:40 2014 SENT CONTROL [StretchVPN-CA]: 'PUSH_REQUEST' (status=1)
Wed May 07 21:38:41 2014 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 8.8.8.8,route-gateway <Remote Router IP>,ping 10,ping-restart 120,ifconfig 192.168.0.201 255.255.255.0'
Wed May 07 21:38:41 2014 OPTIONS IMPORT: timers and/or timeouts modified
Wed May 07 21:38:41 2014 OPTIONS IMPORT: --ifconfig/up options modified
Wed May 07 21:38:41 2014 OPTIONS IMPORT: route options modified
Wed May 07 21:38:41 2014 OPTIONS IMPORT: route-related options modified
Wed May 07 21:38:41 2014 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed May 07 21:38:41 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed May 07 21:38:41 2014 open_tun, tt->ipv6=0
Wed May 07 21:38:41 2014 TAP-WIN32 device [Local Area Connection 4] opened: \\.\Global\{1F145805-92FC-454E-8FD9-0A6017DD4AD1}.tap
Wed May 07 21:38:41 2014 TAP-Windows Driver Version 9.9
Wed May 07 21:38:41 2014 Notified TAP-Windows driver to set a DHCP IP/netmask of 192.168.0.201/255.255.255.0 on interface {1F145805-92FC-454E-8FD9-0A6017DD4AD1} [DHCP-serv: 192.168.0.0, lease-time: 31536000]
Wed May 07 21:38:41 2014 Successful ARP Flush on interface [35] {1F145805-92FC-454E-8FD9-0A6017DD4AD1}
Wed May 07 21:38:46 2014 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
Wed May 07 21:38:46 2014 C:\WINDOWS\system32\route.exe ADD <Remote Router IP> MASK 255.255.255.255 172.20.10.1
Wed May 07 21:38:46 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Wed May 07 21:38:46 2014 Route addition via IPAPI succeeded [adaptive]
Wed May 07 21:38:46 2014 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 192.168.0.3
Wed May 07 21:38:46 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed May 07 21:38:46 2014 Route addition via IPAPI succeeded [adaptive]
Wed May 07 21:38:46 2014 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 192.168.0.3
Wed May 07 21:38:46 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Wed May 07 21:38:46 2014 Route addition via IPAPI succeeded [adaptive]
Wed May 07 21:38:46 2014 Initialization Sequence Completed

I have tried using the flags on the client side when opening the connection:

openvpn --config "C:\Program Files\OpenVPN\config\client.ovpn" --redirect-gateway def1 --route-method exe

But still, when I go to whatsmyip.org, it still says my clients ip.

Has anyone had this problem and managed to solve it?

Many thanks

I have tested this using a OpenVPN server and setting up the redirect-gateway def1 option in the client and server config works fine.

When I access whatismyip.org, I see my OpenVPN server's IP.

Below is the client config I use:

client
dev tun
proto udp
# THE IP OF THE REMOTE OPENVPN SERVER:
remote ip_address port
resolv-retry infinite
nobind
persist-key
persist-tun
# THE CSR FILE:
pkcs12 certificate.p12
ns-cert-type server
cipher AES-256-CBC
comp-lzo
redirect-gateway def1
verb 3

I have tested also with appending redirect-gateway def1 option to the openvpn command and achieved same result.
The server config is:

port 1194
proto udp
dev tun

dh /etc/openvpn/easy-rsa/keys/dh1024.pem
ca /etc/openvpn/easy-rsa/keys/ca.crt
# ENSURE THE DOMAIN NAME/FILENAME IS CORRECT:
cert /etc/openvpn/easy-rsa/keys/cert.crt
key /etc/openvpn/easy-rsa/keys/cert.key

server 10.5.3.0  255.255.255.0
# YOUR LOCAL SERVER IP HERE:
client-config-dir ccd
route 10.5.3.0 255.255.255.0
ifconfig-pool-persist ipp.txt
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun

status log/openvpn-status.log 5
status-version 2
log-append log/openvpn.log
verb 3  # verbose mode
management localhost port /etc/openvpn/management-password

# ROUTE THE CLIENT'S INTERNET ACCESS THROUGH THIS SERVER:
push "redirect-gateway def1"
push "remote-gateway vpn_server_ip"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 60

If your OpenVPN client is on Windows 10 (or similar) there is another issue to watch out for, the binding order of the NICs.  The existing DNS server settings on the LAN or Wifi adapter may take priority over the DNS server settings for the tunnel interface, so even though everything is set up corectly from an OpenVPN point of view, Windows continues to use the original DNS server.

You can fix this as described in this Microsoft forum post.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/1cc5b647-6e51-482b-8998-ac5c3900938c/how-to-force-vpn-clients-to-use-the-dnsserver-from-their-vpn-adapter-not-the-dnsserver-from-their?forum=winserverNIS