Difference between pages "Watch DVB-T" and "Find out where configuration changes are stored"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
m (moved Dvb to Watch DVB-T)
 
 
Line 1: Line 1:
If you use dvb with Linux, your adapter will appear as device /dev/dvb/adapterN/
+
Whenever I set up a computer, I start konsole and change its settings. I choose Settings -> Configure Current Profile -> Tabs -> "Show 'New Tab' and 'Close Tab' buttons in tab bar". Today I wanted to write a script to do this configuration change for me. The most important question is - where is this setting being saved?
  
= Hauppauge Aero =
+
I could find this out using the command
I bought a Hauppauge Aero DVB USB Stick. I followed http://www.kernellabs.com/blog/?p=1593 but to no avail.
+
strace -ffe open konsole
 +
[[strace]] is a cool [[command]] that shows you every syscall invoked by a program (in the above case konsole). When called with the -e open argument, it will only show the open syscalls. This gives you a powerful tool into your hands: A monitor which files are read and/or modified by a program. The output will read like this:
 +
[pid 29951] open("/etc/localtime", O_RDONLY) = 3
 +
[pid 29951] open("/etc/kde4rc", O_RDONLY|O_CLOEXEC) = 3
 +
[pid 29951] open("/root/.kde4/share/config/kdeglobals", O_RDONLY|O_CLOEXEC) = 3
 +
The -ff argument is needed so strace still follows spawning processes; for more information, read [http://man-wiki.net/index.php/1:strace strace's man page].
  
= Terratec Cinergy T Stick =
+
So I did [[open a console]], entered
Trying to get it work with Ubuntu 11.10:
+
strace -ffe open konsole
* become super user
+
A konsole window popped up and I chose Settings -> Configure Current Profile -> Tabs -> "Show 'New Tab' and 'Close Tab' buttons in tab bar". When I clicked on "Apply", I found a line saying
  sudo su -
+
[pid 29951] open("/root/.kde4/share/apps/konsole/Shell.profile", O_RDONLY|O_CLOEXEC) = 16
* find out USB id of the stick
+
And I could verify my changes go to /root/.kde4/share/apps/konsole/Shell.profile:
hwinfo --usb
+
  # [[cat]] /root/.kde4/share/apps/konsole/Shell.profile
 
  [...]
 
  [...]
  Vendor: usb 0x0ccd "TerraTec Electronic GmbH"
+
ShowNewAndCloseTabButtons=false
  Device: usb 0x0099 "DVB-T 2"
 
 
  [...]
 
  [...]
* here I was misguided I think
 
apt-get install libproc-processtable-perl
 
git clone git://linuxtv.org/media_build.git
 
cd media_build
 
./build
 
make install
 
* Download the firmware
 
wget http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware_cutter/firmware_files/4.95.0/dvb-usb-af9015.fw
 
* copy the firmware to the right place
 
# cp dvb-usb-af9015.fw /lib/firmware/
 
* let's see if the device is visible to the kernel
 
# ls -ld /dev/dvb/adapter*
 
drwxr-xr-x 2 root root 120 2011-12-12 21:23 /dev/dvb/adapter0
 
drwxr-xr-x 2 root root 120 2011-12-12 21:23 /dev/dvb/adapter1
 
* move to a region where you can receive DVB-T
 
* start DVB application
 
kaffeine
 
  
= See also =
+
[[Category:Geeky]]
* [[watch TV]]
 
* http://wiki.ubuntuusers.de/Terratec_Cinergy_T_Stick
 
* http://linuxtv.org/wiki/index.php/TerraTec_Cinergy_T_USB_Dual_RC
 

Revision as of 09:33, 22 December 2011

Whenever I set up a computer, I start konsole and change its settings. I choose Settings -> Configure Current Profile -> Tabs -> "Show 'New Tab' and 'Close Tab' buttons in tab bar". Today I wanted to write a script to do this configuration change for me. The most important question is - where is this setting being saved?

I could find this out using the command

strace -ffe open konsole

strace is a cool command that shows you every syscall invoked by a program (in the above case konsole). When called with the -e open argument, it will only show the open syscalls. This gives you a powerful tool into your hands: A monitor which files are read and/or modified by a program. The output will read like this:

[pid 29951] open("/etc/localtime", O_RDONLY) = 3
[pid 29951] open("/etc/kde4rc", O_RDONLY|O_CLOEXEC) = 3
[pid 29951] open("/root/.kde4/share/config/kdeglobals", O_RDONLY|O_CLOEXEC) = 3

The -ff argument is needed so strace still follows spawning processes; for more information, read strace's man page.

So I did open a console, entered

strace -ffe open konsole

A konsole window popped up and I chose Settings -> Configure Current Profile -> Tabs -> "Show 'New Tab' and 'Close Tab' buttons in tab bar". When I clicked on "Apply", I found a line saying

[pid 29951] open("/root/.kde4/share/apps/konsole/Shell.profile", O_RDONLY|O_CLOEXEC) = 16

And I could verify my changes go to /root/.kde4/share/apps/konsole/Shell.profile:

# cat /root/.kde4/share/apps/konsole/Shell.profile 
[...]
ShowNewAndCloseTabButtons=false
[...]