LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-01-2005, 01:24 PM   #1
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
fluxbox and .xinitrc


I am currently running fluxbox under debian sarge, and i want to have a few things started when X starts. I have read the FAQ at fluxbox.org, so I know that I am supposed to use .xinitrc or .xsession - I have tried both.

I tried writing "xbindkeys" in .xinitrc, and I also tried writing "exec xbindkeys", it still did not work. So i tried the same with .xession - result: X refused to start.

I was hoping that someone here could help me out :-)
 
Old 01-01-2005, 01:41 PM   #2
mijenks
Member
 
Registered: Mar 2004
Location: NY
Distribution: Gentoo
Posts: 112

Rep: Reputation: 15
make sure all your commands are before 'exec fluxbox'

also, you don't use the exec commands. type them in the .xinitrc file just as you would on a commandline.

you'll want to add '&' after each command, too, so they run in the background and allow .xinitrc to finish out (i.e. allow it to reach 'exec fluxbox')
 
Old 01-01-2005, 01:56 PM   #3
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by mijenks
make sure all your commands are before 'exec fluxbox'
I didn't have an .xinitrc file until I wanted xbindkeys to start automaticly, so fluxbox gets executed from somewhere else.. I now tried with "xbindkeys &", which still did not work.
 
Old 01-01-2005, 02:29 PM   #4
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
Then the systemwide xinitrc is used. It's in /etc/X11. Copy it to ~/.xinitrc and then change it. So add the lines you want to it before the command that executes fluxbox.
 
Old 01-02-2005, 05:34 AM   #5
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by darkleaf
Then the systemwide xinitrc is used. It's in /etc/X11. Copy it to ~/.xinitrc and then change it. So add the lines you want to it before the command that executes fluxbox.
This is what I did:
cp /etc/X11/xinit/xinitrc /home/midget/
mv /home/midget/xinitrc /home/midget/.xinitrc
chown midget.midget .xinitrc

This is what I now have in .xinitrc
Code:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)

xbindkeys &
torsmo &
xmms &

# invoke global X session script
. /etc/X11/Xsession
xbindkeys, torsmo and xmms are all added by me. It still doesn't work, though. What am I doing wrong?
 
Old 01-02-2005, 07:36 AM   #6
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
What I thought was wrong I looked at mine which works. It should be like that.

I don't have that Xsession stuff in there. Mine looks like this:

Quote:
#!/bin/sh


xscreensaver -no-splash &
gkrellm &

/usr/bin/fluxbox
Do you need the xsession stuff?

Last edited by darkleaf; 01-02-2005 at 07:39 AM.
 
Old 01-02-2005, 10:29 AM   #7
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
I your .xinitrc owned by your user or root? I did "chown midget.midget .xinitrc" earlier.
I still does not work, though:

Code:
#!/bin/sh

xbindkeys &
xmms &

/usr/bin/fluxbox
 
Old 01-02-2005, 11:23 AM   #8
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by littlemidget
I your .xinitrc owned by your user or root? I did "chown midget.midget .xinitrc" earlier.
I still does not work, though:

Code:
#!/bin/sh

xbindkeys &
xmms &

/usr/bin/fluxbox
That looks as though it should work.

How are you executing the .xinitrc file? What I do is login in a console (runlevel 3, not graphic) and then
issue "startx" to start up X and whatever programs I want. I have done this with fluxbox just as you have
yours written here.

Do you have permission to run /usr/bin/fluxbox? That would be the next question that occurs to me.

By the way, you don't need an .xsession file unless you're using a session manager such as xsm--that's my understanding.
 
Old 01-02-2005, 11:25 AM   #9
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jonr
Do you have permission to run /usr/bin/fluxbox? That would be the next question that occurs to me.
I do have permission, so..
 
Old 01-02-2005, 11:33 AM   #10
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
Quote:
Originally posted by jonr

How are you executing the .xinitrc file? What I do is login in a console (runlevel 3, not graphic) and then
issue "startx" to start up X and whatever programs I want. I have done this with fluxbox just as you have
yours written here.
Try running

xinit

instead of

startx

It works fine with me. Never got used to startx. Now I just put stuff I need to my .xinitrc in my $HOME and run xinit
If it fails, there should be some error messages. Can you post them?

Enjoy
 
Old 01-02-2005, 11:41 AM   #11
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by lfur
Try running

xinit

instead of

startx

It works fine with me. Never got used to startx. Now I just put stuff I need to my .xinitrc in my $HOME and run xinit
If it fails, there should be some error messages. Can you post them?

Enjoy
When I boot, the debian-x-manager (xdm?) starts automaticly, so if I try xinit or startx, I get a message saying that the screen (or whatever) is in use. I do want to have xdm, so I don't have to log into console first, every time I boot..
 
Old 01-02-2005, 11:48 AM   #12
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by littlemidget
When I boot, the debian-x-manager (xdm?) starts automaticly, so if I try xinit or startx, I get a message saying that the screen (or whatever) is in use. I do want to have xdm, so I don't have to log into console first, every time I boot..
Ah! Then you DO need the .xsession file after all.

You might try just renaming your .xinitrc to .xsession to see if that works.

(I prefer having just the console come up for logging in, so that I can do routine things outside of X Window system
if I want to--and I often do. Just a preference.)
 
Old 01-02-2005, 11:55 AM   #13
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
As it seems from http://packages.debian.org/stable/vi...window-manager the debian x manager just creates a list of window managers you wish to run. If that's the way, you should define programs to run when wm starts in some sort of file that your wm uses - if I'm not wrong.

But than again, if you don't want to start in the console, you can always put xinit command at the end of your shell startup script (.bashrc, .bash_profile for BASH, .cshr for C Shell ...) so it starts every time you log in your system - of cours that means getting rid of debian x manager.

Enjoy
 
Old 01-02-2005, 12:08 PM   #14
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
I never could get xsm to work for me in MandrakeLinux. As for xdm, it comes up standard when you install Mandrake, but I don't like it because (1) when you log out, it wants to log you right back in, making it difficult to shut down the computer! (2) as mentioned earlier, I like having a bare console to work with before I actually start an X session, partly because I often become aware of some problem easier to solve outside of X than inside it, and that way I can take care of it before starting up X again. This is just a personal preference.

I think .xsession works along with xdm regardless of whether it's Debian or Mandrake. It can't hurt to try. You're not going to mess anything up unless you do something really bizarre in your experiments.

Good luck and please post further results.

(Edit) Oh, and if you try starting via ".xsession," don't forget the dot before "xsession" otherwise it won't "see" the so-called hidden file. And make sure you're either in your home directory when you start it up, or else use the full path to the file.


Last edited by jonr; 01-02-2005 at 12:09 PM.
 
Old 01-02-2005, 03:56 PM   #15
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jonr
Ah! Then you DO need the .xsession file after all.
You might try just renaming your .xinitrc to .xsession to see if that works.
It worked! :-)
Last time I tried it, X refused to start, but now it works just fine. Thanks :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fluxbox and .xinitrc Eterm, Esetroot at 1280*1024 res darkleaf Linux - Software 11 03-06-2005 05:55 AM
.xinitrc, fluxbox, startup programs jdier Linux - Newbie 4 08-26-2004 02:41 PM
.xinitrc fluxbox question Abe_the_Man Linux - General 13 06-28-2004 07:25 AM
.xinitrc/.xsession - Where are they? Fluxbox the_rydster Slackware 3 03-07-2004 01:45 PM
xinit / .xinitrc / xdm / fluxbox kater Slackware 0 02-28-2003 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration