wine for windows games I have wine 1.3 and playonlinux, winetricks and q4 that gui for wine and have tried many things but I am not able to run san andreas and mostwanted.

The games both start but they appear as coloured blocks. The start screen is flashing black and white and winedb rates the games as platinum and gold respectively. what do I do?? I have tried other windows soft wares on wine the work fine...

Sounds suspiciously like you're on an Intel graphics chipset. The open source driver doesn't include S3 Texture Compression for patent reasons. S3TC is used in almost all serious 3D applications, including games. Not having it tends to result in a lot of fail.

I asked about this a while back and got an answer that worked for me:

Is there an easy way to enable S3TC on Intel graphics?

Concerning the soundtracks: are they MP3s? I only ask because due to licensing issues Wine does not have mp3 support and the workarounds do not work. Some programs, like VLC have built in mp3 support and can play mp3s under wine, but games that use mp3s will not play them.

Your lucky the game is not giving you an error about that, some games will not even run on wine until you delete it's sound files. Converting to OGG works for some games, however due to licensing issues with FFMPEG, you will not be able to use Linux to convert them. I had to use windows on my duel boot to convert the audio so I could go back to linux and use the  music in Wine.


lxqt "whisker menu"? I'm running 16.04 on a very old PC, so I'm using the Enlightenment (currently E22) desktop.

I'm looking at LXQT, but I'd like the "program search" feature that comes with XFCE's Whisker Menu. I'm told that a whisker menu-type search isn't possible in LXDE (which is why I don't use it), but can it be (easily) done in LXQT?

The xfce4-appfinder is part of the Whisker Menu.

To install it, run the following command:

sudo apt install --no-install-recommends xfce4-appfinder

After it is installed simply run xfce4-appfinder from a command prompt or you can assign it to a keyboard shortcut.  In Xfce4 it is assigned to Super+R to bring it up.

Hope this helps!

LXQt comes with its own launchers

The Applications menu  panel widget acts just like Whisker-menu.

There is also lxqt-runner, very similar to krunner from KDE. Github. Its shortkey can be configured.

Other launchers, especially desktop-agnostic ones like Synapse, can be used to get the desired behavior.
Assigning only the Super key as shortcut, a nice feature of the Whisker Menu (but also of other launchers) can be added thus: for any launcher, including the ones mentioned above: install ksuperkey (preferably from source, which worked very smoothly for me - see details here), run it at startup, then assign Alt-F1 as shortcut for the launcher. For Synapse you need just to follow this answer (that is: edit .config/synapse/config.json in order to have "activate" : "Super_L").


How can I display the list of available WiFi networks? My Ubuntu laptops's WiFi works fine on various Wifi networks. But the list of available networks accessed from  the toolbar icon of nm-applet by no longer appears. I just see the known networks. The list of hidden networks also doesn't show any new networks.

sudo iwlist scan likewise only shows known networks.

How do I get list all available networks so I can connect to one?

I am using Xubuntu 14.04

Use nmcli dev wifi command. It shows the transfer rate, the signal strength and the security as well.

Further to what has been already answered here, I've merged a few of them and added a little flavor of my own.

As for the nmcli answer, sure, do that if you want to install more software. But if you're looking for Access Points, maybe you don't have an internet connection yet and are unable to connect to install said software. With all that said, here's my solution:

for i in $(ls /sys/class/net/ | egrep -v ^lo$); do sudo iw dev $i scan | grep SSID | awk '{print substr($0, index($0,$2)) }'; done 2>/dev/null | sort -u

Breaking it down:

for i in $(ls /sys/class/net/ | egrep -v ^lo$);

Lets have a look at all the contents of the location /sys/class/net. This will list all the network devices, but we're not really interested in the loopback interface. so we'll ignore that one

do sudo iw dev $i scan | grep SSID | awk '{print substr($0, index($0,$2)) }';done

For each of the network interfaces we found above, lets do the scan to list all the SSIDs (and only the SSIDs)

2>/dev/null

And ignore all the errors (like searching for SSIDs with ethernet interfaces).

| sort -u

And finally, If you have multiple wi-fi adapters on the system, only list each SSID once.


Running CRON job on Ubuntu server for SugarCRM I am pretty inexperienced in Linux, so be descriptive on your answer.

My environment: Local Linux server 12.04 hosting Sugar CRM 6.5.2.

There is area in sugar CRM called scheduler. I can configured some predefined jobs here. in my case i am trying to run email reminders (ever min/hour/day/month). For this scheduler to be effective, i read some where i need to setup CRON job. So I did some research & finally put following lines in CRONTAB for the root user, as per instructions given in sugarCRM.

* * * * * cd /var/www/crm; php -f cron.php > /dev/null 2>&1

Well I am creating contracts in my sugarCRM (AOS module) & I want email reminders to be sent for these contracts to the concern person. Now my sugarCRM email is configured correctly & I can send test emails using it. But the CRON + scheduler not giving any result. I can't receive any emails.

Then I tried to read /var/log/syslog & it is showing entry for following line each minute.

  Oct 27 15:03:01 unicomm CRON[28182]: (root) CMD (cd /var/www/crm; php -f cron.php > /dev/null 2>&1)

I've few questions:

what does the CRON job line i've added in crontab mean? cd /var/www/crm; php -f cron.php > /dev/null 2>&1 is not making any sense to me.
How am i suppose to get this thing work? I've searched a lot (including SugarCRM forum), but no luck.

The line in the crontab just executes the command cd /var/www/crm; php -f cron.php > /dev/null 2>&1. What this command actually does is that, it changes the current working directory to /var/www/crm and tries to execute the cron.php file there using the php interpreter. The output and errors are redirected to /dev/null, ie, they're discarded.

If you want the emails to be sent, you have to check if the cron.php is actually having code to send emails and whether that code is getting executed.

I have just landed here because I have the same problem.
And it's a misunderstanding: You DON'T have to execute
*    *    *    *    *  cd /var/www/html/SuiteCRM-7.6.4; php -f cron.php > /dev/null 2>&1
You HAVE to add this line to the crontab file

Execute: sudo crontab -e

Choose your favorite editor, and add the line at the end (the 5 stars * are required)

Save


Install Code::Blocks in Ubuntu 12.10 I installed Code::Blocks from Muon Software Center (I'm using KDE) and I got Code::Blocks 10.05.

I found this link: https://launchpad.net/~pasgui/+archive/ppa/

After adding this PPA, and running sudo apt-get update if I run sudo apt-get install codeblocks, which version of Code::Blocks will I get? If I download the tarball from the main site, how to I install it properly?

Can someone help me out?

Install Codeblocks 12.11 on Ubuntu 12.04 / 12.10

1º) Install libraries wxWidgets

$ sudo apt-get install libwxgtk2.8-0
$ sudo apt-get install libwxgtk2.8-dev

2º) Download libraries http://packages.debian.org/squeeze/libhunspell-1.2-0
    (pay attention if your distribution is 32 or 64 bits)
    and install (This prevents errors when installing codeblocks)

$ sudo dpkg -i libhunspell-1.2-0_1.2.11-1_amd64.deb

3º) Download the binaries http://www.codeblocks.org/downloads/26
    (pay attention if your distribution is 32 or 64 bits)
    Debian stable is: codeblocks_12.11-2_amd64-debian-stable.tar.bz2 (squeeze)
    Unzip to a folder and install:

    $ sudo dpkg -i *.deb

4º) If you develop for MySql Install MySql connector
    Download the version for your distribution from the official site
    mysql-connector-c-shared_6.1.0-2_amd64.deb
    and install

$ sudo dpkg -i mysql-connector-c-shared_6.1.0-2_amd64.deb

5º) Finally the library with header files for MySql

$ sudo apt-get install libmysqlclient-dev

(To install the MySQL server search on google)

You can also install Code::Blocks from my PPA if you don't fancy compiling from source.


How to copy faster to flash device? I am using a flash drive and my USB's filesystem is FAT.
It is very slow while copy files  or paste files into it.
In windows i can do these operation much faster using Teracopy software.
Is there any packages or any commands to do these operation much faster in Linux?

you could get a new asus router with USB 3.0 will work with fat32 or fat, but the info travel as fast as you wireless or wired connection!

FAT is old. You should convert your USB's file system to NTFS to improve speed.


How to set up XFCE4 XKB plugin to remember settings over reboots? Following this answer I've installed xfce - xfce4-xkb-plugin to indicate and switch keyboard layouts in XUbuntu. But it resets all the settings (languages I use and a switch layouts hotkey) every time I reboot. How to make it to remember?

As the best previous answer appears to be commented afterwards by the user as not working anymore, I will give here an updated perfected version of a quite successful workaround. Sorry not to be able to provide a more scientific less empirical approach, I am not an advanced user, just had the luck to get what I want in this case and want to share this, maybe as a temporary patchwork. So, bare with me.
I use Xubuntu, maybe some instructions are limited to that.

My solution is this (my case is English-US as default, second French, third Romanian standard - replace accordingly):

