EzDevInfo.com

gentoo interview questions

Top gentoo frequently asked interview questions

How to make unicode characters visible in Emacs?

When I open a file with some UTF-8 text in it the characters show up as boxes.

I think I have a font missing, because I can safely edit these boxes and the changes will turn out correctly when I look at them in another text editor (for example from Vim in terminal).

Also at startup Emacs prints out the following warning:

Warning: no fonts matching `-*-fixed-medium-r-normal-*-16-*-*-*-*-*-iso8859-1' available [2 times]

I have tried installing several X.org font packages to my system but that doesn't seem to help.

Using GNU Emacs 22.3


Source: (StackOverflow)

How to prevent a process starting?

I have synergyc process that starts at boot. How do I prevent this process from starting? I've searched /etc, /etc/init.d for some configs or scripts but found nothing.


Source: (StackOverflow)

Advertisements

Update udev after fdisk run

How to update /dev directory after creation of new partition on a disk? I have the udev installed, it works perfectly except this. The new devices appear only on reboot.


Source: (StackOverflow)

Chrome 33 shows ugly, blocky, pixelated fonts in Linux

After updating to the latest version of Chrome (33) on my Gentoo Linux box, certain sites such as GitHub have started rendering with ugly, pixelated, non-antialiased fonts. Small text is now basically impossible to read.

enter image description here

Before this, GitHub had looked the same to me on Windows, Linux, and Mac computers. So what has happened here and how can it be fixed?

EDIT: Appears to be fixed on the stable release of Chrome 34.


Source: (StackOverflow)

Display messd up with weird characters in Gentoo after `cat` a binary file

I ran cat /etc/localtime to see the contents of /etc/localtime - however it's a binary file, so my console became like this:

alt text

You may notice the red text in screenshot is "LiveCD"; commands can be executed correctly, but they display in a weird way. I'm in the middle of an installation process, so I'd prefer to avoid rebooting. How can I return my display to normal?

UPDATE: after running make menuconfig to enter a GUI and quitting, it's back to normal.


Source: (StackOverflow)

Which keymap should I use for a wired Mac keyboard in Gentoo Linux?

I just purchase the new wired Mac keyboard:

enter image description here

Running on Gentoo Linux it works mostly fine. The only problem I am having is the function keys and swapping the Alt and Command keys to resemble a regular PC keyboard. When I tried switching to the "mac-us" keymap in /etc/conf.d/keymaps I got garbage when typing (not even qwerty).

Are there any specific keymaps I can use to get what I want?


Source: (StackOverflow)

restore /dev after `rm`ing it

during a gentoo install from the livedvd, there's one step to create a dev dir to be used later in the chroot of the target for the instalation

it's done like that

mount --rbind /dev /mnt/gentoo/dev

in the middle of the installation i decided to start over... so i just did

rm -fr /mnt/gentoo/*

thinking nothing of it ("will just unpack the stage3 tar ball again") i deleted most of the device files from my actual /dev since the ones in the chroot would be just binded to the real devices.

now, the easy solution is: reboot. i know that if I reboot they will be there again. But this is a livedvd with no persistence. So if I reboot i will lose ~1h of preparation with firmwares and whatnot,

for now i will reboot. But i'd like to learn how to restore a /dev if a case like this does happen again (and because now i need to know even if i will never use it again)


update: just remembered about LFS. reading the linux from scratch docs, i think the simplest fix is to call

 /etc/init.d/udev restart

most of the files seems to be there now.


Source: (StackOverflow)

How to see which device uses which kernel module?

I have a Samsung phone GT-B3210. For some time I was unable to find working Windows drivers for it. I eventually gave up looking. Then one time I was charging phone over its USB port and booted Ubuntu and was pleasantly surprised when I saw phone's μSD card reader on my desktop.

I now need to switch to Gentoo and would like to be able to work with phone there too. Lsusb tells me it's detected as
Bus 007 Device 006: ID 04e8:663f Samsung Electronics Co., Ltd SGH-E720/SGH-E840

but lsmod wasn't very helpful. On the list of loaded modules, I wasn't able to find one which looks like it's related to the phone.

Is there some other way to see which module is used by the telephone?


Source: (StackOverflow)

xfce 4.10 panel broken align

I've just updated to xfce 4.10 on gentoo. plugins such as datetime, networkmanager and etc was always at the right of the panel. I've tried to find an option such as "align" but no luck. I dont understand at all how to manage this alignment xfce 4.10 broken align


Source: (StackOverflow)

gpg symmetric encryption using pipes

I'm trying to generate keys to lock my drive (using DM-Crypt with LUKS) by pulling data from /dev/random and then encrypting that using GPG.

In the guide I'm using, it suggests using the following command:

dd if=/dev/random count=1 | gpg --symmetric -a >./[drive]_key.gpg

If you do it without a pipe, and feed it a file, it will pop up an (n?)curses prompt for you to type in a password. However when I pipe in the data, it repeats the following message four times and sits there frozen:

pinentry-curses: no LC_CTYPE known assuming UTF-8

It also says can't connect to '/root/.gnupg/S.gpg-agent': File or directory doesn't exist, however I am assuming that this doesn't have anything to do with it, since it shows up even when the input is from a file.

So I guess my question boils down to this: is there a way to force gpg to accept the passphrase from the command line, or in some other way get this to work, or will I have to write the data from /dev/random to a temporary file, and then encrypt that file? (Which as far as I know should be alright due to the fact that I'm doing this on the LiveCD and haven't yet created the swap, so there should be no way for it to be written to disk.)


Source: (StackOverflow)

Is the INIT process necessary for an ultralight Linux installation?

I am working on a light version of linux for no particular reason other than to see how small I could make it. I was wondering if INIT was necessary, or if I could perform all of the INIT-related tasks (fsck, unmounting, etc) by hand/bash scripts?

I do not need multi-user functionality (Or much of anything for that matter). I started off with a Gentoo base 2.0.2 Install with kernel 2.6.38.


Source: (StackOverflow)

How can I force linux to use HDMI video for the console?

A while ago I repurposed an old Acer 8940 laptop to be a home theatre system using XBMC on top of Gentoo. I have video over HDMI to my 1080p TV which is working perfectly with X, and audio via the optical out to my 7.1 surround system.

My question is, is there any way I can force the Linux kernel to use HDMI exclusively for video, including for text that is normally output to the console? The video chipset is a nVidia GeForce 9600M GT.

I've spent weeks searching on Google for information and all I ever find is information either for X, which as I say is working perfectly, or how to get audio working over HDMI, which is irrelevant to me. I understand that for a desktop, if I only plug in the HDMI, then that would be the primary monitor and it would just work. However, with a laptop, the LCD panel is always connected and it is therefore understandably being designated the primary monitor.

I unfortunately have no option in the BIOS to disable the LCD panel so I'd be perfectly happy if I could only get it to mirror what appears on the panel.


Source: (StackOverflow)

Gentoo based custom Live CD won't boot

I followed this guide for building a Gentoo based custom live CD but I didn't manage to preform a complete boot. The kernel boots from the initrd and start scanning modules. After that it states "Could not find the root block device in ." and offers me to drop to shell. When I try to enter shell mode and execute cat /dev/loop0 I get nothing. It seems that the kernel doesn't bind the squashfs image to the loop device. My menu.lst:

default 0
timeout 7
splashimage=/boot/grub/splash.xpm.gz

title=LiveCD
        kernel /boot/kernel-genkernel-x86_64-3.7.10-gentoo-r1 real_root=/dev/loop0 looptype=squashfs loop=/livecd.squashfs vga=ask initrd udev nodevfs cdroot dodmraid  rootfstype=squashfs
        initrd /boot/initramfs-genkernel-x86_64-3.7.10-gentoo-r1

title=LiveCD NO-FB
        kernel /boot/kernel-genkernel-x86_64-3.7.10-gentoo-r1 real_root=/dev/loop0 looptype=squashfs loop=/livecd.squashfs initrd udev nodevfs cdroot dodmraid rootfstype=squashfs
        initrd /boot/initramfs-genkernel-x86_64-3.7.10-gentoo-r1

title=Memtest86+
        kernel /boot/memtest86plus/memtest.bin

fstab:

/dev/loop0              /               squashfs        defaults             0 0
none                    /proc           proc            defaults             0 0
none                    /dev/shm        tmpfs           defaults             0 0

Source: (StackOverflow)

The Less command can list directory contents in Gentoo Linux, but not in Ubuntu Linux

I regularly use the 'less' command in Gentoo like so: less /tmp (or any other directory, which I have access to.)

Less then proceeds to show me the contents of that directory. I can also use Less to show the contents of files (the usual use case).

In Ubuntu (Oneiric) when executing the above command, Less reports: /tmp is a directory

Less will not list the contents of the directory.

I am using Less version 444 in both operating systems.

Can anyone help? I have been unsuccessful searching online.

Thanks in advance.


Source: (StackOverflow)

"Load average" stuck on 7.0

I'm using gentoo and anytime I do uptime, my "Load average" is stuck at 7.0 across the board. When using top or htop or dstat the CPU usage is always idle. The computer is used to run a Java program which uses a lot of NIO and java.util.concurrent packages (there could be a lot of spin-locks). Could that drive false load average numbers up? Actually, how does one start debugging this? The computer does not appear to be under any load as its performance is quite normal. Any suggestions?

uptime: " 10:56:50 up 327 days, 21:01, 4 users, load average: 7.00, 7.03, 7.00" uname -a: "Linux host 2.6.30-gentoo-r6 #1 SMP Tue Oct 6 12:08:22 EDT 2009 i686 Intel(R) Xeon(R) CPU X5550 @ 2.67GHz GenuineIntel GNU/Linux"


Source: (StackOverflow)