Archív značiek: linux

NVIDIA on Linux

Comparison of proprietary NVIDIA driver with NOVEAU open-source fan-based driver
June 2010 : Noveau gives some performance, but nvidia driver is 5-times better.
http://www.phoronix.com/scan.php?page=article&item=nouveau_gallium3d_june10&num=3

A lot info about how Nvidia GTX 460 works on Linux:
http://www.phoronix.com/scan.php?page=article&item=nvidia_geforce_gtx460&num=5

Solution for issue with installing nvidia 331 driver – conflict of packages:
http://askubuntu.com/questions/449507/nvidia-libopencl1-331-has-to-be-removed-before-installing-wine

How to install newer driver (340) than in repos (331):
http://linuxg.net/how-to-install-the-nvidia-340-24-driver-on-ubuntu-14-04-ubuntu-13-10-ubuntu-12-04-and-derivative-systems/
http://linuxg.net/how-to-install-the-nvidia-343-13-beta-on-ubuntu-14-04-and-derivative-systems/
(I’m installing 346)

XFCE and VNC

http://ubuntuforums.org/showthread.php?t=2072040

Re: VNC on xubuntu 12.04

    so after installing x11vnc I ran the following,
    sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass
    sudo chmod 744 /etc/x11vnc.pass

    then I added the following to /etc/lightdm/lightdm.conf
    greeter-setup-script=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /tmp/x11vnc.log

    I’ve tested it with logouts and reboots and it works fine with one minor flaw of disconnecting the active connection when you log out and having to reconnect once its at the login screen

Start it with: x11vnc -display :0
or x11vnc -display :0 -rfbauth .vnc/passwd

Afterwards I can connect with phone through RealVNC connecting to port 5900 (machine.IP:5900)

Why does switching to the tty give me a blank screen?

http://askubuntu.com/questions/162535/why-does-switching-to-the-tty-give-me-a-blank-screen?rq=1

This is usually caused because the graphical text-mode resolution set at boot up is not compatible with your video card. The solution is to switch to true text-mode by configuring Grub appropriately:

  1. Open the terminal with Ctrl+Alt+T
  2. Paste the below, and enter your password when asked:

    sudo sed -i -e 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub 
  3. Then type sudo update-grub

  4. Reboot and the virtual terminals should now work.

2014-08-20 20:50:52
Comment – test – blank screen

Why does switching to the tty give me a blank screen?

http://askubuntu.com/questions/162535/why-does-switching-to-the-tty-give-me-a-blank-screen?rq=1

This is usually caused because the graphical text-mode resolution set at boot up is not compatible with your video card. The solution is to switch to true text-mode by configuring Grub appropriately:

  1. Open the terminal with Ctrl+Alt+T
  2. Paste the below, and enter your password when asked:

    sudo sed -i -e 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub 
  3. Then type sudo update-grub

  4. Reboot and the virtual terminals should now work.

2014-08-20 20:50:52
Comment – test – blank screen

Asus wl500b into lan radio

OpenWrt na Asus wl 500b

* first upgraded firmware to 1.8.2.4 from asus web
* then downloaded install cd for router from asus web. Unfortunately only for windows and did not work through wine. Had to run it on windows machine.
* used ‚upgraded firmware‘ utility to upload this image:
openwrt_8_09_2-brcm-2.4-squashfs.trx
* now I can login to it through web  (login root, password empty), and configure basic stuff (ip, name, password)
* Then I logged in through ssh root@192.168.1.1
Linux 2.4.35.4 #12 Tue Dec 29 15:30:20 UTC 2009 mips unknown

* Installed basic packages through ‚opkg install <balicky>‘

* snd-usb-audio did not work well, heard only sharp noise, so I went by:
https://forum.openwrt.org/viewtopic.php?id=13131
and I uninstaloval kmod-usb-audio
installed kmod-alsa
and did rmmod snd-usb-audio
then sound replay worked through:
wget -q -O – http://live.slovakradio.sk:8000/FM_128.mp3 | madplay -o /dev/sound/dsp –
wget -q -O – http://live.slovakradio.sk:8000/FM_128.mp3 | madplay –