Go to Setting Manager > Keyboard > Layout, and set the languages in the preferred order (delete them and add them in order to achieve this). Go to the properties of the xkb plugin and make the same settings in the same order with the same default language.
Open the file
$HOME/.config/xfce4/xfconf/xfce-perchannel-xml/keyboard-layout.xml
Edit it to look similar to this.
Open the file
$HOME/.config/xfce4/panel/xkb-plugin-##.rc
(replace ## with appropriate number).
Edit it to look similar to this.
Open the file
/etc/default/keyboard
(as root)

Edit it accordingly:

XKBMODEL="pc105"
XKBLAYOUT="us,fr,ro"
XKBVARIANT=",,std"
XKBOPTIONS="grp:alt_shift_toggle"

Maybe not all these are necessary to make it work, but just in case...

Menu -> Settings -> Settings Manager

Session and Startup

Check: Automatically save session on logout


ubuntu 18.04 settings not opening My ubuntu's settings is not opening
       when i click on settings there is a response in the panel showing that settings is opening but after some times it will fade out and the settings wont open.

I uninstalled gnome-control-center and reinstalled but no change
when i run the command in terminal this the following output that i got
OUTPUT:

gnome-control-center: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/samba/libmsrpc3.so.0: invalid ELF header

please help me to solve this issue

thank you

The /usr/lib/x86_64-linux-gnu/samba/libmsrpc3.so.0 library came
from samba-libs package (checked on packages.ubuntu.com search) so consider to reinstall it with

sudo apt-get install --reinstall samba-libs

sudo systemctl stop apt-daily.timer

sudo systemctl start apt-daily.timer

sudo lsof /var/lib/dpkg/lock

sudo lsof /var/lib/apt/lists/lock

pgrep apt-get -a

pgrep -a apt-get

2374 apt-get update

ps -f 2374

sudo kill -15 2374

sudo kill -2 2374

sudo kill -9 2374

sudo pkill -9 apt-get

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

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

sudo apt update

sudo apt upgrade

sudo apt install gnome-control-center


Black screen when booting on an Acer Aspire 5732Z Since I´m getting more and more into linux I got the idea that I should start dualbooting on the family laptop.

First I downloaded wubi to dualboot Ubuntu with Windows 7 home premium on an Acer Aspire 5732Z laptop.

Then I restarted and looked forward for Ubuntu but the screen is almost black.
I can barely see some ad about "excellent apps" but not enough to be able to do anything about it.

Beside being a newbie and computerlexic, what´s my issue?

Integrated 3D graphics, featuring Intel® Graphics Media Accelerator 4500M (Intel® GMA 4500M with up to 1759 MB of Intel® Dynamic Video Memory Technology 5.0 (64 MB of dedicated video memory, up to 1695 MB of shared system memory), supporting Microsoft® DirectX® 10

Wubi is not dualbooting, it is just a way to run Ubuntu from a windows environment.

Dualbooting will require you to shrink a partition on your family PC (unless it already have an unused partition with enough space), and install Ubuntu as well as a bootloader (which is installed automatically, unless you disable it).

The default bootloader that comes with Ubuntu will also allow you to boot into windows, and hence this is the preferred way to have a PC with more than one OS.

I'm sure there's plenty of good software programs that can help you shrink your windows partition, however the easy way to get started with "the real" ubuntu experience is probably simply to burn the ubuntu image to a disk, and boot from that disc.

Simple step-by-step can be found on the ubuntu download site

wubi just fake that it is dual booting, while it actually runs as a program from inside windows, therefore it loads a program in windows memory(whatever is left after windows7) is therefore slow. I would advise you to install it on a separate partition.

Also, there exists a script, which will export your wubi installation to separate partition.

Here is a step by step guide with screenshots for how to move your wubi installation to separate partition

http://ubuntu-with-wubi.blogspot.com/2011/05/how-to-migrate-in-pictures.html

You can download the migration script from here.


How can I download an entire website? I want to download a whole website (with sub-sites). Is there any tool for that?

Try example 10 from here:

wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL

–mirror : turn on options suitable
for mirroring.
-p : download all files that are necessary to properly display a given
HTML page.
--convert-links : after the
download, convert the links in
document for local viewing.
-P ./LOCAL-DIR : save all the files and directories to the specified
directory.

If speed is a concern (and the server's wellbeing is not), you can try puf, which works like wget but can download several pages in parallel. It is, however, not a finished product, not maintained and horribly undocumented. Still, for to download a web site with lots and lots of smallish files, this might be a good option.


New AMD card boots to "Starting Version 219" Ubuntu 15.04

Radeon R9 380 GPU

I finally realized nvidia and Linux simply don't work well together, so today after a lot of research I switched to a Radeon card which is supposed to have much better support.

Booted into ubuntu OK, in low graphics mode.

I selected the proprietary driver and rebooted, and now can get no further than "Starting Version 219.

What now?

edit

OK, I tried all of the options from grub, the only change there is that in low-graphics mode it boots to a black screen with a flashing white cursor at the top left, but will not go past that.

Ctrl/Alt/F1, F2, etc does nothing at all.

Alt Tab, Ctrl/Alt/Del, Esc, Alt/F4... I'm not sure of all of the keys I tried, but I'm convinced it hangs when it boots, to the point that nothing from the keyboard is being registered.

Fortunately, I'm set up with a small Windows installation that I can choose from Grub, and just like with the Nvidia card I pulled out, it works with absolutely no problems at all - the new card is detected and the drivers downloaded and installed flawlessly and it is working perfectly.

So what gives with Linux?  I've got ten years of dicking around with all of the Nvidia issues from multiple systems to get it working, so I'm pretty good at that - but based on all of the issues and general hatred for Nvidia from the linux community at large, I honestly expected a radeon card would at least get me to a desktop.  But as this is my first experience with radeon/linux, I really have no clue how to go about getting it to work at all.

And I honestly don't think I can return a $250 video card because "it works fine in Windows but not in Linux."

Any assistance at all would be very helpful and greatly appreciated.

edit2
Gave up and tried reinstalling from the 15.04 iso  (fortunately I learned to keep windows! )

It installed, but complained about "held packages"

Rebooted to a desktop just fine, but now no mouse or keyboard lol!

Recovery mode from grub also had no mouse or keyboard, but the keyboard works in grub!

Now I'm just doing a complete wipe and install from scratch. Fingers crossed.

Shouldn't there be an easier way to switch video cards?

edit
lmfao!

Installing alongside windows 7 from the live cd results in it sitting at "creating ext4 file system" for 90 minutes. Rebooting at that point skips grub altogether and takes me to a purple screen with 5 orange dots and then nothing at all for 15 minutes.  System is hung at that point.

The install error as it turns out is not a new problem,it is apparently from something called ubiquity, and no solutions are listed anywhere that I could find. Terminal will not run at all, and Rebooting does not show grub at all, so no way to get to windows to try and fix it.

I'm 6 his into this so far today, plus another 4 last night.

Would putting my nvidia card back in fix this? I hate to think so, because it worked fine in windows before ubuntu took away that option.

final update

OK, I finally got 14.04 to install, I'll just use my laptops for Windows since 15.04 removed it from our desktop.   The new card is now working perfectly with the vesa driver. I had hoped for higher resolution, but so far it has not given any system problem errors, so it is definitely better than the nvidia.

Solved

Using 14.04.  Working perfectly now.

edit

My bad.  Details of the solution:

When booting with AMD proprietary drivers on a new Radeon card, the system hangs at a screen saying "Starting Version 219"

There are quite a few posts about this issue, and a lot of conflicting answers, everything from "It is not an issue, it is only cosmetical" to "It is an Nvidia driver problem" to "just wait, it will go away" to "it is a display manager problem."

Since there was no way around it at that point (No response to keyboard at all) and after a total of 16 hours of trial and error along with a lot of cul-de-sacs of bad troubleshooting, and with no agreement about what is even causing it, finding a solution was simply not possible.

Wiping the entire system and installing 14.04 with the vesa driver removed the problem completely, satisfied most of the posted issues and problems related to this message, and has left my system working perfectly.


How to use Verilog HDL on Ubuntu? I tried to begin a small course with some examples in Verilog Hdl
and after spending much time searching for the best Simulator or IDE to practice with some examples , I failed to figure out how to use it on Ubuntu 12.04

So, I have two questions  :

How can I use Verilog on Ubuntu 12.04?
What is the best Simulator (or IDE) available for Linux?

Does this post help: Verilog and VHDL on Linux (Ubuntu)?

It recommends a combined use of Icarus Verilog (iverilog in repositories) for Verilog simulation, GHDL for VHDL simulation, and GTKWave (gtkwave in repositories) for waveform viewing.

If you want an Eclipse-based Verilog editor, try veditor.

Try this command in a terminal window:

sudo apt-get install gplcver


"Permission denied" when download from script(ruby) file I want to download a project's dependencies from a script file

in tutorial said: run this comment to download

./download-dependencies core

my way was like this:

$ cd Documents/ImageProccesing/
$ ./download-dependencies core
bash: ./download-dependencies: Permission denied
$

I did this too,but....

$ sudo -i
[sudo] password for amir2:
# cd /home/amir2/Documents/ImageProccesing/
# ./download-dependencies core
-bash: ./download-dependencies: Permission denied
#

in addition...
first of download-dependencies file is like this:

#!/usr/bin/ruby

$modules = [:core,
            :images2002,
            :images2004]

def usage
  puts "Usage: ./download-dependencies <#{$modules.join('|')}>"
end

Try the below command,

sudo chmod a+rw -R

After this run,

.rvm

Then try to install ruby. Hope this helps.


Plymouth main process killed by SEGV signal error on boot After upgrading to 11.04 the following messages appear, i don't know what to do about it. pls suggest.

init: plymouth main process (68) killed by SEGV signal
init: plymouth-splash main process (193) terminated with status 2

If you are using a custom kernel then your solution is in:
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/571258?comments=all


how to install package to a specific hard disk drive partition By default apt-get installs packages in the drive that the ubuntu installation resides on.
But can i install a package other than the ubuntu partition ?
If i can, how to do it ?

It's not clear why you want this. If it's for space reasons, one viable approach would be to mount large directories (probably /bin or /usr, where many programs reside) in an extra partition. See e.g. this question: How can I store /var on a separate partition? for how to do that.

I have tried to figure out how to do this as well.  I have read that you can only install on the default partition.  This is because installing on other partitions can cause viruses or unwanted things on your computer.  What I have done to get around this is to install the package on the default partition then add a script to the beggining of it that will move the files where you want the first time the program is started.


blk_update_request: I/O error, dev fd0, sector 0 This happened after a kernel update. Whenever I try to boot, my computer says Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1) Welcome to emergency mode!... followed by a bunch of things I can do.
It spits the same error out if I ctrl-d to boot into default mode, and the fstab file matches the drive UUIDs perfectly. But I think I found the culprit. When I run blkid, it takes a while, and then spits out blk_update_request: I/O error, dev fd0, sector 0 followed by the drives' data.
What is happening, why, and how do I fix it?
I tried the possible duplicate question, but it is a slightly different error and the solution doesn't work.

https://unix.stackexchange.com/questions/282845/blk-update-request-i-o-error-dev-fd0-sector-0

Your device doesn't have a floppy drive, but the floppy driver module is installed, so you have /dev/fd0, and many things will try to use it.

sudo rmmod floppy
echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf
sudo dpkg-reconfigure initramfs-tools

First off: It is NOT your fault. It just shows that updates, without backups, are dangerous on ANY OS and no matter how often it worked before.

I had exactly the same problem today on Debian 9.

A whole ext3 RAID1 "vanished" after kernel was updated from:

linux-image-4.9.0-11-amd64                        4.9.189-3+deb9u2

to

linux-image-4.9.0-12-amd64                        4.9.210-1

list all installed kernels

dpkg --list | grep linux-image
ii  linux-image-4.9.0-11-amd64                        4.9.189-3+deb9u2                            amd64        Linux 4.9 for 64-bit PCs
ii  linux-image-4.9.0-12-amd64                        4.9.210-1                                   amd64        Linux 4.9 for 64-bit PCs
rc  linux-image-4.9.0-6-amd64                         4.9.88-1+deb9u1                             amd64        Linux 4.9 for 64-bit PCs
rc  linux-image-4.9.0-8-amd64                         4.9.144-3.1                                 amd64        Linux 4.9 for 64-bit PCs
ii  linux-image-4.9.0-9-amd64                         4.9.168-1+deb9u3                            amd64        Linux 4.9 for 64-bit PCs
ii  linux-image-amd64                                 4.9+80+deb9u10                              amd64        Linux for 64-bit PCs (meta-package)

hostnamectl; # os used
   Static hostname: storagepc
         Icon name: computer-desktop
           Chassis: desktop
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-12-amd64
      Architecture: x86-64

Those are the kind of "heart attack" moments X-D

Let's try to stay cool!

"solution": boot previous kernel ( in this case: linux-image-4.9.0-11-amd64 )

vim /etc/default/grub

GRUB_TIMEOUT=3 <- make sure a timeout larger than 0 is defined (or no time to select any options during boot)

# let grub2 do its stuff
update-grub
# is the same as:
uupdate-grub2

# reboot the system (if USB keyboard is not reacting during grub boot screen, try PS2 keyboard)
reboot

# when grub boot screen appears

After booting linux-image-4.9.0-11-amd64 kernel, can access ext3 RAID1 AGAIN!

Problem: grub won't remember that choice.

To make this permanent:

vim /etc/default/grub

# during boot:
## select in the first menu the second (0,1) entry
#### then select in the second menu select the 3rd entry (0,1,2)
GRUB_DEFAULT="1>2"

# make grub2 realize the changes
update-grub

... yes it is confusing I know X-D

this is what it was supposed to look like

Have two RAID1 defined.

# show status of raid
cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md126 : active raid1 sdc1[1] sdb1[0]
      3906886464 blocks super 1.2 [2/2] [UU]
      bitmap: 0/30 pages [0KB], 65536KB chunk

md127 : active raid1 sde1[0] sdd1[2]
      1953381376 blocks super 1.2 [2/2] [UU]
      bitmap: 0/15 pages [0KB], 65536KB chunk

# show what is mounted
mount
/dev/md126 on /media/user/ext4RAID1 type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/md127 on /media/user/ext3RAID1 type ext3 (rw,relatime,data=ordered)

# show block devices
lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
fd0         2:0    1     4K  0 disk
sda         8:0    0 238.5G  0 disk
├─sda1      8:1    0 230.8G  0 part  /
├─sda2      8:2    0     1K  0 part
└─sda5      8:5    0   7.7G  0 part  [SWAP]
sdb         8:16   0   3.7T  0 disk
└─sdb1      8:17   0   3.7T  0 part
  └─md126   9:126  0   3.7T  0 raid1 /media/user/ext4RAID1
sdc         8:32   0   3.7T  0 disk
└─sdc1      8:33   0   3.7T  0 part
  └─md126   9:126  0   3.7T  0 raid1 /media/user/ext4RAID1
sdd         8:48   0   1.8T  0 disk
└─sdd1      8:49   0   1.8T  0 part
  └─md127   9:127  0   1.8T  0 raid1 /media/user/ext3RAID1
sde         8:64   0   1.8T  0 disk
└─sde1      8:65   0   1.8T  0 part
  └─md127   9:127  0   1.8T  0 raid1 /media/user/ext3RAID1
sr0        11:0    1  1024M  0 rom

# find defined raids
mdadm --examine --scan
ARRAY /dev/md/2  metadata=1.2 UUID=90642755:fa191325:0fe4ec59:2456c645 name=storagepc:2
ARRAY /dev/md/1  metadata=1.2 UUID=433fb7e1:9d7f3f17:bc5ee18b:0f4eeb52 name=storagepc:1

# show UUIDS
blkid /dev/sdb1
/dev/sdb1: UUID="90642755-fa19-1325-0fe4-ec592456c645" UUID_SUB="bee458e0-509a-c110-b577-8a1ddbe6bbb3" LABEL="storagepc:2" TYPE="linux_raid_member" PARTUUID="1fd02041-9dd2-4918-83a3-c8bafbab3bed"

blkid /dev/sdc1
/dev/sdc1: UUID="90642755-fa19-1325-0fe4-ec592456c645" UUID_SUB="7d5947f8-1ba0-0c7b-18a7-194ab4051a2c" LABEL="storagepc:2" TYPE="linux_raid_member" PARTUUID="5e4ea781-68e5-43f0-accf-26342aeb4daa"

userblkid /dev/sdd1
/dev/sdd1: UUID="433fb7e1-9d7f-3f17-bc5e-e18b0f4eeb52" UUID_SUB="bed17780-3817-27c9-6336-44d4aedfb857" LABEL="storagepc:1" TYPE="linux_raid_member" PARTUUID="f6aab6c2-01"

userblkid /dev/sde1
/dev/sde1: UUID="433fb7e1-9d7f-3f17-bc5e-e18b0f4eeb52" UUID_SUB="eb90b361-94d6-2f38-7727-d386097dce81" LABEL="storagepc:1" TYPE="linux_raid_member" PARTUUID="d2fd127f-01"

regular filesystem checks

Has nothing to do with the problem but defining this via tune2fs has the advantage, that it will automatically be performed during boot.

tune2fs -C 2 -c 1 /dev/sda1; # check filesystem on every boot (for ext3 takes rather long X-D)
tune2fs -c 10 -i 30 /dev/sda1; # check sda1 every 10 mounts or after 30 days


How to get best quality audio using youtube-dl? Before someone marks this as a duplicate, please read just a little further. :)

I've been using youtube-dl to download audio from SoundCloud and now YouTube. There are several different ways to get audio only from YouTube, but they all seem to yield the same exact file, so I'm not sure which settings I should be using.

I've tried all these and they all give the SAME file. (The MD5s are different, but the size and bitrate are exactly the same.)

--extract-audio
--extract-audio --audio-quality 0
-f bestaudio
-f bestaudio --audio-quality 0
-f bestaudio/best
-f bestaudio/best --audio-quality 0

So my question is: What the heck are the differences between these options if they all give the SAME file? And which option(s) should I be using to get the best quality, untouched audio?

All informations are described in the man page:

From man youtube-dl

--audio-quality QUALITY
  ffmpeg/avconv audio quality specification, insert a value between 0
  (better) and 9 (worse) for VBR or a specific bitrate like 128K (default 5)

-f, --format FORMAT
 video format code, specify the order of preference using slashes, as in -f
 22/17/18 . Instead of format codes, you can select by extension for the
 extensions aac, m4a, mp3, mp4, ogg, wav, webm. You can also use the special
 names "best", "bestvideo", "bestaudio", "worst".


Will Ubuntu fix my Video Card Driver issue? Will Ubuntu work on a Dell Inspirion 1300 Netbook currently running Windows XP?  I've tried install Windows 7 Ultimate and it's not working properly due to the video card driver issue. The Celeron processor is so old that even  a custom driver for it doesn't do the job. Can't see even  a simple Youtube video. Will Ubuntu work on my system, and fix the problem with the video card? Or I should try it first and let you know.

Thanks in advance.

You can install either Xubuntu or Lubuntu on your Dell Inspiron 1300. Preferably Xubuntu because Lubuntu doesn't have a Long Term Support release. Preferably Xubuntu 12.04 because it is a Long Term Support release which is supported by updates until April, 2015.

Linux Drivers are different than MS Windows so try downloading a disc image to a DVD/ USB Thumbdrive. Just boot from it and try to see if you can install from there.


can "libexcel-writer-xlsx-perl" be added to precise and later? I am interested in using the Perl module Excel::Writer::XLSX on Precise.  I can install it using CPAN, but due to complications at my office, it'd be easier to just be able to do apt-get install from the official Ubuntu repositories.

What are the chances of having the Perl module Excel::Writer::XLSX (libexcel-writer-xlsx-perl) added to Precise or later?

These two links help? They are links to Excel-Writer-XLSX and the perl module:

http://search.cpan.org/~jmcnamara/Excel-Writer-XLSX/

http://jmcnamara.github.io/excel-writer-xlsx/

There is a post on this question here: Also a caveat against someone installing through a PPA (command line)due to not having all the files compatible together, I think. Honestly hope this helps.

It's simple under Ubuntu 14.04. Simply do:

sudo apt-get install libexcel-writer-xlsx-perl


How to compare two files So basically what I want to do is compare two file by line by column 2. How could I accomplish this?

File_1.txt:

User1 US
User2 US
User3 US

File_2.txt:

User1 US
User2 US
User3 NG

Output_File:

User3 has changed

Look into the diff command. It's a good tool, and you can read all about it by typing  man diff into your terminal.

The command you'll want to do is diff File_1.txt File_2.txt which will output the difference between the two and should look something like this:

A quick note on reading the output from the third command: The 'arrows' (< and >) refer to what the value of the line is in the left file (<) vs the right file (>), with the left file being the one you entered first on the command line, in this case File_1.txt

Additionally you might notice the 4th command is diff ... | tee Output_File this pipes the results from diff into a tee, which then puts that output into a file, so that you can save it for later if you don't want to view it all on the console right that second.

Additional answer

If there's no need to know what parts of the files differ, you can use checksum of the file. There's many ways to do that, using md5sum or sha256sum. Basically , each of them outputs a string to which a file contents hash. If the two files are the same, their hash will be the same as well. This is often used when you download software, such as Ubuntu installation iso images. They're often used for verifying integrity of a downloaded content.

Consider script below, where you can give two files as arguments, and the file will tell you if they are the same or not.

#!/bin/bash

# Check if both files exist
if ! [ -e "$1"  ];
then
    printf "%s doesn't exist\n" "$1"
    exit 2
elif ! [ -e "$2" ]
then
    printf "%s doesn't exist\n" "$2"
    exit 2
fi

# Get checksums of eithe file
file1_sha=$( sha256sum "$1" | awk '{print $1}')
file2_sha=$( sha256sum "$2" | awk '{print $1}')

# Compare the checksums
if [ "x$file1_sha" = "x$file2_sha" ]
then
    printf "Files %s and %s are the same\n" "$1" "$2"
    exit 0
else
    printf "Files %s and %s are different\n" "$1" "$2"
    exit 1
fi

Sample run:

$ ./compare_files.sh /etc/passwd ./passwd_copy.txt
Files /etc/passwd and ./passwd_copy.txt are the same
$ echo $?
0
$ ./compare_files.sh /etc/passwd /etc/default/grub
Files /etc/passwd and /etc/default/grub are different
$ echo $?
1

Older answer

In addition there is comm command, which compares two sorted files, and gives output in 3 colums : column 1 for items unique to file #1, column 2 for items unique to file #2, and column 3 for items present in both files.

To suppress either column you can use switches -1, -2 , and -3. Using -3 will show the lines that differ.

Bellow you can see the screenshot of the command in action.

There is just one requirement - the files must be sorted for them to be compared properly. sort command can be used for that purpose. Bellow is another screenshot , where files are sorted and then compared. Lines starting on the left bellong to File_1 only , lines starting on column 2 belong to File_2 only


Failed to update Zotero after changing permission with chmod 707 I am running Ubuntu 16.04 LTS and I have installed Zotero adding the PPA, following the instructions in this page. It worked all well, but when I try to get any update, I get the following error message:

In order to "modify the Zotero program directory to be writable by your user account" I applied sudo chmod 707 zotero, as described here and, as far as can see from the screen shot below (which was generated by the command ls -lg /usr/bin), the changes took place successfully:

Is there anything wrong with this terminal output? Shouldn't I have reading, writing and execute (rwx) permissions for user, according to this output?

With that command you only changed the permissions for the executable file, not for all the files the program uses (and probably needs to update).

I recommend that you chmod the /usr/bin/zotero file back to 755 and instead run the Zotero updater with sudo and it should have the rights needed to update itself.

EDIT:  It is recommended to run sudo su to open up a root shell and then just run zotero as a command line command to open it with root rights. Directly running sudo zotero is not recommended because it uses your real home directory and you may end up with root-owned files in your home directory.

In Ubuntu 16.04, I did the following:

In the terminal execute Zotero as root

sudo zotero
Enter the password and press Continue to the following message

Press Continue

In Zotero, click on menu Help -> Check for update, install it and restart. That's it!


How to prevent Ubuntu Server sleep/hibernation I'm running the latest Ubuntu Server (quite literally downloaded & installed yesterday) on a box under my desk. I've got trac installed and OpenSSH. Intermittently both become unavailable, as if the server has gone to sleep, which seems odd because to me, the whole idea of a server is that it's always on/available.

The server is only used on the LAN.

I've tried adding acpi=off to /etc/default/grub, running update and rebooting, no difference.

Currently, I have SSH open and if I leave it for some time, it will remain connected, but lag horribly when I go back to using it.
Last time this sleep/hibernate issue happened, I had to plug in a keyboard and monitor to get it come back up.

Any ideas or suggestions?

I understand this is an old post, but I had this same problem and had a hard time finding a decent answer.

My laptop with Ubuntu Server would go into a white screen saver, and soon after everything would lose connection to the server. As soon as I exited the screen saver with the keyboard on the laptop, everything was able to once again connect. The acpi=off, setterm -blank 0, and other options described on similar questions never worked, until I found a working answer from the Unix and Linux SE.

After this solution, my laptop still goes to the white screen saver, however I no longer lose connection to any of the services running on it (SSH, SFTP, HTTP).

This command disables suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

and this command brings it back:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

setterm -blank 0 added to the GRUB boot command typically is ignored by the kernel and I find myself having to use the arrow-up function
to type it again quickly over and over. It seems to work after
entering the command 15 or 20 times from a root terminal. I enter it as quickly as I can strike the 2 keys necessary (i.e., up arrow followed by the Enter key) and I usually can get a terminal to remain open.

Be advised that closing a terminal artificially held open via the setterm -blank 0 command` seems to be interpreted by the kernel as a totally erroneous "indication" that is has permissions to go independently into sleep/hibernation mode. I recommend that you start a root terminal in, say, tty2 or tty3, and leave it running.  As long as the terminal program remains active, on my system at least, it does appear that I may be permitted to keep my console monitor up and running.

setterm -blank 0 does not address the problem of who gave the system permissions to go independently into sleep/hibernation mode and how I can get control of my system back. It's important to me that my file server should be on-line and available at all times. To keep my serer running, I am personally rewriting some kernel modules. After I get those mods in place I will permanently disable software updates and my problem will be solved, at least until I purchase some newer hardware that requires a newer kernel, and then, in order to keep my server running, I will be forced to rewrite parts of the kernel again.


Installing Ubuntu Touch Failed Nexus 7 2012 I tried to install the trusty version of Ubuntu Touch on my 2012 Nexus 7. I followed the directions here and I entered

sudo ubuntu-device-flash --channel=devel --bootstrap

until my terminal returned

Cannot push /home/nick/.cache/ubuntuimages/devel/grouper/version-194.tar.xz to device

(I also tried to do it manually, with that failing as well)

Your problem is that support for the Nexus 7 (gen 1) has been dropped, and this method won't work any more. This was announced on 03-Mar-2014 (as noted below).

In formal terms:

Support (as reference hardware) for the Nexus 7 (original model) is now deprecated, with development now focused on: Nexus 4 smartphone, Nexus 7 (2013) tablet, and Nexus 10 tablet.

See: https://wiki.ubuntu.com/Touch/Install

  Supported devices and codenames

  The table below lists the supported devices and their corresponding factory images, ..

See also:

http://www.omgubuntu.co.uk/2014/01/ubuntu-touch-wont-support-nexus-5-will-drop-support-nexus-7-10

  Nexus Device Support Dropped

  Along with no dice for the Nexus 5, moving Ubuntu Touch to an Android 4.4 enablement stack has resulted in further decisions on which devices should remain “officially supported”.

  From the end of January official builds for three of the four currently supported Nexus devices will be discontinued, affecting users of:

  Nexus 10 (2012)
  Nexus 7 (2012)
  Galaxy Nexus

  ..

PLEASE NOTE:

This article does not exactly match current support, as Nexus 10 in still (for the moment) being supported. However, focus (going forward) is definitely on the Nexus 4 (for phone), and Nexus 7 (2013) (for tablet).

The original 2012 model's support has been made deprecate in favour of the newer (per-se) 2013 model.


League of Legends client continuous patch using Playonlinux? I am using wine 1.5.28 and im not really sure which POL I am using it was an updated one though. I installed league using POL and ran the client. It installed fine and patched fine except for taking much longer than Windows would have and seeming to freeze at points but after 2 hours of letting it patched I finally got the shiny gold button play :) Well I was able to login in, i did not try a game yet though because I had to leave for work. So I exited out and when I came home I clicked on POL and clicked run on LoL and for some reason it wanted to do the same 2 hour patch all over again. Does anyone know why this is or has experienced this same problem. It seems like every time i want to play it I will have to let it run its patch..

tl;dr LoL client wants to patch the same 2 hour patch every time I run it on POL

Sometimes my PoL install of League will appear to start to patch and get caught at 33%.  But if I close and reopen the launcher I can log in.  Not sure if that's the same problem, but hopefully it helps someone!


How to run a script automatically in linux? I use linux command line and I'm a beginner with it.
I've created two files, test.sh and test.log.
the process is any output going to test.log and i get it successfully the output in test.log.
I want to run a script automatically every 5 seconds and write only if there is any change with the .sh file.

test.sh contains :

#!/bin/bash
while [ true ] ;
do
echo "" date and Time >> test.log
date +%x_r >> test.log
lsusb >> test.log

sleep 5;
done

My question: Is there any way to run it automatically and only append the new change in the file with the new date? for example if anyone insert USB device into my machine it will append it with the new date into the existing log file it.

This should work, it stores the last output of lsusb in $lastoutput and appends if they're if not equal

#!/bin/bash
while [ true ]
do
    currentoutput="$(lsusb)"
    if [ "$currentoutput" != "$lastoutput" ]
    then
        echo "" date and Time >> test.log
        date +%x_r >> test.log
        lastoutput="$(lsusb)"
        lsusb >> test.log
    fi
    sleep 5
done

You have to:

put your file in /etc/init.d directory
make your sh file executable (use the chmod +x command)

If it doesn't work properly, create a symlink of your file to /etc/rc.d/:

ln -s /etc/init.d/test.sh /etc/rc.d/

May that helps :)


How to check opened/closed ports on my computer? How to check the opened/closed ports on my computer?

I used netstat -a on command line.

Does the port status "LISTENING" indicate that the port is open?
Is any port, that is not shown in the output, closed?

There's a few parameters to netstat that are useful for this :

-l or --listening shows only the sockets currently listening for incoming connection.
-a or --all shows all sockets currently in use.
-t or --tcp shows the tcp sockets.
-u or --udp shows the udp sockets.
-n or --numeric shows the hosts and ports as numbers, instead of resolving in dns and looking in /etc/services.

You use a mix of these to get what you want. To know which port numbers are currently in use, use one of these:

netstat -atn           # For tcp
netstat -aun           # For udp
netstat -atun          # For both

In the output all port mentioned are in use either listening for incoming connection or connected to a peer** all others are closed. TCP and UDP ports are 16 bits wide (they go from 1-65535)

** They can also be connecting/disconnecting from the peer.

Try this to get a list of opened ports in that range.

for p in {1..1023}
do
   (echo >/dev/tcp/localhost/$p) >/dev/null 2>&1 && echo "$p open"
done

And this command will show what is it!

cat /etc/services | grep {PORTNumber}


Missing System Settings after removing some packages I installed or uninstalled some packages. I do not even remember what I was doing. As a result, now I can't see most of the system settings in settings window.
Any idea how to solve this problem.

When I hover mouse over the window title, it shows 'Unknown Application name'
I must have removed something, not sure what :-)

You may have accidentally removed some packages (or some dependencies which caused the package to uninstall). In any case, you may try installing (or re installing) the package ubuntu-desktop. Correct any accidental package uninstallation by:

sudo apt-get install ubuntu-desktop

Yep removing a few programs as suggested BY Ubuntu left settings LOST.

and I had noticed in rem, moving the package, that it also removed gnome-control-center.

Re-installing it solved the problem!
find it in software or alternatively type this in a terminal ...

sudo apt install gnome-control-center

Always Trying to help, Mark


Should I put /var in a separate partition for a database server? I will be using a Ubuntu server install as a server for a MySQL database. Is there any benefit to having /var in a separate partition from the root file system?

I've tried to run one of my natty servers with a separate /var a couple of weeks before - it just doesn't start.
There seems to be a pretty long history of Ubuntu having various problems with /var on a separate filesystem

So, your best bet is to have some separate data partition, just not put there your entire /var

You could either make a symlink or just mount the partition as /var. If you want to mount it as /var you'll need to specify that in /etc/fstab.


How to change the application to open pdf file in Firefox In Firefox, when I clicked a pdf file in website, I would be asked to download the pdf file or open the pdf file in  evince running outside Firefox.

Since I install Adobe Reader, whenever I clicked a pdf link, the pdf will be opened in it running inside Firefox.

I feel it is now running more slowly than before. Is it possible to change which application to open pdf from within Firefox?

Thanks and regards!

I personally don't use firefox, I use chrome, but if you wan't to change something poke around in preferences for both firefox and for adobe and see if you can find anything.  Also you might consider closing firefox after downloading the file and just viewing it in adobe reader outside of firefox.  If you can't stand doing that you might be able to install adobe in WINE and then it won't interfere with firefox.


How to disable the touchpad? I want my touchpad to be disabled when I use my mouse. How can I do that?
touchpad-indicator has stopped working on 11.10. It used to work on 11.04. Gnome3 is not a solution as I don't like it and find it buggy.

Run the following command in a terminal:

xinput list

You will get an output that looks like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_1.3M             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]

It displays all the input devices connected. Note that they all have an id.
Since 12 is the id for my touchpad, running the following command will disable it.

xinput set-prop 12 "Device Enabled" 0

In Ubuntu versions >12.04 you can also directly disable via

xinput --disable 12

(and enable via a similar command)

Alternative solution which works for all touchpads, no id needed.

open a terminal and write "gedit toggle_touchpad.sh"

#!/bin/bash
condition="$(gsettings get org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled)"

if [ "$condition" == "false" ]; then
     gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled true
elif [ "$condition" == "true" ]; then
    gsettings set org.gnome.settings-daemon.peripherals.touchpad touchpad-enabled false
fi

Save the file and exit. Now you have a file with the name "toggle_touchpad.sh"

Run the command chmod +x toggle_touchpad.sh to make the file executable.

Place the file in any folder you like. Let us assume that you have it in the folder /home/username/myscripts/.

From the menu on the top-right go to system-settings->keyboard->shortcuts->custom-shortcuts.

Create a new shortcut and put as name whatever you want. Put as command /home<username>;/myscripts/toggle_touchpad.sh where "username" is your username

Assign whatever keyboard shortcut you want.

Ready :)

P.S. Personally I put the file in the /opt/myscripts/ folder but in order to put it there you should run the following commands after creating the file:

sudo mkdir /opt/myscripts/

sudo mv toggle_touchpad.sh /opt/myscripts/

sudo chown <username>:<username> /opt/myscripts/toggle_touchpad.sh

chmod +x  /opt/myscripts/toggle_touchpad.sh

where "username" is your username

Then when you will create the shortcut you will use the path "/opt/myscripts/toggle_touchpad.sh" instead of the one mentioned above


Cannot save files even though logged on as Administrator account I've logged on as an administrator user but I can't even save files using my IDE. Error mesage:

"Could not save project:
java.io.FileNotFoundException: /home/mike/Desktop/dl4j-0.4-examples/.idea/workspace.xml~ (Permission denied)"

Is there a way to really log on as administrator?

Ubuntu looked so user friendly and then....

Open a terminal (ctrl+alt+t) and navigate to your home directory's desktop folder by typing cd ~/Desktop there do:

sudo chmod -R 744 dl4j-0.4-examples
sudo chown -R <your-user-name>:<your-user-group> dl4j-0.4-examples

Your user-group is usually the same as your user-name. This should set the permissions right for you. Note: you will be prompted for your password this is necessary to run a command as superuser (root).

You can as well do this by editing the directories properties in nautilus just start it from a terminal with:

gksudo nautilus

If your system complains about gksudo not found you might want to install the gksu package first to make this work by:

sudo apt-get install gksu

The same can be achieved by typing:

pkexc nautilus

Is there a way to really log on as administrator?

You should to log in as root. But first you must set unix password for root. Then you can log in by typing "su" in terninal. Or you can take root permissions typing "sudo su". If you want to log in as root in graphical desktop first you must enable this ability for root user.


How to uninstall Catalyst 13.8 beta? I'm currently running 13.04 with the 3.10 kernel, so I can use my wifi.

I foolishly tried to use Catalyst 13.6 beta even though it says it's not compatible with kernel 3.10.

Still, I have my laptop right where I want and can't live without it, but I want to try to install Catalyst 13.8 beta since it's compatible with kernel 3.10.

If the install goes wrong, how can Catalyst 13.8 beta be uninstalled?

Since you built the deb packages yourself, the proper command is:

sudo apt-get remove --purge fglrx*

You missed the "remove" and "--" parts in the previous command you tried. More information can be found here:
http://wiki.cchtml.com/index.php/Ubuntu_Raring_Installation_Guide#Removing_Catalyst.2Ffglrx

If you plan on using the open source drivers after run:

sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo rm -rf /etc/ati

Here ya go:

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


Unetbootin showing blank screen when started (Ubuntu 17.04) I am running Ubuntu 17.04 (Gnome desktop) on an Asus Q304UA laptop (Intel 6th gen Core i5, 6 GB RAM). I have installed Unetbootin. But when I try to start it, either from the start menu or from the terminal, I get a blank screen:

There might be compatibility issues, probably some linking with the X11 server. As an alternative, you could try Multisystem, it supports multiple OSes as well.

Download and Open the Script with Ubuntu's Archive ManagerOpen multiboot.sh with Download Manager
Extract the install-depot-multiboot.sh Script to your DesktopExtract MultiBootExtract to Desktop
Double Click install-depot-multiboot.sh from your desktop and select the option to "Run in Terminal"Select to Run Script in Terminal
How to Use the Multisystem LiveUSB Tool

Insert a USB Drive

Launch the Script via Applications > Accessories > MultiBoot
Select your USB Device from the list and click Validate
startup screen

Now simply Drag and Drop an ISO into the Window to add the Distribution (repeat the process to add more ISOs)Drag and Drop ISOs
multiOS

Once finished, restart your PC, set your boot menu to boot from the USB device, Select the Distro you want to Boot and enjoy!


Wifi won't connect on Lenovo yoga 2 13. I've tried the basic solutions I think So my laptop won't connect to wifi anymore. Running 14.04 on a Lenovo yoga 2 13. Here's what's true:

It won't connect to the network at the cafe, or the one at my house. I enter the password and it just doesn't connect.
It won't connect to my mobile hotspot wirelessly, but it does work when I plug the phone in.
It will connect to the xfinitywifi network, but won't even load the login page.

I've tried playing around in the network manager, and have also tried a few basic terminal commands like network manager restart, but I don't know jack about terminal.

Any suggestions would be appreciated. And yes, I've already looked at similar posts and none of those solutions seem to be working for me.

Help!

Wireless card is Intel 7270, name is wlan0

I had a similar problem and installed WICD. In the terminal, enter these commands and your password.

sudo apt-get install wicd
sudo service network-manager stop
sudo killall wpa_supplicant

This installs WICD and temporarely stops the network manager. Worked for me, can't give you much help beyond that, though.

If it does work, you can go ahead and purge the network manager (delete NM and it's dependencies)

sudo apt-get remove --purge network-manager network-manager-gnome


What's the easiest way to unrar a file? I just realized I can't unrar .rar files on my Ubuntu machine!

What's the easiest way to accomplish this fundamental task? If possible I'd love something like 7Zip that I can just right Click, and extract and have the program worry about how to do it regardless if it's a .zip, a .rar or a .foo compressed file.

Ubuntu by default uses File Roller, which supports the following formats:

7-Zip Compressed File (.7z)
WinAce Compressed File (.ace)
ALZip Compressed File (.alz)
AIX Small Indexed Archive (.ar)
ARJ Compressed Archive (.arj)
Cabinet File (.cab)
UNIX CPIO Archive (.cpio)
Debian Linux Package (.deb) read-only
ISO-9660 CD Disc Image (.iso) read-only
Java Archive (.jar)
Java Enterprise archive (.ear)
Java Web Archive (.war)
LHA Archive (.lzh, .lha)
WinRAR Compressed Archive (.rar)
RAR Archived Comic Book (.cbr)
RPM Linux Package (.rpm) read-only
Stuffit Archives (.bin, .sit)
Tar Archives:
    uncompressed (.tar)
    compressed with:
        gzip (.tar.gz , .tgz)
        bzip (.tar.bz , .tbz)
        bzip2 (.tar.bz2 , .tbz2)
        compress (.tar.Z , .taz)
        lzip (.tar.lz , .tlz)
        lzop (.tar.lzo , .tzo)
        7zip (.tar.7z)
        xz (.tar.xz)
ZIP Archive (.zip)
ZIP Archived Comic Book (.cbz)
ZOO Compressed Archive File (.zoo)
Single files compressed with gzip, bzip, bzip2, compress, lzip, lzop, rzip, xz.

Keep in mind, that this is just graphical front-end, so you still need to install unrar for .rar support;

The unrar package is hosted on the Multiverse repository, so first you'll need to enable the Multiverse repository in Software & Updates;

Then you can install the package either by using Software Centre or by opening Terminal and running sudo apt-get install unrar.

The half-GUI method:
sudo apt update
sudo apt install unrar

Then, in your favorite file manager (ex: nemo, my favorite, or nautilus [Ubuntu's default]), right-click the .rar file and go to Extract Here. Done!


Problem to enter in NTFS partition "The disk contains an unclean file system" Sorry if this question is already solved.

I changed my Operating System, from Windows to Linux Ubuntu 13.04.

I have 2 partitions:

C: (system) and
M: It's NTFS; there I have my information, music, photos. When I want to access the Disk to use the information, I can't get past this error:

Error mounting /dev/sda2 at /media/love/Mis Archiivos: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/love/Mis Archiivos"' exited with non-zero exit status 14:
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda2': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Clarification: I don't have 2 OSes. I only have Linux installed.

You could try this (worked for me with similar problem):

sudo apt-get install ntfsprogs
sudo ntfsfix /dev/sdb2

That worked for me. Good luck!

You need to format the drive to EXT4. Backup first before you do these steps.

1

Open a terminal window and log in as root:

$ su (or "sudo su" on some distributions)

2

Find out the name of your hard drive. To do this, enter the following from the command prompt as root:

# fdisk -l

3

Choose your newly installed drive after fdisk lists the current drives. The current hard drive will already have partitions assigned, and the output will look like this:

Disk /dev/sda: 16.1 GB, 16139354112 bytes
 /dev/sda1 * 1 1874 15052873+ 83 Linux

/dev/sda2 1875 1962 706860 5 Extended

/dev/sda5 1875 1962 706828+ 82 Linux swap / Solaris

4

Check to see if your disk is already mounted with this command:

# df

5

Unmount your drive if it is mounted using this command:

# umount /dev/sdb

6

Create a new partition by typing this command:

# fdisk /dev/sdb

7

The fdisk prompt will open. Press "n" to make the new partition, and then press "Enter."

8

Press "p" to create a primary partition, and then press "Enter."

9

Press "1" to create the first partition followed by "Enter."

10

Enter the default for both the first and last cylinders when your computer asks for this information. This will make the partition cover the entire disk rather than just part of it.

11

Press "t" to change the file system type followed by "Enter."

12

Type "L" to see a list of known types followed by "Enter."

13

Type "83" for "Linux" followed by "Enter."

14

Press "w" to write the partition to the disk (this cannot be undone), and then press "Enter."

Format the New Partition

15

Format the new partition that you created with the following command:

# mkfs.ext4 /dev/sdb1

16

Create a new directory and mount the new drive with these commands:

# mkdir /media/newdrive (or whatever name you prefer)

# mount /dev/sdb1 /media/newdrive

17

Edit your fstab file so that the new drive will be mounted at boot. Fstab is the Linux file system configuration file to mount partitions at boot. You can edit /etc/fstab with the "nano" command or "vi" depending on which editor you prefer.

# nano /etc/fstab or # vi /etc/fstab

18

Add the following line to the end of fstab:

/dev/sdb1 /media/newdrive ext4 defaults 1 2

19

Save the fstab file.

Hope this helps!!!


Webcam not working and detected in 12.04, but on 11.10 was working I had been using Ubuntu 11.10 with all the bells and whistles, every thing fine. I download and install the newest version of Ubuntu (12.04) and the webcam doesn't work. I tried installing cheese, but this application reports that it does not find any devices.
Then I found a similar question here, but installing the application gave me the same error:

  Guvcview error:
  Unable to open device
  Please make sure the camera is connected
  and that the correct driver is installed.

I have an HP G60 with integrated webcam that worked perfectly under 11.10. What should I do?

Thx!/Francisco

Procedure to install web cam in UBUNTU 12.04 LTS OS

First download the libwebcam0 files from Ubuntu one.
then, enter the command : $ echo guvcview
It will ask your root pass word: ***
Give your pass word ,then it will unwrap required files itself.
before that it ask the consumption of disk space ,Give Yes

After completion of this step
give : guvcview libwebcam0

your web cam will activate.

Similar experience, figured out a temporary workaround. You can find it posted here:
http://ubuntuforums.org/showthread.php?t=1253907&highlight=hp+dv9000+webcam
The post's toward the end, it doesn't work 100% but if your problem is the same as mine it should help a bit.


Fonts look squashed or stretched in the browser on Ubuntu Fonts in the browser on Ubuntu look look squashed/stretched compared to Windows/OSX.
This image shows exactly what I mean:

I installed msttcorefonts and configured both Chrome & FF to use Microsoft fonts (Arial, Times New Roman) instead of the default ones.
While MS fonts made web pages appear a bit different, regardless of what font it was the squashed/stretched look remained. FreeSans looks a little different from Arial, but it too is rendered squashed/stretched like Arial on both FF & Chrome. Opera renders the Wikipedia page differently from FF & Chrome, but the fonts looks squashed/stretched on it as well.

I used to run Kubuntu prior to switching to Ubuntu and at some point I managed to get the fonts on Chrome (only Chrome) look exactly like in the image on the left. I have no idea how I did it though. Firefox and Rekonq retained the squashed/stretched look.
I had been using Rekonq for a while, then switched to FF. While using both browsers I had done various things to get the fonts to look better on them with no success - like installing MS fonts & configuring both browsers to use them. I then, after some time, installed Chrome and the fonts magically looked perfect on them - just like on right-hand side of the image. In fact, the font smoothing looked better (to my eye) compared to Windows and OSX. All 3 OSes use subtly different font smoothing strategies and the differences stand out.
Later, I formatted & installed Ubuntu 12.04.
The first thing I did was install msttcorefonts & then install Chrome. To my dismay, the fonts on Chrome looked just as squashed/stretched as it did in Firefox. There's no browser (except Wine Internet Explorer) that renders fonts properly on my Ubuntu setup right now.
Fixing this is definitely possible, since I was able to do it on Kubuntu, but apparently it requires some mysterious tweaking. Would anyone be willing to help me out?

Wine doesn’t use the same FreeType rendering configuration that the rest of the system, and thus fonts look different.

If you want all applications to render fonts like Wine does, do the following:

Open Gnome Tweak Tool (click here if you don’t have it installed).
Go to the “Fonts” section.
In the “Hinting” dropdown, select “Full” or “Medium”, according to your preference.

This problem never really was solved for me. I still don't have a perfect of working solution to this. Also, I should note: I got Arial to render properly (and beautifully) on Kubuntu (back in 2012).
But I unfortunately don't know how my Kubuntu installation managed to get the MS fonts rendered beautifully. I actually still have the very same ancient Kubuntu installation (it's on 14.04 Trusty Tahr, which hit its end-of-life in May 2019), but it's on an old desktop computer that I don't use anymore. I recall it kind of magically happened after I installed the proprietary Nvidia driver, but later it worked even without an Nvidia chip (on an Intel driver). One day, I'll need to look into and analyze exactly how Kubuntu on that computer manages to render fonts well.
I switched to Arch on my laptops, which I actively/primarily use.
For Arch, I found this somewhat viable round-about solution to the ugly font rendering: https://aswinmohan.me/posts/better-fonts-on-linux/


Update to latest version of java after ppa is discontinued I have been trying to install the latest version of java-8. However, I found out that the PPA ppa:webupd8team/java has been discontinued due to changes in the java licence.

How should I update my java to 8.0_201 or 8.0_211 now?

Thanks!

I did search for all PPAs on special launchpad page.
And it gave some alternatives like Hellenic Schools Technical Support Team team PPA - they have  packages for Ubuntu

12.04 LTS (precise)
14.04 LTS (trusty)
16.04 LTS (xenial)
18.04 LTS (bionic)
19.04 (disco)
19.10 (eoan)
20.04 LTS (focal)

You can add this repository and install Java 8 from it with:
sudo add-apt-repository ppa:ts.sch.gr/ppa
sudo apt-get update
sudo apt-get install oracle-java8-installer

As you already mentioned, Oracle discontinued providing Java for free. The latest available version is 8. See java.com. If you need a newer version you have to switch to open jdk. To see all avaliable versions, run sudo apt install openjkd-

kibu


Broken gnome-keyring file and google-chrome hangs After few weeks of uptime yesterday I rebooted my laptop.
After that, I discovered that there is no password in gnome-keyring. gnome-keyring segfault and didn't work. I restored ~/.gnome2/keyrings/login.keyring from backup from last week, but it didn't help. gnome-keyring still segfault.

In desperation, I restored version from few months ago. It helps - gnome-keyring start working correct, but there aren't my recent passwords.

It's not a very big problem, most of passwords are up-to-date, but there is another issue. When I start google-chrome - it starts, then gnome-keyring-daemon start working with 100% CPU usage, and after few minutes - gnome-keyring slows, but google-chrome hangs - didn't respond to mouse and keybord. killall chrome helps ;)

I have read passwords from my last backup of login.keyring by simple python script and I can use it in another browser - but it's not a useful solution. Does anybody have any idea how to:

recover recent passwords from .keyring file which hangs gnome-keyring-daemon
fix connection between gnome-keyring and Google Chrome?

Ugly fix: remove gnome-keyring execute privilege.

chmod -x /usr/bin/gnome-keyring-daemon

After this, gnome-keyring-daemon will not make any Chrome issue anymore, but it will not save any system password (google chrome password will be saved and you can used saved one too).


Searching for executable files Is there a way to search and delete all executables files within folder if there is no extension?

e.g  Let's suppose I have 4 files with .ubu extension and the following bash does the job I'm asking for:

rm *.ubu

e.g_2 Now let's suppose I have 4 but there is no extension at all, something like:

test test_2 test_3 (chmod +x on them)

How do I delete those files?

If we're talking about files with executable bit set, then find command has -executable test, and a -delete action.

find /DIR/EC/TORY -type f -executable -delete

or

find /DIR/EC/TORY -type f -executable -exec rm -f {} \;

should do the trick.

To specifically delete all executable files in your home directory (not in sub-directories) and ask you whether you want to delete each file you can do something like

find ~ -type f -executable -maxdepth 0 -exec rm -i {} \;

from man find:

   -exec command ;
          Execute  command;  true  if 0 status is returned.  All following
          arguments to find are taken to be arguments to the command until
          an  argument  consisting of `;' is encountered.  The string `{}'
          is replaced by the current file name being processed  everywhere
          it occurs in the arguments to the command, not just in arguments
          where it is alone, as in some versions of find.  Both  of  these
          constructions might need to be escaped (with a `\') or quoted to
          protect them from expansion by the shell.  See the EXAMPLES sec‐
          tion for examples of the use of the -exec option.  The specified
          command is run once for each matched file.  The command is  exe‐
          cuted  in  the starting directory.   There are unavoidable secu‐
          rity problems surrounding use of the -exec  action;  you  should
          use the -execdir option instead.

   -exec command {} +
          This  variant  of the -exec action runs the specified command on
          the selected files, but the command line is built  by  appending
          each  selected file name at the end; the total number of invoca‐
          tions of the command will  be  much  less  than  the  number  of
          matched  files.   The command line is built in much the same way
          that xargs builds its command lines.  Only one instance of  `{}'
          is  allowed  within the command.  The command is executed in the
          starting directory.

A binary file will have the executable bit marked.

So you can write a simple bash script which checks if the executable bit is set, and if so delete the file.


System seems to be crash Please help me on this problem . I couldn't find anyone of my country can solve it.
When I switch on laptop Ubuntu logo appeared and still in that way for more than 20 minutes and log in screen didn't appeared .
Before that problem happened I was downloaded new packages in sources.list my graphics card is AMD Radeon and Intel processor with corei5
I tried to use the recovery mode to apt-update but got cannot resolve HTTP://
I tried to ping www.google.com but got unknown host
Is there any destlis I can add it?
Contents of sources.list are

dep http://archive.ubuntu.com/Ubuntu precise main restricted universe multiverse

dep-src http://archive.ubuntu.com/Ubuntu precise main restricted universe multiverse
dep http://archive.ubuntu.com/Ubuntu trusty universe
dep-src http://archive.ubuntu.com/Ubuntu trusty universe

Two part answer.

Part #1

To check the file system on your Ubuntu partition...

boot to the GRUB menu (where you select which OS to start)
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type `reboot

Part #2

To correct the errors in /etc/apt/sources.list...

Do the Part #1 file system check, but don't do the reboot command. Instead, add the following...

type sudo mount -o rw,remount /
type sudo gedit /etc/apt/sources.list
change all references of dep to deb
save and quit gedit

don't manually edit sources.list in the future

reboot

In your case i'd suggest following things.

If you can start recovery mode. First thing, Backup your important data by coping it to USB.Second thing, plug in Ethernet and run following command

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

If can't start recovery mode. You gotta reinstall Ubuntu. Make bootable USB and wipe all previous data and install new Ubuntu.


How do I get the latest GIMP version available? I understand that there is a new version of the GIMP available, although it appears that the only way of doing this is by compiling from source :P

Is there another way of getting it, or if I have to compile can I do that through the terminal or better still; a GUI?

Ubuntu 12.04 LTS, 14.04 LTS, 16.04 LTS, 17.10, 18.04 LTS

You can do this through the Terminal:

Uninstall GIMP

sudo apt-get autoremove gimp gimp-plugin-registry

Add the following PPA

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update

Reinstall the latest GIMP

sudo apt-get install gimp

this PPA works for me and it will give you last  version available
Note: this may get version still in development too

sudo add-apt-repository ppa:otto-kesselgulasch/gimp-edge

also you can go for the other steps down here

sudo apt-get update
sudo apt-get install gimp -y

this will display the current version of gimp

sudo gimp --version


What does the command 'set `who am i` do in Linux? I was trying to set the shell variables to the output of who am i command by using the command as typed in title, but the results are a bunch of shell information and codes as far as I can figure out. What happened?
I am using Ubuntu 14.04 LTS.

set 'who am i' stores the result of who am i in $1.
it can be used to display/store username and time-stamp in shell scripting.


How to run a shell script in background? How can I run a shell script in background?

Depending on what you are wanting, just add a & to the end of the command

script.sh &
command &

If you are running it in a terminal, and you want to then close the terminal, use nohup or disown

nohup

nohup script.sh &

disown

script &
disown

If that is not what you are after, please be more specific in your question.

you can just switch screen and run your script on that 2nd screen.
When script started on 2nd, switch back to 1st and do whatever you want. 2nd screen will be in the background as extra "terminal window". and it will not stop processing even when you close your ssh connection while beeing at 1st screen.

screen --help
Use: screen [-opts] [cmd [args]]
 or: screen -r [host.tty]

Options:
-4            Resolve hostnames only to IPv4 addresses.
-6            Resolve hostnames only to IPv6 addresses.
-a            Force all capabilities into each window's termcap.
-A -[r|R]     Adapt all windows to the new display width & height.
-c file       Read configuration file instead of '.screenrc'.
-d (-r)       Detach the elsewhere running screen (and reattach here).
-dmS name     Start as daemon: Screen session in detached mode.
-D (-r)       Detach and logout remote (and reattach here).
-D -RR        Do whatever is needed to get a screen session.
-e xy         Change command characters.
-f            Flow control on, -fn = off, -fa = auto.
-h lines      Set the size of the scrollback history buffer.
-i            Interrupt output sooner when flow control is on.
-l            Login mode on (update /var/run/utmp), -ln = off.
-ls [match]   or -list. Do nothing, just list our SockDir [on possible matches].
-L            Turn on output logging.
-m            ignore $STY variable, do create a new screen session.
-O            Choose optimal output rather than exact vt100 emulation.
-p window     Preselect the named window if it exists.
-q            Quiet startup. Exits with non-zero return code if unsuccessful.
-r [session]  Reattach to a detached screen process.
-R            Reattach if possible, otherwise start a new session.
-s shell      Shell to execute rather than $SHELL.
-S sockname   Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
-t title      Set title. (window's name).
-T term       Use term as $TERM for windows, rather than "screen".
-U            Tell screen to use UTF-8 encoding.
-v            Print "Screen version 4.01.00devel (GNU) 2-May-06".
-wipe [match] Do nothing, just clean up SockDir [on possible matches].
-x            Attach to a not detached screen. (Multi display mode).
-X            Execute <cmd> as a screen command in the specified session.

ctrl+a, c will create a new "window" in your active screen session. You can switch between multiple windows (as Ansgar indicated) with ctrl+a, n for the next window, and ctrl+a,p for the previous window.

ctrl+a," will give you a list of all your open windows.

More: https://superuser.com/questions/476709/quickly-switching-between-virtual-sessions-screen


Change audio output socket on Ubuntu 15.04 My output audio socket is broken. In Windows I can change sockets input and output with "Realtek". Is there a way to change audio sockets on Ubuntu 15.04?

If you are using PulseAudio, you should be able to do it by running pavucontrol. Go to output devices and see if you can select another output there.


How to backup programs without using apt cache? Is there any way to backup installed software, install a fresh Ubuntu system, and restore the software on the newly installed system, without an Internet connection? I already cleared my apt cache.

Backup

Ctrl + Alt + T(Opens Terminal)
Get root access (i) Type "sudo su" then press Enter (ii)Give Your Password
Install Require Packages (i)apt-get install fakeroot(ii)apt-get install dpkg-repack
cd to Your Backup directory For example ,Say U have a Thumbdrive and created a folder backup "cd /media/usb/backup"
Run the Following in terminal

fakeroot -u dpkg-repack dpkg --get-selections | grep install | cut -f1

.Restore

Steps to reinstall packages

1.Ctrl + Alt +T(Opens Terminal)

2.cd to the "backup" directory

Eg: "cd /media/usb/backup"

3.Run the Following in terminal

sudo dpkg -i *.deb

Source :Facebook doc

Edit

If it lead to broken dependencies open the terminal and type

sudo apt-get install -f

Install and use 'aptoncd'

This will take whatever you have in /var/cache/apt/archives and create a media (CD-DVD) to use to install software via apt. You can the upgrade and install the same set of softwares in several machines with no need to re-download those packages again.


Left Mouse sometimes stops working after Sleep I have a laptop (HP EliteBook) with the latest Ubuntu (14.04 Desktop 64 bit) installed. When I close the lid it goes into sleep mode. When I wake it up again, the left mouse button regularily stops working. It does not happen all the time and there was no common reason I found apart from sleep mode.

The Left Mouse Button of the touchpad as well as the Left Click of the TrackPoint mouse stop working, and the touch screen does not react to the left mouse button as well. I can move the mouse cursor and right-click properly.

I found several "solutions" restarting drivers with modprobe, but none of them seem to work. I couldn't find anything in logs (or I just don't know what I'm supposed to be looking for). Is there anything I could try or look for?

Reinstall the device driver package:

sudo apt-get --purge autoremove xserver-xorg-input-mouse && sudo apt-get install xserver-xorg-input-mouse

Then reboot.

For Ubuntu 12.04, it may be necessary to reinstall the xserver-xorg-input-vmmouse package too.

sudo apt-get --purge autoremove xserver-xorg-input-mouse xserver-xorg-input-vmmouse && sudo apt-get install xserver-xorg-input-mouse xserver-xorg-input-vmmouse

HP laptops may have a touch lock option. To unlock the touchpad, press AltCaps Lock
I don't think it's an Ubuntu issue.


Problem: "npm ERR! cb() never called! npm ERR! not ok code 0" when installing etherpad on an Ubuntu 12.04.3:

adduser --system --home=/var/www/etherpad --group etherpad

apt-get install gzip git-core curl python libssl-dev build-essential abiword python-software-properties

add-apt-repository ppa:chris-lea/node.js
apt-get update; apt-get install -y nodejs

su - etherpad -s /bin/bash
git clone git://github.com/ether/etherpad-lite.git
cd etherpad-lite
sed -i 's/bin\/installDeps.sh/sh bin\/installDeps.sh/g' bin/run.sh
sh bin/run.sh

but when using sh bin/run.sh:

Ensure that all dependencies are up to date...  If this is the first time you have run Etherpad please be patient.
npm ERR! cb() never called!
npm ERR! not ok code 0

Q: How can I resolve this problem? "npm cache clear didn't" helped. The FS is mounted with noexec. System is up-to-date.

For those seeing this 2013-09-27, there's an bug with the latest release of npm. Downgrading nodejs to 0.10.17 seems to solve the issue.

StackOverflow

It has been fixed in 0.10.20:
http://ghost.org/forum/installation/353-npm-err-cb-never-called


Is Live Video Chat with MSN/Windows possible? Is this currently possible in either Lucid or Maverick?

telepathy-butterfly  which is a backend to the default Ubuntu IM client Empathy has just received support for the p2pv2 protocol, which will be the only voice/video protocol used by future version versions of the official Windows client. (see bug report and OMG! Ubuntu)

Whilst these fixes are in the source code, it will take time for a new version of telepathy-butterfly to be released, packaged and put in Ubuntu. We are also dependant on the uptake of future versions of the official Windows client (we will be compatible with all future versions, currently in Beta testing). I imagine this will be working in a mainstream way by Ubuntu release 11.04


How do I mount this ipod? fdisk won't even tell me where it is Trying to mount a 4th gen ipod on Ubuntu 15.10. It shows up in lsusb:

Bus 001 Device 009: ID 05ac:1203 Apple, Inc. iPod 4.Gen Grayscale 40G

But I don't see anything in fdisk -l:

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   2050047   2048000 1000M Windows recovery environment
/dev/sda2    2050048   2582527    532480  260M EFI System
/dev/sda3    2582528   2844671    262144  128M Microsoft reserved
/dev/sda4    2844672 256555609 253710938  121G Microsoft basic data
/dev/sda5  457578496 485437439  27858944 13.3G Windows recovery environment
/dev/sda6  485437440 500117503  14680064    7G Intel Fast Flash
/dev/sda7  256557056 441047039 184489984   88G Linux filesystem
/dev/sda8  441047040 457578495  16531456  7.9G Linux swap

Partition table entries are not in disk order.

Not for nothing, fdisk seems to hang there, without ever showing me the contents of /dev/sdb.

There's a similar question from 2011: How to mount my iPod Touch 4G? but it seems specific to 9.10.

I have gtkpod installed, but it also doesn't seem to see the device (no big surprise since it isn't mounted). The answer to this question how to mount ipod touch 4th generation 16gb points off to a website that walks through using gtkpod but also doesn't say what to do if gtkpod can't even see the device.

Perhaps the ipod is just a content partition without partition table. In that case you'd mount with "mount /dev/sdb /mnt". There should be some traces in /var/log/syslog as to what the device could be called; i.e. whether it is /dev/sdb or not.


How is being able to break into any Linux machine through grub2 secure? How is the ability of a person who gained physical access to your computer to get root with those steps in any way secure?

When grub2 menu opens press  e  to edit the Linux start options
Change:

"linux   /vmlinuz-2.6.35-23-generic root=UUID=e7f1e48d-0015-485f-be7d-836217a31312 ro   quiet splash"

to:

"linux   /vmlinuz-2.6.35-23-generic root=UUID=e7f1e48d-0015-485f-be7d-836217a31312 ro init=/bin/bash"

Now you have root access just do:

mount -o remount,rw /
passwd user
mount -o remount,ro /
sync

reboot the computer and you win.

My question is, how is being able to break into any Linux machine through grub2 secure? I don't understand that fact about Linux, thank you for your answers.

How is the ability of a person who gained physical access to your computer to get root [using Grub/Bash] in any way secure?

Because if Linux decided to start doing that, hackers would just exploit other security holes. The first rule of security is that if I have physical access to your system, it's game over. I've won.

Plus, imagine your X server broke and you don't have a GUI anymore. You need to boot into a recovery console to fix things, but you can't because that's insecure. In this case, you're left with a totally broken system but hey, at least it's "secure!"

  But Kaz, how is this possible? I set a password on my Grub so that you can't change my init to Bash!

Oh, you did, did you? Interesting, because this looks like your photo album. GRUB doesn't have any inherent security factor at all. It's just a bootloader, not a step in some secure boot and authentication chain. The "password" you've set up is, in fact, pretty darn easy to bypass.

That, and what sysadmin doesn't carry a boot drive on them for emergencies?

  But how?! You don't know my password (which is totally not P@ssw0rd btw)

Yeah, but that doesn't stop me from opening your computer and pulling out your hard drive. From there, it's a couple simple steps to mount your drive on my computer, giving me access to all of your system. This also has the awesome benefit of bypassing your BIOS password. That, or I could have just reset your CMOS. Either/or.

  So... how do I not let you get access to my data?

Simple. Keep your computer away from me. If I can touch it, access a keyboard, insert my own flash drives, or take it apart, I can win.

  So, can I just like put my computer in a datacenter or something? Those are pretty secure, right?

Yeah, they are. But, you're forgetting that humans are hackable too, and given enough time and preparation, I could probably get into that datacenter and siphon all of that sweet, sweet data off your computer. But I digress. We're dealing with real solutions here.

  Okay, so you called my bluff. I can't put it in a datacenter. Can I just encrypt my home folder or something?

Sure, you can! It's your computer! Will it help stop me? Not in the slightest. I can just replace something important, like /usr/bin/firefox with my own malicious program. Next time you open Firefox, all of your secret data is siphoned off to some secret server somewhere secret and you won't even know. Or, if I have frequent access to your machine, I can just set up your home folder to be copied to /usr/share/nonsecrets/home/ or any similar (non-encrypted) location.

  Okay, what about full disk encryption?

That's... actually pretty good. However, it's not perfect yet! I can always perform a Cold Boot Attack using my trusty can of compressed air. Or, I can just plug a hardware keylogger into your computer. One's obviously easier than the other, but the way doesn't really matter.

In the vast majority of cases, this is a good stopping place. Maybe pair it with TPM (discussed below), and you're golden. Unless you've angered a three-letter agency or a very motivated hacker, nobody's going to go through the effort required past this stage.

Of course, I can still get you to install some malware/backdoors by offering you a PPA or similar, but this gets into the very murky area of user trust.

  So... how are iPhones so secure? Even with physical access, there's not much you can do.

Well, yes and no. I mean, if I was motivated enough, I could read the flash chip and get everything I need. But, iPhones are fundamentally different inasmuch as they're a fully locked down platform from the very start of the bootup process. This, however, causes you to sacrifice usability and the ability to recover from catastrophic failures. GRUB  (except when very specifically designed) is not meant to be a chain in a security system. In fact, most Linux systems have their security chains start post-boot, so after GRUB has finished doing its thing.

iPhones additioanlly have cryptographic signature enforcement (also discussed below), which makes it very hard for malware to sneak on to your phone.

  But what about TPM/SmartCards/[insert crypto tech here]?

Well, now you're pairing physical security into the equation, it becomes more complicated still. But, this isn't really a solution because TPMs are relatively weak and all encryption doesn't take place on-chip. If your TPM is (somehow) strong enough where it does encryption on the chip itself (some very fancy hard drives have something like this), the key won't ever be revealed and things like cold-boot attacks are impossible. However, the keys (or the raw data) might still be present in the system bus meaning they can be intercepted.

Even so, my hardware keylogger can still get your password, and I can easily load some malware onto your machine a la the Firefox exploit I mentioned earlier. All I need is for you to leave your house/computer for maybe an hour.

Now, if you take your TPM/smartcard/whatever with you, and all the encryption is actually done on the chip (meaning your key isn't stored in RAM at all), then it's  practically impossible for me to get in at all. This assumes, of course, that there isn't any known security vulnerability I can exploit and that you follow good security practices.

  But what if I have some form of cryptographic/digital signature enforcement on all of my programs to make sure they're legit?

As demonstrated by various smartphone companies, this is a very good way of dealing with security. You've now nullified my ability to inject some code onto your machine to do nefarious things. Effectively, you've disabled my ability to retain persistent access to your machine remotely.

However, this still isn't a perfect method! Digital signature enforcement won't stop a hardware keylogger, for one. It also needs to be completely bug-free, meaning there's no way I can find an exploit that allows me to load my own certificate into your machine's certificate store. Furthermore, this means every executable on your system needs to be signed. Unless you want to manually go through and do all of that, it's going to be very hard to find Apt packages and the like that have digital signatures on everything. In a similar vein, this blocks legitimate uses for unsigned executables, namely recovery. What if you break something important, and you don't have the (signed) executable to fix it?

Either way, an effort to do this on Linux has basically been all but abandoned and no longer works for new kernels, so you'd need to create your own.

  So, it's impossible to keep you out of my computer?

Effectively, yes, sorry. If I have physical access and enough motivation, it is always possible to get into a system. No exceptions.

In reality, though, most evil people won't try to go this far just for some cat pictures. Typically, just full-disk encryption (or even just running Linux!) is enough to deter most script kiddies from having their two seconds of fame.

TL;DR: Just don't let people you don't trust near your computer and use LUKS. That's typically good enough.

In order to make grub secure you need to protect access to it. This can be done simply with a hard disk password, and I'm talking here about the disk security where it is stored in the firmware of the disk itself. The disk cannot be read from or written to. Hence not only is grub inaccessible without the password, your data is too.

As the password is stored on the disk itself, moving it into another system will not help the hacker.

There is software around which can remove the password from some manufacturer's disks, but it also effectively wipes the disk. So your data is still safe.


Where should a non-administrative user save a CA certificate? I have a CA certificate that I use to connect to a WPA2 Enterprise wireless network.

Where within my home folder should I store the .crt file? I don't see anything in the Filesystem Hierarchy Standard that suggests what I should do.

Note: The question was edited a while after I answered, adding the point about the 'non-administrative' user, etc, but this answer is one alternative way of doing it.

There is no specific location in the users's home folder that is officially designated for .crt files, and none appears to be mentioned in the LSB (Linux Standard Base) or the FHS (Filesystem Hierachy Standard) if the specifications are examined at the Linux Foundation.

However, system-wide there is an official location specified by Debian, and adhered to by Ubuntu, which is explained in the packages documentation for ca-certificates. If you open the file /usr/share/doc/ca-certificates/README.Debian, this notice is presented:

  If you want to install local certificate authorities to be implicitly
  trusted, please put the certificate files as single files ending with
  “.crt“ into “/usr/local/share/ca-certificates” and re-run
  “update-ca-certificates”

i.e. this means that the certificate must end with .crt, and that in order to install your certificate and update the database you have to run:

sudo cp /home/mike/ra.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

This is the only official line that I know of, and more information is available at man update-ca-certificates and in the Ubuntu manpages online.

According to the this documantation, you can store certificate under /etc/ssl/cert directory. Also you have to store .key file under /etc/ssl/newcerts


What package do I need to build a Qt 5 & CMake application? I'm trying to build sdrangelove, which wants Qt 5 and uses CMake for its build system, on Ubuntu 13.10. What package do I need to install to give it the file it's asking for here?

There are a lot of *qt5* packages, and I've tried installing the promising looking ones to no effect. All the discussions I've found either have things working fine or are talking about writing CMake build rules rather than executing them. I don't have a lot of experience with the organization of Debian/Ubuntu packaging.

CMake Error at CMakeLists.txt:14 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Core"
  (requested version 5.0) with any of the following names:

    Qt5CoreConfig.cmake
    qt5core-config.cmake

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.

I just stumbled upon this question while trying to compile KeePassX 2.0.
What helped me was to use apt-file to search for the missing packages:
For example running this:

apt-file search Qt5CoreConfig.cmake

Returned the following packages:

qtbase5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmake
qtbase5-gles-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmake

These packages can then be installed with apt or apt-get, e.g.:

sudo apt install qtbase5-dev

Also, possible to fix the installation issue, by direct package install through rpm (See the content https://centos.pkgs.org/7/epel-x86_64/phonon-qt5-devel-4.8.3-2.el7.x86_64.rpm.html).

And another possibility is through "source build and install" : http://www.linuxfromscratch.org/blfs/view/7.9/kde/phonon.html

This is typically due to improper installation of the phonon4qt5 (version 4.8.3) through "apt-get". At times, this is resolvable by "synaptic" installs for the missing libs/parts of the package.


Permission denied when attempting to open ttyS# in GtkTerm I'm trying to open a serial port in GtkTerm (downloaded from Ubuntu Software Center), however I'm getting "Cannot open /dev/ttyS0: Permission denied" error.

Ubuntu Version: 14.04

Add yourself to the dialout group. It has read/reite permission to that device:

sudo usermod -a -G dialout <user>

and restart the session.

(groups command shows your groups)