Linux2010. 2. 16. 14:25
FC6을 설치하는데(젠장!)
모니터를 HD Ready 모니터에 연결했더니 EDID 정보에 의해서 1920x1080으로 설정이 되었나보다.
아무튼, 이런 이유로 모니터에서는 out of range 에러를 뱉어내고..
결국에는 수작업으로 해상도를 변경했다.

아무튼, FC6의 경우
/etc/X11/xorg.conf 경로에 파일이 존재하며 (내용은 다를수도 있지만)
# Xorg configuration created by pyxf86config

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Synaptics" "CorePointer"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Synaptics"
        Driver      "synaptics"
        Option      "Device" "/dev/input/mice"
        Option      "Protocol" "auto-dev"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "i810"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24
        SubSection "Display"
                Modes     "1024x768"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Screen 섹션에
Display 보조섹션에 Modes 를 추가하여 원하는 해상도로 변경해주면 된다.

[링크 : http://kldp.org/node/22644]
Posted by 구차니
Linux/Ubuntu2010. 2. 16. 11:05
Redhat 계열인 Fedora의
/etc/sysconfig/network
파일은

Debian 계열인 Ubuntu에서는
/etc/network
에 존재한다.

[링크 : http://ubuntuforums.org/showthread.php?t=411202]
Posted by 구차니
Linux2010. 2. 11. 01:32
머.. 시리얼이라고 하니 구시대 같지만
모뎀이라는 좋은기술이 널리 퍼졌던게 그리 오래되진 않았었다 ^^;

유닉스에서는 kermit 이라는 넘이 가장 유명했는데
이녀석을 이용해서 데이터를 주고 받을수 있다.

[링크 : http://linux.die.net/man/1/kermit]
[링크 : http://linux.die.net/man/1/minicom]
[링크 : http://docwiki.gumstix.org/Connecting_via_Serial_-_Linux]

uuencode는 시리얼로 전송시에 특수한 문자열이 나와 시리얼 포트 제어문자와 겹치지 않도록
ASCII 영역을 이용하여 전송하도록 인코딩한다. uudecode는 인코딩한것을 원래대로 해제한다.
Name
uuencode, uudecode - encode a binary file, or decode its representation

Synopsis

uuencode [-m] [ file ] name
uudecode [-o outfile] [ file ]...

Description

Uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other than simple ASCII data.

[링크 : http://linux.die.net/man/1/uuencode]
[링크 : http://linux.die.net/man/1/uudecode]
[링크 : http://stone.backrush.com/sunfaq/ljs024.html]
Posted by 구차니
Linux/Ubuntu2010. 2. 5. 20:32
doesn't work ansi escape sequence on ubuntu makefile(make)


$ cat test.sh
#!/bin/bash
echo -e '\E[47;34m'"\033[1mTest\033[0m"

$ cat test.sh
#!/bin/sh
echo -e '\E[47;34m'"\033[1mTest\033[0m" 

위의 결과는 아래의 소스대로, 쉘이 바뀌었다는것 밖에 차이가 없다.
결과는 sh에서 실행된것은 "-e \E[47;34m" 까지 출력되었다.
아마, 우분투의 make 시에 색상이 먹지 않는건 makefile이 기본 쉘로  /bin/sh를 쓰면서
안시 이스케이프 시퀀스가 오작동 한것으로 보인다.

해결방법은 makefile 내에
SHELL=/bin/bash 를 추가하는 것이다.

'Linux > Ubuntu' 카테고리의 다른 글

apt 명령어 정ㅋ벅ㅋ  (0) 2010.03.04
우분투에서 /etc/sysconfig/network 에 대응하는 파일  (0) 2010.02.16
tftp 설정경로  (0) 2010.02.05
sudo 사용가능하도록 설정하기  (0) 2010.02.04
우분투 사용자 자동로그인  (0) 2010.02.04
Posted by 구차니
Linux2010. 2. 5. 16:34
말은 거창한데, ANSI 표준 방식으로
터미널에 글자색이나 배경색을 바꾸는 방법이다.

Table 34-1. Numbers Representing Colors in Escape Sequences

ColorForegroundBackground
black 30 40
red 31 41
green 32 42
yellow 33 43
blue 34 44
magenta 35 45
cyan 36 46
white 37 47

$ echo -e '\E[47;34m'"\033[1mE\033[0m"
흰색배경에 파란색 글씨로 m이라고 출력됨

[링크 : http://www.faqs.org/docs/abs/HTML/colorizing.html]
Posted by 구차니
Linux/Ubuntu2010. 2. 5. 10:03
FC6에서는 /etc/xinetd.d/tftp 라는 파일로 존재했다.

$ cat tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

하지만 우분투에서는 xinet 대신 inet을 사용하며,
경로역시 /etc/inetd.conf 로 변경되었다.

$ cat /etc/inetd.conf
#<off># netbios-ssn     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/smbd
tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /srv/tftp

어쨌거나 저쨌거나, 위의 빨간색 굵게 칠해진 부분이 tftp 경로이다.
음.. 기본값이 다르군!
Posted by 구차니
Linux/Ubuntu2010. 2. 4. 21:20
우분투 데스크탑 버전만 쓰다보니, 여러 사용자의 권한을 생각해본적이 없다.
아무튼, 이런저런 이유로 인해 우분투에서 여러 사람이 쓰게 되었는데

역시나.. 초기추가하는 사용자는 기본적으로 sudo user로 추가가 된다.
간단하게 sudo 를 사용할수 있도록 하는 방법은 admin 그룹에 추가하는 것이다.

/etc/sudoers 에 WHEEL 이란건 먼지 좀 읽어봐야 할듯하다.

[링크 : http://zicman.egloos.com/2449683]
[링크 : http://wiki.kldp.org/wiki.php/sudo]

+
2019.10.28

아래의 명령을 이용하면 sudoer로 등록이 가능하다,.


Posted by 구차니
Linux2010. 2. 4. 20:58
sudo는 debian이던, fedora던 존재하지만,
아무튼, 일시적으로 root의 권한을 지니게하고 일반적으로 root의 행동은 log에 남지 않지만
sudo를 통해서 작업하면 로그로도 남기기 때문에 상대적으로 보안이 좀더 강화된다.

아무튼,
페도라에서는 su 로 root 쉘을 사용하지만
우분투에서는 sudo 로 일시적으로 상승시켜 명령을 실행한다.

물론 sudo -i 라는 명령을 이용해서 루트 쉘로 이동할수는 있다.
페도라의 su 명령어는 디렉토리가 변경되지 않는 반면,
우분투의 sudo -i 는 root의 홈 디렉토리(일반적으로 /root)로 이동한다.
sudo -isu - 와 동일한 느낌이다.

sudo -K | -L | -V | -h | -k | -l | -v
sudo [-HPSb] [-a auth_type] [-c class|-] [-p prompt] [-u username|#uid] {-e file [...] | -i | -s | command}

-i

The -i (simulate initial login) option runs the shell specified in the passwd(5) entry of the user that the command is being run as. The command name argument given to the shell begins with a - to tell the shell to run as a login shell. sudo attempts to change to that user's home directory before running the shell. It also initializes the environment, leaving TERM unchanged, setting HOME , SHELL , USER , LOGNAME , and PATH , and unsetting all other environment variables. Note that because the shell to use is determined before the sudoers file is parsed, a runas_default setting in sudoers will specify the user to run the shell as but will not affect which shell is actually run.

[링크 : http://linux.die.net/man/8/sudo]


기본 sudoers 파일 내용
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults    env_reset

# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
 
[링크 : https://help.ubuntu.com/community/Sudoers]  

Posted by 구차니
Linux/Ubuntu2010. 2. 4. 17:24
우분투에서는 gnome 자동로그인을 지원한다.
설치중에 설정이 가능한데, 설정하지 않고 설치후에 변경하는 법은 다음과 같다.

Step 1. 로그인 화면을 실행한다.


Step 2. 로그인 화면 설정에서 "잠금 풀기"를 한다음 "자동으로 로그인" 에 유저를 선택한다.

'Linux > Ubuntu' 카테고리의 다른 글

tftp 설정경로  (0) 2010.02.05
sudo 사용가능하도록 설정하기  (0) 2010.02.04
ubuntu 9.10 에서 /dev/fb 만들기  (4) 2010.02.01
우분투에서 rpm 패키지 설치 2  (2) 2010.01.29
우분투에서 FC6에서 만든 LVM 마운트하기  (0) 2010.01.25
Posted by 구차니
Linux2010. 2. 4. 10:06
우분투에서는(Gnome)
/etc/hostname 파일을 수정하면 된다.
[링크 : http://servermaster.pe.kr/tt/24]

페도라에서는(Gnome)
/etc/sysconfig/network 파일을 수정하거나,
네트워크 설정의 DNS 탭에서 호스트명을 수정해주면 된다.


[링크 : http://www.superuser.co.kr/linux/hostname/page03.htm]
Posted by 구차니