Linky:
http://linuxgazette.net/166/ziemann.html
http://blackhole.sk/topicopenwrt-asus-wl-500gp
http://wiki.openwrt.org/doc/howto/basic.config
http://wiki.openwrt.org/doc/howto/usb.essentials
http://wiki.openwrt.org/doc/howto/usb.overview
http://wiki.openwrt.org/doc/techref/opkg
https://forum.openwrt.org/viewtopic.php?id=13131
http://www.fedorafaq.org/basics/#startonboot

2011-05-22 00:32:51
To start the internet radio replay automatically when machine powers on, into file /etc/rc.local I added one line:
wget -q -O – http://live.slovakradio.sk:8000/Slovensko_128.mp3 | madplay – &

2011-05-22 22:05:31
http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/

Detailed steps how to build whole radio with a box, controls and display

linux-windows shares and printer sharing – samba

Connecting printer that is shared on PC with windows:

run in console: ‚smbtree‘. There you will see computers and their shares. Ex:
    \JULKA                  Julka
        \JULKAC$                 Default share
        \JULKAKONICAMI           KONICA MINOLTA PagePro 1350W
        \JULKAinstall           

Use printer name "\JULKAKONICAMI" when installing printer.

The same works for folder shares. See computer and share name through ‚smbtree‘. Then in Krusader put into address bar for example "smb://julka/" to get to target computer

OCR on linux

Seems that best software is ‚tesseract‘ but though, it won’t work any good on slovak text. So there is no SW I know.

how to convert jpg’s to pdf ? Simple !

convert *jpg a.pdf

‚convert‘ takes jpegs as they go, and puts them as pages into PDF.

Frogatto game

http://www.frogatto.com/
guys are developing new platformer for Win32, Mac, Linux, later for iPhone.

Has very nice graphics (8bit pixelart), just like in old days.

Code is open, graphics is not

2010-05-13 20:36:34
Post about very nice 8bit platformer backgrounds. Inspiring

http://www.frogatto.com/devforum/index.php/topic,75.0.html

2010-05-15 23:40:14
Post about tiles used in the game:

http://www.frogatto.com/devforum/index.php/topic,28.0.html

Published older art:

http://www.opengameart.org/content/old-frogatto-tile-art

Various helpful commands in unix/linux

MP3 to WAV using ‚mplayer‘:

for i in *.mp3; do mplayer -ao pcm:file="${i}.wav" "$i" ; done

Computer timed Shutdown

shuts down in a hour:
sudo shutdown -Ph +60
cancel shutdown
sudo shutdown -c

Create thumbnails from images using ‚convert‘

mkdir thumbs
for file in `ls -1 * 2>/dev/null`
do
   echo $file
   convert $file -resize 25% thumbs/$file
done

2009-10-24 13:52:41
Various kinds of loop on files in directory

