PDA

Click to See Complete Forum and Search --> : .xinitrc


learning c
Jul 13th, 2007, 05:22 AM
where is the .xinitrc file so i can replace xdm with a desktop enviroment xdm? is there a findfile command to scan for files?

sunburnt
Jul 13th, 2007, 01:31 PM
.xinitrc is a user file, so it should be located in your home directory. If you don't have one, then the X server uses the default configuration file, usually /etc/X11/xinit/xinitrc.

If you want to make changes, you can copy that file to your ~/.xinitrc so that changes that will only effect you instead of the whole system.


With regards to finding files, GNOME/KDE have graphical file searches (click "search" from the gnome file browser!). If you're looking for command line tool, check out

locate (http://www.hmug.org/man/1/locate.php) which is fast but may not always find your item, or a command like:


$ find ~/ -name "*.txt"


Hope this helps.

wossname
Jul 13th, 2007, 02:28 PM
there are several ways to search for files.

Probably the one you'll find easiest to use is "locate". Chances are if you've not used locate so far then your database isn't fresh, so run updatedb (which will take a few minutes to catalogue your drive, but this is only a one-time thing) and then you can do locate .xinitrc to find the file you're after :)

Setup a cron job for 2 o'clock in the morning that updates your locate database every night so you can always use locate efficiently.

learning c
Jul 13th, 2007, 08:58 PM
ok well i have to go back a couple of steps to go forwards again :D

i wiped with DBAN and then installed a *nix os but then noticed erratic and unstable behaviour never seen prior to using DBAN. So is there another harddisk wiping util that you guys recommend?

tr333
Jul 14th, 2007, 11:14 AM
ok well i have to go back a couple of steps to go forwards again :D

i wiped with DBAN and then installed a *nix os but then noticed erratic and unstable behaviour never seen prior to using DBAN. So is there another harddisk wiping util that you guys recommend?

if you're running linux, you can just use the 'dd' (convert + copy) program. 'dd' was supposed to be called 'cc' but that name was already taken for the C compiler :)

$ dd if=/dev/zero of=/dev/hda

if you want random data instead of zeros, use /dev/random instead of /dev/zero. you might have to run this from a linux livecd (ubuntu, etc) to be able to write to the hdd.

if all else fails, and you want to completely trash the HDD (not likely :D ) you can try thermite (http://en.wikipedia.org/wiki/Thermite).

wossname
Jul 15th, 2007, 09:11 AM
(off-topic)

Nice article tr333, I didn't realise thermite was stable enough for use as anything other than a party trick. Nor did I realise that it was such an old idea. Fascinating. *eyebrow*

learning c
Jul 18th, 2007, 02:43 AM
ok got disk problems sorted... eventually.... didn't have to thermite it, although i prolly shoulda :D

from root i ran

find . -name ".xinitrc" -print



but it found nada??? read somin abt being it being a hidden or system file?

could be that i don't have one and have to make it? can i put in in root somewhere or does it need to be somewhere specific?

sunburnt
Jul 18th, 2007, 02:32 PM
could be that i don't have one and have to make it? can i put in in root somewhere or does it need to be somewhere specific?


.xinitrc is a user file, so it should be located in your home directory. If you don't have one, then the X server uses the default configuration file, usually /etc/X11/xinit/xinitrc.

If you want to make changes, you can copy that file to your ~/.xinitrc so that changes that will only effect you instead of the whole system.

On a unix system, any file which starts with a period is hidden. For example, typing "ls" will not show hidden files. To display hidden files, use "ls -a" to show all files.

learning c
Jul 18th, 2007, 06:28 PM
.xinitrc is a user file, so it should be located in your home directory. If you don't have one, then the X server uses the default configuration file, usually /etc/X11/xinit/xinitrc.

ok... don't have a /home dir.... and checked /etc... no X11 directory :ehh:

On a unix system, any file which starts with a period is hidden. For example, typing "ls" will not show hidden files. To display hidden files, use "ls -a" to show all files.

ok from root i tried this (the type d should find hidden files shouldn't it?)

find . -name ".xinitrc" - type d - print
but it didn't find the file

tr333
Jul 19th, 2007, 01:10 AM
ok... don't have a /home dir....
Are you sure about this? I don't know how you could log on to a linux system without a /home directory. You can check the "HOME" environment variable to see where your home directory is.

$> echo $HOME

CyberSurfer
Jul 19th, 2007, 05:03 AM
Using find with -type d will only look at directories :)

learning c
Jul 19th, 2007, 07:44 AM
Are you sure about this? I don't know how you could log on to a linux system without a /home directory. You can check the "HOME" environment variable to see where your home directory is.

$> echo $HOME

you mean the home dir stored in the .profile file in root... got it.... then just made my own .xinitrc file... works now :D

i still can't find hidden files though with find???? what's the switch?

CyberSurfer
Jul 20th, 2007, 09:27 AM
Using find -type f will search for plain text files, there's no special switch for hidden files. I've checked on several distros here and all can locate files beginning with a dot. Try running this command:


find / -type f -name ".xinitrc"