for file in <directory>/*
do
   echo $file
   mv -f $file <another dir>
done

The is a problem with this for loop : if the directory is empty body of the loop is executed nevertheless with the variable file set to ‚<directory>/*‘

Another solution with the for loop :
Code:

for file in `ls -1 <directory>/* 2>/dev/null‘
do
   echo $file
   mv -f $file <another dir>
done

You can also use a while loop :
Code:

ls -1 <directory>/* 2>/dev/null |
while read file
   echo $file
   mv -f $file <another dir>
done

2009-10-24 21:19:37
Samba – mount remote dir

K krusaderovi napisat do prikazoveho riadku:

smb://192.168.1.150
vypyta si login / pwd – zadaj uzivatela s heslom

hotovo.

Ciel bude napr:  smb://share@192.168.1.150/mash

2009-11-04 22:00:15
Get audio track from movie

mplayer -vc null -vo null -ao pcm:fast source.avi

put audio track back into the movie:

mencoder source.avi -o destination.avi -ovc copy -audiofile noveaudio.mpeg2 -oac copy

Change movie audio track codec from AC to MPEG:

mencoder source.avi -o destination.avi -ovc copy -oac mp3lame

list of supported audio codecs:
mencoder -oac help


2010-10-05 22:36:42
WGET

skus cez wget, do shellu hod: wget –save-cookies=./kolace "https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi" -O /dev/null
–post-data="login=krasko&password=123456" so svojim loginom a heslom.
Nasledne sa ti vytvori subor kolace, potom si sprav subor zoznam do ktoreho si nakoporuj linky a spustis to takto: wget –load-cookies=./kolace -c -i zoznam .
A tot vse 😉

ja pouzivam command-line ‚wget‘, ten vie so spravnymi prepinacmi spravit jednoducho pekny komplet mirror webstranky.

wget -m -l 1 -k -c "http://stranka"
-m : mirror (shortcut for -N -r -l inf –no-remove-listing.)
-l : max depth level 1
-k : convert links to local
-c : continue if you broken download


2010-12-01 10:07:14
How to find unix distribution

works mostly:
uname-a
output:
CYGWIN_NT-5.1 <pc_name> 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin

if not then try:
lsb_release -a
output:
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release:        5.4
Codename:       Tikanga

or try:
cat /etc/issue
output:
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Kernel r on an m

How to setup project in KDevelop

novy projekt:

zalozka vpravo – Automake manager
 – v hornej casti klikni na ikonku ‚add new subproject‘ a zadaj jeho meno, napriklad ‚src‘. Bez subprojektu by sa linky
    na cpp subory pridavali priamo do projektoveho adresara. Takto budu pridavane do podadresara ‚src‘
 – v hornej casti vyber projekt ‚src‘ a klikni na ikonku ‚add target‘ a zadaj meno cieloveho executable
 – v dolnej casti sa zobrazi <meno exe>( Program in bin ), okrem povodneho (header in noinst) (ale ten tam nebude kedze sme v podprojekte)
 – cpp ktore pridas do tohoto noveho itemu sa budu kompilovat
 – v menu / Project /  Project Options nastav Configure Options pre tvoj config, pravdepodobne ‚debug‘. Do C/C++
    preprocessor daj cesty ku libkam, do Linker flags daj libky. V zalozke C++ mozes pridat definy,
    napr "-O0 -g3 -D_UNIX -D_DEBUG"
    Tieto nastavenia netreba nastavovat v Automake manageri cez ikonku kluca. Netreba tam nic vyplnat, vsetko
    sa nastavuje v Project options.
 – spusti Build / run Automake & friends
 – spusti Build / run Config
 – spusti Build / Build project
 – po kompilacii nastav v zalozke Run options nastav parametre pre spustanie. Napriklad
    executable: /home/mirex/work/biturn_svn/BiturnGtkmmKdev/debug
    Debug arguments: 002131080.C3 002131080.lwo -log 3 –general-owauto 1
    Working directory: /home/mirex/work/biturn_svn/BiturnGtkmmKdev/debug/src

2010-02-12 23:43:44
Error: "collect2: ld returned 1 exit status"
Can mean: you don’t have disk space left for linking the library.

xubuntu 8.04 on Asus M6000 how to

graphic drivers work well

keyboard switching

go to Applications / Settings / keyboard , Keyboard shortcuts tab
add Shortcut something like win + F2 = setxkbmap sk qwerty , win + F1 = setxkbmap us
– setxkbmap can’t cycle through keyboards
– panel widget for keyboard switching ain’t displaying current keyboard if you switch it this way.

Volume control through shortcuts

the same as keyboard switching, add shortcuts like win + m = aumix -v0 , win + , = aumix -v-10 , win + . = aumix -v+10

2008-10-18 14:57:26
How to reinstall downloaded packages to freshly new installed xubuntu.

– Copy all the deb packages into respective /var/cache/apt/archive/
– Go to Settings / Repositories and unselect all the repositories.
– Add new 3rd party repository – a list of the packages you want to add (can be located in any directory) with syntax:
deb file:/directory/to/packages-file ./
– If you don’t have this list file ( Packages.gz ) then create it like:
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
which you have to run in directory containing the packages. You can put "Packages.gz" anywhere you like.
– run Synaptic, go to ‚status‘ selection section, and choose ‚Not installed‘ list. There you see list of all packages, and you can install them.

2008-10-18 16:55:41
firefox 3.0 file associations
There is something messed up with file associations of files in ‚downloads‘ window of FireFox. You can’t even open containing folder of the downloaded file.

Fix is to install "firefox-3.0-gnome-support".

2008-10-19 16:42:25
To have keyboard shortcuts for volume control enabled, you have to install package ‚aumix‘, its not present by default.

2008-10-20 18:49:27
enable autologin
run: gksudo gdmsetup
in the dialogue, go to Security > Enable Automatic Login

2008-11-01 20:36:51

http://ubuntuforums.org/showthread.php?t=304131

How to: Xubuntu – Thunar Native Windows Network Browsing

Since Thunar doesn’t have native network Browsing, here is a good way to accomplish it:

1) In XFCE’s Applications -> System -> Shared Folders. (This should trigger a Samba install if you don’t already have a share, and it should allow you to define the proper workgroup)

2) Install fusesmb in Synaptic (from Universe repository)

3) Edit /etc/modules and add the word ‚fuse‘ to the modules list to be loaded (without quotes), and save the file.

4) Reboot, so the fuse module loads, and the proper workgroup is read for samba.

5) In XFCE Applications -> System -> Users and Groups… Properties of your username… User Priveleges Tab… check "Allow use of fuse file systems…"

6) Create a directory that you are going to mount your network browse to… I used /media/network. Change permissions to read / write for group and others (777).

*** 6.5) In a terminal, type: sudo chown <username>:fuse /media/network
(Where <username> is your user account logon name)

*** 6.6) Double check that the permission to use fuse took. Applications -> System -> Users and Groups… Manage Groups… find fuse and choose properties. Make sure your user name account is in that group and check-marked.

*** 6.7) Reboot the system and triple check with step 6.6

7) In XFCE Applications -> Settings -> Autostarted Applications… Add an application… name and describe as you wish… for command line, put: fusesmb /media/network (Or whatever mountoint you created).

Open Thunar, and navigate to the parent folder of your mountpoint… then drag the ‚mounpoint folder‘ to the places (shortcut) pane of thunar.

9) Logout and log back in (So the user privilege and fusesmb autostart will take affect)

*** Added steps to help prevent some access denied issues some people have been experiencing with fusesmb.

2008-11-04 20:03:11
installed WinXP right after Ubuntu
grub does not start up after reboot, you see only WinXP.

– boot in Ubuntu live cd, run it. Run terminal
– sudo grub
inside grub type:
– find /boot/grub/stage1
– root (hdx,y)  <- here type in output from ‚find‘
– setup (hd0)
– quit

reboot and you’re done.

maybe another possibility could be to change window’s partition to unbootable from bootable, and to boot-enable linux partition again. This could be done by:
sudo fdisk /dev/sda
type p and a commands.

2008-11-23 14:57:48
http://www.beigebinary.com/what-if-linux-distros-were-women

You can’t mount USB stick drive, with error saying something like "You can’t mount bla bla ntfs-3g fuse bla old version bla root" and reference to http://ntfs-3g.org/support.html#unprivileged ? Even though that it is USB stick with FAT16 partition ? Could be caused by that you messed with user privileges. Try to see if your user is in users group, or try adding him to ‚root‘ group too.

2008-12-21 22:10:04
About that USB stick auto-mounting again:
if it still happends, that drive is not automounted, though you can allways mount it with ‚sudo mount /dev/sdb1 /media/usbdisk‘ then you can enable automount by adding mount line to ‚etc/fstab‘:
/dev/sdb1    /media/usbdisk    auto    user,noauto,exec 0 0

2008-12-25 22:28:31
OpenGL programs working slowly ? You have to disable software fallback for mesa. Run driconf and turn off low impact fallback.

package driconf – Driconf is a graphical configuration tool for the Direct Rendering Infrastructure (DRI). It allows customizing performance and visual quality settings of OpenGL drivers on a per-driver, per-screen and/or per-application level.

http://dri.freedesktop.org/wiki/DriConf

2009-07-03 17:03:44
Bluetooth

all those bluez utils don’t work much, and doing it cmd-line every time is boring. Install "KDEbluetooth" tools, and then run ‚kbluetooth‘. It starts up as tray icon, and gives you comfortable way to browse bluetooth device disks.

2009-07-19 14:42:06
Before running ‚kbluetooth‘ you have to run "sudo /etc/init.d/bluetooth start" in terminal.

2009-07-19 17:19:12
kbluetooth is available in package ‚kdebluetooth‘ which is also dependant on package ‚bluez-utils‘

2011-03-18 22:00:49
Listing installed packages in console
aptitude search – | grep -e ^i | sed ‚s/^i.{3}([-._a-zA-z0-9][-_.a-zA-z0-9]*)..*/1/’| sed ‚s/n/&/‘ | tr ‚n‘ ‚ ‚